/* ==========================================================================
   LUMERA WELLNESS – RESPONSIVE STYLESHEET
   Handles Viewports: 320px, 360px, 375px, 390px, 414px, 430px, 480px,
                      768px, 1024px, 1280px, 1366px, 1440px, 1920px
   Strict Requirement: ZERO Horizontal Scrolling.
   ========================================================================== */

/* Universal Overflow Safety */
html,
body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

/* ==========================================================================
   Large Desktop / High-DPI Screens (1440px - 1920px+)
   ========================================================================== */
@media screen and (min-width: 1440px) {
    :root {
        --container-max: 1360px;
    }

    .title-group {
        margin-right: 18%;
        transform: translateY(-90px);
    }
}

/* ==========================================================================
   Standard Desktop & Laptops (1025px - 1280px / 1366px)
   ========================================================================== */
@media screen and (max-width: 1280px) {
    .main-menu {
        gap: 22px;
    }

    .title-group {
        margin-right: 10%;
        transform: translateY(-50px);
    }

    .ke-confidence-grid,
    .founder-grid,
    .ke-services-grid {
        gap: 40px;
    }

    .footer-container {
        gap: 30px;
    }
}

/* ==========================================================================
   Tablets & Small Screens (769px - 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    :root {
        --section-padding: 80px 5%;
        --header-height: 65px;
    }

    /* Switch to Mobile Header Navigation */
    .main-menu,
    .desktop-only {
        display: none !important;
    }

    .mobile-toggle {
        display: flex;
    }

    #main-header {
        width: 92%;
        padding: 0 20px;
    }

    /* Hero Section Adjustments */
    .lux-hero {
        padding: 110px 5% 60px;
        min-height: 90vh;
    }

    .lux-wrapper {
        min-height: auto;
        height: auto;
        padding-top: 40px;
    }

    .title-group {
        margin-left: 0;
        margin-right: 0;
        transform: none;
        max-width: 100%;
        text-align: left;
    }

    .stats-glass {
        position: static;
        margin-top: 35px;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.12);
    }

    /* Grids Collapse to 1 Column */
    .ke-expertise-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .ke-confidence-grid {
        grid-template-columns: 1fr;
        gap: 45px;
        justify-items: center;
    }

    .ke-confidence-section {
        padding: 90px 5% 70px;
    }

    .ke-confidence-header {
        margin-bottom: 55px;
    }

    .ke-visual-gallery {
        width: 578px;
        max-width: 100%;
        grid-template-columns: minmax(0, 322px) minmax(0, 240px);
        height: 492px;
    }

    .ke-features-list {
        width: 470px;
        max-width: 100%;
    }

    .hscroll-section {
        --hscroll-card-width: clamp(270px, 30vw, 320px);
        --hscroll-card-height: min(58vh, 430px);
    }

    .hscroll-pin {
        gap: 28px;
    }

    .hscroll-header {
        padding: 0 6vw;
    }

    /* About Preview & Founder Grids */
    .about-preview-container,
    .founder-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .founder-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .about-preview-img-wrapper,
    .founder-image-col {
        height: 420px;
    }

    /* Treatment Planner */
    .ke-planner-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Services Section */
    .ke-services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-visual-col {
        height: 380px;
    }

    /* FAQ */
    .ke-faq-columns-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ==========================================================================
   Mobile Landscape & Medium Mobiles (481px - 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 70px 5%;
        --v-card-width: 290px;
        --v-card-height: 420px;
    }

    .header-inner {
        padding: 0 15px;
    }

    #main-header {
        width: 94%;
        height: 62px;
        top: 15px;
    }

    .lux-hero {
        align-items: flex-end;
    }

    .lux-wrapper {
        justify-content: flex-end;
        align-items: center;
        padding-bottom: 40px;
    }

    .title-group {
        text-align: center;
        margin: 0 auto !important;
        align-items: center;
        transform: none;
        width: 100%;
    }

    .text-skin {
        font-size: 46px !important;
    }

    .text-confidence {
        font-size: 36px !important;
        margin-left: 0 !important;
    }

    .hero-description {
        position: relative;
        bottom: 0;
        text-align: center;
        margin: 20px 0 25px 0;
        max-width: 100%;
        opacity: 1;
        animation: none;
    }

    .hero-description p {
        font-size: 14px;
        width: 90%;
        margin: 0 auto;
    }

    .cta-container {
        position: relative;
        bottom: 0;
        transform: none;
        left: 0;
        text-align: center;
        width: 100%;
    }

    .lux-pill-btn {
        padding: 13px 28px;
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .stats-glass {
        display: none;
    }

    .ke-confidence-section {
        padding: 82px 5% 60px;
    }

    .ke-confidence-header {
        margin-bottom: 38px;
    }

    .ke-visual-gallery {
        grid-template-columns: 1.35fr 1fr;
        height: 420px;
        gap: 10px;
    }

    .ke-img-stack {
        gap: 10px;
    }

    .ke-img-sub {
        height: calc(50% - 5px);
    }

    .hscroll-section {
        --hscroll-card-width: min(78vw, 310px);
        --hscroll-card-height: 370px;
    }

    .hscroll-pin,
    .concerns-scroll-section .hscroll-pin {
        min-height: 0;
        gap: 24px;
        padding: 48px 0;
    }

    .hscroll-header {
        align-items: flex-start;
        padding: 0 5vw;
    }

    .hscroll-header h2 {
        font-size: clamp(26px, 7vw, 34px);
    }

    .hscroll-track {
        gap: 14px;
        padding: 0 5vw 12px;
    }

    .v-card,
    .hscroll-card {
        min-height: 320px;
        border-radius: 20px;
    }

    .v-card-content,
    .hscroll-card-content {
        padding: 22px;
    }

    .services-catalog-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mobile Standard & Compact Viewports (320px, 360px, 375px, 390px, 414px, 430px)
   ========================================================================== */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 60px 4.5%;
        --header-height: 60px;
    }

    .ke-confidence-header h2 {
        font-size: 24px;
        line-height: 1.25;
    }

    .ke-confidence-grid {
        gap: 34px;
    }

    .ke-confidence-section {
        padding: 82px 4.5% 55px;
    }

    .ke-visual-gallery {
        height: 360px;
    }

    .ke-feature-row {
        min-height: 76px;
        gap: 12px;
    }

    .ke-feature-content p {
        font-size: 12.5px;
    }

    .header-logo img {
        height: 36px;
        max-width: 130px;
    }

    #main-header.is-scrolled .header-logo img {
        height: 32px;
    }

    .header-inner {
        padding: 0 12px;
    }

    /* Hero Typography */
    .text-skin {
        font-size: 38px !important;
    }

    .text-confidence {
        font-size: 30px !important;
    }

    .hero-description p {
        font-size: 13px;
    }

    .lux-pill-btn,
    .btn,
    .cta-btn,
    .ke-btn-black,
    .ke-btn-outline {
        width: 100%;
        padding: 13px 22px;
        font-size: 11px;
    }

    .ke-cta-row {
        flex-direction: column;
        width: 100%;
    }

    /* Cards & Spacing */
    .ke-expertise-card {
        height: 380px;
        padding: 25px;
    }

    .ke-card-title {
        font-size: 22px;
    }

    .hscroll-section {
        --hscroll-card-width: min(80vw, 300px);
        --hscroll-card-height: 350px;
    }

    .about-preview-img-wrapper,
    .founder-image-col,
    .services-visual-col {
        height: 300px;
    }

    .planner-steps-box,
    .planner-result-card,
    .consultation-form-card,
    .contact-form-card,
    .legal-card {
        padding: 25px 20px;
    }

    .ke-service-item {
        padding: 18px 0;
    }

    .ke-service-title {
        font-size: 16px;
    }

    .ke-faq-item {
        padding: 18px 20px;
    }

    .ke-faq-question h4 {
        font-size: 15px;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-legal-links {
        justify-content: center;
    }

    /* Page Hero Banners */
    .page-hero {
        padding: 130px 5% 60px;
    }
}

/* ==========================================================================
   Ultra-Compact Mobiles (320px - 360px)
   ========================================================================== */
@media screen and (max-width: 360px) {
    .text-skin {
        font-size: 32px !important;
    }

    .text-confidence {
        font-size: 26px !important;
    }

    .hscroll-section {
        --hscroll-card-width: 82vw;
        --hscroll-card-height: 330px;
    }

    .header-logo img {
        height: 30px;
    }
}

/* ==========================================================================
   LUMERA WELLNESS – RESPONSIVE POLISH & MOBILE TOUCH SCROLL
   Final overrides: fluid layouts, consistent spacing, and swipeable cards.
   ========================================================================== */

:root {
    --lw-gutter: clamp(18px, 5vw, 76px);
    --lw-section-space: clamp(54px, 7vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { width: 100%; min-width: 320px; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { max-width: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }

/* Consistent page gutters and prevent fixed-width children escaping */
main, section, header, footer, .page-content, .container, .section-container {
    min-width: 0;
}
section:not(.lux-hero):not(.hscroll-section) {
    scroll-margin-top: 90px;
}
.page-hero, .page-section, .contact-section, .legal-section,
.blog-section, .services-section, .consultation-section {
    padding-left: var(--lw-gutter);
    padding-right: var(--lw-gutter);
}
.page-hero { overflow: hidden; }
.page-hero h1, .page-hero h2,
section h1, section h2, section h3,
.footer-h {
    overflow-wrap: anywhere;
}
p { overflow-wrap: break-word; }

/* Header: stable sizing and accessible tap targets */
#main-header {
    max-width: calc(100% - 28px);
}
.header-inner {
    min-width: 0;
    gap: 12px;
}
.header-logo { flex: 0 1 auto; min-width: 0; }
.header-logo img, .footer-logo-img {
    display: block;
    max-width: 100%;
    object-fit: contain;
}
.mobile-toggle {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
}
.main-menu a, .mobile-menu a, .mobile-menu button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}
button, .btn, .cta-btn, .lux-pill-btn, .ke-btn-black, .ke-btn-outline {
    min-height: 44px;
    touch-action: manipulation;
}

/* Hero content scales without forced offsets */
.lux-hero {
    min-height: min(900px, 100svh);
    min-height: min(900px, 100vh);
    min-height: min(900px, 100svh);
    background-position: center;
}
.lux-wrapper {
    width: min(90%, 1300px);
    max-width: 1300px;
}
.title-group { max-width: 100%; }
.text-skin, .text-confidence { overflow-wrap: normal; }

/* Common grids: avoid fixed widths causing horizontal overflow */
.ke-expertise-grid, .ke-confidence-grid, .founder-grid,
.ke-services-grid, .ke-planner-grid, .about-preview-container,
.ke-faq-columns-wrapper, .footer-container,
.services-catalog-grid, .blog-grid, .contact-grid,
.consultation-grid {
    min-width: 0;
}
.ke-expertise-card, .ke-feature-row, .ke-feature-item,
.ke-service-item, .ke-faq-item, .founder-info-card,
.planner-steps-box, .planner-result-card,
.contact-form-card, .consultation-form-card, .legal-card,
.blog-card, .service-card {
    min-width: 0;
    max-width: 100%;
}
.ke-visual-gallery, .about-preview-img-wrapper,
.founder-image-col, .services-visual-col {
    max-width: 100%;
}
.ke-visual-gallery img, .about-preview-img-wrapper img,
.founder-image-col img, .services-visual-col img,
.blog-card img, .service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Horizontal treatment rail: desktop stays GSAP controlled */
.hscroll-section { width: 100%; max-width: 100%; }
.hscroll-pin { min-width: 0; }
.hscroll-viewport { overscroll-behavior-x: contain; }
.hscroll-track { align-items: stretch; }
.v-card, .hscroll-card { flex-shrink: 0; }

/* Form controls and long content */
input, select, textarea {
    width: 100%;
    min-width: 0;
    font: inherit;
}
textarea { resize: vertical; }
table { display: block; max-width: 100%; overflow-x: auto; }
pre, code { max-width: 100%; overflow-wrap: anywhere; }

/* Tablet */
@media (max-width: 1024px) {
    :root { --lw-section-space: clamp(52px, 7vw, 78px); }
    .lux-hero { min-height: 760px; min-height: 92svh; }
    .lux-wrapper { width: 90%; }
    .title-group { width: min(100%, 680px); }
    .ke-expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ke-confidence-grid, .founder-grid,
    .about-preview-container, .ke-services-grid,
    .ke-planner-grid { grid-template-columns: minmax(0, 1fr); }
    .ke-confidence-grid { justify-items: stretch; }
    .ke-visual-gallery { width: min(100%, 620px); margin-inline: auto; }
    .ke-features-list { width: min(100%, 620px); }
    .services-catalog-grid, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile/tablet touch scrolling: swipe the single Premium Treatments rail.
   Do not pin on touch-sized screens; the page remains naturally vertically scrollable. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    html, body { overflow-x: clip !important; }
    .hscroll-section {
        min-height: 0;
        height: auto;
        overflow: visible;
        padding: 42px 0 48px;
    }
    .hscroll-pin {
        min-height: 0;
        height: auto;
        padding: 0;
        gap: 24px;
        overflow: visible;
    }
    .hscroll-header {
        padding-inline: var(--lw-gutter);
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px;
    }
    .hscroll-header .btn { width: auto; }
    .hscroll-viewport,
    .hscroll-section.is-horizontal-ready .hscroll-viewport {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        padding: 0;
        overscroll-behavior: none;
        touch-action: pan-y;
    }
    .hscroll-track {
        width: max-content !important;
        min-width: 100%;
        gap: 14px;
        padding: 0 var(--lw-gutter) 10px;
        will-change: transform;
    }
    .v-card, .hscroll-card {
        width: min(78vw, 320px);
        flex: 0 0 min(78vw, 320px);
        height: clamp(300px, 70vw, 390px);
        min-height: 0;
        scroll-snap-align: start;
        border-radius: 20px;
    }
    .v-card-content, .hscroll-card-content { padding: 20px; }
    .hscroll-section.is-horizontal-pinned { z-index: auto; }
    .ke-expertise-grid, .services-catalog-grid, .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ke-confidence-section { padding-block: var(--lw-section-space); }
    .about-preview-container, .founder-grid, .ke-services-grid,
    .ke-planner-grid, .ke-faq-columns-wrapper { gap: 28px; }
    .footer-container { gap: 28px; }
}

/* Standard phones */
@media (max-width: 600px) {
    :root { --lw-gutter: 18px; --lw-section-space: 58px; }
    #main-header {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        padding-inline: 12px;
    }
    .header-logo img { max-width: 122px; height: 34px; }
    .lux-hero { min-height: 760px; min-height: 100svh; }
    .lux-wrapper {
        width: calc(100% - 36px);
        padding-top: 100px;
        padding-bottom: 32px;
    }
    .title-group { align-items: center; text-align: center; }
    .text-skin { font-size: clamp(34px, 10vw, 46px) !important; line-height: 1.02; }
    .text-confidence { font-size: clamp(27px, 8vw, 36px) !important; line-height: 1.08; }
    .hero-description { max-width: 38rem; }
    .hero-description p { width: 100%; line-height: 1.65; }
    .ke-expertise-grid, .services-catalog-grid, .blog-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .ke-expertise-card { min-height: 330px; height: auto; }
    .ke-visual-gallery {
        width: 100%;
        height: clamp(300px, 95vw, 390px);
        grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr);
    }
    .ke-feature-row { align-items: flex-start; }
    .about-preview-img-wrapper, .founder-image-col,
    .services-visual-col { height: clamp(260px, 78vw, 340px); }
    .hscroll-section { padding-block: 38px 42px; }
    .hscroll-header { padding-inline: 18px; }
    .hscroll-header h2 { font-size: clamp(25px, 7.5vw, 34px); }
    .hscroll-header .btn { width: auto; min-height: 40px; padding: 10px 16px; }
    .hscroll-track { padding-inline: 18px; }
    .v-card, .hscroll-card {
        width: min(82vw, 310px);
        flex-basis: min(82vw, 310px);
        height: clamp(290px, 95vw, 360px);
    }
    .footer-container { grid-template-columns: minmax(0, 1fr); }
    .footer-col { min-width: 0; }
    .footer-bottom-inner { align-items: center; }
    .page-hero { padding-top: 120px; padding-bottom: 48px; }
    .contact-form-card, .consultation-form-card,
    .planner-steps-box, .planner-result-card, .legal-card { padding: 22px 18px; }
}

/* Small phones */
@media (max-width: 380px) {
    :root { --lw-gutter: 15px; }
    .header-logo img { max-width: 108px; }
    .hscroll-header { padding-inline: 15px; }
    .hscroll-track { padding-inline: 15px; gap: 12px; }
    .v-card, .hscroll-card {
        width: 84vw;
        flex-basis: 84vw;
        height: 310px;
    }
    .text-skin { font-size: 32px !important; }
    .text-confidence { font-size: 26px !important; }
    .ke-feature-content p { font-size: 12px; }
}

/* Large desktop breathing room */
@media (min-width: 1440px) {
    .hscroll-header { padding-inline: max(8vw, calc((100vw - 1360px) / 2)); }
    .hscroll-track { padding-inline: max(3vw, calc((100vw - 1440px) / 2)); }
}

/* Respect motion preferences while keeping touch scrolling available */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
