/* ---------------------------
   KHPG App (MVP) styles
   Calm, minimal, responsive.
---------------------------- */

.khpg-section {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
}

.khpg-muted { opacity: .7; }
.khpg-error { color: #a00; }
.khpg-more-link { margin-top: 10px; }

.khpg-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .khpg-grid-2 { grid-template-columns: 1fr 1fr; }
}

.khpg-card {
  padding: 12px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
}

.khpg-list { margin: 10px 0 0 18px; }

/* Generic tiles */
.khpg-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.khpg-tile {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  text-decoration: none;
}

.khpg-tile:hover { border-color: rgba(0,0,0,.25); }

/* Small pill */
.khpg-pill {
  display: inline-block;
  font-size: .75em;
  padding: 2px 8px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 999px;
  opacity: .8;
}

/* Articles tiles */
.khpg-tiles-articles {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* On mobile: show one row of 3 tiles */
@media (max-width: 600px) {
  .khpg-tiles-articles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.khpg-article { text-decoration: none; }

.khpg-article-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.khpg-article-meta {
  font-size: .85em;
  opacity: .7;
}

.khpg-article-title {
  font-weight: 600;
  margin-top: 8px;
}

.khpg-article-teaser {
  margin-top: 8px;
  opacity: .85;

  /* 3-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.khpg-article-more {
  margin-top: 10px;
  font-weight: 600;
  opacity: .8;
}

/* Schedule tiles */
.khpg-tiles-schedule {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* On mobile: show one row of 3 tiles */
@media (max-width: 600px) {
  .khpg-tiles-schedule {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.khpg-event-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.khpg-event-when {
  font-size: .9em;
  opacity: .75;
}

.khpg-event-title {
  font-weight: 600;
  margin-top: 8px;
}

.khpg-event-meta {
  margin-top: 6px;
  opacity: .75;
}

.khpg-event-notes {
  margin-top: 8px;
  opacity: .85;

  /* 3-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.khpg-event-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.khpg-btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  text-decoration: none;
  font-weight: 600;
  font-size: .95em;
}

.khpg-btn:hover {
  border-color: rgba(0,0,0,.28);
}

.khpg-btn-outline {
  opacity: .9;
}
