/* ==========================================
   SALO RESPONSIVE & UTILITY STYLES
   Optimized for ThemeForest / Awwwards Quality
   ========================================== */

/* Fluid Spacing & Section Padding globally */
:root {
    --section-py: clamp(2.5rem, 5vw, 4.5rem);
}

body.mobile-menu-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    padding-right: clamp(1rem, 4vw, 2.5rem);
    padding-left: clamp(1rem, 4vw, 2.5rem);
    margin-right: auto;
    margin-left: auto;
}

/* Base Headings - Fluid Scale */
h1 { font-size: clamp(2.4rem, 6vw, var(--text-6xl)); }
h2 { font-size: clamp(1.8rem, 4.5vw, var(--text-5xl)); }
h3 { font-size: clamp(1.4rem, 3.5vw, var(--text-3xl)); }
h4 { font-size: clamp(1.2rem, 2.5vw, var(--text-2xl)); }

/* ==========================================
   LARGE DESKTOP: 1400px+
   ========================================== */
@media (min-width: 1400px) {
    .container {
        max-width: var(--container-wide);
    }
    .footer-widgets-grid {
        gap: var(--space-12);
    }
}

/* ==========================================
   DESKTOP: 1200px
   ========================================== */
@media (max-width: 1200px) {
    .about-grid {
        gap: var(--space-10);
    }

    .about-img-accent {
        width: 170px;
        right: -var(--space-4);
    }

    .footer-widgets-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
}

/* ==========================================
   LAPTOP / TABLET LANDSCAPE: 992px
   ========================================== */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    body {
        padding-top: var(--header-height) !important;
    }

    /* Fixed mobile navbar */
    .salo-navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        box-shadow: var(--shadow-sm) !important;
        border-bottom: 1px solid rgba(201, 169, 110, 0.15) !important;
    }

    .navbar-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: var(--header-height) !important;
    }

    /* Header */
    .salo-nav-menu {
        display: none;
    }

    .salo-hamburger {
        display: flex;
    }

    .navbar-book {
        display: none;
    }

    .navbar-phone {
        display: none;
    }

    /* Hero */
    .salo-hero {
        min-height: auto;
        padding: clamp(7rem, 15vw, 10rem) 0 clamp(4rem, 10vw, 6rem);
    }

    .salo-hero h1 {
        font-size: clamp(2.2rem, 5vw, 3.5rem);
    }

    .hero-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .hero-image-wrap {
        grid-row: 1;
    }

    .hero-content {
        grid-row: 2;
    }

    .hero-pretitle {
        justify-content: center;
    }

    .hero-desc {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-model-card {
        max-width: 280px;
        margin: 0 auto;
    }

    /* Services Grid */
    .salo-services-grid.cols-4,
    .salo-services-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .about-img-accent {
        display: none;
    }

    .about-badge {
        left: var(--space-4);
    }

    /* Why Choose */
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Gallery Grid */
    .salo-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .salo-gallery-grid .gallery-item:nth-child(5) {
        grid-column: span 1;
        aspect-ratio: 1;
    }

    /* Team */
    .salo-team-grid.cols-4,
    .salo-team-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Testimonials Grid */
    .salo-testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Appointment */
    .appointment-inner {
        grid-template-columns: 1fr;
        padding: var(--space-8);
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    /* Stats Grid */
    .salo-stats-widget.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .salo-stats-widget.layout-horizontal {
        flex-wrap: wrap;
    }

    .salo-stats-widget.layout-horizontal .stat-item {
        flex: 0 0 50%;
        border-right: none;
        border-bottom: 1px solid var(--salo-border);
    }

    /* Price Lists */
    .salo-price-list.layout-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Instagram Grid */
    .instagram-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2);
    }

    /* WooCommerce */
    .salo-woo-content {
        grid-template-columns: 1fr;
    }

    /* Footer widgets */
    .footer-widgets-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
}

/* ==========================================
   TABLET PORTRAIT: 768px
   ========================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* Typography Scale Down */
    h1 { font-size: clamp(2rem, 7vw, 2.8rem) !important; }
    h2 { font-size: clamp(1.6rem, 5vw, 2.2rem) !important; }
    h3 { font-size: clamp(1.25rem, 4vw, 1.6rem) !important; }
    h4 { font-size: clamp(1.1rem, 3.5vw, 1.35rem) !important; }

    /* Topbar styling mobile fallback */
    .salo-topbar .topbar-left .topbar-item:nth-child(2) {
        display: none;
    }

    /* Hero section centering on smaller screens */
    .salo-hero {
        min-height: auto;
        background-attachment: scroll;
        text-align: center;
    }

    .salo-hero .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
    }

    .hero-pretitle {
        font-size: var(--text-xs);
        justify-content: center;
    }

    .hero-desc {
        font-size: var(--text-base);
        margin-right: auto;
        margin-left: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: var(--space-3);
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-scroll-hint {
        display: none;
    }

    /* Grid Sections stack */
    .salo-services-grid.cols-3,
    .salo-services-grid.cols-4,
    .salo-services-grid.cols-2 {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .about-features {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    /* Price Lists */
    .price-item {
        flex-wrap: wrap;
        gap: var(--space-1);
    }

    .price-dots {
        display: none;
    }

    .price-value {
        margin-left: auto;
    }

    .salo-price-list.layout-cards {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .salo-price-list.layout-cards .price-item {
        flex-wrap: nowrap !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important;
    }

    /* Gallery */
    .salo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .salo-gallery-grid .gallery-item:nth-child(5) {
        grid-column: span 1;
        aspect-ratio: 1;
    }

    /* Team */
    .salo-team-grid.cols-3,
    .salo-team-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    /* Testimonials */
    .salo-testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Appointment Form Layout */
    .appointment-inner {
        padding: var(--space-6);
    }

    .salo-default-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .appointment-form-wrap {
        padding: var(--space-5);
        width: 100%;
        box-sizing: border-box;
    }

    /* FAQ */
    .faq-question h4 {
        font-size: var(--text-sm);
    }

    /* Instagram */
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }

    /* Stats */
    .salo-stats-widget.layout-horizontal .stat-item {
        flex: 0 0 50%;
    }

    .salo-stats-widget.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: var(--text-4xl);
    }

    /* Before/After Tabs */
    .ba-tabs {
        flex-wrap: wrap;
        gap: var(--space-2);
        justify-content: center;
    }

    /* Section headers lines */
    .salo-section-header .subtitle::before,
    .salo-section-header .subtitle::after {
        width: 20px;
    }

    /* Footer widgets column stack */
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .footer-bottom-right {
        flex-direction: column;
        gap: var(--space-3);
    }
}

/* ==========================================
   MOBILE & SMARTPHONES: 576px
   ========================================== */
@media (max-width: 576px) {
    /* Prevent any horizontal layout spill */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Topbar completely hidden on mobile */
    .salo-topbar {
        display: none;
    }

    /* Hero */
    .salo-hero {
        min-height: 100svh;
        display: flex;
        align-items: center;
    }

    .salo-hero h1 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    .hero-buttons {
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100% !important;
        max-width: 100%;
    }

    /* Services Card margins */
    .salo-service-card {
        padding: var(--space-6);
    }

    /* Before / After Mobile Override */
    .salo-ba-container {
        aspect-ratio: 4/3 !important;
        border-radius: var(--radius-lg) !important;
    }
    
    .ba-tab-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
    }

    /* Gallery */
    .salo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2) !important;
    }

    /* Team card full width stack */
    .salo-team-grid.cols-3,
    .salo-team-grid.cols-4 {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Stats Widget full stack */
    .salo-stats-widget.layout-horizontal {
        flex-direction: column;
    }

    .salo-stats-widget.layout-horizontal .stat-item {
        flex: 0 0 100%;
        border-bottom: 1px solid var(--salo-border);
        border-right: none;
        padding: var(--space-4) 0;
    }

    .salo-stats-widget.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Instagram Grid */
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Form Fields spacing */
    .appointment-inner {
        padding: var(--space-4) var(--space-2);
        gap: var(--space-6);
    }

    .appointment-form-wrap {
        padding: var(--space-4);
    }

    .form-group {
        margin-bottom: var(--space-4);
    }

    .salo-form input,
    .salo-form select,
    .salo-form textarea {
        padding: 0.75rem var(--space-4);
        font-size: var(--text-sm);
    }
    
    .appointment-form-wrap button[type="submit"],
    .salo-form button[type="submit"] {
        padding: 0.85rem 1.25rem !important;
        font-size: 0.75rem !important;
    }

    /* Footer Areas */
    .footer-widgets-area {
        padding: var(--space-12) 0 var(--space-8);
    }

    /* Floating Utilities */
    #salo-scroll-top {
        bottom: 80px;
        right: var(--space-4);
    }

    .salo-whatsapp-float {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    /* Button sizes & Padding */
    .btn {
        padding: 0.75rem var(--space-5);
        font-size: var(--text-xs);
        letter-spacing: 0.05em;
    }

    .btn-lg {
        padding: 0.875rem var(--space-6);
        font-size: var(--text-sm);
    }

    /* Cards generic */
    .why-choose-card,
    .salo-card {
        padding: var(--space-6);
    }

    /* Subtitle & Headings centering */
    .salo-section-header {
        margin-bottom: var(--space-8);
    }

    /* Page Hero typography */
    .salo-page-hero {
        padding: 3rem 0 2rem;
    }

    .page-hero-title {
        font-size: 1.8rem;
    }
}

/* ==========================================
   TINY MOBILE PHONES: 320px
   ========================================== */
@media (max-width: 360px) {
    /* Sizing adjustments for extra tight width */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    
    .container {
        padding-right: var(--space-3);
        padding-left: var(--space-3);
    }
    
    /* Before/after tab button wrapping */
    .ba-tabs {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    
    .ba-tab-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Instagram grid 2 columns to prevent tiny crops */
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats grid 1 column */
    .salo-stats-widget.layout-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   WORDPRESS ADMIN BAR SUPPORT
   ========================================== */
.admin-bar .salo-navbar.scrolled {
    top: 32px !important;
}

@media (max-width: 992px) {
    .admin-bar .salo-navbar {
        top: 32px !important;
    }
    .admin-bar .salo-mobile-menu {
        top: calc(var(--header-height) + 32px) !important;
    }
}

@media (max-width: 782px) {
    .admin-bar .salo-navbar {
        top: 46px !important;
    }
    .admin-bar .salo-mobile-menu {
        top: calc(var(--header-height) + 46px) !important;
    }
}



/* ==========================================
   MOBILE HERO LAYOUT OVERRIDES (max-width: 767px)
   ========================================== */
@media (max-width: 767px) {
    .salo-hero {
        height: calc(100vh - 70px) !important;
        min-height: calc(100vh - 70px) !important;
        display: flex !important;
        align-items: flex-end !important;
        padding-top: 0 !important;
        padding-bottom: 65px !important;
        text-align: center !important;
    }

    .salo-hero .container {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-end !important;
        width: 100% !important;
    }

    .salo-hero .hero-content {
        max-width: 100% !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 var(--space-4) !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .salo-hero .hero-content * {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-pretitle {
        font-size: 13px !important;
        color: var(--salo-primary) !important;
        justify-content: center !important;
    }

    .salo-hero h1 {
        color: var(--salo-dark) !important;
        font-size: clamp(34px, 8vw, 40px) !important;
        line-height: 1.25 !important;
    }

    .salo-hero h1 .hero-strong {
        color: var(--salo-primary) !important;
    }

    .hero-desc {
        color: var(--salo-gray-dark) !important;
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin: 0 auto var(--space-4) !important;
    }

    .hero-buttons {
        justify-content: center !important;
        width: 100% !important;
    }

    /* Reposition dots to sit nicely below the bottom-aligned text */
    .hero-slider-dots {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        display: flex !important;
        gap: var(--space-2) !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .salo-header,
    .salo-footer,
    .salo-whatsapp-float,
    #salo-scroll-top,
    #salo-loader,
    .salo-topbar,
    .hero-scroll-hint {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    .salo-service-card,
    .blog-card {
        page-break-inside: avoid;
    }
}

/* ==========================================
   SERVICE DETAILS PAGE RESPONSIVE OVERRIDES
   ========================================== */
@media (max-width: 992px) {
    .service-layout-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .service-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .service-benefits-list {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

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

@media (max-width: 576px) {
    .service-gallery-grid {
        grid-template-columns: 1fr;
    }
}