/* ─────────────────────────────────────────
   style.css — Nest Homestay
───────────────────────────────────────── */

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

:root {
  --red:      #e02020;
  --dark:     #1a1a1a;
  --light-bg: #f5f6fa;
  --white:    #fff;
  --text:     #333;
  --muted:    #666;
  --nav-bg:   #2b2b2b;
}

html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; color: var(--text); }

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--nav-bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 58px;
}
.nav-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.nav-logo .dot { width: 10px; height: 10px; background: var(--red); border-radius: 50%; }
.nav-logo span { color: var(--white); font-family: 'Playfair Display', serif; font-size: 1.25rem; letter-spacing: 1px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 0.88rem; letter-spacing: 0.5px; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: transparent; border: 1px solid var(--white); color: var(--white);
  padding: 7px 20px; border-radius: 3px; cursor: pointer; font-size: 0.85rem;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--white); color: var(--dark); }

/* ── HERO ── */
#hero {
  height: 100vh; min-height: 560px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--white); position: relative;
}
#hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
  
}
.hero-scroll-hint {
  position: absolute; bottom: 36px;
  display: flex; flex-direction: column; align-items: center;
  color: rgba(255,255,255,.7);
}
.scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, rgba(255,255,255,.7), transparent);
  animation: scrollLine 1.6s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(0.4); }
}

/* ── SECTION COMMONS ── */
section { padding: 80px 20px; }
.section-title {
  text-align: center; font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 3.8rem); font-weight: 700;
  margin-bottom: 50px; color: var(--dark);
}
.section-sub {
  text-align: center; color: var(--muted); font-size: 0.92rem;
  max-width: 600px; margin: 0 auto 50px; line-height: 1.7;
}
.container { max-width: 1100px; margin: 0 auto; }

/* ── OUR STORY ── */
#story { background: var(--white); }
.story-inner { display: flex; align-items: center; gap: 60px; flex-wrap: wrap; }
.story-text { flex: 1; min-width: 260px; }
.story-text h2 { font-family: 'Playfair Display', serif; font-size: 2rem; margin-bottom: 18px; color: var(--dark); }
.story-text p { color: var(--muted); line-height: 1.8; margin-bottom: 28px; font-size: 0.95rem; }
.btn-red {
  background: var(--red); color: var(--white); border: none;
  padding: 11px 28px; border-radius: 3px; cursor: pointer;
  font-size: 0.88rem; letter-spacing: 0.5px; font-weight: 700;
  text-transform: uppercase; transition: background .2s;
}
.btn-red:hover { background: #c01818; }
.story-img { flex: 1; min-width: 260px; }
.story-img img { width: 100%; border-radius: 4px; object-fit: cover; max-height: 320px; }

/* ── WHY CHOOSE US — FLIP CARDS ── */
#why { background: var(--light-bg); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Outer wrapper — sets the 3D perspective */
.flip-card {
  perspective: 1000px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

/* Middle layer that actually rotates */
.flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s ease;
  border-radius: 6px;
}

/* Trigger flip on hover */
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

/* Both faces share these rules */
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* FRONT — image + label */
.flip-front {
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
}
.flip-front img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  color: var(--white); padding: 32px 16px 14px;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.3px;
}

/* BACK — description */
.flip-back {
  background: var(--red);
  color: var(--white);
  transform: rotateY(180deg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 28px; text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.flip-back h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 16px;
}
.flip-back p {
  font-size: 0.92rem; line-height: 1.75;
  color: rgba(255,255,255,.9);
}

/* ── EXPLORE ON FOOT ── */
#explore { background: var(--white); }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.explore-card { text-align: center; }
.explore-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 5px; margin-bottom: 14px;
  transition: transform .35s, box-shadow .35s;
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
}
.explore-card:hover img { transform: scale(1.11); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.explore-card h3 { font-size: 1rem; color: var(--dark); font-weight: 700; }

/* ── GALLERY SLIDER ── */
#gallery { background: var(--light-bg); padding: 80px 0; }
#gallery .section-title { padding: 0 20px; margin-bottom: 30px; }
.gallery-slider-wrap { position: relative; overflow: hidden; }
.gallery-track { display: flex; transition: transform .5s ease; }
.gallery-slide { min-width: 100%; }
.gallery-slide img { width: 100%; max-height: 700px; object-fit: cover; display: block; }
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18); border: none; color: var(--white);
  font-size: 2rem; width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.gallery-btn:hover { background: rgba(255,255,255,.34); }
.gallery-btn.prev { left: 18px; }
.gallery-btn.next { right: 18px; }
.gallery-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.gallery-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #bbb;
  cursor: pointer; border: none; transition: background .2s;
}
.gallery-dot.active { background: var(--red); }

/* ── TESTIMONIALS ── */
#testimonials { background: var(--white); }
.testi-slider-wrap { position: relative; overflow: hidden; }
.testi-track { display: flex; transition: transform .5s ease; }
.testi-slide {
  min-width: 100%; display: flex; justify-content: center;
  align-items: flex-start; gap: 32px; flex-wrap: wrap; padding: 10px 60px 30px;
}
.testi-card { flex: 1; min-width: 220px; max-width: 300px; text-align: center; }
.testi-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 14px; display: block; border: 3px solid var(--light-bg);
}
.testi-text { font-size: 0.88rem; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.testi-name { font-weight: 700; font-size: 0.88rem; color: var(--dark); }
.testi-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 2rem; cursor: pointer;
  color: #aaa; transition: color .2s;
}
.testi-btn:hover { color: var(--dark); }
.testi-btn.prev { left: 0; }
.testi-btn.next { right: 0; }
.testi-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.testi-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ccc;
  cursor: pointer; border: none; transition: background .2s;
}
.testi-dot.active { background: var(--red); }

/* ── CONTACT ── */
#contact {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  color: var(--white);
}
#contact .section-title { color: var(--white); }
#contact .section-sub { color: rgba(255,255,255,.75); }
.contact-inner { display: flex; gap: 60px; flex-wrap: wrap; align-items: flex-start; }
.contact-form { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; gap: 14px; }
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
  color: var(--white); padding: 12px 14px; border-radius: 3px;
  font-size: 0.9rem; font-family: 'Lato', sans-serif;
  width: 100%; outline: none; transition: border-color .2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.55); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: rgba(255,255,255,.7); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-info { flex: 0 0 260px; min-width: 220px; }
.contact-info h4 {
  font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: 8px; margin-top: 22px;
}
.contact-info h4:first-child { margin-top: 0; }
.contact-info p { font-size: 0.92rem; line-height: 1.7; color: rgba(255,255,255,.9); }

/* ── CTA BANNER ── */
#cta {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  padding: 48px 40px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
#cta p { color: var(--white); font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.btn-outline-white {
  background: transparent; border: 2px solid var(--white); color: var(--white);
  padding: 12px 30px; border-radius: 30px; cursor: pointer;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px;
  transition: background .2s, color .2s;
}
.btn-outline-white:hover { background: var(--white); color: var(--dark); }

/* ── FOOTER ── */
footer {
  background: var(--nav-bg); color: rgba(255,255,255,.6);
  padding: 20px 40px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
footer p { font-size: 0.8rem; }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 0.88rem; transition: color .2s; }
.footer-socials a:hover { color: var(--white); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { padding: 0 18px; }
  .nav-links { display: none; }
  .story-inner { flex-direction: column; }
  .contact-inner { flex-direction: column; }
  #cta { justify-content: center; text-align: center; }
  .testi-slide { padding: 10px 50px 30px; }
}