/* ============================================================
   VITALIS WHITE SANDS — RESPONSIVE CSS
   Breakpoints: 1200px, 1024px, 768px, 480px, 390px
   ============================================================ */

/* ============================================================
   1200px – Large Desktop / Container edge
   ============================================================ */
@media screen and (max-width: 1200px) {

    :root {
        --container-max: 960px;
    }

    .vws-menu > li > a {
        padding: 8px 10px;
        font-size: 11px;
        letter-spacing: 1.2px;
    }

    .vws-logo-img {
        height: 54px;
    }

    .vws-footer__grid {
        gap: var(--spacing-lg);
    }
}

/* ============================================================
   1024px – Small Desktop / Tablet Landscape
   ============================================================ */
@media screen and (max-width: 1024px) {

    :root {
        --fs-h1:  34px;
        --fs-h2:  28px;
        --fs-h3:  22px;
    }

    /* Hide topbar address on 1024 */
    .vws-topbar__address {
        display: none;
    }

    .vws-topbar__contact-item {
        font-size: 11px;
    }

    /* Compress nav items */
    .vws-menu > li > a {
        padding: 6px 8px;
        font-size: 10.5px;
        letter-spacing: 1px;
    }

    /* Footer grid: 2-column on tablet landscape */
    .vws-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .vws-footer__col--about {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        align-items: start;
    }

    .vws-footer__logo {
        grid-column: 1 / -1;
    }

    /* Content grid */
    .vws-content-container {
        grid-template-columns: 1fr 260px;
        gap: var(--spacing-lg);
    }

    .vws-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Section spacing */
    .vws-section {
        padding: var(--spacing-xl) 0;
    }

    .vws-section--lg {
        padding: var(--spacing-xxl) 0;
    }
}

/* ============================================================
   900px – Tablet transition
   ============================================================ */
@media screen and (max-width: 900px) {

    /* Switch to hamburger layout */
    .vws-nav--left,
    .vws-nav--right {
        display: none;
    }

    /* Circle side-panel trigger, the standalone header Book Now button, and
       the compact mobile BOOK chip are all removed — only the hamburger remains */
    .vws-header__side-btn,
    .vws-header__book-btn,
    .btn-book--mobile {
        display: none;
    }

    .vws-header__mobile-controls {
        display: flex;
    }

    .vws-hamburger {
        display: flex;
    }

    /* Header inner: collapse the 5-column desktop grid down to just
       [logo] ... [mobile controls] so the hamburger sits flush right.
       Desktop's 10% side padding is also reduced so it actually reaches the edge. */
    .vws-header__inner {
        grid-template-columns: 1fr auto;
        padding: 0 20px;
    }

    .vws-header__logo {
        justify-content: flex-start;
    }

    /* Logo enlarged on mobile */
    .vws-logo-img {
        height: 64px;
    }

    /* Topbar hidden entirely on mobile — header sticks to the very top */
    .vws-topbar {
        display: none;
    }

    .vws-header {
        top: 0;
    }

    body:not(.has-hero) .vws-main {
        padding-top: var(--header-height);
    }

    body.has-page-banner:not(.has-hero) .vws-main {
        padding-top: 0;
    }

    .vws-page-banner {
        margin-top: var(--header-height);
        padding: 0;
    }

    /* Page banner */
    .vws-page-banner {
        height: 320px;
    }

    .vws-page-banner__title {
        font-size: 28px;
        letter-spacing: 3px;
    }

    /* Section title */
    .vws-section-title__heading {
        font-size: 24px;
    }

    .vws-section-title__accent {
        font-size: 26px;
    }
}

/* ============================================================
   768px – Tablet Portrait / Small Tablet
   ============================================================ */
@media screen and (max-width: 768px) {

    :root {
        --fs-h1:       28px;
        --fs-h2:       24px;
        --fs-h3:       20px;
        --fs-h4:       18px;
        --fs-body:     16px;
        --spacing-xxl: 60px;
        --spacing-xl:  40px;
    }

    /* Top bar is hidden on mobile (see 900px query) — header sticks to top */
    body:not(.has-hero) .vws-main {
        padding-top: var(--header-height);
    }

    .vws-page-banner {
        margin-top: var(--header-height);
    }

    .vws-header {
        top: 0;
    }

    /* Footer: single column */
    .vws-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .vws-footer__col--about {
        grid-column: auto;
        display: block;
    }

    .vws-footer__col--about .vws-footer__social {
        margin-top: var(--spacing-sm);
    }

    /* Footer columns are already centered site-wide (see main.css) —
       mobile just scales the logo up */
    .vws-logo-img--footer {
        width: 80%;
        max-width: 320px;
        height: auto;
    }

    /* Content: no sidebar on small tablets */
    .vws-content-container {
        grid-template-columns: 1fr;
    }

    .vws-sidebar {
        position: static;
    }

    /* Grid adjustments */
    .vws-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .vws-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .vws-grid-2 {
        grid-template-columns: 1fr;
    }

    /* Post navigation: stack */
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
        align-items: flex-start;
    }

    /* Page banner */
    .vws-page-banner {
        height: 280px;
    }

    .vws-page-banner__title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .vws-page-banner__subtitle {
        font-size: 22px;
    }

    /* Footer copyright */
    .vws-footer__copyright-inner {
        flex-direction: column;
        text-align: center;
    }

    /* Cards */
    .vws-card {
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    /* Mobile menu: leave a visible gap on the side so the overlay/backdrop shows */
    .vws-mobile-menu {
        width: 85%;
        max-width: 340px;
    }

    /* 404 */
    .vws-404__number {
        font-size: 120px;
    }

    /* Section title */
    .vws-section-title__heading {
        font-size: 22px;
        letter-spacing: 1.5px;
    }

    .vws-section-title__desc {
        font-size: 15px;
    }
}

/* ============================================================
   480px – Large Mobile
   ============================================================ */
@media screen and (max-width: 480px) {

    :root {
        --fs-h1:  24px;
        --fs-h2:  20px;
        --spacing-md: 20px;
    }

    /* Topbar stays hidden on mobile (see 900px query) */
    body:not(.has-hero) .vws-main {
        padding-top: var(--header-height);
    }

    .vws-page-banner {
        margin-top: var(--header-height);
    }

    .vws-header {
        top: 0;
    }

    /* Logo enlarged on mobile (still slightly smaller than the 900px size to fit small screens) */
    .vws-logo-img {
        height: 56px;
    }

    /* Grid: single column */
    .vws-grid-3,
    .vws-grid-4 {
        grid-template-columns: 1fr;
    }

    /* Buttons: full width on small screens */
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    /* Page banner */
    .vws-page-banner {
        height: 240px;
    }

    .vws-page-banner__title {
        font-size: 20px;
        letter-spacing: 1.5px;
    }

    /* Footer */
    .vws-footer__main {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }

    .vws-footer__col-title {
        font-size: 11px;
    }

    /* 404 */
    .vws-404__number {
        font-size: 90px;
    }

    .vws-404__search {
        flex-direction: column;
    }

    /* Back to top: smaller on mobile */
    .vws-back-to-top {
        width: 38px;
        height: 38px;
        bottom: 12px;
        right: 12px;
    }
}

/* ============================================================
   390px – iPhone 14 / Small Mobile
   ============================================================ */
@media screen and (max-width: 390px) {

    :root {
        --fs-h1:  22px;
        --fs-h2:  18px;
        --fs-body: 15px;
        --spacing-md: 16px;
    }

    /* Container padding tighter */
    .vws-container,
    .vws-footer__container,
    .vws-topbar__inner,
    .vws-header__inner {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    /* Hamburger border: thinner border on very small screens */
    .vws-hamburger {
        width: 36px;
        height: 36px;
    }

    /* Page banner: compact */
    .vws-page-banner {
        height: 200px;
    }

    .vws-page-banner__title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .vws-page-banner__breadcrumb {
        font-size: 11px;
    }

    /* Section title */
    .vws-section-title__accent {
        font-size: 22px;
    }

    .vws-section-title__heading {
        font-size: 18px;
        letter-spacing: 1px;
    }

    /* Mobile menu: full padding adjustment */
    .vws-mobile-menu__inner {
        padding: var(--spacing-sm);
    }

    .vws-mobile-menu__list > li > a {
        font-size: 12px;
        padding: 12px 4px;
    }

    /* Card */
    .vws-card {
        max-width: 100%;
    }

    .vws-card__body {
        padding: var(--spacing-sm);
    }

    /* Footer grid: full width  */
    .vws-footer__grid {
        gap: var(--spacing-md);
    }

    .vws-footer__main {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    /* Back to top: far right from screen edge */
    .vws-back-to-top {
        right: 8px;
        bottom: 8px;
    }

    /* 404 */
    .vws-404__number {
        font-size: 80px;
    }

    .vws-404__title {
        font-size: 18px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {

    .vws-topbar,
    .vws-header,
    .vws-footer,
    .vws-back-to-top,
    .vws-hamburger,
    .vws-mobile-menu,
    .vws-mobile-overlay,
    .btn-book,
    .btn-primary {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000000;
    }

    .vws-main {
        padding-top: 0 !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666666;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   HIGH CONTRAST MODE
   ============================================================ */
@media (prefers-contrast: high) {
    :root {
        --color-accent: #00d4c8;
        --color-body-text: #444444;
    }

    .vws-menu > li > a {
        color: #000000;
    }

    .vws-topbar {
        border-bottom: 2px solid #ffffff;
    }

    .vws-header--scrolled {
        border-bottom: 2px solid #000000;
    }
}
