/* ============================================================
   CPT TEMPLATES (archive-noor_*.php / single-noor_*.php)
   ------------------------------------------------------------
   Styles specific to the Programs, Faculty and Events archives
   and single pages. Reuses the theme's design tokens only.
   Shared pieces (.cpt-hero, .page-content, .breadcrumb,
   .page-cta, .programs__grid, .faculty__grid, .events__list,
   .program/.teacher/.event cards) live in style.css.
============================================================ */

/* ---------- Empty / no-results state ---------- */
.cpt-empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cpt-empty h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--green-800);
  margin-bottom: 6px;
}
.cpt-empty p { color: var(--muted); margin: 0; }

/* ---------- Archive section title (events "Recent Events") ---------- */
.events-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-800);
  margin: 2.5rem 0 1.25rem;
}

/* ---------- Program archive cards ---------- */
.program-card--archive > .program-card__thumb {
  display: block;
  margin: -32px -26px 18px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.program-card--archive > .program-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.program-card--archive .entry-title a { color: var(--green-800); }
.program-card--archive .entry-title a:hover { color: var(--green-600); }

.program-card__link,
.faculty-card__link,
.event-card__link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--green-700);
  transition: color .2s ease;
}
.program-card__link:hover,
.faculty-card__link:hover,
.event-card__link:hover { color: var(--gold-deep); }

/* ---------- Faculty archive cards ---------- */
.faculty-card--archive .teacher__avatar { overflow: hidden; }
.faculty-card--archive .teacher__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.faculty-card--archive .entry-title a { color: var(--green-800); }
.faculty-card--archive .entry-title a:hover { color: var(--green-600); }

/* ---------- Event date badge ---------- */
.event-date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 92px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--green-800), var(--green-700));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.event-date__month {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.event-date__day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}
.event-date__year {
  font-size: .72rem;
  color: var(--gold-light);
  opacity: .85;
}
.event-date--large {
  min-width: 110px;
  padding: 18px 22px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-lg);
}
.event-date--large .event-date__day { font-size: 2.6rem; }

/* ---------- Event archive cards ---------- */
.event-card--archive .entry-title a { color: var(--green-800); }
.event-card--archive .entry-title a:hover { color: var(--green-600); }
.event-card--archive .event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-size: .84rem;
  color: var(--muted);
}

/* ---------- Single layouts: shared head ---------- */
.program-detail__head,
.faculty-profile__head,
.event-single__head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.program-detail__head .entry-title,
.faculty-profile__head .entry-title,
.event-single__head .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--green-900);
  margin-bottom: 6px;
}
.event-single__head .event__tag { margin-top: 4px; }

/* Program detail */
.program-detail__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
}
.program-detail__lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--ink);
}
.program-detail__thumb,
.event-single__thumb {
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.program-detail__thumb img,
.event-single__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   EVENT GALLERY (slideshow — fixed-height viewport, mixed dims)
   ============================================================ */
.event-gallery {
  margin: 2.5rem 0 1rem;
}
.event-gallery__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-800);
  margin-bottom: 1rem;
  text-align: center;
}

/* The slideshow root. */
.event-slideshow {
  /* max-width: 960px; */
  margin: 0 auto;
}

/* Viewport holds the track and the prev/next buttons. The height is
   FIXED so that smaller images never resize the container — every
   slide occupies the same space regardless of its dimensions.
   Background: the theme's signature deep-emerald gradient with a soft
   gold glow (matches the page heroes / admissions panel), so the area
   around contained images feels branded instead of a black box. */
.event-slideshow__viewport {
  position: relative;
  height: 520px;                 /* fixed height — never resizes */
  background:
    radial-gradient(700px 340px at 85% -10%, rgba(201,162,75,.20), transparent 60%),
    radial-gradient(560px 280px at 0% 110%, rgba(31,107,74,.38), transparent 55%),
    linear-gradient(160deg, var(--green-900, #062b21) 0%, var(--green-800, #0B3D2E) 55%, var(--green-950, #052017) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(224,196,121,.35);
  box-shadow: var(--shadow-lg);
}

/* Track is a flex row; we translate it to show the active slide. */
.event-slideshow__track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

/* Each slide fills the viewport exactly. Transparent so the viewport's
   emerald gradient shows through around contained images. */
.event-slideshow__slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: transparent;
}
.event-slideshow__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
}
/* object-fit: contain keeps the whole image visible without cropping,
   while the fixed viewport height guarantees the layout never jumps. */
.event-slideshow__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Prev / Next nav buttons. */
.event-slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--green-800, #1f5c3d);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
  z-index: 2;
}
.event-slideshow__nav:hover,
.event-slideshow__nav:focus-visible {
  background: linear-gradient(180deg, var(--gold-light, #E0C479), var(--gold, #C9A24B));
  color: var(--green-950, #052017);
  transform: translateY(-50%) scale(1.08);
  outline: none;
}
.event-slideshow__nav--prev { left: 12px; }
.event-slideshow__nav--next { right: 12px; }
.event-slideshow__nav:disabled {
  opacity: .35;
  cursor: default;
}

/* Footer: counter + dots. */
.event-slideshow__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}
.event-slideshow__counter {
  font-size: .9rem;
  color: var(--green-800, #1f5c3d);
  font-variant-numeric: tabular-nums;
}
.event-slideshow__dots {
  display: flex;
  gap: 8px;
}
.event-slideshow__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 92, 61, .25);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.event-slideshow__dot:hover { background: rgba(201,162,75,.55); }
.event-slideshow__dot.is-active {
  background: var(--gold, #C9A24B);
  transform: scale(1.15);
}

/* Smaller fixed height on tablets/phones, but still FIXED. */
@media (max-width: 860px) {
  .event-slideshow__viewport { height: 420px; }
}
@media (max-width: 560px) {
  .event-slideshow__viewport { height: 320px; }
  .event-slideshow__nav { width: 38px; height: 38px; }
}

/* RTL: swap prev/next button positions. */
[dir="rtl"] .event-slideshow__nav--prev { left: auto; right: 12px; }
[dir="rtl"] .event-slideshow__nav--next { right: auto; left: 12px; }

/* Faculty profile */
.faculty-profile__avatar {
  width: 120px;
  height: 120px;
  font-size: 2.2rem;
  margin-bottom: 18px;
  overflow: hidden;
}
.faculty-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.faculty-profile__head .arabic {
  display: block;
  font-size: 1.05rem;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.faculty-profile__role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-deep);
}
.faculty-profile__bio {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Event details grid */
.event-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}
.event-details-grid__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.event-details-grid__label {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 4px;
}
.event-details-grid__value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green-800);
}

/* ---------- Long-form body blocks ---------- */
.program-detail__body,
.faculty-profile__body,
.event-single__content {
  /* max-width: 780px; */
  margin: 0;
}
.program-detail__body h2,
.faculty-profile__body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-800);
}
.program-detail__body ul,
.faculty-profile__body ul,
.event-single__content ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 1.2rem;
}
.program-detail__body li,
.faculty-profile__body li,
.event-single__content li {
  margin-bottom: 6px;
  color: var(--ink-soft);
}

/* ---------- Related / other posts ---------- */
.related-posts {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.related-posts h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-800);
  margin-bottom: 1.25rem;
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-posts__card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.related-posts__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--sand-deep);
}
.related-posts__thumb {
  display: block;
  margin: -18px -20px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.related-posts__thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.related-posts__card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--green-800);
  margin-bottom: 4px;
}
.related-posts__card h3:hover { color: var(--green-600); }
.related-posts__card p {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
}
.related-posts__card .event-date {
  flex-direction: row;
  gap: 8px;
  min-width: 0;
  padding: 6px 12px;
  margin-bottom: 12px;
  box-shadow: none;
  align-self: flex-start;
}
.related-posts__card .event-date__month { font-size: .7rem; }
.related-posts__card .event-date__day { font-size: 1.05rem; }
.related-posts__card .event-date__year { display: none; }

/* ---------- Pagination (archives) ---------- */
.cpt-pagination {
  margin-top: 3rem;
}
.cpt-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.cpt-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--green-800);
  font-weight: 600;
  font-size: .95rem;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.cpt-pagination a.page-numbers:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-2px);
}
.cpt-pagination .page-numbers.current {
  background: linear-gradient(180deg, var(--green-800), var(--green-700));
  border-color: transparent;
  color: #fff;
}

/* ---------- Prev/next navigation (singles) ---------- */
.noor-post-navigation {
  margin-top: 3rem;
}
.noor-post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.noor-post-navigation .nav-previous,
.noor-post-navigation .nav-next {
  flex: 1;
  min-width: 0;
}
.noor-post-navigation .nav-next { text-align: right; }
.noor-post-navigation a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-700);
  font-weight: 600;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.noor-post-navigation a:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .related-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .event-details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .related-posts__grid { grid-template-columns: 1fr; }
  .noor-post-navigation .nav-links { flex-direction: column; }
  .noor-post-navigation .nav-next { text-align: left; }
  .event-card--archive { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ============================================================
   CAREERS
============================================================ */
/* Section titles — "Current Openings" / "Earlier Openings" */
.careers-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-800);
  margin: 2.5rem 0 1.25rem;
}
.careers-section-title--muted { color: var(--muted); }
.careers-section-note {
  color: var(--muted);
  font-size: .95rem;
  margin: -0.5rem 0 1.5rem;
}

/* Current openings — card grid */
.careers__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.career-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.career-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--sand-deep);
}
.career-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.career-card__head .entry-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
}
.career-card__head .entry-title a { color: var(--green-800); }
.career-card__head .entry-title a:hover { color: var(--green-600); }

/* Status badge — reused on archive + single */
.career-card__badge {
  flex: none;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.career-card__badge--open {
  background: rgba(31, 92, 61, .12);
  color: var(--green-800);
}
.career-card__badge--expired {
  background: rgba(120, 120, 120, .15);
  color: var(--muted);
}

/* Meta row: department · location · type */
.career-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 10px;
  font-size: .85rem;
  color: var(--gold-deep);
  font-weight: 600;
}
.career-card__meta-item:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: var(--line);
}
.career-card__desc {
  font-size: .94rem;
  color: var(--muted);
  margin: 0 0 14px;
  flex: 1;
}
.career-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.career-card__deadline {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600;
}
.career-card__link {
  font-weight: 600;
  font-size: .92rem;
  color: var(--green-700);
  transition: color .2s ease;
}
.career-card__link:hover { color: var(--green-600); }

/* Earlier openings — compact tile list */
.careers__past {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.career-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.career-tile:hover {
  transform: translateY(-2px);
  border-color: var(--sand-deep);
  box-shadow: var(--shadow-md);
}
.career-tile__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-800);
  font-size: 1rem;
}
.career-tile__meta {
  font-size: .85rem;
  color: var(--muted);
  flex: 1;
  min-width: 120px;
}
.career-tile__closed {
  flex: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(120, 120, 120, .15);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Single career ---------- */
.career-single__head {
  text-align: center;
  margin-bottom: 2rem;
}
.career-single__head .career-card__badge {
  display: inline-block;
  margin-bottom: 12px;
}
.career-single__head .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--green-800);
  margin: 0;
}
.career-single__apply {
  max-width: 780px;
  margin: 2rem auto 0;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(11, 61, 46, .04), rgba(201, 162, 75, .06));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.career-single__apply h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--green-800);
  margin-bottom: 10px;
}
.career-single__apply p {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}
.career-single__apply--closed {
  background: #fff;
}
.career-single__apply--closed p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Careers responsive ---------- */
@media (max-width: 860px) {
  .careers__list { grid-template-columns: 1fr; }
  .careers__past { grid-template-columns: 1fr; }
}

/* ---------- Admin status column badges ---------- */
.noor-career-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.noor-career-status--open {
  background: rgba(31, 92, 61, .12);
  color: #1f5c3d;
}
.noor-career-status--expired {
  background: rgba(120, 120, 120, .18);
  color: #555;
}

/* ============================================================
   ANNOUNCEMENTS (archive rows + single)
   ============================================================ */

/* ---------- Archive: tile list (career-tile style) ---------- */
.announcements__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.announcement-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.announcement-tile:hover,
.announcement-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--sand-deep);
  box-shadow: var(--shadow-md);
  outline: none;
}
.announcement-tile__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-800);
  font-size: 1rem;
  line-height: 1.4;
}
/* Date pill — same look as .career-tile__closed, pushed right by the
   title's flex: 1. */
.announcement-tile__date {
  flex: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(120, 120, 120, .15);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Single announcement ---------- */
.announcement-single__head {
  text-align: center;
  margin-bottom: 2rem;
}
.announcement-single__date {
  font-size: .88rem;
  color: var(--muted);
  margin: 0 0 10px;
  letter-spacing: .02em;
}
.announcement-single__head .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--green-800);
  margin: 0;
}
.announcement-single__excerpt {
  max-width: 780px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

/* ---------- Announcements responsive ---------- */
@media (max-width: 640px) {
  .announcement-tile {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}