/* Inner pages — KITM */
.page-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-forest-mid) 70%, var(--green-lime-dark) 100%);
  color: #fff;
  overflow: hidden;
}

.page-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.06) 20px,
    rgba(255, 255, 255, 0.06) 21px
  );
  pointer-events: none;
}

.page-hero .breadcrumb {
  margin-bottom: 0.75rem;
}

.page-hero .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.85);
}

.page-hero .breadcrumb-item a:hover {
  color: var(--gold-light);
}

.page-hero .breadcrumb-item.active {
  color: var(--gold-light);
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
}

.section-pad-sm {
  padding: 2.5rem 0 4rem;
}

.inner-sidebar {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(12, 31, 61, 0.06);
}

.inner-sidebar-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.inner-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.inner-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.inner-sidebar-nav a:hover,
.inner-sidebar-nav a.active {
  background: #fff;
  color: var(--maroon);
}

.inner-sidebar-cta {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(12, 31, 61, 0.08);
  font-size: 0.85rem;
  font-weight: 600;
}

.inner-sidebar-cta .sidebar-logo {
  margin-bottom: 0.75rem;
}

.page-content h2 {
  font-family: var(--font-display);
  color: var(--indigo);
}

.programme-hero {
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
}

.programme-hero-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.info-callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(26, 107, 107, 0.08);
  border: 1px solid rgba(26, 107, 107, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}

.info-callout > .bi {
  font-size: 1.35rem;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.info-callout a {
  color: var(--maroon);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(12, 31, 61, 0.06);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .bi {
  color: var(--sage);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.page-content .accordion-button:not(.collapsed) {
  background: var(--cream);
  color: var(--indigo);
  font-weight: 700;
}

.page-content .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(122, 24, 50, 0.2);
}

.faq-answer p {
  margin-bottom: 1rem;
  line-height: 1.75;
  text-align: justify;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.faq-answer li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.kitm-faq-accordion .accordion-body {
  padding: 1.25rem 1.5rem;
}

.anti-ragging-img {
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26, 77, 46, 0.1);
}

.anti-ragging-content .content-block p {
  text-align: justify;
  line-height: 1.75;
}

.ceri-header-block {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.ceri-content .content-block p {
  text-align: justify;
  line-height: 1.75;
}

.ceri-carousel .carousel-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ceri-contact-table td {
  vertical-align: middle;
}

.placement-content .content-block p {
  text-align: justify;
  line-height: 1.75;
}

.placement-carousel .carousel-item img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.placement-student-card {
  text-align: center;
}

.placement-student-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26, 77, 46, 0.1);
}

.placement-student-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--green-forest);
  margin: 0.75rem 0 0;
  font-weight: 700;
}

.text-kitm-accent {
  color: var(--maroon);
  font-family: var(--font-display);
}

.placement-records-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .placement-records-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .placement-records-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.placement-record-item {
  margin: 0;
  overflow: hidden;
  border-radius: 0.35rem;
  box-shadow: var(--shadow-sm);
}

.placement-record-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.placement-record-item:hover img {
  transform: scale(1.03);
}

.activity-feature-img {
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26, 77, 46, 0.1);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.activity-gallery-section .content-block p,
.activity-gallery-section > .row > .col-lg-7 p {
  text-align: justify;
  line-height: 1.75;
}

.activity-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.activity-filter-btn {
  padding: 0.45rem 1.25rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--green-forest);
  background: var(--cream);
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.activity-filter-btn:hover,
.activity-filter-btn.active {
  background: var(--green-forest);
  color: #fff;
  border-color: var(--green-forest);
}

.content-lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.content-block {
  margin-bottom: 1.75rem;
}

.content-block p:last-child {
  margin-bottom: 0;
}

.content-figure {
  margin: 2rem 0 0;
}

.content-figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

.message-section-title {
  font-family: var(--font-display);
  color: var(--green-forest);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--green-lime);
  display: inline-block;
}

.message-divider {
  margin: 2.5rem 0;
  border: none;
  border-top: 2px solid var(--cream-dark);
  opacity: 1;
}

.chairman-photo-wrap {
  margin: 2rem auto;
  max-width: 520px;
  text-align: center;
}

.chairman-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 4px solid var(--gold);
  background: var(--cream);
}

.chairman-photo-wrap figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--maroon);
}

.chairman-message-body p {
  text-align: justify;
  line-height: 1.8;
  margin-bottom: 1.15rem;
}

/* Affiliation documents */
.affiliation-doc-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27, 67, 50, 0.08);
  background: #fff;
}

.affiliation-doc-thumb {
  display: block;
  position: relative;
  overflow: hidden;
}

.affiliation-doc-thumb img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.affiliation-doc-thumb:hover img {
  transform: scale(1.05);
}

.affiliation-doc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 67, 50, 0.55);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.affiliation-doc-thumb:hover .affiliation-doc-overlay,
.affiliation-doc-thumb:focus .affiliation-doc-overlay {
  opacity: 1;
}

.affiliation-doc-overlay .bi {
  font-size: 2rem;
}

.affiliation-pdf-block {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(27, 67, 50, 0.1);
}

.pdf-viewer-wrap {
  background: #525659;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}

.pdf-viewer-frame {
  width: 100%;
  height: min(70vh, 500px);
  border: none;
  display: block;
}

.affiliation-modal-img {
  max-height: 85vh;
  width: auto;
  margin: 0 auto;
}

/* Transportation */
.transport-hero-photo {
  margin: 0;
}

.transport-hero-photo img {
  width: 100%;
  box-shadow: var(--shadow);
  border: 3px solid var(--gold);
}

.transport-hero-photo figcaption {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--maroon);
  text-align: center;
}

.transport-connect-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--green-lime);
}

.transport-connect-card h3 {
  font-size: 1.05rem;
  color: var(--green-forest);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transport-connect-card h3 .bi {
  color: var(--maroon);
}

.transport-connect-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.transport-connect-card li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.transport-connect-card li .bi {
  color: var(--green-lime-dark);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.transport-gallery .gallery-photo img {
  min-height: 220px;
}

/* Programme fees & syllabus */
.kitm-fees-table {
  font-size: 0.9rem;
}

.kitm-fees-table thead th {
  background: var(--green-forest);
  color: #fff;
  font-size: 0.82rem;
  white-space: nowrap;
}

.kitm-fees-table td {
  vertical-align: middle;
}

.fees-summary-list {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.fees-summary-list li {
  margin-bottom: 0.35rem;
}

.fees-total {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 0;
}

.syllabus-pdf-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border: 2px dashed var(--maroon);
  border-radius: var(--radius);
  color: var(--green-forest);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.syllabus-pdf-card:hover {
  background: #fff;
  border-color: var(--gold);
  color: var(--maroon);
}

.syllabus-pdf-card .bi {
  font-size: 2.5rem;
  color: #dc3545;
}

.programme-detail .content-block h3 {
  font-family: var(--font-display);
  color: var(--green-forest);
  margin-bottom: 0.75rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.member-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid rgba(27, 67, 50, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.member-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-forest), var(--green-forest-mid));
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--indigo);
}

.member-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* Photo gallery — real <img> tiles */
.gallery-grid-photos,
.gallery-grid:has(.gallery-photo) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--cream);
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.1);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-photo:hover img {
  transform: scale(1.04);
}

.gallery-photo figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(0deg, rgba(27, 67, 50, 0.88), transparent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.gallery-photo-lg {
  grid-row: span 2;
}

.gallery-photo-lg img {
  min-height: 100%;
}

.gallery-photo-tall {
  grid-row: span 2;
}

.gallery-photo-wide {
  grid-column: span 2;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-grid-masonry {
  grid-auto-rows: 140px;
}

.gallery-item {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(27, 67, 50, 0.75), transparent 55%);
}

.gallery-item span {
  position: absolute;
  bottom: 0.65rem;
  left: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 1;
}

.gallery-item-lg {
  grid-row: span 2;
  min-height: 100%;
}

.gallery-item-tall {
  grid-row: span 2;
}

.gallery-item-wide {
  grid-column: span 2;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  background: #fff;
  border: 1px solid rgba(27, 67, 50, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--green-lime);
}

.news-card-featured {
  border-left-color: var(--maroon);
  background: linear-gradient(135deg, #fff 0%, var(--cream) 100%);
}

.news-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--indigo);
  margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
  .gallery-grid,
  .gallery-grid-photos,
  .gallery-grid:has(.gallery-photo) {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item-wide,
  .gallery-photo-wide {
    grid-column: span 2;
  }

  .gallery-photo-lg,
  .gallery-photo-tall {
    grid-row: span 1;
  }
}
