@journey{text-align:justify;}

@layer variables {
  :root {
    /* Color Palette */
    --color-primary:       #D35400;
    --color-primary-light: #E67E22;
    --color-accent:        #C0392B;
    --color-accent-light:  #E74C3C;
    --color-bg:            #FDF3E7;
    --color-bg-dark:       #2C3E50;
    --color-text:          #2C3E50;
    --color-text-dark:     #ECF0F1;
    --color-white:         #FFFFFF;
    --color-border:        #F39C12;

    /* Spacing Scale */
    --space-xs: .5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;

    /* Radii & Shadows */
    --radius:     .75rem;
    --shadow-sm:  0 2px 6px rgba(0,0,0,0.1);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.15);

    /* Transitions */
    --duration:   .3s;
    --ease:       cubic-bezier(0.4,0,0.2,1);

    /* Breakpoints */
    --bp-xs:  480px;
    --bp-sm:  768px;
    --bp-md: 1024px;
    --bp-lg: 1200px;
  }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 1.2vw, 18px);
  }
  body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
  }
  img, video, iframe {
    display: block;
    max-width: 100%;
    height: auto;
  }
  a, button { all: unset; cursor: pointer; }
  a { text-decoration: none; }
  :focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
  }
}

@layer utilities {
  .radius    { border-radius: var(--radius); }
  .shadow-sm { box-shadow: var(--shadow-sm); }
  .shadow-md { box-shadow: var(--shadow-md); }
  .anim      { transition: all var(--duration) var(--ease); }
}

@layer components {
  header {
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
  }
  header img {
    width: clamp(60px, 20vw, 120px);
    /* Center and make circular */
    margin: 0 auto;
    display: block;
    border-radius: 50%;
  }

  nav {
    position: sticky;
    top: 0;
    background: var(--color-white);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
  }

  main {
    max-width: 100%;
    width: min(90%, 900px);
    margin: var(--space-lg) auto;
    padding-inline: var(--space-sm);
  }

  section {
    background: var(--color-white);
    padding: var(--space-md);
    margin-block-end: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
  }

  .carousel-container {
    width: 100%;
    max-width: 100%;
    margin: var(--space-lg) auto;
  }

  .timeline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@layer dark-mode {
  [data-theme="dark"] body {
    background: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
}

@layer responsive {
  @media (max-width: var(--bp-md)) {
    .timeline-content {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: var(--bp-sm)) {
    nav {
      flex-direction: column;
    }
    header img {
      width: 80px;
      margin: 0 auto;
      display: block;
      border-radius: 50%;
    }
  }

  @media (max-width: var(--bp-xs)) {
    header img {
      width: clamp(50px, 30vw, 80px);
      margin: 0 auto;
      display: block;
      border-radius: 50%;
    }
    html {
      font-size: 14px;
    }
  }
}

  /* Navigation */
  nav {
    position: sticky;
    top: 0;
    background: var(--color-white);
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding-block: var(--space-sm) 0;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
  }
  nav a {
    color: var(--color-primary);
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    transition: transform var(--duration) var(--ease);
  }
  nav a:hover { transform: scale(1.1); }
  nav a[aria-current] { border-bottom: 2px solid var(--color-accent); }

  /* Main & Sections */
  main {
  max-width: 900px;
  /* top/bottom = var(--space-lg); left/right = auto → centered */
  margin: var(--space-lg) auto;
  padding-inline: var(--space-sm);
}
  main {
  max-width: 900px;
  margin: var(--space-lg) auto;
  padding-inline: var(--space-sm);
  text-align: center;    /* ← add this */
}
  section {
    background: var(--color-white);
    padding: var(--space-md);
    margin-block-end: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }
  h2 {
    color: var(--color-primary);
    font-size: 1.75rem;
    margin-block-end: var(--space-sm);
  }

  /* Buttons */
  .btn, .button {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-accent);
    color: var(--color-white);
    font-weight: 600;
    border-radius: var(--radius);
    transition: transform var(--duration) var(--ease);
  }
  .btn:hover, .button:hover { transform: translateY(-2px) scale(1.05); }

  /* Back-to-Top */
  .back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-sm);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--duration) var(--ease);
    z-index: 1000;
  }
  .back-to-top.show {
    opacity: .85;
    transform: translateY(0);
  }

  /* ─── Gallery: Larger images (min 300px), auto‐fitting columns ─── */
.gallery {
  display: grid;
  /* make each column at least 300px wide; auto‐fit as many as possible */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);       /* more breathing room between items */
  justify-items: center;      /* center each figure in its grid cell */
}

/* Stretch images to fill their column */
.gallery img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}


  /* Quotes Slider */
  #quotes-section {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-block: var(--space-md);
  }
  #quote-text, #quote-author {
    opacity: 0;
    animation: fade-in 10s infinite both;
  }
   ul, ol {
    text-align: left;
    list-style-position: outside;
    margin-inline-start: var(--space-lg);
    padding-inline-start: var(--space-md);
  }
 /* ─── Timeline – Grid layout, text & image on opposite halves ───────── */

ul.timeline {
  list-style: none;
  position: relative;
  margin: 0;
  padding: var(--space-md) 0;
}
ul.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--color-accent);
  transform: translateX(-50%);
}

ul.timeline li {
  position: relative;
  margin: var(--space-lg) 0;
}

/* create two equal‑width columns per item */
.timeline-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: var(--space-lg);
}

.timeline-content > * {
  padding: 0;
}


.timeline-img {
  width: 250px;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
video.timeline-img {
  width: 250px;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}


/* scroll‑reveal (your existing JS adds .is-visible) */
ul.timeline li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}
ul.timeline li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-content > .timeline-img,
.timeline-content > .timeline-text {
  /* force both image & text to hug the top of their grid row */
  align-self: start;
}
  figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

/* ─── Figcaptions: span full column width, more padding ─── */
figcaption {
  width: 100%;
  margin-top: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}


  @keyframes fade-in {
    0%, 80% { opacity: 1; transform: translateY(0); }
    90%,100% { opacity: 0; transform: translateY(20px); }
  }
  .quote-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-block-start: var(--space-sm);
  }
  .quote-controls button {
    all: unset;
    cursor: pointer;
    font-size: 1.5rem;
    padding: var(--space-xs);
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius);
    transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
  }
  .quote-controls button:hover {
    background: var(--color-primary-light);
    transform: scale(1.1);
  }

  /* Lightbox */
  .lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity var(--duration) var(--ease);
  }
  .lightbox-modal.show {
    display: flex;
    opacity: 1;
  }
  .lightbox-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--color-white);
    padding: var(--space-xs);
    cursor: pointer;
  }
  .lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }
  .lightbox-caption {
    position: absolute;
    bottom: var(--space-lg);
    color: var(--color-white);
    font-size: 1.2rem;
    text-align: center;
  }

  /* Forms */
  form input, form textarea {
    width: 100%;
    padding: var(--space-xs);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-block-end: var(--space-sm);
  }
  form button {
    all: unset;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--duration) var(--ease);
  }
  form button:hover { background: var(--color-primary-light); }

  /* Footer */
  footer {
    background: var(--color-bg);
    text-align: center;
    padding-block: var(--space-sm);
    color: #555;
  }
  .social-icons a {
    margin-inline: var(--space-xs);
    font-size: 1.75rem;
    filter: grayscale(100%);
    transition: transform var(--duration) var(--ease), color var(--duration) var(--ease);
  }
  .social-icons a:hover {
    transform: scale(1.2);
    color: var(--color-accent);
  }
}

@layer dark-mode {
  [data-theme="dark"] body {
    background: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
  [data-theme="dark"] header,
  [data-theme="dark"] nav,
  [data-theme="dark"] main section,
  [data-theme="dark"] footer {
    background: #1e1e1e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  }
}

@layer responsive {
  @media (max-width: var(--bp-sm)) {
    nav { flex-direction: column; gap: var(--space-xs); }
    header img { width: 80px; }
    .gallery { grid-template-columns: 1fr; }
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ───── Carousel with Custom Arrows & Larger Images ───── */
.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 2rem auto;
  overflow: visible;
  border-radius: var(--radius);
}

.carousel-slide {
  display: none;
  text-align: center;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.carousel-slide figure {
  margin: 0;
  position: relative;
}

.carousel-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 620px;
  border-radius: var(--radius);
  margin: 0 auto;
  object-fit: unset !important;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 3.75rem;
  border-radius: 999px; /* Force pill shape */
  background-color: #D35400;
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  border: none;
}

.prev::before { content: "‹"; }
.next::before { content: "›"; }

.prev:hover,
.next:hover {
  background-color: #E67E22;
  transform: translateY(-50%) scale(1.1);
}

/* Position arrows left and right */
.prev { left: 1rem; }
.next { right: 1rem; }


/* Hover effect */
.prev:hover,
.next:hover {
  background-color: #E67E22;
  transform: translateY(-50%) scale(1.1);
}

.carousel-slide figcaption {
  margin-top: 1rem;
  padding: 0 0.5rem;
  font-size: 1rem;
  text-align: left;
  line-height: 1.6;
}


