/* ============================================================
   Wayanad Homestays – main stylesheet
   ============================================================ */

:root {
  --green-900: #173a24;
  --green-700: #2c5e3d;
  --green-500: #4a7c59;
  --green-100: #e7f0e8;
  --gold: #d9a441;
  --cream: #f7f4ec;
  --white: #ffffff;
  --ink: #23312a;
  --muted: #66756d;
  --line: #e4e0d5;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(23, 58, 36, 0.12);
  --shadow-lg: 0 24px 60px rgba(23, 58, 36, 0.18);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--green-900);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

/* ---------- Layout ---------- */
.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.section { padding: 72px 0; }
.section--tint { background: var(--green-100); }

.section-head {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head .kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 74px;
  padding: 12px 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-brand .brand-name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.05;
}
.site-brand .brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; }

.nav-list a {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-list a:hover { background: var(--green-100); color: var(--green-900); }

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a { background: var(--green-900); color: #fff; }

.nav-list .menu-item-has-children { position: relative; }

.nav-list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  list-style: none;
  margin: 0;
}
.nav-list .menu-item-has-children:hover > .sub-menu,
.nav-list .menu-item-has-children:focus-within > .sub-menu { display: block; }

.nav-list .sub-menu a { display: block; border-radius: 8px; }
.nav-list .sub-menu .sub-menu { top: 0; left: 100%; }

/* Mega dropdowns (Homestays / Resorts / Contact Us) */
.nav-list .menu-item-has-children.mega { position: static; }
.nav-list .menu-item.mega > .sub-menu {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  width: min(720px, 92vw);
  left: 50%;
  transform: translateX(-50%);
  margin-top: -22px;
  padding-top: 26px;
  max-height: 70vh;
  overflow-y: auto;
  gap: 2px;
}
.nav-list .menu-item.mega:hover > .sub-menu,
.nav-list .menu-item.mega:focus-within > .sub-menu { display: grid; }
.nav-list .menu-item.mega > .sub-menu li { break-inside: avoid; }
.nav-list .menu-item.mega > .sub-menu a { white-space: normal; }

.header-cta { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #fff; box-shadow: 0 8px 20px rgba(217, 164, 65, 0.35); }
.btn--green { background: var(--green-900); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn--line { background: transparent; color: var(--green-900); border: 2px solid var(--green-700); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-900);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Accessibility ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  top: 10px;
  left: 10px;
  z-index: 999;
  background: var(--green-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 120px 0 140px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14) 0, transparent 40%),
    linear-gradient(135deg, var(--green-900), var(--green-500));
  overflow: hidden;
}
.hero--plain {
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}
.hero h1 { color: #fff; max-width: 760px; }
.hero .hero-sub { font-size: 1.15rem; max-width: 620px; opacity: 0.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Hero slider ---------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-slides {
  position: relative;
  min-height: min(78vh, 640px);
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 7s ease;
}
.hero-slide.is-active .hero-slide-bg { transform: scale(1.1); }
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(23, 58, 36, 0.85) 0%, rgba(23, 58, 36, 0.6) 45%, rgba(23, 58, 36, 0.25) 100%);
}
.hero-slide > .container {
  position: relative;
  z-index: 2;
  width: min(1160px, 92%);
  margin-inline: auto;
}
.hero-slide-content { max-width: 640px; }
.hero-slide-content .kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero-slide-content h1 { color: #fff; }
.hero-slide-content .hero-sub { font-size: 1.1rem; opacity: 0.95; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.slider-arrow:hover { background: rgba(255, 255, 255, 0.25); }
.slider-prev { left: 18px; }
.slider-next { right: 18px; }

.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.slider-dots button.is-active { background: #fff; transform: scale(1.25); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.06); }

.card-media .card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 8px; }
.card-body h3 a { color: var(--green-900); }
.card-body p { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.card-meta .price {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--green-700);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--green-700);
}
.card-link::after { content: "→"; transition: transform 0.15s ease; }
.card-link:hover::after { transform: translateX(3px); }

/* ---------- Page / post content ---------- */
.page-hero {
  color: #fff;
  padding: 84px 0 96px;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { opacity: 0.9; max-width: 640px; margin-bottom: 0; }

.content-area { padding: 64px 0 80px; }
.content-area .page-copy {
  max-width: 820px;
  margin-inline: auto;
}
.page-copy ul, .page-copy ol { padding-left: 1.3em; }
.page-copy li { margin-bottom: 0.4em; }
.page-copy hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.page-copy table { border-collapse: collapse; width: 100%; }
.page-copy th, .page-copy td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 32px;
}
.gallery-grid a {
  border-radius: 12px;
  overflow: hidden;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--green-100);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* ---------- Contact ---------- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact-card .row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-card .row:last-child { border-bottom: 0; }
.contact-card .row strong { display: block; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-card .row a { font-weight: 700; color: var(--green-900); }
.contact-card--full { margin-top: 48px; }
.contact-form .btn { margin-top: 8px; }

.map-wrap {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}
.map-wrap iframe { width: 100%; height: 420px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
  padding: 64px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.site-footer h3 { color: #fff; font-size: 1.05rem; letter-spacing: 0.04em; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 4px 0; }
.footer-contact .row { display: flex; gap: 10px; padding: 6px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 18px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 404 / search ---------- */
.error-404, .no-results { text-align: center; padding: 80px 0; }
.search-form { display: flex; max-width: 460px; margin: 24px auto; gap: 8px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit;
}
.search-form button { border: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 20, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-split { grid-template-columns: 1fr; }

  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 6%;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; width: 100%; }
  .nav-list .sub-menu,
  .nav-list .menu-item-has-children > .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding-left: 16px; }
  .nav-list .menu-item-has-children.mega { position: static; }
  .nav-list .menu-item.mega > .sub-menu {
    position: static;
    width: 100%;
    transform: none;
    left: auto;
    display: block;
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    margin-top: 0;
    padding-top: 8px;
  }
  .header-cta { width: 100%; justify-content: center; padding: 10px 0; }
}

@media (max-width: 620px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 90px 0 110px; }
  .hero-slides { min-height: 72vh; }
  .slider-arrow { display: none; }
  .hero-slide-content h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}
