/* styles.css - Shared styles across all pages */
:root {
  /* Colors - from homepage (index.css) as source of truth */
  --haiti-red: #d21034;
  --haiti-blue: #002a9f;
  --haiti-white: #FFFFFF;
  --dark-text: #0b111e;
  --tag-border: #8a8a8a;

  /* Layout */
  --sticky-bottom-height: 299px;
  --mobile-break: 600px;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background: #ffffff;
  min-height: 100vh;
  position: relative;
  font-family: 'DM Sans', sans-serif;
  color: #000000;
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.overlay {
  display: none;
  /* Hide overlay - no longer needed with white background */
}

/* Container - shared across all pages */
.container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
  text-align: left;
}

/* Mobile container adjustments */
@media (max-width: 600px) {
  .container {
    padding: 2rem 1rem;
  }
}

body>.events-container,
body>.container {
  padding-bottom: 4rem;
  /* Space for footer */
}

/* --------------------------------------------------------------------------
   NAVIGATION (shared across all pages) - Navigation Bar-blue
   -------------------------------------------------------------------------- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--haiti-blue);
  /* Blue background from Figma Navigation Bar-blue */
  padding: 0.75rem 4.5rem;
  /* Match Figma padding: 72px = 4.5rem */
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle separation line */
  max-width: 100%;
  overflow: visible;
  /* Ensure dropdown is not clipped */
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex: 1;
  text-transform: uppercase;
}

.nav-left>a:not(.logo-link) {
  white-space: nowrap;
}

.logo-link {
  display: block;
  text-decoration: none;
}

.logo-link:hover .logomark {
  opacity: 0.8;
}

.logomark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

/* Nav brand text (ON THIS DAY) - styled to match logo */
.nav-brand {
  font-weight: 600;
  margin-left: 0.75rem;
}

.flag-icon {
  width: 24px;
  height: 18px;
  object-fit: contain;
}

.site-nav a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--haiti-white);
  /* White text on blue background */
  text-decoration: none;
  transition: opacity 0.2s ease;
  font-size: 0.95rem;
  /* Uppercase nav links per Figma */
  letter-spacing: 0.05em;
}

.site-nav a:hover,
.site-nav a:focus {
  opacity: 0.8;
  /* Subtle hover effect on white text */
  text-decoration: underline;
  /* Underline on hover for better visibility */
}

/* Active nav link styling */
.site-nav a.active {
  text-decoration: underline;
}

.nav-right {
  display: flex;
  align-items: center;
  overflow: visible;
  /* Ensure dropdown is not clipped */
  position: relative;
  /* Create stacking context for dropdown */
}

.search-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.5rem;
  text-transform: none;
}

/* Language selector */
.language-selector {
  position: relative;
  display: flex;
  padding: 8px;
  align-items: center;
  gap: 8px;
  z-index: 10001;
  /* Higher than nav to ensure dropdown appears above everything */
}

.language-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  gap: 0.5rem;
}

.language-toggle:hover {
  opacity: 0.8;
}

.language-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.chevron-down-icon {
  width: 12px;
  height: 12px;
  display: block;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--popover, #FFF);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  min-width: 120px;
  display: none;
  flex-direction: column;
  z-index: 10000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.language-selector.active .language-dropdown {
  display: flex;
}

.language-option {
  background: transparent;
  border: none;
  color: var(--Secondary-Noir, #0B111E);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  text-transform: none;
  letter-spacing: normal;
}

.language-option:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.language-option:last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.language-option:hover {
  background: var(--Neutral-Light-Grey, #EEE);
}

/* MOBILE NAV TWEAKS */
@media (max-width: 900px) {
  .site-nav {
    padding: 0.75rem 1rem;
  }

  .nav-left {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .site-nav a {
    font-size: 0.85rem;
  }

  .search-link {
    margin-right: 1rem;
  }

  .language-icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 600px) {
  .site-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
  }

  .nav-left {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .nav-right {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  .search-link {
    margin-right: 0;
  }

  .language-icon {
    width: 18px;
    height: 18px;
}

  /* Ensure text doesn't get squeezed on mobile */
  .container {
    padding: 2rem 1rem;
  }
  
  /* Prevent horizontal scrolling */
  body {
    overflow-x: hidden;
  }
  
  /* Ensure all text containers use full width on mobile */
  .container p,
  .container h2,
  .container h3 {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Ensure paragraphs have proper spacing and don't get squeezed */
  p {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Fix text containers that might have fixed widths */
  .container,
  .container > *,
  article,
  section {
    max-width: 100%;
  box-sizing: border-box;
}

  /* Images should maintain aspect ratio */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Shared Typography - from homepage as source of truth */

/* Page Title - matches homepage .page-title */
.page-title,
h1 {
  font-family: 'Source Serif Pro', serif;
  font-size: 40px;
  font-weight: 400;
  color: #000000;
  /* Matches homepage .page-title color */
  margin: 0 0 1rem 0;
  line-height: 1.2;
  text-transform: none;
}

/* Center all page titles (h1) inside containers, except homepage .page-title */
.container h1 {
  text-align: center;
}

/* Homepage .page-title is already centered in hero section, no need to override */
.page-title {
  text-align: inherit;
}

/* Page Subtitle - matches homepage .date-display formatting */
.page-subtitle,
.subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--haiti-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  line-height: 1.2;
  text-align: center;
}

/* Decorative underline for h1 - removed by default */
/* Only add it back on specific pages (like about.css) */
h1::after {
  display: none;
}

/* Remove underline for homepage .page-title */
.page-title::after {
  display: none;
}

/* Shared under construction styles */
.under-construction {
  text-align: center;
  padding: 3rem 0;
}

.under-construction-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--haiti-blue);
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

/* Section Headings - matches homepage .section-heading */
/* Only apply small uppercase style to .section-heading class */
.section-heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--haiti-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem 0;
  line-height: 14px;
}

/* Regular h2 headings - larger section headings (like on about/privacy pages) */
h2 {
  font-family: 'Source Serif Pro', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #000000;
  /* Black to match homepage */
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

/* Body Text - matches homepage .event-section p */
p,
.container p {
  font-family: 'Source Serif Pro', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 25.2px;
  color: #000000;
  margin: 0 0 1.5rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Links */
a {
  color: var(--haiti-blue);
  text-decoration: none;
}

a:hover {
  color: var(--haiti-red);
}

/* In-text links within containers */
.container a {
  color: var(--haiti-blue);
  text-decoration: underline;
}

.container a:hover {
  color: var(--haiti-red);
}



/* ----------------------------------------------------------------------------
   SHARED FOOTER (Frame 64) - Normal footer positioned below footer-articles
   ---------------------------------------------------------------------------- */
#footer-placeholder {
  position: relative;
  width: 100%;
  clear: both;
  margin-top: 0;
  flex-shrink: 0;
}

.site-footer {
  position: relative;
  width: 100%;
  background: var(--haiti-blue);
  color: var(--haiti-white);
  padding: 1.5rem 2rem;
  min-height: 192px;
  /* Match Frame 64 height from Figma */
  margin-top: 0;
  clear: both;
  flex-shrink: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  }

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.footer-logo-lockup {
  display: flex;
  width: 196px;
  height: 40px;
  padding-right: 0.492px;
  justify-content: center;
  align-items: center;
  gap: 15.328px;
}

.footer-logomark {
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
}

.footer-logo-text {
  font-family: "DM Sans";
  font-size: 20.693px;
  font-style: normal;
  font-weight: 600;
  line-height: 97%; /* 20.073px */
  letter-spacing: -0.207px;
  text-transform: capitalize;
  color: var(--haiti-white);
}

.footer-nav-tabs {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--haiti-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-nav-tab:hover {
  text-decoration: underline;
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-right span {
  font-family: 'DM Sans';
  font-size: 0.9rem;
  color: var(--haiti-white);
}

/* MOBILE FOOTER TWEAKS */
@media (max-width: 600px) {
  .site-footer {
    font-size: 0.8rem;
    padding: 1rem;
    margin-top: 0;
    position: relative;
    clear: both;
    z-index: 1;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-left a {
    margin-left: 0;
  }
  
  /* Ensure footer placeholder doesn't overlap */
  #footer-placeholder {
    position: relative;
    width: 100%;
    margin-top: 0;
    clear: both;
    z-index: 1;
}
}



/* Increase indent for sub‐bullets under "How It Works" */
.container section ol li ul {
  margin-left: 1.5em;
  /* pushes the entire nested list right */
  padding-left: 0;
  /* reset default padding if needed */
}

/* (Optional) Tweak individual bullet spacing */
.container section ol li ul li {
  margin-bottom: 0.5em;
  /* adds a little vertical breathing room */
}

/* bullets inside the main container */
.container ul {
  /* push the entire list in from the left edge                */
  margin-left: 2rem;
  /* <— increase or decrease as you like */

  /* add space between the bullet itself ◦ and the text that follows */
  padding-left: 0.75rem;
  /* fine-tunes how far the text sits after the bullet */

  /* optional: makes the bullet line up with the text block rather than hanging outside */
  list-style-position: inside;
  /* remove this line if you prefer the default “outside” look */
}
