/* ===========================
   LIFE – Hero snap + free scroll below
=========================== */

/* Smoothness + no browser bounce */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  overscroll-behavior-y: none;
}

/* Body doesn't scroll on this page (container will) */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body.life {
  overflow: hidden;
  overscroll-behavior-y: none;
  scroll-snap-type: none !important;
}

/* The ONLY scroller with snap is the container */
body.life .snap-container {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: none;
}

/* ===========================
   HERO - WITH SNAP
=========================== */
.life-hero {
  position: relative;
  height: 100vh;

  background-image: url("assets/life.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll !important;
  background-color: #f9f9f9;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;

  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.life-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.05);
  z-index: 0;
}
.life-hero > * { position: relative; z-index: 1; }

.life-logo {
  position: absolute;
  top: 220px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 180px;
  width: 60%;
  height: auto;
  pointer-events: none;
}

/* ===========================
   CONTENT + FOOTER as ONE snap target
=========================== */
.content-wrap {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.life-main {
  background: #fff;
  color: #222;
  padding: 0 0 5rem;
  min-height: 100vh;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
}

.footer {
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}

/* ===========================
   TABS BAR
=========================== */
.life-tabs {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  justify-content: space-around;
  align-items: center;

  width: 100%;
  padding: 0.9rem 0;

  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.life-tabs .tab {
  appearance: none;
  border: none;
  background: transparent;
  font: 600 17px/1 Arial, sans-serif;
  color: #333;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
  
  flex: 1;
  text-align: center;
}
.life-tabs .tab:hover { transform: translateY(-1px); }
.life-tabs .tab.is-active { color: #000; }
.life-tabs .tab.is-active::after {
  content: "";
  position: absolute;
  bottom: 0; 
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px; 
  border-radius: 3px;
  background: rgba(11,219,230,0.7);
  box-shadow: 0 0 10px rgba(11,219,230,0.45);
}

/* ===========================
   PANELS
=========================== */
.panel {
  display: none;
  max-width: 950px;
  margin: 0 auto;
  padding: 3rem 2rem;
  animation: fadeIn .35s ease;
  scroll-margin-top: 80px;
}
.panel.is-visible { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: #000;
}
.panel p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 720px) {
  .life-tabs { padding: 0.7rem 0; }
  .life-tabs .tab { padding: 0.7rem 1rem; font-size: 16px; }
  .panel { padding: 2rem 1.25rem; }
  .panel h2 { font-size: 1.6rem; }
}

/* ===========================
   TRAVEL GALLERY GRID BY YEAR
=========================== */

.travel-gallery {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

/* Each year section */
.travel-year {
  margin-bottom: 3rem;
  text-align: left;
}

/* Year label on left + underline */
.travel-year-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #000;
  margin: 0 0 .3rem 0;
  text-align: left;
}

.travel-year-underline {
  width: 100%;
  height: 1px;
  background: #000;
  margin-bottom: 1.5rem;
}

/* Thumbnail grid */
.travel-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.travel-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.travel-thumb img:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.15);
}

.travel-caption {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

/* Responsive */
@media (max-width: 800px) {
  .travel-thumb img {
    height: 150px;
  }
}

/* Make single-image years consistent */
.travel-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

/* Consistent image aspect ratio */
.travel-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;         /* keeps natural 4:3 height ratio */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.travel-thumb img:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.15);
}

/* ===========================
   TRAVEL GALLERY — centered rows, 1–3 per line
=========================== */

.travel-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;    /* center even if 1 or 2 */
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Each image tile keeps consistent size */
.travel-thumb {
  flex: 0 1 280px;             /* consistent width for all */
  max-width: 100%;
  text-align: center;
}

/* Image style */
.travel-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;         /* consistent height */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.travel-thumb img:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.15);
}

/* Caption */
.travel-caption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #222;
}
/* ===========================
   FORCE 3 PER ROW (on wide screens)
=========================== */
@media (min-width: 900px) {
  .travel-thumbs {
    justify-content: center;
    gap: 2rem;
  }

  .travel-thumb {
    flex: 0 0 calc((100% - 4rem) / 3); /* 3 per row accounting for 2 gaps */
    max-width: calc((100% - 4rem) / 3);
  }
}

/* ==========================================================
   TRAVEL MODAL — FULLSCREEN WIDE, SCROLLABLE, ARROWS
========================================================== */
.travel-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow-y: auto;
  padding: 3rem 1rem;
}

.travel-modal.active { display: flex; }

.travel-modal-content {
  max-width: 95%;
  width: 1400px;
  height: 90vh;          /* fixed modal height */
  overflow-y: auto;      /* scrolls inside, not grow outside */
  padding: 2.5rem 3rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}


.travel-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.8rem;
  background: none;
  border: none;
  font-size: 2.4rem;
  color: #000;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.travel-modal-close:hover { opacity: 0.6; }

.travel-popup-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* bigger columns */
  gap: 1.4rem;
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.travel-popup-gallery img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.travel-popup-gallery img:hover {
  transform: scale(1.03);
}

/* Arrows for next/previous */
.travel-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  font-size: 3rem;
  padding: 0.5rem 1.3rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s ease;
  z-index: 10000;
}

.travel-arrow:hover {
  background: rgba(255,255,255,0.4);
}

.travel-arrow.left { left: 1.5rem; }
.travel-arrow.right { right: 1.5rem; }

.travel-modal-content.hidden {
  display: none !important;
}
