/* MedLab Kuwait 2026 - Custom CSS Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Hide scrollbar for clean carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Smooth theme transitions */
.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Glossy frosted glass header */
.header-glass {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.62) 100%
  );
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.dark .header-glass {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.72) 100%
  );
}

/* Compact inner-page title banner */
.page-title-banner {
  min-height: 0;
  line-height: normal;
  padding:50px 0 !important;
}

/* Full-bleed hero — natural image height, no crop */
.hero-banner {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background: #0f172a;
}

.hero-banner picture {
  display: block;
  width: 100%;
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center top;
}

/* Transparent overlay sitting on top of the hero image */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1rem 1rem;
  pointer-events: none;
  background: none;
  line-height: normal;
}

.hero-overlay-top {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  margin-top: 1.1rem;
  text-align: center;
  pointer-events: auto;
}

.hero-overlay-bottom {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  pointer-events: auto;
  line-height: normal;
}

.hero-info-panel {
  width: min(100%, 36rem);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1.35rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(240, 253, 250, 0.46) 40%,
    rgba(13, 148, 136, 0.14) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
}

.hero-patron-label {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0f766e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.hero-patron-name {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.75rem);
  font-weight: 900;
  line-height: 1.25;
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 10px rgba(255, 255, 255, 0.45);
}

.hero-patron-title {
  margin: 0.4rem 0 0.55rem;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  font-weight: 700;
  color: #115e59;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.hero-event-title {
  margin: 0.9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.14em;
  font-size: clamp(1.7rem, 3.9vw, 3.4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  word-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 14px rgba(255, 255, 255, 0.42);
}

.hero-event-title-line {
  display: block;
  color: #0f172a;
}

.hero-event-title-line-accent {
  color: #0f766e;
}

.hero-event-title-line-main {
  color: #0f172a;
  margin-top: 0.04em;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0;
  width: 100%;
}

.hero-meta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.15rem;
  padding: 0.65rem 0.4rem;
  border-radius: 1rem;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(240, 253, 250, 0.35) 45%,
    rgba(255, 255, 255, 0.22) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.hero-meta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-meta-icon {
  position: relative;
  z-index: 1;
  width: 0.95rem;
  height: 0.95rem;
  color: #0d9488;
  margin-bottom: 0.1rem;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.6));
}

.hero-meta-label {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f766e;
  line-height: 1.2;
}

.hero-meta-value {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.hero-countdown {
  margin-top: 1rem;
  width: 100%;
}

.hero-countdown[hidden] {
  display: none !important;
}

.hero-countdown-glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-countdown-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ccfbf1;
}

.hero-countdown-units {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
}

.hero-countdown-unit {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.45rem 0.3rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-countdown-unit span {
  display: block;
  font-size: clamp(1.05rem, 3.5vw, 1.55rem);
  font-weight: 900;
  line-height: 1.1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.hero-countdown-unit small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.hero-countdown-sep {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
  padding-bottom: 0.7rem;
}

@media (min-width: 480px) {
  .hero-overlay {
    padding: 2.35rem 1.15rem 1.15rem;
  }

  .hero-overlay-top {
    margin-top: 1.35rem;
  }

  .hero-patron-title {
    margin-bottom: 0.65rem;
  }

  .hero-event-title {
    margin-top: 1rem;
  }

  .hero-overlay-bottom {
    left: 1.15rem;
    right: 1.15rem;
    bottom: 1.15rem;
  }

  .hero-info-panel {
    padding: 1.05rem 1.1rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
  }

  .hero-event-title {
    margin-top: 0.75rem;
  }
}

/* The poster is 1920x1100, so on a desktop screen its bottom third - and the
   info panel pinned to it - fell below the fold. Cap the banner to what is left
   of the first screen under the 8rem sticky header; overflow:hidden trims the
   bottom of the image and the panel comes back into view. Phones are excluded:
   there the panel sits under the poster and the full artwork should show. */
@media (min-width: 640px) {
  .hero-banner {
    max-height: calc(100vh - 8rem);
    max-height: calc(100svh - 8rem);
  }
}

@media (min-width: 768px) {
  .hero-overlay {
    padding: 2.75rem 1.5rem 1.5rem;
  }

  .hero-overlay-top {
    max-width: 62rem;
    margin-top: 1.6rem;
  }

  .hero-patron-title {
    margin-bottom: 0.75rem;
  }

  .hero-event-title {
    margin-top: 1.15rem;
  }

  .hero-countdown-glass {
    flex-direction: row;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.85rem 1.25rem;
  }

  .hero-countdown-units {
    width: auto;
    gap: 0.5rem;
  }

  .hero-countdown-unit {
    min-width: 4.25rem;
    flex: none;
    padding: 0.45rem 0.65rem;
  }

  .hero-overlay-bottom {
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .hero-info-panel {
    width: min(100%, 38rem);
    margin-right: 0.45rem;
    margin-bottom: 0.45rem;
  }
}

@media (max-width: 639px) {
  .hero-event-title {
    font-size: clamp(1.45rem, 8.2vw, 2.15rem);
  }

  .hero-overlay {
    padding: 1.5rem 0.75rem 0.75rem;
  }

  .hero-banner {
    background: #f0fdfa;
  }

  .hero-overlay-bottom {
    position: static;
    padding: 0.85rem 0.75rem 1rem;
  }

  .hero-info-panel {
    width: min(100%, 100%);
    margin-right: 0;
    margin-bottom: 0;
    padding: 0.85rem 0.9rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .hero-countdown-glass {
    align-items: stretch;
  }

  .hero-countdown-units {
    flex-wrap: wrap;
  }

  .hero-countdown-sep {
    display: none;
  }
}

/* Objectives — timeline list (not card grid) */
.objectives-timeline {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.objectives-timeline::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, #0d9488 0%, #99f6e4 100%);
  opacity: 0.45;
}

.objectives-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0 0.85rem 0;
}

.objectives-item + .objectives-item {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.objectives-num {
  position: relative;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0f766e;
  background: #f0fdfa;
  border: 2px solid #14b8a6;
}

.dark .objectives-num {
  color: #99f6e4;
  background: #042f2e;
  border-color: #0d9488;
}

.objectives-text {
  margin: 0;
  padding-top: 0.2rem;
  font-size: 0.925rem;
  line-height: 1.65;
  color: #475569;
}

.dark .objectives-text {
  color: #cbd5e1;
}

/* Agenda page tabs & schedule */
.agenda-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.dark .agenda-tabs {
  background: #0f172a;
  border-color: #1e293b;
}

.agenda-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.agenda-tab-day {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

.agenda-tab-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}

.dark .agenda-tab-day {
  color: #f8fafc;
}

.dark .agenda-tab-date {
  color: #94a3b8;
}

.agenda-tab.is-active {
  background: #0d9488;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.25);
}

.agenda-tab.is-active .agenda-tab-day,
.agenda-tab.is-active .agenda-tab-date {
  color: #fff;
}

.agenda-panel {
  min-width: 0;
}

.agenda-theme {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  background: rgba(13, 148, 136, 0.2);
  border: 0px solid #99f6e4;
}

.dark .agenda-theme {
  background: rgba(4, 47, 46, 0.55);
  border-color: #115e59;
}

.agenda-theme-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 0.2rem;
}

.dark .agenda-theme-label {
  color: #5eead4;
}

.agenda-theme-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #134e4a;
  line-height: 1.35;
}

.dark .agenda-theme-title {
  color: #ccfbf1;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.agenda-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.dark .agenda-row {
  background: #0f172a;
  border-color: #1e293b;
}

.agenda-row-break {
  background: #f8fafc;
}

.dark .agenda-row-break {
  background: #111827;
}

.agenda-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0d9488;
  white-space: nowrap;
}

.agenda-item-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.dark .agenda-item-title {
  color: #f1f5f9;
}

.agenda-speaker {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  font-weight: 600 !important;
  color: #0d9488 !important;
  line-height: 1.45;
}

.dark .agenda-speaker {
  color: #e2e8f0;
}

.agenda-course {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #99f6e4;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.06);
}

.dark .agenda-course {
  background: rgba(4, 47, 46, 0.35);
  border-color: #115e59;
}

.agenda-course-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #0d9488;
}

.agenda-course-room {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
}

.dark .agenda-course-room {
  color: #99f6e4;
  background: #042f2e;
}

@media (min-width: 640px) {
  .agenda-tabs {
    gap: 0.65rem;
    padding: 0.4rem;
  }

  .agenda-tab {
    padding: 1rem 1.15rem;
  }

  .agenda-tab-day {
    font-size: 0.95rem;
  }

  .agenda-tab-date {
    font-size: 0.78rem;
  }

  .agenda-row {
    grid-template-columns: 9.5rem 1fr;
    align-items: start;
    gap: 1rem;
  }

  .agenda-time {
    font-size: 0.8rem;
    padding-top: 0.1rem;
  }

  .agenda-item-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 379px) {
  .agenda-tabs {
    grid-template-columns: 1fr;
  }
}

/* Committee members have no biography, so their popup drops that section and
   scales the photo and text up so the box keeps its size. IDs are used so these
   win over the Tailwind utilities on the same elements. */
#speaker-bio-modal.is-committee .bio-section {
  display: none;
}

#speaker-bio-modal.is-committee .bio-head {
  margin-bottom: 0;
}

#speaker-bio-modal.is-committee #bio-image {
  width: 9rem;
  height: 9rem;
}

#speaker-bio-modal.is-committee #bio-name {
  font-size: 1.375rem;
  line-height: 1.75rem;
  text-wrap: balance;
}

#speaker-bio-modal.is-committee #bio-title {
  font-size: 1rem;
  line-height: 1.5rem;
  margin-top: 0.5rem;
}

#speaker-bio-modal.is-committee #bio-country {
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

@media (min-width: 640px) {
  #speaker-bio-modal.is-committee .bio-head {
    min-height: 12.5rem;
    gap: 1.25rem;
    align-items: center;
  }

  #speaker-bio-modal.is-committee #bio-image {
    width: 11rem;
    height: 11rem;
  }
}

/* Speaker bios are the admin editor's HTML (see api/bio.php). Tailwind's reset strips
   list and paragraph styling, so it is restored here; blank lines the author typed come
   through as empty paragraphs and keep their spacing. */
#bio-text > * + * {
  margin-top: 0.5rem;
}

#bio-text ul {
  list-style: disc;
  padding-left: 1.25rem;
}

#bio-text ol {
  list-style: decimal;
  padding-left: 1.25rem;
}

#bio-text li + li {
  margin-top: 0.25rem;
}

#bio-text li::marker {
  color: #0d9488;
}

.dark #bio-text li::marker {
  color: #2dd4bf;
}

/* Modal animation */
.modal-backdrop {
  animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
