*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

/* ================= BODY ================= */

body{
  font-family:Georgia, serif;
  overflow-x:hidden;
  color:#111;
  line-height:1.7;
  position:relative;
}


/* ================= HEADER ================= */

header{
  position:fixed;
  top:25px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000;
  width:100%;
  display:flex;
  justify-content:center;
}

.save-date{
  background:rgba(255,255,255,.9);
  padding:12px 30px;
  border-radius:40px;
  text-decoration:none;
  color:#000;
  font-weight:bold;
  box-shadow:0 8px 25px rgba(0,0,0,.08);
}

/* ================= SECTIONS ================= */

section{
  min-height:100vh;
  width:100%;
  padding:120px 25px 80px 25px;
  text-align:center;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  box-sizing:border-box;
}

/* Better mobile viewport height */
section {
  min-height: 100svh;
}

@media (max-width: 768px){
  section{
    min-height:auto;   /* prevent mobile vh bug */
    padding:90px 20px;
  }
}


section h2{
  font-size:28px;
  margin-bottom:30px;
  letter-spacing:1px;
}

section p{
  max-width:750px;
  margin-bottom:20px;
  line-height:1.8;
}

/* ================= HERO ================= */

.hero{
  min-height:100vh;
  width:100%;
  background-size:cover;
  background-position:center;
  transition:background-image 1s ease-in-out;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-text{
  background:rgba(0,0,0,.5);
  padding:45px;
  border-radius:30px;
  color:white;
  max-width:550px;
}

.hero-text h1{
  font-family:'Playfair Display', serif;
  font-size:60px;
  letter-spacing:3px;
  font-weight:600;
  line-height:1.1;
  margin-bottom:15px;
}

.hero-text p{
  font-style:italic;
  margin:10px 0;
}

.hero-text span{
  display:block;
  margin-top:12px;
  letter-spacing:3px;
}

/* ================= IMAGES ================= */

img{
  max-width:90%;
  border-radius:20px;
  margin:25px 0;
}

/* ================= OUR STORY IMAGE FIX ================= */

#ourstory img {
  width: 100%;
  max-width: 650px;   /* controls desktop size */
  height: auto;
  border-radius: 25px;
  display: block;
  margin: 30px auto;
}


/* ================= GREEN SECTIONS ================= */

#fromourhearts,
#photobook,
#celebrate{
  background:rgba(138,184,156,0.88);
}

/* ================= HEART CARDS ================= */

.heart-card{
  background:white;
  padding:30px;
  border-radius:20px;
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:35px;
  width:100%;
  max-width:700px;
  text-align:left;
}

.heart-card img{
  width:90px;
  height:90px;
  border-radius:50%;
  object-fit:cover;
}

/* ================= SCHEDULE ================= */

.schedule{
  background:#8ab89c;
  color:white;
  padding:35px;
  border-radius:25px;
  margin-top:25px;
  max-width:420px;
}

/* ================= COUNTDOWN ================= */

.countdown{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
  margin:25px 0;
}

.countdown div{
  background:#8ab89c;
  color:white;
  padding:18px;
  border-radius:15px;
  font-weight:bold;
}

.countdown span{
  font-size:24px;
  display:block;
}

/* ================= PHOTOBOOK MODAL ================= */

.card-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.6);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
  z-index:1000;
}

.card-modal.open{
  opacity:1;
  pointer-events:auto;
}

/* IMPORTANT FIX */
.card-content{
  background:rgba(138,184,156,0.88);
  border-radius:25px;
  padding:30px;
  width:85%;
  max-width:1000px;

  height:85vh;           /* use height instead of max-height */
  overflow-y:auto;       /* force vertical scroll only */
  overflow-x:hidden;     /* prevent horizontal bug */

  position:relative;
  -webkit-overflow-scrolling: touch; /* mobile smooth scroll fix */
}

.card-content .close{
  position:absolute;
  top:15px;
  right:20px;
  background:none;
  border:none;
  font-size:18px;
  cursor:pointer;
}

/* ================= GALLERY GRID ================= */

.gallery-images{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:25px;
  justify-items:center;
}

/* Desktop more columns */
@media (min-width:768px){
  .gallery-images{
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  }
}

.gallery-images img{
  width:150px;
  height:100px;
  object-fit:cover;
  border-radius:18px;
  cursor:pointer;
  transition:transform .2s ease;
}

.gallery-images img:hover{
  transform:scale(1.05);
}


/* ================= RSVP BUTTON CARD ================= */

.card-button{
  background:white;
  padding:14px 25px;
  border-radius:15px;
  border:none;
  cursor:pointer;
  margin-top:20px;
  font-weight:bold;
}

/* ================= RSVP MODAL ================= */

.modal{
  background:white;
  padding:35px;
  border-radius:25px;
  width:100%;
  max-width:420px;
  box-shadow:0 15px 40px rgba(0,0,0,.2);
}

.modal input{
  width:100%;
  padding:14px;
  margin:12px 0;
  border-radius:12px;
  border:1px solid #ddd;
  font-size:14px;
}

.modal button{
  margin-top:15px;
  padding:14px;
  border:none;
  border-radius:12px;
  background:#8ab89c;
  color:white;
  width:100%;
  font-weight:bold;
  cursor:pointer;
}

.form-status{
  font-size:13px;
  margin-top:10px;
}

/* ================= QUESTIONS + ANSWERS ================= */

.qa-list{
  max-width:800px;
  text-align:left;
  margin-top:35px;
}

.qa-item{
  margin-bottom:40px;
}

.qa-item h4{
  margin-bottom:15px;
  font-weight:bold;
}

.qa-item p{
  line-height:1.8;
}

/* ================= FOOTER ================= */
footer{
  padding:20px 10px;
  font-size:12px;
  text-align:center;
  background:transparent;
  margin-top:0;
}

/* ================= RESPONSIVE ================= */

@media(min-width:900px){
  section{
    padding:120px 80px;
  }
}

/* ================= FLORAL BACKGROUND OVERLAY ================= */

body::before{
  content:"";
  position:fixed;
  inset:0;
  background:url("assets/images/decor/floral-full.webp") no-repeat center top;
  background-size:cover;
  opacity:0.9;
  pointer-events:none;
  z-index:-1;
}

/* ================= FIX EXTRA MOBILE SCROLL ================= */

@media (max-width: 768px) {

  section {
    min-height: auto;   /* remove forced full screen */
  }

  body {
    min-height: auto;
  }

  html, body {
    overflow-x: hidden;
  }

}

/* ================= celebrate ================= */
#celebrate{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.gallery-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-images img:hover {
  transform: scale(1.05);
}

/* ================= IMAGE VIEWER ================= */

.image-viewer{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.9);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:2000;
  cursor:pointer;
}

.image-viewer img{
  max-width:90%;
  max-height:90%;
  border-radius:15px;
}
