/* ==========================================================================
   TEAL HERO HEADER STYLING
   ========================================================================== */
.hero-section {
  background-color: #00A7A0 !important; 
  padding: 40px 0; /* Restores 40px of top padding so archive elements aren't crushed */
  text-align: center;
  width: 100%;
  overflow: hidden;
}

/* Keeps the index page visual graphic perfectly flush against the navbar by removing the section's padding */
.hero-banner-graphic {
  width: 100vw;       
  max-width: 100%;    
  height: auto;       
  display: block;     
  margin: -40px auto 32px auto; /* Negative margin pulls the top edge flush up over the section padding */
  border-radius: 0;   
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hero-title {
  font-size: 42px;
  font-weight: 900; 
  color: #ffffff; /* Updated to white so your heading pops instantly */
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: #f0f5f3; /* Changed to a soft cream tone for better visual hierarchy */
  font-weight: 600;
  max-width: 750px;
  margin: 0 auto 32px auto;
}
.edition-tag {
  color: #ffffff !important;
  background-color: var(--accent-orange) !important; 
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
}

.meta-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  background-color: var(--accent-blue-light); 
  border: 1px solid rgba(0, 61, 124, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
}

.badge-text {
  font-size: 14px;
  color: var(--accent-blue); 
  font-weight: 700;
}

.register-btn-large {
  background-color: var(--accent-blue);
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 61, 124, 0.25);
  transition: var(--transition);
}

.register-btn-large:hover {
  background-color: #002b57;
  transform: translateY(-1px);
}
/* ==========================================================================
   UNIFIED SINGLE COLUMN ENGINE
   ========================================================================== */
.main-content {
  padding: 48px 0;
  background-color: #f4f3f0;
}

.single-column-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.content-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 32px;
  border: none; /* Changed from 1px solid #e9e6df to remove the outer box line */
  width: 100%;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue); 
  margin-bottom: 16px;
  border-bottom: 3px solid #f4f1ea;
  padding-bottom: 8px;
}

.body-text {
  font-size: 15px;
  line-height: 1.6;
  color: #354f52;
}

.gala-box {
  background-color: var(--accent-orange-light);
  border-left: 4px solid var(--accent-orange);
  padding: 20px;
  margin-top: 24px;
  border-radius: 0 8px 8px 0;
}

.gala-title {
  font-size: 16px;
  font-weight: 800;
  color: #5c3000;
}

.gala-subtitle {
  font-size: 14px;
  color: var(--accent-orange);
  font-weight: 700;
  margin: 4px 0 8px 0;
}

.body-text-muted {
  font-size: 14px;
  color: #5c4738;
}

/* ==========================================================================
   HORIZONTAL SPEAKER TILES GRID & JUSTIFIED TYPOGRAPHY ENGINE
   ========================================================================== */
.speaker-segment-heading {
  font-size: 15px;
  color: #2c4c38; /* Balanced corporate green track heading */
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.speakers-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.speaker-card {
  background-color: #ffffff; 
  border: 1px solid #eeebe3;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.speaker-layout-wrapper {
  display: flex;
  align-items: center;
  gap: 20px; 
  margin-bottom: 14px;
}

.speaker-avatar-placeholder {
  width: 80px;         
  height: 80px;        
  border-radius: 50%;
  border: 2px solid var(--accent-blue-light);
  object-fit: cover;
  flex-shrink: 0;      
}

.speaker-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: flex-start;
  gap: 12px;           
}

.speaker-name {
  font-size: 18px;
  font-weight: 700;
  color: #112211;
}

.speaker-title {
  font-size: 13px;
  color: #526355;
}

.role-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;      
}

/* Unified styling for all role tags */
.tag-earth, 
.tag-green-deep { 
  background-color: var(--accent-blue-light); 
  color: var(--accent-blue); 
}

.speaker-bio {
  font-size: 13.5px;
  color: #354f52;
  line-height: 1.6;
  
  /* HIGH-END ALIGNMENT ENGINE: Perfectly flush margins without awkward gaps */
  text-align: justify !important;
  text-justify: inter-word !important; 
}

/* FIXED: Targets the second timeline block (Evening Programme) and breaks Bernard Tan onto his own row */
.speaker-timeline-segment:nth-of-type(2) .speakers-grid-layout .speaker-card:first-child {
  grid-column: 1 / -1 !important;
}

/* ==========================================================================
   RESPONSIVE LAYOUT OVERRIDES (SPEAKERS TRICK)
   ========================================================================== */
@media (max-width: 768px) {
  /* Collapses grid into a clean single column view on tablet / mobile devices */
  .speakers-grid-layout { 
    grid-template-columns: 1fr; 
  }
  
  .speaker-layout-wrapper {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 12px;
  }

  .speaker-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    text-align: left !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .speaker-info {
    flex: 1;
    min-width: 120px; 
  }

  .speaker-bio {
    font-size: 13px; 
    line-height: 1.5;
    text-align: justify !important; /* Retains nice crisp edges on small devices */
  }
}
/* ==========================================================================
   AGENDA CHRONOLOGICAL TIMELINE (UNIVERSAL STABLE PLATFORM)
   ========================================================================== */
.agenda-timeline-segment {
  padding-left: 0; 
  padding-right: 0;
  margin-top: 32px;
}

.agenda-segment-heading {
  font-size: 15px;
  color: #2c4c38; 
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding-left: 0; 
}

.agenda-timeline {
  position: relative;
  padding-left: 40px; /* Leaves exactly 40px of space on the left */
  display: flex;
  flex-direction: column;
  gap: 16px; 
}

/* The vertical connecting track line - LOCKED AT EXACTLY 12px FROM THE LEFT EDGE */
.agenda-timeline::before {
  content: '';
  position: absolute;
  top: 26.5px;    /* Starts precisely at the vertical center of the first row's dot */
  bottom: 26.5px; /* Ends precisely at the vertical center of the last row's dot */
  left: 12px;  
  width: 2px;
  background-color: #e9e6df; 
}

/* Individual timeline event block panel */
.agenda-row {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 20px; 
  background-color: #faf9f6; 
  border-radius: 8px;
  border: 1px solid #eeebe3;
}

/* Geometric circular node markers - SOLIDLY ROOTED TO MATCH THE LINE AT 12px */
.agenda-row::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -33px; /* Positions the dot center perfectly on top of the 12px desktop line */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-orange); 
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px var(--accent-orange);
  z-index: 2;
  transform: translateY(-50%); /* Keeps it completely centered vertically */
}

.time-block {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-blue); 
  letter-spacing: 0.5px;
  display: flex;
  align-items: center; 
}

.agenda-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agenda-event-title {
  font-size: 15px;
  font-weight: 700;
  color: #112211; 
  line-height: 1.4;
}

.agenda-speaker {
  font-size: 13px;
  color: #55665a; 
  font-weight: 500;
}

/* MOBILE RESPONSIVE LAYOUT ENGINE */
@media (max-width: 576px) {
  .agenda-timeline {
    padding-left: 40px !important; /* Retain exactly 40px of layout padding on mobile devices */
  }

  .agenda-timeline::before {
    left: 12px !important; /* Retain exactly 12px of line layout coordinate spacing */
    top: 32px !important;    /* Safely anchors to the middle of the first mobile row */
    bottom: 32px !important; /* Safely anchors to the middle of the last mobile row */
  }

  .agenda-row {
    display: block !important; 
    grid-template-columns: none !important;
    padding: 14px 16px !important;
  }

  /* KEEPS DOTS HARD-ALIGNED WITH THE LINE ON SMARTPHONES */
  .agenda-row::after {
    top: 50% !important;
    left: -33px !important; /* Uses the identical horizontal pixel coordinate mapping as laptops */
    transform: translateY(-50%) !important; 
  }

  .time-block {
    font-size: 13px !important;
    display: block !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
  }
}
/* ==========================================================================
   PAST EVENTS SPECIFIC LAYOUT MECHANICS (PAST-EVENTS PAGE FIXED WRAPPERS)
   ========================================================================== */
.events-single-column-stack {
  display: flex;
  flex-direction: column;
  gap: 32px; /* Increased padding gap for healthier layout breathing room */
  width: 100%;
}

.event-poster-row-card {
  background-color: #ffffff;
  border: 1px solid #e9e6df;
  border-radius: 12px;
  display: flex;
  gap: 32px;
  padding: 32px;
  min-width: 0;
  align-items: flex-start; /* Keeps the A4 poster top-aligned when body rows expand */
}

.poster-frame-container {
  width: 180px; /* Slight scaling bump to beautifully balance the layout weight */
  flex-shrink: 0;
}

.event-poster-a4 {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.event-history-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1;
  min-width: 0;
}

/* HIGH-VISIBILITY HEADING CONTAINER: Houses the standalone badges */
.event-history-body h4.event-year-tag {
  display: flex;
  align-items: center; /* Locks the badge and year digits onto a perfect horizontal baseline */
  flex-wrap: wrap;
  gap: 10px; /* Clean spacing between the orange box and the trailing year */
  margin: 0 0 16px 0;
  font-size: 16px; /* Reduced to balance beautifully alongside the small badge scale */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-blue); /* Updated to clean corporate NUS Blue to ground the card layout */
  line-height: 1;
}

/* BOX BADGE UPGRADE: Completely matches the look, size, and weight of your header's .edition-tag */
.event-history-body h4.event-year-tag .orange-lecture {
  color: #ffffff !important; /* Crisp white text inside the box */
  background-color: var(--accent-orange) !important; /* Full branding orange box background */
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px; /* Retains the signature small badge premium typography scale */
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* LECTURE DESCRIPTION PARAGRAPH: Spreads text edge-to-edge for premium alignment */
.event-history-desc {
  font-size: 15px;
  line-height: 1.65;
  color: #354f52;
  margin-bottom: 24px;
  text-align: justify; /* Justified Alignment */
}

/* VISUAL ANCHOR CONTAINER: Clean background block grounding speaker profiles */
.poster-meta-directory {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #faf9f6; /* Premium light sand paper texture tint */
  border: 1px solid #eeebe3;
  border-top: 3px solid var(--primary-teal); /* Micro brand colorway indicator strip */
  border-radius: 8px;
  padding: 20px;
}

.meta-dir-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #526355;
  letter-spacing: 0.5px;
}

.dir-value, .dir-valueName {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-blue);
}

.title-value {
  color: var(--accent-blue) !important;
}

.meta-people-row {
  display: flex;
  gap: 32px;
  border-top: 1px dashed #e9e6df;
  padding-top: 16px;
}

.person-item {
  flex: 1;
  min-width: 0;
}

.person-profile-badge {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
}

.dir-avatar {
  width: 72px;         
  height: 72px;        
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e9e6df;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.person-meta-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* SPEAKER AND MODERATOR DESCRIPTION: Reverted to crisp left-alignment for elite legibility */
.dir-valueDesc {
  font-size: 12px;
  line-height: 1.45;
  color: #2f3e46;
  text-align: left; /* Left alignment handles <br> breaks gracefully */
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS (FINAL INDEX CARD FIX)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hero section typography optimization */
  .hero-title {
    font-size: 32px;
    padding: 0 12px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    padding: 0 16px;
  }

  .meta-badges {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* Padding adjustment for smaller viewports */
  .content-card {
    padding: 20px;
  }

  /* Speaker layouts transform smoothly into stacked columns */
  .speakers-grid-layout { 
    grid-template-columns: 1fr; 
  }
  
  .speaker-layout-wrapper {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 12px;
  }

  /* ALLOWS TEXT AND ROLE TAGS TO DROP DOWN SAFELY IN THE WRAPPER */
  .speaker-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    text-align: left !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .speaker-info {
    flex: 1;
    min-width: 120px; 
  }

  /* FIXED MOBILE SAFETY OVERRIDE: Removed .speaker-bio from the left-align rule */
  .speaker-info,
  .event-history-body,
  .event-history-desc,
  .dir-valueDesc,
  .person-meta-details {
    text-align: left !important; 
  }

  /* CRITICAL: Enforces clean edge-to-edge justification on small smartphone layouts */
  .speaker-bio {
    font-size: 13px !important; 
    line-height: 1.55 !important;
    text-align: justify !important; 
    text-justify: inter-word !important;
  }

  /* Past events structural cards split beautifully into a clean stacked list block */
  .event-poster-row-card { 
    flex-direction: column; 
    gap: 24px; 
    align-items: flex-start;
    text-align: left;
    padding: 24px;
  }
  
  .poster-frame-container { 
    width: 140px; 
    align-self: center; /* Center handles the poster individually for perfect layout balance */
  }
  
  .meta-people-row { 
    flex-direction: column; 
    gap: 20px; 
  }
}

@media (max-width: 576px) {
  .agenda-timeline {
    padding-left: 20px; 
  }
  
  .agenda-timeline::before {
    left: 4px;
  }
  
  .agenda-row {
    grid-template-columns: 1fr; 
    gap: 4px;
    padding-bottom: 20px;
  }
  
  .agenda-row::after {
    top: 5px;
    left: -20px; 
  }
  
  .time-block {
    font-size: 13px;
    margin-bottom: 2px;
  }
}
/* ==========================================================================
   LIGHTBOX POP-OUT MODAL CLASS ENGINE
   ========================================================================== */
.lightbox-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
  margin: auto;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: visible; /* Prevents clipping the fixed close button */
}

.lightbox-scroll-wrapper {
  max-height: 90vh;
  overflow-y: auto; /* Activates pure vertical scroll tracks */
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  background-color: #ffffff; /* Clean canvas backing behind high-res text details */
}

.lightbox-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}

.lightbox-close-btn {
  position: fixed; /* Locks securely onto viewport canvas coordinates */
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999; /* Forces close button to layer on top of everything */
  transition: var(--transition);
}

.lightbox-close-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

.lightbox-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 85vh; /* Standard safe sizing limit for small phone screens */
}

/* ==========================================================================
   LAPTOP & DESKTOP MAX-ZOOM SCROLL CONFIGURATIONS
   ========================================================================== */
@media (min-width: 1024px) {
  .lightbox-modal {
    max-width: 85vw; /* Allocates generous widescreen margin spacing */
  }

  .lightbox-scroll-wrapper {
    max-height: 88vh; /* Keeps a slim layout border framing the display */
  }

  .lightbox-img {
    max-height: none; /* Destroys screen height ceilings entirely */
    max-width: 900px; /* Forces large high-density reading dimensions */
  }
}

/* Backdrop Dimming Engine */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}

dialog[open] {
  animation: fadeInModal 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}