/* ============================================================
   VILLA 369 — Professional Mobile-First Responsive
   Breakpoints: 1024 / 768 / 480 / 375
   ============================================================ */

/* === TABLET (≤ 1024px) === */
@media (max-width: 1024px) {
    /* Header */
    .header__nav { display: none; }
    .header__burger { display: block; }
    .header .btn--sm { display: none; }
    .header__lang { gap: 0.1rem; font-size: 0.6rem; }

    /* Highlights — stack to 1 column */
    .highlights__grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        max-width: 560px;
        margin: 0 auto;
    }
    .highlight__img { aspect-ratio: 16/9; }

    /* Villa split — stack, image first */
    .villa-split { grid-template-columns: 1fr; gap: var(--space-lg); }
    .villa-split__image { order: -1; }

    /* Amenities */
    .amenities__grid { grid-template-columns: repeat(3, 1fr); }

    /* Suites — 2 columns still */
    .suites__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }

    /* Gallery — 2 columns */
    .gallery__grid { grid-template-columns: repeat(2, 1fr); }
    .gallery__item--wide { grid-column: span 2; }
    .gallery__item--tall { grid-row: span 1; }

    /* Location */
    .location__split { grid-template-columns: 1fr; gap: var(--space-md); }

    /* Experiences — 2 columns */
    .experiences__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }

    /* Rates */
    .rates__features { grid-template-columns: repeat(2, 1fr); }

    /* Contact */
    .contact__split { grid-template-columns: 1fr; gap: var(--space-lg); }

    /* Footer */
    .footer__inner { flex-direction: column; gap: var(--space-md); }
    .footer__links { flex-wrap: wrap; gap: 1rem; }
    .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* === MOBILE (≤ 768px) === */
@media (max-width: 768px) {
    :root {
        --space-xl: 3.5rem;
        --space-lg: 2rem;
        --space-md: 1.5rem;
        --gutter: 1.25rem;
    }

    /* Typography mobile scale */
    .h2, h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    .section-label { font-size: 0.62rem; margin-bottom: 1rem; }

    /* Header — tighter */
    .header { height: 60px; }
    .header__logo { font-size: 0.75rem; letter-spacing: 0.2em; }
    .header__lang { gap: 0; }
    .header__lang-item { padding: 0.15rem 0.25rem; font-size: 0.55rem; }

    /* Hero — mobile optimized */
    .hero { min-height: 100svh; }
    .hero__content { padding: 0 1.25rem; }
    .hero__title { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.1; }
    .hero__tag { font-size: 0.62rem; letter-spacing: 0.15em; margin-bottom: 1rem; }
    .hero__sub { font-size: 0.78rem; margin-bottom: 2rem; }
    .hero__cta { gap: 0.75rem; }
    .hero .btn { padding: 0.85rem 1.8rem; font-size: 0.72rem; }
    .hero__stats {
        gap: 1.2rem;
        bottom: 5.5rem;
        width: 100%;
        justify-content: center;
        padding: 0 1rem;
    }
    .hero__stat-num { font-size: 1.3rem; }
    .hero__stat-label { font-size: 0.55rem; }
    .hero__scroll { display: none; }

    /* Highlights */
    .highlights { padding: var(--space-xl) 0 var(--space-lg); }
    .highlights__grid { max-width: 100%; gap: var(--space-md); }
    .highlight__title { font-size: 1.2rem; }
    .highlight__text { font-size: 0.82rem; }

    /* Villa section */
    .villa-section { padding: var(--space-lg) 0; }
    .villa-split { gap: var(--space-md); margin-top: var(--space-md); }
    .villa-split__lead { font-size: 1.1rem; }
    .villa-split__text p { font-size: 0.88rem; }
    .link-arrow { font-size: 0.75rem; margin-top: 1rem; }

    /* Amenities — 2 col */
    .amenities { padding: var(--space-lg) 0; }
    .amenities .h2 { margin-bottom: var(--space-md); }
    .amenities__grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .amenity {
        padding: 0.8rem 0.6rem;
        gap: 0.4rem;
    }
    .amenity__icon svg { width: 22px; height: 22px; }
    .amenity__name { font-size: 0.68rem; }

    /* Suites — single column */
    .suites { padding: var(--space-lg) 0; }
    .suites .h2 { margin-bottom: var(--space-md); }
    .suites__grid { grid-template-columns: 1fr; max-width: 100%; gap: var(--space-md); }
    .suite-card__img img { height: 220px; }
    .suite-card__title { font-size: 1.2rem; }
    .suite-card__list li { font-size: 0.82rem; }

    /* Gallery — 2 columns, all same size */
    .gallery { padding: var(--space-lg) 0; }
    .gallery .h2 { margin-bottom: 1rem; }
    .gallery__filters {
        gap: 0.3rem;
        margin-bottom: var(--space-md);
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .gallery__filters::-webkit-scrollbar { display: none; }
    .gallery__filter {
        padding: 0.4rem 0.9rem;
        font-size: 0.62rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .gallery__grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .gallery__item--wide { grid-column: span 2; }
    .gallery__item img { min-height: 160px; }
    .gallery__item--wide img { min-height: 180px; }

    /* Location */
    .location { padding: var(--space-lg) 0; }
    .location__intro { font-size: 0.88rem; margin-bottom: var(--space-md); }
    .location__map iframe { min-height: 280px; }
    .distance-item { padding: 0.7rem 0; font-size: 0.82rem; }

    /* Experiences — single column */
    .experiences { padding: var(--space-lg) 0; }
    .experiences__intro { font-size: 0.88rem; }
    .experiences__grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: var(--space-md);
    }
    .experience-card__img img { height: 200px; }
    .experience-card__title { font-size: 1.1rem; }
    .experience-card__text { font-size: 0.82rem; }

    /* Rates */
    .rates { padding: var(--space-lg) 0; }
    .rates .h2 { font-size: clamp(2rem, 8vw, 3rem); }
    .rates__sub { font-size: 0.85rem; }
    .rates__features {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        max-width: 320px;
    }
    .rates__feature { font-size: 0.82rem; }
    .rates__cta { flex-direction: column; align-items: center; }
    .rates__cta .btn { width: 100%; max-width: 300px; }

    /* FAQ */
    .faq { padding: var(--space-lg) 0; }
    .faq .h2 { margin-bottom: var(--space-md); }
    .faq__question { font-size: 0.9rem; padding: 1rem 0; }
    .faq__answer p { font-size: 0.82rem; padding-bottom: 1rem; }

    /* Contact */
    .contact { padding: var(--space-lg) 0; }
    .contact .h2 { margin-bottom: var(--space-md); }
    .form-row { grid-template-columns: 1fr; }
    .form-group label { font-size: 0.65rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { padding: 0.75rem 0.85rem; font-size: 0.85rem; }
    .contact__note { font-size: 0.72rem; }
    .contact__info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    .contact__info-block { margin-bottom: 0; }
    .contact__messenger { font-size: 0.88rem; }

    /* Footer */
    .footer { padding: var(--space-md) 0; }
    .footer__tagline { font-size: 0.75rem; }
    .footer__links { gap: 0.8rem; }
    .footer__links a { font-size: 0.7rem; }

    /* Mobile sticky bar */
    .mobile-bar { display: flex; }
    body { padding-bottom: 58px; }
    .mobile-bar {
        padding: 0.5rem var(--gutter);
        gap: 0.5rem;
    }
    .mobile-bar__btn {
        padding: 0.7rem 0.5rem;
        font-size: 0.65rem;
        gap: 0.3rem;
    }

    /* Lightbox mobile */
    .lightbox__prev,
    .lightbox__next { font-size: 2rem; padding: 0.5rem; }
    .lightbox__prev { left: 0.5rem; }
    .lightbox__next { right: 0.5rem; }
    .lightbox__close { top: 0.8rem; right: 0.8rem; font-size: 1.6rem; }
    .lightbox__caption { font-size: 0.7rem; bottom: 0.8rem; }

    /* Buttons global mobile */
    .btn { padding: 0.85rem 1.6rem; font-size: 0.75rem; }
}

/* === SMALL MOBILE (≤ 480px) === */
@media (max-width: 480px) {
    :root {
        --space-xl: 3rem;
        --space-lg: 1.75rem;
        --gutter: 1rem;
    }

    /* Hero fine-tune */
    .hero__title { font-size: 1.9rem; }
    .hero__sub { font-size: 0.72rem; }
    .hero__cta { flex-direction: column; align-items: center; }
    .hero .btn { width: 100%; max-width: 260px; }
    .hero__stats { gap: 0.8rem; bottom: 5rem; }
    .hero__stat-num { font-size: 1.1rem; }
    .hero__stat-label { font-size: 0.5rem; }

    /* Highlights */
    .highlight__img { aspect-ratio: 3/2; }
    .highlight__title { font-size: 1.1rem; }
    .highlight__text { font-size: 0.78rem; }

    /* Amenities — still 2 col but tighter */
    .amenities__grid { gap: 0.4rem; }
    .amenity { padding: 0.6rem 0.4rem; }
    .amenity__name { font-size: 0.62rem; letter-spacing: 0.03em; }
    .amenity__icon svg { width: 20px; height: 20px; }

    /* Gallery */
    .gallery__item img { min-height: 130px; }
    .gallery__item--wide img { min-height: 150px; }

    /* Suites */
    .suite-card__img img { height: 200px; }

    /* Contact info — single column */
    .contact__info { grid-template-columns: 1fr; }

    /* Rates */
    .rates .h2 { font-size: 1.9rem; }
    .rates__per { font-size: 0.45em; }
}

/* === EXTRA SMALL (≤ 375px) — iPhone SE etc === */
@media (max-width: 375px) {
    :root { --gutter: 0.85rem; }

    .hero__title { font-size: 1.65rem; }
    .hero__tag { font-size: 0.56rem; }
    .hero__stats { gap: 0.6rem; }

    .amenities__grid { grid-template-columns: 1fr 1fr; gap: 0.3rem; }
    .amenity { padding: 0.5rem 0.3rem; }
    .amenity__name { font-size: 0.58rem; }

    .gallery__grid { gap: 0.35rem; }

    .faq__question { font-size: 0.82rem; }

    .mobile-bar__btn { font-size: 0.58rem; padding: 0.6rem 0.3rem; }
}

/* === LANDSCAPE MOBILE (short + wide) === */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: 100svh; }
    .hero__title { font-size: 1.8rem; }
    .hero__sub { display: none; }
    .hero__stats { bottom: 1rem; gap: 1.5rem; }
    .hero__cta { gap: 0.5rem; }
    .hero .btn { padding: 0.6rem 1.2rem; font-size: 0.65rem; }
}

/* === TOUCH DEVICE HINTS === */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch — prevent "stuck" states */
    .highlight__img-wrap:hover .highlight__img { transform: none; }
    .gallery__item:hover img { transform: none; }
    .suite-card:hover .suite-card__img img { transform: none; }
    .experience-card:hover .experience-card__img img { transform: none; }
    .img-frame:hover img { transform: none; }
    .amenity:hover { border-color: var(--color-line); }
    .header__link::after { display: none; }

    /* Bigger tap targets */
    .gallery__filter { min-height: 36px; }
    .faq__question { min-height: 48px; }
    .btn { min-height: 44px; }
}

/* === SAFE AREA (notch / dynamic island) === */
@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-bar {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom));
    }
    .hero {
        padding-top: env(safe-area-inset-top);
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hero__scroll { display: none; }
    [data-animate] { opacity: 1; transform: none; }
}

/* === DARK MODE HINT (optional future) === */
/* @media (prefers-color-scheme: dark) { } */

/* === PRINT === */
@media print {
    .header, .mobile-bar, .lightbox, .mobile-nav { display: none !important; }
    body { padding-bottom: 0; }
    .hero { height: auto; min-height: auto; page-break-after: always; }
    .hero__bg { position: relative; }
    section { page-break-inside: avoid; }
}
