/* ============================================
   INBUILT ATELIER MOBILE-FIRST OPTIMISATION 2025
   App-Like Experience for Mobile Devices
   ============================================ */

/* ============================================
   MOBILE-FIRST BASE STYLES
   ============================================ */
@media (max-width: 1024px) {
    :root {
        /* Reduced spacing for mobile */
        --space-xs: 0.5rem;
        --space-sm: 0.75rem;
        --space-md: 1rem;
        --space-lg: 1.25rem;
        --space-xl: 2rem;
        --space-2xl: 2.5rem;
        --space-3xl: 3rem;
        --space-4xl: 4rem;
    }

    html {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .container {
        padding: 0 1rem;
        max-width: 100%;
    }

    /* ============================================
       MOBILE NAVIGATION - PREMIUM CLEAN DESIGN
       Award-winning minimalist approach
       ============================================ */
    
    /* Fixed clean header on mobile — transparent by default */
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.75rem 0 !important;
        border-radius: 0 !important;
        z-index: 1000 !important;
    }

    /* Mobile: solid header on scroll */
    header.header-solid {
        background: rgba(255, 255, 255, 0.97) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        backdrop-filter: blur(16px) !important;
        border-bottom-color: rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    }

    /* Mobile: logo white on transparent, dark on solid */
    .nav-logo {
        filter: brightness(0) invert(1) !important;
    }
    header.header-solid .nav-logo {
        filter: none !important;
    }

    /* Clean flat bar - no pill design */
    .nav-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 1.25rem !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    /* Mobile header: keep .nav-links functional but don't let .nav-center take space */
    .nav-center {
        width: 0 !important;
        height: 0 !important;
        flex: 0 0 0 !important;
        overflow: visible !important;
    }

    .nav-right {
        display: flex !important;
        align-items: center !important;
    }

    header.scrolled .nav-container {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 1.25rem !important;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 !important;
    }

    /* Premium logo styling - not too big */
    .logo {
        z-index: 1003;
    }

    .logo img,
    .nav-logo-img {
        height: 36px !important;
        width: auto !important;
        filter: none !important;
    }

    html body nav .nav-links {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-width: none !important;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 2rem !important;
        margin: 0 !important;
        gap: 0 !important;
        list-style: none !important;
        transform: translateY(-100%) !important;
        transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        z-index: 1002 !important;
        opacity: 0;
        visibility: hidden;
    }

    html body nav .nav-links.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* No backdrop needed - fullscreen white menu */
    body.menu-open::before {
        display: none;
    }

    html body nav .nav-links li {
        display: block !important;
        width: auto !important;
        border-bottom: none !important;
        padding: 0 !important;
        text-align: center !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    html body nav .nav-links a {
        display: block !important;
        padding: 1rem 2rem !important;
        font-size: 1.5rem !important;
        font-weight: 600 !important;
        color: #1a1a2e !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        letter-spacing: -0.02em !important;
    }

    html body nav .nav-links a:hover,
    html body nav .nav-links a:active {
        color: var(--color-primary) !important;
        transform: scale(1.05);
    }

    .nav-links a::before {
        display: none;
    }

    .nav-links a.active::before,
    .nav-links a:hover::before {
        height: 60%;
    }

    /* Dropdown parent links - style properly */
    .nav-item-dropdown > a,
    .dropdown > a {
        display: block !important;
    }

    /* Dropdown in mobile - hidden by default, reveal on tap */
    .nav-item-dropdown .dropdown-menu,
    .dropdown .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                    opacity 0.35s ease;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Mega-menu mobile: full-width single column */
    .nav-item-dropdown .mega-menu.dropdown-menu {
        display: flex !important;
        grid-template-columns: none !important;
    }

    .nav-item-dropdown.active .dropdown-menu,
    .dropdown.active .dropdown-menu {
        max-height: 800px;
        opacity: 1;
        visibility: visible;
        padding: 0.5rem 0 1rem !important;
    }

    .nav-item-dropdown .dropdown-menu li,
    .dropdown .dropdown-menu li {
        width: 100% !important;
        text-align: center !important;
        border: none !important;
        padding: 0 !important;
    }

    /* Mega-menu columns on mobile: stack vertically */
    .mega-col {
        border-right: none !important;
        padding: 0.5rem 1.5rem !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .mega-heading {
        font-size: 0.65rem !important;
        color: var(--color-copper, #c4996c) !important;
        text-align: center !important;
        padding: 0.75rem 0 0.35rem !important;
        margin-bottom: 0.25rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    }

    .mega-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .mega-links li {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        width: 100% !important;
        text-align: center !important;
    }

    .mega-links a {
        justify-content: center !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: #64748b !important;
    }

    .mega-links a::before {
        display: none !important;
    }

    .mega-links a:hover {
        transform: none !important;
        gap: 0 !important;
        color: var(--color-primary) !important;
    }

    .nav-item-dropdown .dropdown-menu a,
    .dropdown .dropdown-menu a {
        padding: 0.625rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #64748b !important;
        border-bottom: none !important;
        display: block !important;
        text-indent: 0 !important;
    }

    .nav-item-dropdown .dropdown-menu a::before,
    .dropdown .dropdown-menu a::before {
        display: none !important;
    }

    .nav-item-dropdown .dropdown-menu a:hover,
    .dropdown .dropdown-menu a:hover {
        color: var(--color-primary) !important;
    }

    .nav-cta {
        display: none !important;
    }

    /* Minimal hamburger menu button — no background box */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        cursor: pointer;
        padding: 12px !important;
        z-index: 1003;
        transition: all 0.3s ease;
        box-shadow: none !important;
        width: 48px;
        height: 48px;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: rgba(255, 255, 255, 0.85);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    /* Solid header: dark hamburger */
    header.header-solid .mobile-menu-toggle span {
        background: #1a1a2e;
    }

    .mobile-menu-toggle.active {
        background: transparent !important;
        box-shadow: none;
    }

    /* Active (X) state: always dark so it's visible over white menu */
    .mobile-menu-toggle.active span {
        background: #1a1a2e !important;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* ============================================
       PAGE HERO - MOBILE OPTIMIZED
       Comes right after fixed header
       ============================================ */
    .page-hero {
        min-height: auto;
        margin-top: 60px !important;
        padding: 2.5rem 1.25rem 2rem 1.25rem;
    }

    .page-hero-content {
        padding: 0;
    }

    .page-hero-label {
        font-size: 0.7rem;
        letter-spacing: 2px;
        margin-bottom: 0.625rem;
        opacity: 0.9;
    }

    .page-hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 1rem !important;
    }

    .page-hero-title .highlight {
        display: block;
        margin-bottom: 0.125rem;
    }

    .page-hero-description {
        font-size: 0.925rem;
        line-height: 1.6;
        opacity: 0.9;
    }

    /* ============================================
       HERO SECTION - MOBILE FIRST
       Premium with fixed header
       ============================================ */
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0 0 3rem 0;
        padding-top: 90px;
        background-attachment: scroll;
        display: flex;
        align-items: flex-start;
    }

    .hero-content {
        text-align: center;
        padding: 1.5rem 1.5rem 0 1.5rem;
    }

    .hero-badge-top {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1.25rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.75rem) !important;
        line-height: 1.15;
        margin-bottom: 0.875rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 0.875rem;
    }

    .hero-description {
        font-size: 0.925rem;
        line-height: 1.6;
        margin-bottom: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.875rem;
        width: 100%;
        max-width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 52px;
    }

    .hero-trust {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }

    .trust-item {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .trust-value {
        font-size: 2rem;
    }

    .trust-label {
        font-size: 0.9rem;
    }

    /* ============================================
       BREADCRUMBS - HIDDEN ON MOBILE
       Wastes space, hero provides context
       ============================================ */
    .breadcrumb-section,
    .service-breadcrumb,
    div[class*="breadcrumb"] {
        display: none !important;
    }

    /* ============================================
       SECTIONS - MOBILE OPTIMIZED
       ============================================ */
    section {
        padding: 3rem 0;
    }

    .section-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .section-label {
        font-size: 0.813rem;
        margin-bottom: 0.75rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* ============================================
       SERVICE CARDS - MOBILE STACK
       ============================================ */
    .service-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .service-card .service-link {
        font-size: 0.95rem;
    }

    /* Service detail sections */
    .service-detail-section {
        padding: 2.5rem 0;
    }

    .service-features-grid,
    .benefits-grid,
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .feature-card,
    .benefit-card,
    .process-step {
        padding: 1.5rem;
    }

    .feature-card h3,
    .benefit-card h3,
    .process-step h3 {
        font-size: 1.125rem;
    }

    /* ============================================
       BUTTONS - TOUCH OPTIMIZED
       ============================================ */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .btn-primary {
        font-weight: 600;
    }

    .btn-secondary {
        font-weight: 500;
    }

    .btn-sm {
        min-height: 40px;
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        min-height: 56px;
        padding: 1rem 2rem;
        font-size: 1.0625rem;
    }

    /* ============================================
       FORMS - MOBILE OPTIMIZED
       ============================================ */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
        min-height: 48px;
    }

    .form-group textarea {
        min-height: 120px;
        resize: vertical;
    }

    /* ============================================
       TESTIMONIALS - MOBILE CAROUSEL
       ============================================ */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

    .testimonial-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .author-avatar {
        width: 50px;
        height: 50px;
    }

    .author-name {
        font-size: 1rem;
    }

    .author-title {
        font-size: 0.875rem;
    }

    /* ============================================
       FAQ - MOBILE OPTIMIZED
       ============================================ */
    .faq-grid,
    .faq-container {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .faq-item {
        border-radius: 12px;
    }

    .faq-question {
        padding: 1.125rem 1rem;
        font-size: 0.95rem;
        line-height: 1.4;
        text-align: left;
    }

    .faq-icon {
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .faq-answer {
        padding: 0 1rem 1.125rem 1rem;
        font-size: 0.9rem;
        line-height: 1.65;
    }

    /* ============================================
       CTA SECTIONS - MOBILE
       ============================================ */
    .cta-section {
        padding: 3rem 1rem;
        text-align: center;
    }

    .cta-content h2 {
        font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
        margin-bottom: 1rem;
    }

    .cta-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* ============================================
       FOOTER - PREMIUM MOBILE DESIGN
       Award-winning minimalist approach
       ============================================ */
    .site-footer,
    footer {
        padding: 3.5rem 0 2rem 0;
        background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    }

    .footer-grid,
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: center;
    }

    /* Brand section - hero treatment */
    .footer-brand,
    .footer-col.footer-brand {
        order: 1;
        margin-bottom: 2.5rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    }

    .footer-brand img {
        height: 44px !important;
        width: auto !important;
        margin: 0 auto 1.25rem auto !important;
        display: block !important;
    }

    .footer-brand p {
        font-size: 0.95rem;
        line-height: 1.7;
        color: #64748b;
        max-width: 320px;
        margin: 0 auto 0.75rem auto;
    }

    .footer-brand .trading-info {
        font-size: 0.85rem;
        color: #94a3b8;
        margin: 0.25rem auto;
    }

    /* Navigation columns - accordion style on mobile */
    .footer-col {
        order: 2;
        margin-bottom: 0;
        padding: 1.25rem 0;
        border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-col h4 {
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #2563EB;
        margin-bottom: 1rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        align-items: center;
    }

    .footer-links li {
        margin: 0;
    }

    .footer-links a,
    .footer-section a {
        font-size: 0.95rem;
        color: #475569;
        text-decoration: none;
        padding: 0.375rem 0;
        display: inline-block;
        transition: color 0.2s ease;
    }

    .footer-links a:hover,
    .footer-section a:hover {
        color: #2563EB;
    }

    /* Contact section special styling */
    .footer-col[itemscope] {
        order: 3;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(6, 182, 212, 0.03) 100%);
        border-radius: 16px;
        padding: 1.5rem;
        margin-top: 0.5rem;
        border-bottom: none;
    }

    .footer-col[itemscope] p {
        font-size: 0.9rem;
        color: #64748b;
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }

    .footer-col[itemscope] a.footer-link {
        color: #2563EB;
        font-weight: 500;
    }

    /* Social links - premium pill buttons */
    .social-links {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .social-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.625rem 1.25rem;
        background: white;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-radius: 100px;
        font-size: 0.875rem;
        font-weight: 500;
        color: #475569;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .social-links a:hover {
        background: #2563EB;
        color: white;
        border-color: #2563EB;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    }

    .footer-social {
        justify-content: center;
        gap: 0.75rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
        border-radius: 12px;
        background: white;
        border: 1px solid rgba(37, 99, 235, 0.12);
        transition: all 0.3s ease;
    }

    .social-link:hover {
        background: #2563EB;
        color: white;
        border-color: #2563EB;
    }

    /* Footer bottom - clean minimal */
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding-top: 1.75rem;
        margin-top: 1.5rem;
        border-top: 1px solid rgba(37, 99, 235, 0.1);
    }

    .footer-bottom p {
        font-size: 0.8rem;
        color: #94a3b8;
        margin: 0;
        line-height: 1.5;
    }

    .footer-bottom .service-areas {
        color: #64748b;
        font-size: 0.85rem;
    }

    .footer-bottom .service-areas strong {
        color: #2563EB;
        font-weight: 600;
    }

    .footer-bottom .disclaimer {
        font-size: 0.75rem;
        color: #94a3b8;
        max-width: 320px;
        margin: 0.5rem auto 0 auto;
    }

    .footer-section {
        margin-bottom: 0;
    }

    .footer-section h3 {
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #2563EB;
        margin-bottom: 1rem;
    }

    .footer-section ul li {
        margin-bottom: 0.5rem;
    }

    /* ============================================
       AI CHAT WIDGET - PREMIUM FULL-SCREEN MOBILE
       ============================================ */
    .chat-widget {
        bottom: 24px;
        right: 16px;
        width: 58px;
        height: 58px;
    }

    .chat-toggle {
        width: 58px !important;
        height: 58px !important;
        background: linear-gradient(135deg, #9B8060 0%, #7A6248 100%) !important;
        box-shadow: 0 4px 20px rgba(155, 128, 96, 0.45) !important;
    }

    .chat-toggle:hover {
        box-shadow: 0 6px 28px rgba(155, 128, 96, 0.6) !important;
    }

    /* Full-screen takeover */
    .chat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none;
        background: #1a1a1a;
        transform-origin: center bottom;
    }

    /* Slide up/down instead of scale on mobile */
    .chat-window.hidden {
        opacity: 1 !important;
        transform: translateY(100%) !important;
    }

    .chat-header {
        padding: 1.125rem 1.25rem;
        padding-top: calc(1.125rem + env(safe-area-inset-top, 0px));
        border-radius: 0 !important;
        background: #111111 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
        position: relative;
    }

    .chat-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 1.25rem;
        right: 1.25rem;
        height: 2px;
        background: linear-gradient(90deg, #9B8060 0%, transparent 100%);
        opacity: 0.55;
    }

    .chat-header h3 {
        font-size: 1.0625rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        color: #fafaf9;
    }

    .chat-header-actions {
        gap: 8px;
    }

    .chat-email,
    .chat-reset,
    .chat-close {
        width: 38px !important;
        height: 38px !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: rgba(255, 255, 255, 0.8) !important;
        border-radius: 10px !important;
        transition: background 0.18s, border-color 0.18s;
    }

    .chat-email:hover,
    .chat-reset:hover,
    .chat-close:hover {
        background: rgba(155, 128, 96, 0.22) !important;
        border-color: rgba(155, 128, 96, 0.4) !important;
    }

    .chat-email svg,
    .chat-reset svg {
        width: 18px;
        height: 18px;
    }

    .chat-messages {
        flex: 1;
        height: auto !important;
        min-height: 0;
        padding: 1.25rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
        background: #1a1a1a;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chat-message {
        max-width: 88%;
        padding: 14px 16px;
        font-size: 0.9375rem;
        line-height: 1.65;
        border-radius: 16px;
    }

    .chat-message.user {
        align-self: flex-end;
        background: linear-gradient(135deg, #9B8060 0%, #7A6248 100%);
        color: #fff;
        border-bottom-right-radius: 4px;
        margin-left: 1.5rem;
        box-shadow: 0 3px 12px rgba(155, 128, 96, 0.35);
    }

    .chat-message.ai {
        align-self: flex-start;
        background: rgba(255, 255, 255, 0.055);
        color: #e5e5e5;
        border-bottom-left-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.09);
        margin-right: 1.5rem;
        box-shadow: none;
    }

    .chat-message.ai p,
    .chat-message.ai li {
        color: #e5e5e5;
    }

    .chat-message.ai strong {
        color: #fafaf9;
    }

    .chat-message.ai a {
        color: #B8A080;
    }

    .chat-message.ai code {
        background: rgba(255, 255, 255, 0.1);
        color: #B8A080;
        border-radius: 4px;
        padding: 1px 5px;
    }

    .typing-indicator {
        background: rgba(255, 255, 255, 0.055) !important;
        border: 1px solid rgba(255, 255, 255, 0.09) !important;
        border-radius: 16px;
    }

    .typing-indicator span {
        background: rgba(255, 255, 255, 0.35) !important;
    }

    .suggestion-btn {
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #e5e5e5 !important;
    }

    .suggestion-btn:hover {
        background: rgba(155, 128, 96, 0.15) !important;
        border-color: rgba(155, 128, 96, 0.35) !important;
        transform: translateX(4px);
    }

    .chat-form {
        padding: 0.875rem 1rem;
        padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: #111111;
        flex-shrink: 0;
        gap: 0.625rem;
    }

    .chat-form input {
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #fafaf9;
        border-radius: 14px;
        padding: 0.875rem 1.125rem;
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        touch-action: manipulation;
    }

    .chat-form input::placeholder {
        color: rgba(250, 250, 249, 0.3);
    }

    .chat-form input:focus {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(155, 128, 96, 0.55);
        box-shadow: 0 0 0 3px rgba(155, 128, 96, 0.12);
    }

    .chat-form button {
        background: linear-gradient(135deg, #9B8060 0%, #7A6248 100%);
        box-shadow: 0 2px 10px rgba(155, 128, 96, 0.3);
        border-radius: 14px;
    }

    .chat-form button:hover:not(:disabled) {
        box-shadow: 0 4px 16px rgba(155, 128, 96, 0.45);
    }

    /* ============================================
       CHAT TOOL BUBBLES - DARK MOBILE THEME
       Overrides desktop light inline/class styles
       ============================================ */

    /* Thinking/typing wrapper - transparent so dark bg shows */
    .chat-message.typing {
        background: transparent;
        align-self: flex-start;
        margin-right: 1.5rem;
    }

    /* Tool status ("Searching the web...") */
    .chat-message.tool-status {
        background: rgba(255, 255, 255, 0.06) !important;
        border-left: 3px solid rgba(155, 128, 96, 0.65) !important;
        color: #b8b0a8 !important;
        border-radius: 10px !important;
        font-size: 0.875rem !important;
    }

    .chat-message.tool-status strong {
        color: #e5e5e5 !important;
    }

    /* Search results + webpage analysis cards */
    .chat-message.search-results,
    .chat-message.webpage-analysis {
        background: rgba(255, 255, 255, 0.055) !important;
        color: #e5e5e5 !important;
        border: 1px solid rgba(255, 255, 255, 0.09) !important;
        box-shadow: none !important;
    }

    /* Tool error */
    .chat-message.tool-error {
        background: rgba(239, 68, 68, 0.12) !important;
        border-left: 3px solid rgba(239, 68, 68, 0.55) !important;
        color: #fca5a5 !important;
    }

    /* ============================================
       NEW PRICING SECTION - MOBILE
       ============================================ */
       .pricing-hero-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .pricing-hero-card h2 {
        font-size: 1.75rem !important;
    }

    .price-display .price-amount {
        font-size: 3rem !important;
    }

    .price-display .price-amount-small {
        font-size: 1.5rem !important;
    }

    .benefits-list {
        gap: 0.75rem;
    }

    /* ============================================
       STATS & METRICS - MOBILE
       ============================================ */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .stat-card {
        padding: 1.5rem;
        text-align: center;
    }

    .stat-value {
        font-size: 2.25rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    /* ============================================
       PRICING TABLES - MOBILE
       ============================================ */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .pricing-card {
        padding: 1.75rem 1.5rem;
    }

    .pricing-card h3 {
        font-size: 1.25rem;
    }

    .pricing-price {
        font-size: 2.5rem;
    }

    .pricing-features {
        margin: 1.25rem 0;
    }

    .pricing-features li {
        font-size: 0.9rem;
        padding: 0.625rem 0;
    }

    /* ============================================
       PROCESS STEPS - MOBILE
       ============================================ */
    .steps-grid,
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .step-card,
    .process-step {
        padding: 1.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .step-card h3,
    .process-step h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    /* ============================================
       CONTACT FORMS - MOBILE
       ============================================ */
    .contact-wrapper,
    .quote-wrapper {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .contact-info,
    .quote-info {
        padding: 1.5rem;
        order: 2;
    }

    .contact-form,
    .quote-form {
        order: 1;
        padding: 1.5rem;
    }

    .contact-info h2,
    .quote-info h2 {
        font-size: 1.5rem;
    }

    .contact-info-item {
        padding: 1rem;
        font-size: 0.95rem;
    }

    /* ============================================
       MODALS - MOBILE FULLSCREEN
       ============================================ */
    .modal {
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-header {
        padding: 1.25rem 1rem;
    }

    .modal-body {
        padding: 1.5rem 1rem;
        max-height: calc(100vh - 140px);
    }

    /* ============================================
       TABLES - MOBILE RESPONSIVE
       ============================================ */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
    }

    tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(196, 239, 23, 0.1);
        border-radius: 12px;
        padding: 1rem;
    }

    td {
        display: block;
        text-align: left;
        padding: 0.5rem 0;
        border: none;
    }

    td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 40%;
        color: var(--accent-primary);
    }

    /* ============================================
       IMAGE OPTIMIZATION - MOBILE
       ============================================ */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .hero-image,
    .section-image {
        margin: 2rem auto;
        border-radius: 16px;
    }

    /* ============================================
       UTILITY CLASSES - MOBILE
       ============================================ */
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .full-width-mobile {
        width: 100% !important;
    }

    /* ============================================
       SMOOTH SCROLLING & GESTURES
       ============================================ */
    * {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Pull to refresh prevention */
    body {
        overscroll-behavior-y: contain;
    }

    /* Better touch targets */
    a, button, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    /* ============================================
       INBUILT ATELIER — INLINE STYLE OVERRIDES
       All pages use inline styles for layout grids,
       section padding, and hero sizing. These rules
       use !important to override inline values and
       ensure proper single-column mobile layout.
       ============================================ */

    /* ── Prevent horizontal overflow globally ── */
    html, body {
        max-width: 100vw !important;
    }

    .container {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Long email / URL overflow prevention */
    a[href*="mailto:"] {
        word-break: break-all;
    }

    /* Grid item min-width safety (prevents content from expanding grid) */
    div[style*="display:grid"] > *,
    div[style*="display: grid"] > * {
        min-width: 0;
    }

    /* ── Override ALL inline section padding ── */
    section[style] {
        padding: 3rem 0 !important;
    }

    /* ── Sub-page Hero sections (with inline min-height) ── */
    section[style*="min-height:50vh"],
    section[style*="min-height:55vh"],
    section[style*="min-height:60vh"],
    section[style*="min-height: 50vh"],
    section[style*="min-height: 55vh"],
    section[style*="min-height: 60vh"],
    section[style*="min-height:100vh"] {
        min-height: auto !important;
        padding: calc(60px + 2.5rem) 0 2.5rem !important;
    }

    /* Sub-page hero h1 — reduce from clamp(3rem,...) */
    section[style*="min-height"] h1 {
        font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
        line-height: 1.15 !important;
    }

    /* Sub-page hero description */
    section[style*="min-height"] p {
        font-size: 0.92rem !important;
    }

    /* ── Force inline 2-column grids to single column ── */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1.5fr"],
    div[style*="grid-template-columns: 1fr 1.5fr"],
    div[style*="grid-template-columns:1.5fr 1fr"],
    div[style*="grid-template-columns: 1.5fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* ── Reduce large inline gaps ── */
    div[style*="gap:5rem"],
    div[style*="gap: 5rem"],
    div[style*="gap:6rem"],
    div[style*="gap: 6rem"] {
        gap: 2rem !important;
    }

    div[style*="gap:3rem"],
    div[style*="gap: 3rem"] {
        gap: 1.5rem !important;
    }

    /* ── Override auto-fit grids with large minimums ── */
    div[style*="minmax(220px"],
    div[style*="minmax(280px"],
    div[style*="minmax(300px"],
    div[style*="minmax(320px"] {
        grid-template-columns: 1fr !important;
    }

    /* ── Premium Footer (.ia-ft) — Mobile ── */
    .ia-ft-nav {
        flex-direction: column;
        border-top: none;
        border-bottom: none;
        padding: 0;
    }

    .ia-ft-nav a {
        padding: 0.75rem 1.5rem;
        font-size: 0.82rem;
        letter-spacing: 0.14em;
        border-bottom: 1px solid rgba(245,245,245,0.04);
    }

    .ia-ft-nav a:last-child {
        border-bottom: none;
    }

    .ia-ft-nav a::after {
        display: none;
    }

    .ia-ft-contact {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 1.5rem 0 !important;
    }

    .ia-ft-contact-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(245,245,245,0.04);
        padding: 1.25rem 1.5rem !important;
    }

    .ia-ft-contact-item:last-child {
        border-bottom: none;
    }

    .ia-ft-brand {
        padding: 2.5rem 1.5rem 2rem !important;
    }

    .ia-ft-logo {
        height: 48px !important;
    }

    .ia-ft-wordmark {
        font-size: 1.5rem !important;
        letter-spacing: 0.18em !important;
    }

    .ia-ft-bottom {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.25rem 1rem;
    }

    /* ── Legacy footer overrides (inline-styled footers on old pages) ── */
    footer div[style*="grid-template-columns"],
    footer[style] div[style*="grid-template-columns"],
    .ia-footer div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    footer div[style*="justify-content"],
    footer[style] div[style*="justify-content"],
    .ia-footer div[style*="justify-content"] {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.75rem !important;
    }

    footer ul[style],
    .ia-footer ul[style] {
        align-items: center;
    }

    footer .footer-logo,
    footer img[style*="height:80px"] {
        height: 52px !important;
        margin: 0 auto 0.75rem auto !important;
    }

    footer h4[style],
    .ia-footer h4[style] {
        text-align: center;
    }

    footer li[style*="display:flex"],
    .ia-footer li[style*="display:flex"] {
        justify-content: center;
    }

    /* ── Homepage Hero (.ia-hero) ── */
    .ia-hero {
        min-height: 80vh !important;
        min-height: 80dvh !important;
    }

    .ia-hero-content {
        padding: 0 0.25rem !important;
    }

    .ia-hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    }

    .ia-hero-sub {
        font-size: 0.95rem !important;
        margin-bottom: 2rem !important;
    }

    .ia-hero-actions {
        flex-direction: column !important;
        width: 100% !important;
    }

    .ia-hero-actions a {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Homepage scroll indicator — hide on mobile */
    .ia-hero > div[style*="bottom:"] {
        display: none !important;
    }

    /* ── Homepage Trust Strip ── */
    .ia-trust {
        padding: 0 !important;
    }

    .ia-trust-inner {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 100% !important;
    }

    .ia-trust-item {
        padding: 1.5rem 1rem !important;
        gap: 0.5rem !important;
    }

    .ia-trust-item:not(:last-child)::after {
        display: none !important;
    }

    /* Hairline grid: right on odd, bottom on top row */
    .ia-trust-item:nth-child(odd) {
        border-right: 1px solid rgba(155,128,96,0.18);
    }
    .ia-trust-item:nth-child(1),
    .ia-trust-item:nth-child(2) {
        border-bottom: 1px solid rgba(155,128,96,0.18);
    }

    .ia-trust-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .ia-trust-icon svg {
        width: 18px;
        height: 18px;
    }

    .ia-trust-label {
        font-size: 0.6rem !important;
        letter-spacing: 0.13em !important;
    }

    /* ── Homepage Section Grids ── */
    .ia-services-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .ia-service-card {
        padding: 2rem 1.5rem !important;
    }

    .ia-service-card-num {
        font-size: 2rem !important;
    }

    .ia-process-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .ia-step-num {
        font-size: 2.5rem !important;
    }

    .ia-why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    @media (max-width: 768px) {
        .ia-why-grid {
            grid-template-columns: 1fr !important;
            gap: 1.25rem !important;
        }
    }

    .ia-why-card {
        padding: 1.75rem !important;
    }

    .ia-testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .ia-testimonial {
        padding: 1.75rem !important;
    }

    .ia-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1px !important;
    }

    @media (max-width: 768px) {
        .ia-card-grid {
            grid-template-columns: 1fr !important;
            gap: 0 !important;
        }
    }

    /* ── Homepage Banner ── */
    .ia-banner {
        padding: 3.5rem 1.5rem !important;
    }

    /* ── Homepage FAQ ── */
    .ia-faq-list {
        padding: 0 !important;
    }

    /* ── Homepage Contact Section ── */
    .ia-contact-section {
        padding: 3.5rem 0 !important;
    }

    .ia-form-wrap {
        padding: 2rem 1.25rem !important;
    }

    /* ── Homepage Footer ── */
    .ia-footer {
        padding: 3rem 0 1.5rem !important;
    }

    /* ── Contact Page Info Cards ── */
    .ia-info-card {
        padding: 1.25rem !important;
        gap: 1rem !important;
    }

    /* ── Submit buttons full width ── */
    .quote-submit-btn {
        width: 100%;
    }

    /* ── Large inline margin-bottom overrides ── */
    div[style*="margin-bottom:4.5rem"],
    div[style*="margin-bottom: 4.5rem"],
    div[style*="margin-bottom:5rem"],
    div[style*="margin-bottom: 5rem"] {
        margin-bottom: 2.5rem !important;
    }

    div[style*="margin-bottom:4rem"],
    div[style*="margin-bottom: 4rem"] {
        margin-bottom: 2rem !important;
    }

    /* ── Service page image cards (service/index.html) ── */
    .service-card[style*="position:relative"] {
        min-height: 280px !important;
    }

    /* ── Aspect ratio images go landscape on mobile ── */
    div[style*="aspect-ratio:3/4"] {
        aspect-ratio: 16/10 !important;
    }
}

/* ============================================
   SMALL MOBILE (< 480px)
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 1.875rem !important;
    }

    .section-title {
        font-size: 1.625rem !important;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }

    .service-card,
    .testimonial-card,
    .faq-item {
        padding: 1.25rem;
    }

    /* Inbuilt Atelier small-screen refinements */
    .ia-hero h1 {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    section[style*="min-height"] h1 {
        font-size: clamp(1.5rem, 6.5vw, 2rem) !important;
    }

    .ia-service-card {
        padding: 1.5rem 1.25rem !important;
    }

    .ia-why-card {
        padding: 1.5rem !important;
    }

    .ia-testimonial {
        padding: 1.5rem !important;
    }

    .ia-info-card {
        flex-direction: column !important;
        text-align: center;
    }

    .ia-info-icon {
        margin: 0 auto;
    }

    .ia-banner {
        padding: 2.5rem 1rem !important;
    }

    .ia-form-wrap {
        padding: 1.5rem 1rem !important;
    }

    /* All sections even tighter padding */
    section[style] {
        padding: 2.5rem 0 !important;
    }

    section[style*="min-height:50vh"],
    section[style*="min-height:55vh"],
    section[style*="min-height:60vh"],
    section[style*="min-height: 50vh"],
    section[style*="min-height: 55vh"],
    section[style*="min-height: 60vh"] {
        padding: calc(60px + 1.5rem) 0 2rem !important;
    }

    /* Chat is full-screen at all mobile sizes — no height override needed */

    /* Premium footer — extra-small devices */
    .ia-ft-wordmark {
        font-size: 1.25rem !important;
        letter-spacing: 0.14em !important;
    }

    .ia-ft-tagline {
        font-size: 0.55rem !important;
        letter-spacing: 0.22em !important;
    }

    .ia-ft-nav a {
        font-size: 0.75rem;
        padding: 0.65rem 1.25rem;
    }

    .ia-ft-contact-item {
        padding: 1rem 1rem !important;
    }

    .ia-ft-contact-label {
        font-size: 0.55rem !important;
    }

    .ia-ft-contact-item span:not(.ia-ft-contact-label),
    .ia-ft-contact-item a {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   TABLET (481px - 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .hero-buttons .btn {
        width: auto;
        min-width: 200px;
    }

    .hero-trust {
        flex-direction: row;
        justify-content: center;
    }

    .trust-item {
        width: auto;
    }
}

/* ============================================
   LANDSCAPE MODE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: calc(60px + 2rem) 0 2rem 0;
    }

    /* Chat full-screen even in landscape — flex layout handles height */

    section {
        padding: 2.5rem 0;
    }
}
@media (max-width: 768px) {
  .tech-stack-grid,
  .simple-difference-grid {
      padding-left: 1rem;
      padding-right: 1rem;
  }
}

/* How It Works premium block — mobile stack */
@media (max-width: 640px) {
  .hiw-steps-grid {
      grid-template-columns: 1fr !important;
      gap: 0 !important;
  }
  .hiw-connector {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 0.25rem 0 !important;
      font-size: 1.75rem !important;
      color: rgba(255,255,255,0.55) !important;
      transform: rotate(90deg);
  }
}

/* ===== Image gallery & showcase — mobile refinements ===== */
@media (max-width: 640px) {
  .ia-gallery--hero,
  .ia-gallery--trio,
  .ia-gallery--duo,
  .ia-gallery--quad {
    grid-template-columns: 1fr !important;
    gap: 3px !important;
  }
  .ia-gallery-item { min-height: 220px; }
  .ia-gallery-caption { opacity: 1; }
  .ia-gallery-caption h3 { font-size: 1rem; }
  .ia-gallery-caption p { font-size: .75rem; }

  .ia-collection {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .ia-collection-content {
    padding: 3rem 1.5rem !important;
  }
  .ia-collection-image { min-height: 320px; }

  .ia-split {
    grid-template-columns: 1fr !important;
  }
  .ia-split--reverse .ia-split-image { order: 0; }
  .ia-split-image { min-height: 280px; }
  .ia-split-content { padding: 3rem 1.5rem !important; }

  .ia-imgrow-item { min-width: 85% !important; }
}
