/* ==========================================================================
   Kite House Dakhla — components
   Header & navigation, hero slider, content blocks, buttons, room / package
   cards, facilities, galleries & lightbox, contact form, map, footer,
   floating buttons, language switcher, cookie notice, blog.
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn1, .btn2, .btn3, .btn-hero {
  display: inline-block; min-width: 220px; padding: 10px 20px; font-size: 13px; line-height: 1.6;
  text-transform: uppercase; text-align: center; border: 0; border-radius: 0; cursor: pointer;
}
.btn1 { background-color: var(--c-primary); color: #fff !important; }
.btn1:hover, .btn1:focus-visible { background-color: var(--c-dark); color: #fff; }
.btn2 { background-color: #009ad1; color: #fff !important; }
.btn2:hover { background-color: #00505c; }
.btn3 { color: var(--c-dark) !important; border: 1px solid var(--c-dark); line-height: 24px; }
.btn3:hover, .btn3:focus-visible { color: #fff !important; border-color: var(--c-primary); background-color: var(--c-primary); }
.btn-hero { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 25px;
  background: var(--c-primary); color: #fff !important; font-size: 14px; padding: 12px 26px; }
.btn-hero:hover { background: var(--c-dark); }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #fff; transition: box-shadow .3s var(--ease), background-color .3s var(--ease); }
.site-main { padding-top: var(--header-h); }
.has-transparent-header .site-main { padding-top: 0; }

.topbar { background-color: var(--c-alt-bg); border-bottom: 1px solid #eee; font-size: 12px; color: #384554; transition: margin .3s var(--ease); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 5px 0; }
.topbar__contact { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.topbar__contact li { display: flex; align-items: center; gap: 8px; line-height: 30px; }
.topbar__contact a { color: #384554; }
.topbar__contact a:hover { color: var(--c-primary); }
.topbar__contact .icon { color: var(--c-primary); width: 18px; height: 18px; }

.social-links { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-primary); color: #fff; }
.social-links a:hover { background: var(--c-dark); color: #fff; }
.social-links--small a { width: 26px; height: 26px; font-size: 14px; }
.social-links--large { justify-content: center; margin-top: 30px; }
.social-links--large a { width: 40px; height: 40px; font-size: 20px; }

.header-main__inner { display: flex; flex-direction: column; align-items: center; }
.brand { display: block; margin: 12px 0 15px; line-height: 0; }
.brand__logo { width: 109px; height: auto; transition: width .3s var(--ease); }
.brand__logo--light { display: none; }

.main-nav ul { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a {
  position: relative; display: block; padding: 0 15px 20px; font-size: 14px; font-weight: 500; line-height: 22.4px;
  text-transform: uppercase; color: var(--c-nav); letter-spacing: .02em;
}
.main-nav a:hover, .main-nav .is-current > a { color: var(--c-primary); }
.nav-toggle { display: none; }

/* Scrolled (sticky) state: compact header without the top bar */
.site-header.is-scrolled { box-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
.site-header.is-scrolled .topbar { margin-top: calc(-1 * var(--topbar-h, 41px)); }
.site-header.is-scrolled .brand { margin: 8px 0 8px; }
.site-header.is-scrolled .brand__logo { width: 64px; }
.site-header.is-scrolled .main-nav a { padding-bottom: 12px; }

/* Transparent header over the home hero */
.site-header--transparent:not(.is-scrolled) { background: transparent; }
.site-header--transparent:not(.is-scrolled) .topbar { display: none; }
.site-header--transparent:not(.is-scrolled) .brand__logo { display: none; }
.site-header--transparent:not(.is-scrolled) .brand__logo--light { display: block; }
.site-header--transparent:not(.is-scrolled) .main-nav {
  width: 100vw; border-top: 1px solid rgba(255, 255, 255, .3); border-bottom: 1px solid rgba(255, 255, 255, .3);
}
.site-header--transparent:not(.is-scrolled) .main-nav a { color: #fff; padding: 14px 20px; }
.site-header--transparent:not(.is-scrolled) .main-nav a::before {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 2px; background: var(--c-primary); transition: left .25s var(--ease), right .25s var(--ease);
}
.site-header--transparent:not(.is-scrolled) .main-nav a:hover::before { left: 20px; right: 20px; }
.site-header--transparent:not(.is-scrolled) .brand { margin: 8px 0 10px; }
.site-header--transparent .brand__logo--light { width: 109px; }
.site-header--transparent.is-scrolled .topbar { display: none; }

/* ---------- Hero / slider ---------- */
.hero { position: relative; height: var(--hero-h, 550px); min-height: 320px; overflow: hidden; background: #cfc6b8; color: #fff; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity var(--fade, 1.5s) ease, visibility 0s linear var(--fade, 1.5s);
}
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity var(--fade, 1.5s) ease, visibility 0s; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__content { position: relative; z-index: 1; max-width: 1400px; padding: 0 20px; }
.hero__title { margin: 0 0 6px; font-size: 50px; font-weight: 700; line-height: 1.375; color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); }
.hero__subtitle { margin: 0; font-size: 36px; font-weight: 500; line-height: 1.6; color: #f6f6f6; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); }
.hero--home .hero__title { font-family: var(--font-script); font-weight: 400; font-size: 60px; }
.hero--home .hero__content { padding-top: 60px; }
.hero__nav {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  width: 48px; height: 64px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 30px; opacity: 0; transition: opacity .3s;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}
.hero:hover .hero__nav, .hero__nav:focus-visible { opacity: .85; }
.hero__nav--prev { left: 20px; }
.hero__nav--next { right: 20px; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 120px; z-index: 3; display: none; justify-content: center; gap: 10px; }
.hero__dot { width: 10px; height: 10px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; }
.hero__dot.is-active { background: #fff; }

/* Image panel (room photo beside its description) */
.image-panel { min-height: var(--min-h, 550px); height: 100%; background: #d9d4cc center / cover no-repeat; }
.row--middle .image-panel { min-height: var(--min-h, 550px); }

/* Mouse scroll cue (overlaps the bottom of the hero) */
.scroll-cue { position: relative; z-index: 5; max-width: var(--container); margin: -100px auto 0; height: 87px; display: flex; justify-content: center; }
.scroll-cue a { display: flex; flex-direction: column; align-items: center; }
.scroll-cue__mouse { display: block; width: 25px; height: 45px; border: 2px solid #fff; border-radius: 15px; background: #fff; }
.scroll-cue__wheel { display: block; width: 3px; height: 13px; margin: 5px auto; background: var(--c-primary); animation: wheel 1.2s ease infinite; }
.scroll-cue__arrow { display: block; width: 10px; height: 10px; margin: 0 0 3px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); animation: cue-arrow 1s infinite; }
.scroll-cue__arrow:nth-of-type(1) { margin-top: 6px; }
.scroll-cue__arrow:nth-of-type(2) { animation-delay: .2s; }
.scroll-cue__arrow:nth-of-type(3) { animation-delay: .3s; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes cue-arrow { 0% { opacity: 0; } 50% { opacity: .6; } 100% { opacity: 1; } }

/* Animated chevron under the welcome text */
.arrow-down { display: block; position: relative; width: 60px; height: 40px; margin: 0 auto 40px; animation: bob 1s 1.5s infinite ease-out alternate; }
.arrow-down span { position: absolute; top: 12px; width: 34px; height: 4px; background: var(--c-primary); border-radius: 2px; }
.arrow-down span:first-child { left: 2px; transform: rotate(35deg); }
.arrow-down span:last-child { right: 2px; transform: rotate(-35deg); }
.arrow-down:hover { animation-play-state: paused; }
@keyframes bob { 0% { transform: translateY(0); } 100% { transform: translateY(12px); } }

/* ---------- Room cards (home) ---------- */
.room { border: 1px solid var(--c-border); text-align: center; margin-bottom: 20px; background: #fff; }
.row:has(.room) > .row__inner { align-items: stretch; }
.cell > .room:only-child { height: calc(100% - 20px); display: flex; flex-direction: column; }
.room > p:last-child { margin-top: auto; }
.room .doblemar { margin-bottom: 30px; }
.room .doblemar img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.room h4 { padding: 0 20px; margin-bottom: 15px; text-transform: uppercase; color: var(--c-dark); }
.room h4::after { content: ""; display: block; width: 50px; height: 3px; margin: 10px auto 30px; background-color: var(--c-primary); }
.room p { padding: 0 20px; }
.room p:last-child { padding: 0 20px; }
.room .btn1 { width: 100%; max-width: 220px; min-width: 0; }
.practical-infos { margin-bottom: 30px; }
.practical-infos .infos { display: inline-block; margin: 5px; padding: 5px 10px; border: 1px solid var(--c-border); line-height: 1.2; }
.practical-infos .infos img { width: 30px; height: 30px; }
.practical-infos .infos br { display: block; content: ""; margin-top: 6px; }
.practical-infos .desc { display: block; margin-top: 4px; font-size: 11px; text-transform: uppercase; color: var(--c-primary); }

/* ---------- Experience cards ---------- */
.package { background: #fff; box-shadow: 0 2px 50px 0 rgba(0, 0, 0, .1); overflow: hidden; margin-bottom: 30px; }
.package img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 15px; }
.package p:first-child { margin-bottom: 0; }
.package h3, .package h4, .package h5 { margin-bottom: 5px; padding: 0 15px; }
.package p { padding: 0 15px; }
.package .description { padding: 0 15px; }

/* ---------- Facilities ---------- */
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px 33px; list-style: none; margin: 30px 0 0; padding: 0; }
.feature { width: calc(25% - 25px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature__icon { display: flex; align-items: center; justify-content: center; width: 90px; height: 90px; margin-bottom: 10px;
  border-radius: 50%; background: #fff; color: var(--c-icon); font-size: 40px; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.feature__title { font-size: 16px; margin: 0; color: inherit; }
.feature__text { margin: 0; color: var(--c-content); }


/* ---------- Gallery (justified rows, pure CSS) + lightbox ---------- */
.gallery { --rh: 100px; display: flex; flex-wrap: wrap; gap: var(--gutter-g, 10px); margin: 0 0 20px; }
.gallery::after { content: ""; flex-grow: 999999; }
.gallery__item {
  position: relative; display: block; height: var(--rh); flex: var(--ar) 1 calc(var(--ar) * var(--rh) * var(--pack, .62)); overflow: hidden; background: #e6e1d9; cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.06); }
.gallery__item::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0); transition: background .3s; }
.gallery__item:hover::after { background: rgba(0, 0, 0, .12); }

.lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(15, 15, 18, .94); opacity: 0; transition: opacity .25s; }
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__figure { position: relative; margin: 0; max-width: calc(100vw - 140px); max-height: calc(100vh - 100px); display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox__caption { margin-top: 10px; color: #ddd; font-size: 13px; text-align: center; }
.lightbox__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 22px; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__counter { position: absolute; top: 26px; left: 24px; color: #ccc; font-size: 13px; letter-spacing: .05em; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 1200px; margin: 30px auto 0; text-align: left; }
.contact-form__grid { display: flex; gap: 3%; }
.contact-form__grid .field { flex: 1 1 0; }
.field { margin: 0 0 20px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea {
  width: 100%; padding: 8px 10px; font: inherit; color: #222; background: #fff; border: 1px solid var(--c-border); border-radius: 0; min-height: 42px;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 2px rgba(0, 119, 152, .15); }
.field--quiz { text-align: center; margin-bottom: 0; }
.field--quiz label { display: block; margin-bottom: 8px; }
.field--quiz input { max-width: 320px; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__submit { margin: 20px 0 0; text-align: center; }
.contact-form__submit .btn1 { min-width: 220px; }
.contact-form .is-invalid { border-color: #dc3232 !important; }
.field-error { display: block; margin-top: 4px; font-size: 13px; color: #dc3232; }
.contact-form__status { margin-top: 20px; text-align: center; }
.contact-form__status:empty { display: none; }
.contact-form__status { padding: 12px 16px; border: 2px solid var(--c-primary); }
.contact-form__status.is-error { border-color: #dc3232; }
.contact-form__status.is-success { border-color: #46b450; }

/* ---------- Map ---------- */
.map { display: block; width: 100%; height: 600px; border: 0; filter: saturate(.5); }

/* ---------- Instagram call-to-action (replaces the live feed) ---------- */
.instagram-cta { text-align: center; padding: 30px 20px 40px; }
.instagram-cta__link { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--c-dark); }
.instagram-cta__icon { width: 44px; height: 44px; color: var(--c-primary); }
.instagram-cta__title { font-size: 20px; font-weight: 700; text-transform: uppercase; color: var(--c-primary); }
.instagram-cta__handle { font-size: 15px; }
.instagram-cta__link:hover .instagram-cta__handle { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { color: var(--c-footer-text); font-size: 15px; line-height: 1.6; background: var(--c-alt-bg); }
.footer-top { padding: 80px 0 30px; text-align: center; border-top: 1px solid #eee; }
.footer-logo { width: 178px; height: auto; margin-bottom: 15px; }
.footer-quote { width: 775px; max-width: 100%; margin: 0 auto; }
.footer-quote__title { position: relative; margin: 30px 0 10px; padding: 0 60px; font-size: 16px; font-weight: 600; line-height: 30px; text-transform: uppercase; color: var(--c-footer-text); }
.footer-quote__mark { position: absolute; top: 0; right: 0; font-size: 26px; color: var(--c-primary); }
.footer-quote__mark--left { left: 0; right: auto; transform: scaleX(-1); }
.footer-quote__text { margin-bottom: 20px; }
.footer-quote__author { font-size: 25px; font-weight: 700; line-height: 1; text-transform: uppercase; color: var(--c-primary); margin-bottom: 30px; }
.footer-contact { margin-bottom: 25px; line-height: 1.6; }
.footer-contact a { color: var(--c-footer-text); }
.footer-contact a:hover { color: var(--c-primary); }
.footer-contact .icon { margin-right: 6px; }
.footer-bottom { padding: 20px 0; border-top: 1px solid #eee; }
.copyright { margin: 0; font-size: 13px; text-align: center; }
.copyright a { color: var(--c-footer-text); }
.copyright a:hover { color: var(--c-primary); }

/* ---------- Floating buttons ---------- */
.float-btn { position: fixed; bottom: 10px; z-index: 9990; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px;
  border-radius: 50%; background-color: var(--c-primary); color: #fff; font-size: 26px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.float-btn:hover, .float-btn:focus-visible { background-color: var(--c-dark); color: #fff; }
.float-btn--location { left: 10px; }
.float-btn--whatsapp { right: 10px; }
body.cookie-visible .float-btn { bottom: var(--cookie-h, 60px); }

/* ---------- Language switcher (replaces the GTranslate floating widget) ---------- */
.lang-switch { position: fixed; top: 10px; left: 10px; z-index: 1100; font-size: 13px; }
.lang-switch__toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 17px;
  background: rgba(255, 255, 255, .92); color: var(--c-dark); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.lang-switch__toggle .icon { color: var(--c-primary); font-size: 15px; }
.lang-switch__list { position: absolute; top: 40px; left: 0; min-width: 150px; margin: 0; padding: 6px 0; list-style: none; background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); }
.lang-switch__list a { display: flex; gap: 10px; padding: 7px 14px; color: var(--c-dark); }
.lang-switch__list a:hover { background: var(--c-alt-bg); color: var(--c-primary); }
.lang-switch__list a[aria-current] { color: var(--c-primary); font-weight: 600; }
.lang-code { display: inline-block; min-width: 22px; font-weight: 700; color: var(--c-primary); }

/* ---------- Cookie notice ---------- */
.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  padding: 12px 70px; background: rgba(50, 50, 58, .92); color: #fff; font-size: 13px; line-height: 20px; text-align: center; }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; }
.cookie-notice__ok { padding: 4px 12px; border: 0; border-radius: 3px; background: var(--c-primary); color: #fff; font-size: 13px; }
.cookie-notice__ok:hover { background: var(--c-primary-dark); }

/* ---------- Blog post & archive ---------- */
.post { max-width: 820px; padding: 50px 20px 60px; color: var(--c-content); }
.post__content p { margin-bottom: 1.4em; }
.post__content h2 { font-size: 30px; margin-top: 1.2em; }
.post__content h3 { font-size: 25px; margin-top: 1em; }
.post__content img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.post__content ul, .post__content ol { margin-bottom: 1.4em; }
.post__content li { margin-bottom: .4em; }
.post__content a { text-decoration: underline; text-underline-offset: 2px; }
.post__content .tip-box { background: #fff; border: 1px solid rgba(10, 92, 122, .15); border-radius: 8px; padding: 1rem 1.25rem; margin-top: 1.25rem; display: flex; gap: 10px; align-items: flex-start; }
.post__content .tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.post__content .tip-box p { margin: 0; font-size: 16px; color: #6b6b80; }
.post__content .tip-box strong { color: #0a5c7a; }
.post__content blockquote { border-left: 3px solid var(--c-primary); padding: 4px 0 4px 18px; margin: 0 0 1.4em; font-style: italic; }
.archive { padding: 60px 20px; }
.archive__item { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid #eee; }
.archive__item:last-child { border-bottom: 0; }
.archive__title { font-size: 18px; margin: 0 0 8px; }
.archive__title a { color: #000; }
.archive__title a:hover { color: var(--c-primary); }
.archive__excerpt { color: var(--c-content); }

/* ---------- 404 ---------- */
.not-found { padding: 120px 20px; text-align: center; }
.not-found h1 { font-size: 36px; }
.not-found p { margin-bottom: 30px; }

/* Image panel fills the full height of its row (room rows on The House) */
.cell:has(> .image-panel) { align-self: stretch; }
.cell > .image-panel:only-child { height: 100%; }
.block--gallery .gallery { margin: 25px 0; }

/* Creative gallery: reserve the final mosaic box before the layout script runs (the script
   sets the same heights, see layoutCreative in components.js), so a late script cannot shift
   the page. Items stay hidden until positioned. Without scripting the justified rows above apply. */
@media (scripting: enabled) {
  .gallery[data-layout="creative"]:not(.is-creative) { display: block; position: relative; height: var(--gh); overflow: hidden; }
  .gallery[data-layout="creative"]:not(.is-creative) .gallery__item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; visibility: hidden; }
}
@media (scripting: enabled) and (max-width: 768px) { .gallery[data-layout="creative"]:not(.is-creative) { height: var(--gh-t); } }
@media (scripting: enabled) and (max-width: 568px) { .gallery[data-layout="creative"]:not(.is-creative) { height: var(--gh-m); } }

/* Creative mosaic (original Modula layout, positioned by js/components.js).
   Without JavaScript the gallery falls back to the justified rows above. */
.gallery.is-creative { display: block; position: relative; gap: 0; }
.gallery.is-creative::after { content: none; }
.gallery.is-creative .gallery__item { position: absolute; flex: none; }
