/*
Theme Name: Serenity Homestay
Theme URI: https://example.com/serenity-homestay
Author: Codex
Description: Elementor-ready homestay theme with designed fallback pages and a working guest query form widget.
Version: 1.10.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serenity-homestay
*/

:root {
  --ink: #16231d;
  --muted: #5f6f66;
  --paper: #fffaf0;
  --surface: #ffffff;
  --sage: #78936f;
  --pine: #244a39;
  --clay: #b86b45;
  --gold: #d9a441;
  --mist: #edf3ed;
  --line: rgba(22, 35, 29, 0.14);
  --shadow: 0 20px 45px rgba(22, 35, 29, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

.site-header {
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.32);
  background: rgba(255, 250, 240, 0.93);
  backdrop-filter: blur(18px);
}
.site-header.is-sticky { position: sticky; top: var(--serenity-sticky-top, 0); }
.site-header.is-static { position: relative; }
.site-header__inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand__mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fffaf0; background: linear-gradient(135deg, var(--pine), var(--sage)); font-family: Georgia, serif; font-size: 22px; flex: 0 0 auto; }
.brand__text { display: grid; min-width: 0; }
.brand__name { font-weight: 800; line-height: 1.1; }
.brand__tagline { color: var(--muted); font-size: 13px; white-space: nowrap; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--pine); cursor: pointer; }
.nav-toggle span:not(.screen-reader-text) { display: block; width: 20px; height: 2px; margin: 5px auto; background: currentColor; }
.primary-menu, .primary-menu ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: var(--radius); color: var(--pine); font-weight: 700; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { background: rgba(120,147,111,0.16); }
.site-main { flex: 1; }

.hero {
  position: relative;
  min-height: clamp(580px, 82vh, 780px);
  display: flex;
  align-items: end;
  isolation: isolate;
  background-image: linear-gradient(90deg, rgba(12,25,18,0.76), rgba(12,25,18,0.52) 38%, rgba(12,25,18,0.08) 78%), var(--hero-image);
  background-size: cover;
  background-position: center;
  color: #fffaf0;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(0deg, var(--paper), rgba(255,250,240,0)); z-index: -1; }
.hero__content { width: min(760px, 100%); padding: 118px 0 112px; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1, .page-hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 8vw, 92px); line-height: 0.95; letter-spacing: 0; }
.hero__lead, .page-hero__lead { max-width: 620px; margin: 22px 0 0; color: rgba(255,250,240,0.88); font-size: 19px; }
.hero__actions, .section__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button, .wp-block-button__link, .query-form .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--clay);
  color: #fffaf0;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button--ghost { border-color: rgba(255,250,240,0.42); background: rgba(255,250,240,0.1); }
.button--light { border-color: var(--line); background: var(--surface); color: var(--pine); }

.section { padding: 84px 0; }
.section--mist { background: var(--mist); }
.section--pine { background: var(--pine); color: #fffaf0; }
.section__head { display: grid; grid-template-columns: minmax(0,0.9fr) minmax(260px,0.55fr); gap: 36px; align-items: end; margin-bottom: 34px; }
.section__head h2, .content-block h2, .entry-content h2, .query-panel h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: 0; }
.section__head p, .content-block p, .entry-content p, .query-panel p { margin: 0; color: var(--muted); }
.section--pine .section__head p, .section--pine p { color: rgba(255,250,240,0.78); }
.feature-grid, .stay-grid, .contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card, .stay-card, .query-panel, .notice, .contact-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.feature-card { padding: 24px; }
.feature-card__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(120,147,111,0.18); color: var(--pine); font-weight: 900; }
.feature-card h3, .stay-card h3, .contact-card h3 { margin: 18px 0 8px; font-size: 21px; line-height: 1.2; }
.feature-card p, .stay-card p, .contact-card p { margin: 0; color: var(--muted); }
.split, .contact-layout { display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr); gap: 44px; align-items: center; }
.image-panel { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; }
.image-panel img, .stay-card__media img, .gallery-tile img { width: 100%; height: 100%; object-fit: cover; }
.content-block { display: grid; gap: 20px; }
.stay-card { overflow: hidden; }
.stay-card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.stay-card__body { padding: 22px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.pill-list li { border: 1px solid rgba(36,74,57,0.18); border-radius: 999px; padding: 6px 10px; color: var(--pine); background: rgba(120,147,111,0.13); font-size: 13px; font-weight: 800; }
.page-hero { padding: 116px 0 76px; background: linear-gradient(90deg, rgba(12,25,18,0.78), rgba(12,25,18,0.34)), var(--hero-image); background-position: center; background-size: cover; color: #fffaf0; }
.page-hero--plain { background: var(--pine); }
.entry-content { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.elementor-page-content { width: 100%; }
.gallery-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 1fr; gap: 18px; }
.gallery-tile { position: relative; overflow: hidden; min-height: 260px; border-radius: var(--radius); background: #d9dfd1; }
.gallery-tile--tall { grid-row: span 2; min-height: 540px; }
.gallery-tile figcaption { position: absolute; inset: auto 14px 14px; padding: 9px 11px; border-radius: var(--radius); background: rgba(22,35,29,0.72); color: #fffaf0; font-size: 13px; font-weight: 800; }
.contact-layout { grid-template-columns: minmax(280px,0.7fr) minmax(0,1fr); align-items: start; }
.query-panel { padding: 28px; }
.query-panel h2 { font-size: 36px; }
.query-panel p { margin-bottom: 22px; }
.query-form { display: grid; gap: 16px; }
.query-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.query-form label { display: grid; gap: 7px; color: var(--pine); font-size: 13px; font-weight: 800; }
.query-form input, .query-form textarea, .query-form select { width: 100%; min-height: 46px; border: 1px solid rgba(22,35,29,0.22); border-radius: var(--radius); padding: 11px 12px; background: #fffdf8; color: var(--ink); }
.query-form textarea { min-height: 138px; resize: vertical; }
.query-form input:focus, .query-form textarea:focus, .query-form select:focus { outline: 3px solid rgba(217,164,65,0.35); border-color: var(--gold); }
.query-form__hidden { position: absolute; left: -9999px; }
.notice { margin-bottom: 18px; padding: 13px 15px; box-shadow: none; }
.notice--success { border-color: rgba(36,74,57,0.3); background: #edf6eb; color: var(--pine); }
.notice--error { border-color: rgba(184,73,69,0.32); background: #fff1ee; color: #83342f; }
.contact-card { padding: 24px; box-shadow: none; }
.contact-card + .contact-card { margin-top: 16px; }
.site-footer { background: #13231b; color: rgba(255,250,240,0.82); padding: 46px 0 26px; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr; gap: 28px; }
.site-footer h2, .site-footer h3 { margin: 0 0 12px; color: #fffaf0; }
.site-footer p, .site-footer ul { margin: 0; }
.site-footer ul { padding: 0; list-style: none; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer__bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,250,240,0.16); color: rgba(255,250,240,0.62); font-size: 14px; }

@media (max-width: 900px) {
  .serenity-widget-footer__grid { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .container { width: min(var(--max), calc(100% - 28px)); }
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; inset: 76px 14px auto; display: none; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-header .primary-menu, .site-header .primary-menu ul, .section__head, .split, .contact-layout, .site-footer__grid { grid-template-columns: 1fr; display: grid; align-items: stretch; }
  .hero { min-height: 700px; }
  .hero__content { padding: 98px 0 104px; }
  .feature-grid, .stay-grid, .contact-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-tile--tall { min-height: 360px; }
}
@media (max-width: 640px) {
  .brand__tagline { display: none; }
  .hero h1, .page-hero h1 { font-size: 46px; }
  .hero__lead, .page-hero__lead { font-size: 17px; }
  .section { padding: 58px 0; }
  .feature-grid, .stay-grid, .contact-grid, .gallery-grid, .query-form__row { grid-template-columns: 1fr; }
  .hero__actions, .section__actions { display: grid; }
  .button { width: 100%; }
}


.serenity-slider { position: relative; overflow: hidden; }
.serenity-slider .serenity-slide { opacity: 0; pointer-events: none; position: absolute; inset: 0; transition: opacity 520ms ease; }
.serenity-slider .serenity-slide.is-active { opacity: 1; pointer-events: auto; position: relative; z-index: 1; }
.serenity-hero-slider.hero { display: block; }
.serenity-hero-slider .serenity-slide { min-height: inherit; display: flex; align-items: end; background-image: linear-gradient(90deg, rgba(12,25,18,0.76), rgba(12,25,18,0.52) 38%, rgba(12,25,18,0.08) 78%), var(--hero-image); background-position: center; background-size: cover; color: #fffaf0; }
.serenity-gallery-slider { min-height: 540px; border-radius: var(--radius); }
.serenity-gallery-slider .gallery-tile { min-height: 540px; width: 100%; margin: 0; }
.serenity-slider__arrow { position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; border: 1px solid rgba(255,250,240,0.42); border-radius: 50%; background: rgba(22,35,29,0.58); color: #fffaf0; font-size: 30px; line-height: 1; display: grid; place-items: center; cursor: pointer; transform: translateY(-50%); }
.serenity-slider__arrow--prev { left: 18px; }
.serenity-slider__arrow--next { right: 18px; }
.serenity-slider__dots { position: absolute; z-index: 4; inset: auto 0 22px; display: flex; justify-content: center; gap: 9px; }
.serenity-slider__dot { width: 10px; height: 10px; padding: 0; border: 1px solid rgba(255,250,240,0.86); border-radius: 50%; background: transparent; cursor: pointer; }
.serenity-slider__dot.is-active { background: #fffaf0; }
@media (max-width: 640px) { .serenity-gallery-slider, .serenity-gallery-slider .gallery-tile { min-height: 360px; } .serenity-slider__arrow { width: 38px; height: 38px; } }


/* Elementor can load a generic .elementor img { height: auto; } rule after the theme.
   These selectors keep media panels filled so images do not leave blank space. */
.image-panel,
.stay-card__media,
.gallery-tile {
  position: relative;
  background: #d9dfd1;
}
.image-panel > img,
.stay-card__media > img,
.gallery-tile > img,
.elementor .image-panel > img,
.elementor .stay-card__media > img,
.elementor .gallery-tile > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: inherit;
  object-fit: cover;
  object-position: center center;
}
.serenity-gallery-slider .serenity-slide > img,
.elementor .serenity-gallery-slider .serenity-slide > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}


.brand__logo-image { width: 46px; height: 46px; object-fit: contain; border-radius: var(--radius); flex: 0 0 auto; }
.site-header__inner { position: relative; }
.site-header__actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-header__cta { min-height: 42px; padding: 9px 14px; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-footer__brand .brand__mark { width: 38px; height: 38px; font-size: 19px; }

.serenity-page-header-widget .page-hero__content { padding-block: 20px; }
.serenity-widget-header { border-bottom: 1px solid var(--line); background: rgba(255,250,240,0.94); }
.serenity-widget-header__inner { min-height: 78px; display: grid; grid-template-columns: minmax(220px, auto) minmax(0, 1fr); align-items: center; gap: 24px; }
.serenity-widget-header__nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.serenity-widget-header .site-nav { position: static; display: block; padding: 0; border: 0; box-shadow: none; background: transparent; }
.serenity-widget-footer { background: #13231b; color: rgba(255,250,240,0.82); padding: 48px 0; }
.serenity-widget-footer__grid { display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr; gap: 28px; }
.serenity-widget-footer h2, .serenity-widget-footer h3 { margin: 0 0 12px; color: #fffaf0; }
.serenity-widget-footer p, .serenity-widget-footer ul { margin: 0; }
.serenity-widget-footer ul { padding: 0; list-style: none; }
.serenity-widget-footer a { color: inherit; text-decoration: none; }
.serenity-widget-footer a:hover { color: var(--gold); }
.serenity-widget-footer .eyebrow { color: var(--gold); }


.serenity-elementor-header,
.serenity-elementor-footer { width: 100%; }
.serenity-elementor-header .elementor,
.serenity-elementor-footer .elementor { width: 100%; }


.serenity-widget-header.is-sticky { position: sticky; top: var(--serenity-sticky-top, 0); z-index: 50; }
.serenity-widget-header.menu-vertical .serenity-widget-menu,
.serenity-widget-header.menu-vertical .serenity-widget-menu ul { display: grid; align-items: stretch; }
.serenity-widget-header__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--pine); cursor: pointer; flex: 0 0 auto; }
.serenity-widget-header__toggle span:not(.screen-reader-text) { display: block; width: 20px; height: 2px; margin: 5px auto; background: currentColor; }
.serenity-widget-header__site-nav.is-open { display: block; }
.serenity-widget-header.mobile-width-auto .serenity-widget-header__site-nav { width: min(360px, calc(100vw - 28px)); }
.serenity-widget-header .serenity-widget-menu li { position: relative; }
.serenity-widget-header .serenity-widget-menu ul { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); z-index: 6; }
.serenity-widget-header .serenity-widget-menu li:hover > ul { display: grid; }
.serenity-widget-header.menu-vertical .serenity-widget-menu ul { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }

@media (max-width: 1180px) {
  .serenity-widget-header.has-mobile-toggle.mobile-at-desktop .serenity-widget-header__toggle { display: inline-block; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-desktop .serenity-widget-header__site-nav { position: absolute; inset: calc(100% + 8px) 0 auto; display: none; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .serenity-widget-header.has-mobile-toggle.mobile-at-desktop .serenity-widget-menu { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-desktop.hide-mobile-cta .serenity-widget-header__cta { display: none; }
}
@media (max-width: 900px) {
  .site-header:not(.show-mobile-cta) .site-header__cta { display: none; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-tablet .serenity-widget-header__toggle { display: inline-block; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-tablet .serenity-widget-header__site-nav { position: absolute; inset: calc(100% + 8px) 0 auto; display: none; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .serenity-widget-header.has-mobile-toggle.mobile-at-tablet .serenity-widget-menu { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-tablet.hide-mobile-cta .serenity-widget-header__cta { display: none; }
}
@media (max-width: 640px) {
  .serenity-widget-header.has-mobile-toggle.mobile-at-mobile .serenity-widget-header__toggle { display: inline-block; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-mobile .serenity-widget-header__site-nav { position: absolute; inset: calc(100% + 8px) 0 auto; display: none; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .serenity-widget-header.has-mobile-toggle.mobile-at-mobile .serenity-widget-menu { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .serenity-widget-header.has-mobile-toggle.mobile-at-mobile.hide-mobile-cta .serenity-widget-header__cta { display: none; }
}

.serenity-widget-header .button { width: auto; }


@keyframes serenityMenuFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes serenityMenuSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes serenityMenuSlideLeft { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes serenityMenuScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.site-header .site-nav.is-open,
.serenity-widget-header__site-nav.is-open {
  transform-origin: top right;
  animation-duration: var(--serenity-menu-duration, 240ms);
  animation-timing-function: var(--serenity-menu-easing, ease-out);
  animation-fill-mode: both;
}
.site-header.menu-animation-fade .site-nav.is-open,
.serenity-widget-header.menu-animation-fade .serenity-widget-header__site-nav.is-open { animation-name: serenityMenuFade; }
.site-header.menu-animation-slide-down .site-nav.is-open,
.serenity-widget-header.menu-animation-slide-down .serenity-widget-header__site-nav.is-open { animation-name: serenityMenuSlideDown; }
.site-header.menu-animation-slide-left .site-nav.is-open,
.serenity-widget-header.menu-animation-slide-left .serenity-widget-header__site-nav.is-open { animation-name: serenityMenuSlideLeft; }
.site-header.menu-animation-scale .site-nav.is-open,
.serenity-widget-header.menu-animation-scale .serenity-widget-header__site-nav.is-open { animation-name: serenityMenuScale; }
.site-header.menu-animation-none .site-nav.is-open,
.serenity-widget-header.menu-animation-none .serenity-widget-header__site-nav.is-open { animation-name: none; }
@media (prefers-reduced-motion: reduce) {
  .site-header .site-nav.is-open,
  .serenity-widget-header__site-nav.is-open { animation-duration: 1ms; }
}


.serenity-widget-footer__column { min-width: 0; }
.serenity-widget-footer__brand-column,
.serenity-widget-footer__menu-column,
.serenity-widget-footer__contact-column { display: grid; align-content: start; gap: 14px; }
.serenity-widget-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.serenity-widget-footer__menu { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.serenity-widget-footer.menu-horizontal .serenity-widget-footer__menu { display: flex; flex-wrap: wrap; align-items: center; }
.serenity-widget-footer__menu a { display: inline-flex; align-items: center; text-decoration: none; }
.serenity-widget-footer__contact { display: grid; gap: 8px; }
.serenity-widget-footer__bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,250,240,0.16); color: rgba(255,250,240,0.62); font-size: 14px; }
