/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .navbar .container {
        padding: 0 1.5rem;
    }
    
    .nav-list {
        gap: 1.5rem;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (max-width: 991px) {
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

/* Tablet Portrait (481px - 767px) */
@media (max-width: 767px) {
    /* Navigation */
    .navbar .container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transform: translateX(-100%);
        opacity: 1;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 10000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-item:last-child {
        margin-bottom: 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.75rem 0;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: var(--gray-800);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .language-selector {
        margin-top: 1.5rem;
        align-self: center;
    }
    
    /* Hero Section */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Layout Grids */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }
    
    /* Utility Grids */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Large (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
}

/* Mobile (320px - 480px) */
@media (max-width: 480px) {
    /* Navigation */
    .navbar .container {
        padding: 0 0.75rem;
    }
    
    .nav-brand .logo {
        height: 40px;
        max-width: 150px;
    }
    
    .nav-menu {
        padding: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Cards and Forms */
    .service-card,
    .industry-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Grids */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Floating Elements */
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .whatsapp-button {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .whatsapp-button.shifted {
        right: 6.5rem;
    }
}

/* Small Mobile (320px and below) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video,
    .hero-fallback,
    .solution-image img,
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-menu,
    .scroll-indicator,
    .back-to-top,
    .whatsapp-button {
        display: none !important;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-overlay,
    .hero-overlay-soft {
        display: none;
    }
    
    .hero-content {
        color: #000;
    }
    
    .hero-title,
    .hero-subtitle {
        color: #000;
        text-shadow: none;
    }
    
    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .btn {
        border: 1px solid #000;
        background: transparent;
        color: #000;
    }
}

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



/* Focus Styles for Accessibility */
.nav-link:focus,
.btn:focus,
.language-toggle:focus,
.back-to-top:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    background: var(--primary-blue) !important;
    color: white !important;
    padding: 8px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    z-index: 1001 !important;
    transition: opacity var(--transition-normal) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.skip-link:focus {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Garantias específicas para Chrome e Edge */
@media (max-width: 768px) {
    /* Garantir que o header tenha z-index adequado */
    .header {
        z-index: 10000;
    }
    
    /* Garantir que o menu seja sempre visível quando ativo */
    .nav-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        -webkit-transform: translateX(0) !important;
    }
    
    /* Garantir que o toggle seja sempre visível */
    .nav-toggle {
        display: flex !important;
        z-index: 10001;
    }
    
    /* Melhorar a experiência de toque */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Garantir que o body não role quando menu está aberto */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Melhorar a animação do toggle */
    .nav-toggle .bar {
        will-change: transform;
    }
    
    /* Garantir que o menu não interfira com outros elementos */
    .nav-menu {
        will-change: transform;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Garantias específicas para Chrome */
    .nav-menu {
        /* Forçar reflow no Chrome */
        transform: translateX(-100%) translateZ(0);
        -webkit-transform: translateX(-100%) translateZ(0);
    }
    
    .nav-menu.active {
        transform: translateX(0) translateZ(0);
        -webkit-transform: translateX(0) translateZ(0);
    }
    
    /* Garantias específicas para Edge */
    .nav-list {
        /* Forçar fundo transparente no Edge */
        background-color: transparent !important;
        background-image: none !important;
    }
    
    .nav-item {
        /* Forçar fundo transparente no Edge */
        background-color: transparent !important;
        background-image: none !important;
    }
    
    .nav-link {
        /* Forçar fundo transparente e texto escuro no Edge */
        background-color: transparent !important;
        background-image: none !important;
        color: #1f2937 !important;
        -webkit-text-fill-color: #1f2937 !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        /* Forçar cor azul no hover/active no Edge */
        color: #3b82f6 !important;
        -webkit-text-fill-color: #3b82f6 !important;
        background-color: rgba(59, 130, 246, 0.05) !important;
    }
    
    /* Garantir que a logo seja branca no Edge */
    .nav-menu .nav-brand .logo {
        filter: brightness(0) invert(1) !important;
        -webkit-filter: brightness(0) invert(1) !important;
    }
}

/* Overlay escuro quando menu está aberto */
.nav-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(100% - 157px);
    background: rgba(255, 255, 255, 1);
    z-index: -1;
}



/* Garantir que o seletor de idioma seja branco */
.nav-menu .language-selector {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Garantir que o botão de idioma seja branco */
.nav-menu .language-toggle {
    background: rgba(59, 130, 246, 0.1) !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: var(--primary-blue) !important;
    -webkit-text-fill-color: var(--primary-blue) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.nav-menu .language-toggle:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Garantir que o dropdown seja branco */
.nav-menu .language-dropdown {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Garantir que as opções de idioma sejam brancas */
.nav-menu .language-option {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    color: var(--gray-800) !important;
    -webkit-text-fill-color: var(--gray-800) !important;
}

.nav-menu .language-option:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    background-color: rgba(59, 130, 246, 0.05) !important;
}

/* Garantir que toda a área do menu seja branca */
.nav-menu > * {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Garantir que o fundo do menu seja transparente */
.nav-menu {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Garantir que não haja áreas escuras no menu */
.nav-menu * {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Exceções para elementos que precisam de cor */
.nav-menu .nav-brand {
    background: var(--primary-blue) !important;
    background-color: var(--primary-blue) !important;
}

.nav-menu .language-toggle {
    background: rgba(59, 130, 246, 0.1) !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.nav-menu .language-dropdown {
    background: white !important;
    background-color: white !important;
}

.nav-menu .language-option {
    background: white !important;
    background-color: white !important;
} 