/* RESPONSIVIDADE COMPLETA E CORREÇÕES DE OVERFLOW */
/* Arquivo adicional para garantir compatibilidade total com todos os dispositivos */

/* Reset básico para evitar overflow */
* {
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Segoe UI', 'Segoe UI Web', 'Segoe UI Symbol', 'Helvetica Neue', Arial, sans-serif;
}

/* Containers principais */
.container, .hero-content, .about-content, main, section {
    max-width: 100%;
    padding-left: clamp(0.5rem, 2vw, 2rem);
    padding-right: clamp(0.5rem, 2vw, 2rem);
    margin-left: auto;
    margin-right: auto;
}

/* Imagens responsivas */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Textos responsivos */
h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}

h2 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

h3 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    word-wrap: break-word;
}

p, li {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.6;
    word-wrap: break-word;
    hyphens: auto;
}

/* Botões responsivos */
.btn-primary, .btn-secondary, button, input[type="submit"] {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 3vw, 2rem);
    min-height: 44px; /* Acessibilidade touch */
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Formulários responsivos */
input, select, textarea {
    width: 100%;
    max-width: 100%;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--azul-wzup, #022F64);
    box-shadow: 0 0 0 3px rgba(2, 47, 100, 0.1);
}

/* Cards e grids responsivos */
.about-cards, .team-grid, .diferenciais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
    max-width: 100%;
}

.about-card, .team-card, .diferencial-item {
    width: 100%;
    max-width: 100%;
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Header responsivo */
.header {
    width: 100vw;
    max-width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--azul-wzup, #022F64);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: clamp(60px, 10vw, 80px);
}

.logo-img {
    height: clamp(32px, 6vw, 48px);
    width: auto;
    max-width: clamp(120px, 20vw, 180px);
}

/* Menu mobile */
@media (max-width: 768px) {
    .menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100vw;
        height: calc(100vh - 60px);
        background: var(--azul-wzup, #022F64);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .menu.menu-open {
        left: 0;
    }
    
    .menu li {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .menu li a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        color: white;
        text-decoration: none;
        border-radius: 8px;
        margin: 0 1rem;
        transition: background-color 0.3s ease;
    }
    
    .submenu-list {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin: 0.5rem 1rem;
        padding: 0.5rem 0;
    }
}

/* Footer responsivo */
.footer {
    width: 100vw;
    max-width: 100vw;
    background: var(--azul-wzup, #022F64);
    color: white;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
}

/* Seções específicas */
.hero {
    padding: clamp(2rem, 5vw, 4rem) 0;
    text-align: center;
    background: var(--azul-wzup, #022F64);
    color: white;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
}

/* Carrossel responsivo */
.carousel, .depoimentos-carousel-container {
    width: 100%;
    max-width: min(750px, 95vw);
    margin: 0 auto;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 12px;
}

/* Vídeos responsivos */
.infra-video, .video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.infra-video iframe, .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Breakpoints específicos */

/* Smartphones pequenos (320px - 480px) */
@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .container, .hero-content, .about-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .about-cards, .team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .carousel {
        max-width: 95vw;
        height: auto;
    }
    
    .carousel-slide img {
        max-height: 40vh;
    }
}

/* Smartphones médios (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .about-cards, .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .carousel {
        max-width: 90vw;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .about-cards, .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .nav {
        padding: 0 2rem;
    }
}

/* Desktops pequenos (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container, .hero-content, .about-content {
        max-width: 1000px;
    }
}

/* Desktops grandes (1201px+) */
@media (min-width: 1201px) {
    .container, .hero-content, .about-content {
        max-width: 1200px;
    }
}

/* Ultra wide screens (1400px+) */
@media (min-width: 1400px) {
    .container, .hero-content, .about-content {
        max-width: 1400px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

/* Correções específicas para overflow */
.overflow-hidden {
    overflow: hidden;
}

.text-overflow-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.word-break {
    word-break: break-word;
    hyphens: auto;
}

/* Utilitários responsivos */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .btn-primary, .btn-secondary {
        border: 2px solid currentColor;
    }
    
    input, select, textarea {
        border: 2px solid currentColor;
    }
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2a2a2a;
    }
}

/* Print styles */
@media print {
    .header, .footer, .mobile-menu-btn, .carousel-btn {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero, .about, .cta {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}