/* ============================================================
   MOBILE.CSS — Complete Mobile UI System (2026)
   DB Pro Clean · Pixel-Perfect iPhone-first Design
   Does NOT affect desktop styles (>1024px).
   ============================================================ */

/* ============================================================
   TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

    /* Tighter section padding */
    .section {
        padding: var(--space-2xl) 0;
    }

    /* Footer grid: 2 columns */
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   MOBILE (max-width: 768px)
   Complete mobile overhaul — app-like, fluid, premium
   ============================================================ */
@media (max-width: 768px) {

    /* ─────────────────────────────────────────────────────────
       1. GLOBAL FOUNDATIONS
       ───────────────────────────────────────────────────────── */
    :root {
        --fs-hero: 26px;
        --fs-h1: 24px;
        --nav-height: 64px;
    }

    /* Global container: 20px lateral breathing room */
    .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    /* Navbar: aligned, never touching edges */
    .navbar__inner {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* ─────────────────────────────────────────────────────────
       2. HERO — Full-screen, vertically centered
       ───────────────────────────────────────────────────────── */
    .hero {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 25vh !important;
        padding-bottom: 40px;
        margin-bottom: 0;
    }

    .hero__content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }

    .hero__title {
        font-size: 26px !important;
        line-height: 1.3 !important;
        letter-spacing: -0.3px;
        font-weight: 900 !important;
        text-transform: uppercase;
        margin-top: 0;
        margin-bottom: 25px;
        padding-left: 15px !important;
        padding-right: 15px !important;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35);
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Force individual word spans to inherit the correct size */
    .hero__title .word {
        font-size: inherit !important;
    }

    .hero__title .word .accent {
        font-size: inherit !important;
    }

    .hero__subtitle {
        font-size: 1rem;
        color: #ffffff;
        padding: 0;
        line-height: 1.5;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .hero__buttons {
        margin-top: 0.75rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Large, thumb-friendly CTA */
    .hero__buttons .btn {
        padding: 1.1rem 2.4rem;
        font-size: 1.05rem;
        font-weight: 700;
        min-height: 54px;
        border-radius: var(--radius-md);
    }

    /* Hide scroll indicator on mobile (saves space) */
    .hero__scroll-indicator {
        display: none;
    }

    /* ─────────────────────────────────────────────────────────
       3. HERO — Sub-pages (About, Services, Contact)
       ───────────────────────────────────────────────────────── */
    .hero--sub {
        min-height: 30vh;
        padding-top: calc(var(--nav-height) + 2rem);
        padding-bottom: 2rem;
    }

    /* ─────────────────────────────────────────────────────────
       4. SECTIONS — Unified vertical rhythm
       All sections get identical spacing for consistency
       ───────────────────────────────────────────────────────── */
    .section {
        padding: 60px 0;
        margin: 0;
    }

    /* Section typography */
    h2,
    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .section-label {
        font-size: 0.7rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        padding: 0;
    }

    /* ─────────────────────────────────────────────────────────
       5. SERVICE CARDS — Single column
       ───────────────────────────────────────────────────────── */
    .services-grid,
    .services-grid--detailed {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: var(--space-md);
    }

    .glass-card,
    .trust-card {
        padding: var(--space-md);
    }

    /* ─────────────────────────────────────────────────────────
       6. BEFORE / AFTER SHOWCASE
       ───────────────────────────────────────────────────────── */
    .ba-item {
        flex: 0 0 min(400px, 88vw);
    }

    .ba-item__labels {
        padding: var(--space-xs) var(--space-sm);
    }

    /* ─────────────────────────────────────────────────────────
       7. TRUST / TESTIMONIALS
       ───────────────────────────────────────────────────────── */
    .trust-grid {
        grid-template-columns: 1fr;
    }

    /* Fix contrast: muted white text is invisible on light glass-card backgrounds */
    .trust-card__text {
        color: rgba(0, 30, 60, 0.7) !important;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .trust-card__title {
        color: var(--color-primary) !important;
    }

    /* ─────────────────────────────────────────────────────────
       8. ABOUT PAGE — Single column, logo on top
       ───────────────────────────────────────────────────────── */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about-grid__visual {
        order: -1;
    }

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

    .about-engagement__card {
        position: static;
    }

    .about-logo-box {
        max-width: 220px;
        margin: 0 auto;
    }

    .about-logo-card {
        max-width: 220px;
        margin: 0 auto;
        position: static;
        padding: var(--space-md);
    }

    .about-engagements {
        padding: var(--space-md);
    }

    /* ─────────────────────────────────────────────────────────
       9. FORMS — Touch-friendly (44px+ targets)
       ───────────────────────────────────────────────────────── */
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.95rem 1rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .form-submit {
        min-height: 50px;
        font-size: 1rem;
    }

    /* ─────────────────────────────────────────────────────────
       10. CONTACT SIDEBAR
       ───────────────────────────────────────────────────────── */
    .contact-sidebar {
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .contact-info-card {
        padding: var(--space-md);
    }

    /* ─────────────────────────────────────────────────────────
       11. ZONE TAGS — Touch targets
       ───────────────────────────────────────────────────────── */
    .zone-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* ─────────────────────────────────────────────────────────
       12. CTA BANNER
       ───────────────────────────────────────────────────────── */
    .cta-banner {
        padding: var(--space-xl) var(--space-sm);
    }

    .cta-banner__title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .cta-banner__text {
        font-size: 0.95rem;
    }

    /* ─────────────────────────────────────────────────────────
       13. FOOTER — Single column, centered
       ───────────────────────────────────────────────────────── */
    .footer {
        padding-top: var(--space-xl);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }

    .footer__brand {
        max-width: none;
    }

    .footer__link {
        padding: 0.45rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .footer__contact-item {
        justify-content: center;
        min-height: 44px;
    }

    .footer__social {
        justify-content: center;
    }

    /* ─────────────────────────────────────────────────────────
       14. WHATSAPP FLOAT
       ───────────────────────────────────────────────────────── */
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
    }

    /* ─────────────────────────────────────────────────────────
       15. VALUES GRID
       ───────────────────────────────────────────────────────── */
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MOBILE SMALL (max-width: 480px)
   Fine-tune for narrow screens (iPhone SE, etc.)
   ============================================================ */
@media (max-width: 480px) {

    /* ── Global fine-tuning ── */
    :root {
        --space-xl: 1.8rem;
        --space-lg: 1.2rem;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* ── Section padding ── */
    .section {
        padding: 48px 0;
    }

    /* ── Hero ── */
    .hero--sub {
        min-height: 25vh;
        padding-top: calc(var(--nav-height) + 1.5rem);
        padding-bottom: 1.5rem;
    }

    .hero__title {
        font-size: 24px !important;
        gap: 0 0.15em;
    }

    .hero__subtitle {
        font-size: 0.9rem;
    }

    /* ── Before/After ── */
    .ba-item {
        flex: 0 0 92vw;
    }

    .ba-showcase__track {
        gap: var(--space-sm);
        padding: var(--space-xs) 0 var(--space-md);
    }

    .ba-item__slider {
        aspect-ratio: 4/3;
    }

    /* ── Stats grid — 2 columns compact ── */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xs);
    }

    .stat-item {
        padding: var(--space-sm);
    }

    .stat-item__number {
        font-size: clamp(1.2rem, 6vw, 2rem);
        white-space: nowrap;
    }

    .stat-item__label {
        font-size: 0.75rem;
    }

    /* ── Form ── */
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.85rem 0.85rem;
        font-size: 1rem;
    }

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

    .form-submit {
        padding: 1rem;
        font-size: 1rem;
        min-height: 52px;
    }

    /* ── Contact info ── */
    .contact-info-item span {
        font-size: 0.88rem;
    }

    /* ── CTA buttons ── */
    .btn {
        padding: 0.85em 1.5em;
        font-size: 0.9rem;
        min-height: 46px;
    }

    /* ── Zone card ── */
    .zone-card {
        padding: var(--space-md);
    }

    .zone-card__regions {
        gap: 0.4rem;
    }

    .zone-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* ── About page ── */
    .about-logo-box {
        max-width: 180px;
        font-size: 2rem;
    }

    .about-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .about-lead {
        font-size: 0.95rem;
    }

    .about-bio {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .about-bio__icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .about-bio__icon svg {
        width: 22px;
        height: 22px;
    }

    .about-checklist__item {
        padding: 0.5rem var(--space-xs);
        font-size: 0.92rem;
    }

    /* ── Footer fine-tuning ── */
    .footer__logo {
        font-size: 1.2rem;
    }

    .footer__bottom {
        font-size: 0.75rem;
        padding: var(--space-sm) 0;
    }

    /* ── WhatsApp float ── */
    .whatsapp-float {
        width: 48px;
        height: 48px;
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================================
   TOUCH DEVICE ENHANCEMENTS
   ============================================================ */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects that don't work well on touch */
    .footer__link:hover,
    .navbar__link:hover,
    .service-card:hover {
        transform: none;
    }

    /* Ensure all interactive elements have proper touch targets */
    .navbar__hamburger {
        min-width: 48px;
        min-height: 48px;
    }

    /* Tap highlight for visual feedback */
    .btn,
    .navbar__link,
    .footer__link,
    .contact-info-item,
    .mobile-menu__link {
        -webkit-tap-highlight-color: rgba(243, 207, 3, 0.15);
    }

    /* Prevent double-tap zoom on interactive elements */
    .btn,
    .form-input,
    .form-select,
    .form-textarea {
        touch-action: manipulation;
    }
}

/* ============================================================
   LANDSCAPE PHONE (short viewport)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
    }

    .hero--sub {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 1rem);
        padding-bottom: 1rem;
    }

    .mobile-menu__link {
        font-size: 1.2rem;
    }

    .mobile-menu {
        gap: 1rem;
    }
}