/**
 * Arquivo: style.css
 * Caminho: /public_html/assets/css/style.css
 * Descrição: Estilos principais do site Mídia no Bairro
 * Otimizado para performance, Core Web Vitals e mobile-first
 */

/* ================================
   VARIÁVEIS CSS
   ================================ */
:root {
    /* Cores Principais - Baseadas no PDF */
    --color-primary: #0047AB;
    --color-primary-dark: #003380;
    --color-primary-light: #1a5fbf;
    --color-secondary: #FF6B35;
    --color-secondary-dark: #e65525;
    --color-secondary-light: #ff7d4d;
    
    /* Cores Neutras */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    
    /* Cores de Estado */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;
    
    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */
    --font-size-6xl: 3.75rem;     /* 60px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Espaçamento */
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-7: 1.75rem;   /* 28px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */
    --spacing-20: 5rem;     /* 80px */
    --spacing-24: 6rem;     /* 96px */
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --section-padding: 5rem;
    
    /* Bordas */
    --border-radius-sm: 0.375rem;   /* 6px */
    --border-radius-md: 0.5rem;     /* 8px */
    --border-radius-lg: 0.75rem;    /* 12px */
    --border-radius-xl: 1rem;       /* 16px */
    --border-radius-2xl: 1.5rem;    /* 24px */
    --border-radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-index-dropdown: 1000;
    --z-index-sticky: 1020;
    --z-index-fixed: 1030;
    --z-index-modal-backdrop: 1040;
    --z-index-modal: 1050;
    --z-index-popover: 1060;
    --z-index-tooltip: 1070;
}

/* ================================
   RESET & BASE
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ================================
   TIPOGRAFIA
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-4);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-4);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

strong {
    font-weight: var(--font-weight-semibold);
}

/* ================================
   UTILITY CLASSES
   ================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

.section {
    padding: var(--section-padding) 0;
}

.section--colored {
    background-color: var(--color-gray-50);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   HEADER & NAVIGATION
   ================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: var(--z-index-fixed);
    transition: all var(--transition-base);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--spacing-4);
}

.nav__logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav__menu {
    display: none;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
    list-style: none;
}

.nav__link {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-700);
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle,
.nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gray-700);
    transition: color var(--transition-fast);
}

.nav__toggle:hover,
.nav__close:hover {
    color: var(--color-primary);
}

/* CORREÇÃO: Esconde o botão de fechar por padrão */
.nav__close {
    position: absolute;
    top: var(--spacing-4);
    right: var(--spacing-4);
    display: none; /* Escondido por padrão */
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-6);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--cta {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn--cta:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* [O restante do CSS permanece igual - copiando apenas as seções principais modificadas] */

/* ================================
   MOBILE NAVIGATION
   ================================ */
@media (max-width: 1023px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: var(--shadow-2xl);
        padding: var(--spacing-16) var(--spacing-8);
        transition: right var(--transition-slow);
        overflow-y: auto;
        z-index: var(--z-index-modal);
    }
    
    .nav__menu.show {
        right: 0;
    }
    
    /* CORREÇÃO: Mostra o botão de fechar quando o menu estiver aberto */
    .nav__menu.show .nav__close {
        display: flex;
    }
    
    .nav__list {
        flex-direction: column;
        gap: var(--spacing-2);
        align-items: flex-start;
    }
    
    .nav__link {
        display: block;
        padding: var(--spacing-4);
        width: 100%;
        font-size: var(--font-size-base);
    }
    
    .nav__link::after {
        display: none;
    }
}

/* ================================
   RESPONSIVE - TABLET
   ================================ */
@media (min-width: 768px) {
    :root {
        --section-padding: 6rem;
    }
    
    .container {
        padding: 0 var(--spacing-8);
    }
}

/* ================================
   RESPONSIVE - DESKTOP
   ================================ */
@media (min-width: 1024px) {
    :root {
        --header-height: 90px;
        --section-padding: 7rem;
    }
    
    .nav__menu {
        display: block;
    }
    
    .nav__toggle {
        display: none;
    }
    
    .nav__close {
        display: none !important; /* Sempre escondido no desktop */
    }
}

/* Restante do CSS aqui - mantendo todas as outras seções iguais */

/* ================================
   RESPONSIVE - DESKTOP
   ================================ */
@media (min-width: 1024px) {
    :root {
        --header-height: 90px;
        --section-padding: 7rem;
    }
    
    .nav__menu {
        display: block;
    }
    
    .nav__toggle {
        display: none;
    }
    
    
    .hero__container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero__content {
        text-align: left;
    }
    
    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero__cta {
        justify-content: flex-start;
    }
    
    .hero__stats {
        margin: 0;
    }
    
    .hero__image {
        display: block;
    }
    
    .hero__title {
        font-size: var(--font-size-6xl);
    }
    
    .section__title {
        font-size: var(--font-size-4xl);
    }
    
    .problem__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .solution__features {
        grid-template-columns: 1fr;
    }
    
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .services-overview__grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .service-detailed__content {
                grid-template-columns: 2fr 1fr;
            }
    
    .why-us__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    .error-404__links {
                grid-template-columns: repeat(4, 1fr);
            }
     .differentials__grid {
                grid-template-columns: repeat(3, 1fr);
            }
    
}

/* ================================
   MOBILE NAVIGATION
   ================================ */
@media (max-width: 1023px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: var(--shadow-2xl);
        padding: var(--spacing-16) var(--spacing-8);
        transition: right var(--transition-slow);
        overflow-y: auto;
        z-index: var(--z-index-modal);
    }
    
    .nav__menu.show {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        gap: var(--spacing-2);
        align-items: flex-start;
    }
    
    .nav__link {
        display: block;
        padding: var(--spacing-4);
        width: 100%;
        font-size: var(--font-size-base);
    }
    
    .nav__link::after {
        display: none;
    }
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .header,
    .nav,
    .back-to-top,
    .whatsapp-float,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ================================
   LOADING STATE
   ================================ */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}