/* Responsive CSS for Mobile Optimization */

/* Tablet Styles (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile Styles (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Header Adjustments */
    .header {
        padding: 10px 0;
    }
    
    .nav-container {
        padding: 0 20px;
        gap: 10px;
    }
    
    /* Logos responsivas em mobile */
    .nav-logo.logo-amil img {
        max-height: 50px;
    }
    
    .nav-logo.logo-corretora img {
        max-height: 60px;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.is-active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        font-size: 16px;
        border-bottom: 1px solid #eee;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 16px;
        margin: 20px 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Simulator Section */
    .simulator {
        padding: 40px 0;
    }
    
    .simulator h2 {
        font-size: 24px;
    }
    
    .simulation-stats {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .stat-item {
        width: 100%;
        text-align: center;
    }
    
    /* Form Adjustments */
    .form-header {
        padding: 15px;
    }
    
    .step-indicators {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step-indicator {
        flex: 1 0 45%;
        min-width: 120px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .form-body {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-footer .btn {
        width: 100%;
    }
    
    /* Benefits Grid */
    .benefits {
        padding: 40px 0;
    }
    
    .benefits h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .benefit-card {
        padding: 20px;
    }
    
    /* Plans Section */
    .plans {
        padding: 40px 0;
    }
    
    .plans h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-card {
        padding: 25px;
    }
    
    /* FAQ Section */
    .faq {
        padding: 40px 0;
    }
    
    .faq h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 16px;
    }
    
    .faq-answer {
        padding: 15px;
        font-size: 14px;
    }
    
    /* CTA Section */
    .cta {
        padding: 40px 0;
    }
    
    .cta h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .callback-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .footer-section ul {
        margin-bottom: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding-top: 20px;
    }
    
    /* WhatsApp Button */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
    
    /* General Typography */
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Small Mobile Styles (max-width: 480px) */
@media screen and (max-width: 480px) {
    /* Hero adjustments for small screens */
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 24px;
        line-height: 1.4;
    }
    
    .hero p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Button adjustments with improved touch targets */
    .btn {
        padding: 14px 24px;
        font-size: 15px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-submit {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 52px;
        font-weight: 600;
    }
    
    /* Step indicators - single column */
    .step-indicator {
        flex: 1 0 100%;
    }
    
    /* Form adjustments */
    .form-step h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Plan cards */
    .plan-card {
        padding: 20px;
    }
    
    .plan-price {
        font-size: 28px;
    }
    
    /* Benefit icons */
    .benefit-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* FAQ */
    .faq-question {
        font-size: 14px;
        padding: 12px;
    }
    
    /* Footer */
    .footer-section h3 {
        font-size: 16px;
    }
    
    .footer-bottom {
        font-size: 12px;
    }
}

/* Landscape Mobile Adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
        min-height: auto;
    }
    
    .nav-menu {
        height: calc(100vh - 50px);
        overflow-y: auto;
    }
    
    .step-indicators {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .step-indicator {
        flex: 0 0 auto;
        min-width: 100px;
    }
}

/* High Resolution Adjustments */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* Ensure crisp borders and shadows */
    .card,
    .benefit-card,
    .plan-card,
    .faq-item {
        border: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .header,
    .whatsapp-float,
    .menu-toggle,
    .form-footer,
    .btn {
        display: none !important;
    }
    
    /* Adjust layout for print */
    .hero,
    .benefits,
    .plans,
    .faq {
        page-break-inside: avoid;
    }
    
    /* Reset backgrounds */
    body {
        background: white;
        color: black;
    }
    
    .hero {
        background: none;
        color: black;
    }
    
    /* Ensure links are visible */
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (DESATIVADO)
   Requisito atual: layout totalmente branco.
   Mantido apenas como marcador para futura implementação via data-theme.
   Quando for reintroduzido:
   - NÃO sobrescrever tokens base.
   - Utilizar: [data-theme="dark"] {} ao invés de media query automática.
*/

/* ================= NEW LAYOUT RESPONSIVE OVERRIDES (2025) ================= */

/* Extra responsividade para telas entre 600px e 768px (tablets pequenos) */
@media (max-width: 768px) and (min-width: 600px) {
    .top-bar-content {
        justify-content: space-evenly;
        gap: 15px;
    }
    
    .top-bar-item {
        flex: 0 1 auto;
        font-size: 0.8rem;
    }
}

/* Tablet Large */
@media (max-width: 1100px) {
    .hero-section { padding-top: 80px; }
    .header { top:34px; }
    
    /* Ajustes top bar para tablets */
    .top-bar-content {
        gap: 24px;
    }
    
    .top-bar-item {
        font-size: 0.8rem;
    }
    
    /* Logos em tablets grandes */
    .nav-logo.logo-amil img {
        max-height: 70px;
    }
    
    .nav-logo.logo-corretora img {
        max-height: 85px;
    }
}

/* Tablet / Medium */
@media (max-width: 900px) {
    .hero-grid {
        gap:40px;
    }
    
    /* Top bar adaptável */
    .top-bar-content {
        gap: 18px;
    }
    
    .top-bar-item {
        font-size: 0.75rem;
        gap: 6px;
    }
    
    /* Logos em tablets médios */
    .nav-logo.logo-amil img {
        max-height: 60px;
    }
    
    .nav-logo.logo-corretora img {
        max-height: 75px;
    }
    
    .top-bar-item i {
        font-size: 0.9rem;
    }
}

/* Tablet Narrow / Large Mobile */
@media (max-width: 780px) {
    .top-bar { padding: 8px 0; }
    .top-bar-content { 
        justify-content: center;
        gap: 20px;
    }
    .top-bar-item {
        font-size: 0.8rem;
    }
    .top-bar-item span {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .hero-section { padding: 80px 0 60px; }
    .hero-stats { gap:24px; }
    .plans-grid { gap:32px; }
}

/* Core Mobile Adjustments for new classes */
@media (max-width: 768px) {
    /* Top Bar Mobile */
    .top-bar {
        padding: 10px 0;
    }
    
    .top-bar-content {
        gap: 16px;
        justify-content: space-around;
        padding: 0 10px;
    }
    
    .top-bar-item {
        font-size: 0.75rem;
        gap: 6px;
        flex: 0 1 auto;
    }
    
    .top-bar-item i {
        font-size: 0.875rem;
    }
    
    .top-bar-item strong {
        font-size: 0.8rem;
    }
    
    .nav-toggle { 
        display: flex;
        margin-left: 12px;
    }
    
    /* Backdrop overlay */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1100;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .nav-menu {
        position: fixed;
        top: calc(60px + 34px);
        left: -100%;
        width: 85%;
        max-width: 400px;
        height: calc(100vh - 60px - 34px);
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        flex-direction: column;
        padding: 40px 32px 60px;
        gap: 20px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1200;
        overflow-y: auto;
        border-right: 1px solid var(--surface-border);
    }
    
    .nav-menu.is-active { 
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .nav-menu ul li { 
        width: 100%;
        animation: slideIn 0.4s ease backwards;
    }
    
    .nav-menu.is-active ul li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.is-active ul li:nth-child(2) { animation-delay: 0.15s; }
    .nav-menu.is-active ul li:nth-child(3) { animation-delay: 0.2s; }
    .nav-menu.is-active ul li:nth-child(4) { animation-delay: 0.25s; }
    .nav-menu.is-active ul li:nth-child(5) { animation-delay: 0.3s; }
    
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .nav-menu ul li a {
        display: block;
        width: 100%;
        padding: 16px 18px;
        border-radius: 12px;
        border-bottom: none;
        font-size: 1rem;
        font-weight: 500;
        transition: all 0.25s ease;
        background: transparent;
    }
    
    .nav-menu ul li a:hover {
        background: var(--primary-color);
        color: #ffffff;
        transform: translateX(8px);
        box-shadow: 0 4px 12px rgba(0, 120, 212, 0.25);
    }
    
    .nav-menu ul li:last-child a { 
        border-bottom: none;
    }

    /* Botão WhatsApp no menu mobile */
    .btn-whatsapp {
        justify-content: center !important;
        margin-top: 10px !important;
        width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-grid {
        grid-template-columns:1fr;
        gap:46px;
    }
    .hero-title {
        font-size:2.4rem;
    }
    .hero-description {
        font-size:.95rem;
    }
    .hero-features { gap:12px; }
    .hero-feature {
        font-size:.7rem;
        padding:6px 12px;
    }
    .hero-form {
        padding:30px 24px 34px;
    }

    .brands-grid { gap:30px 40px; }

    .benefits-section { padding:70px 0 60px; }
    .benefits-section .benefits-grid {
        grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
        gap:26px;
    }

    .plans-section { padding:70px 0 70px; }
    .plans-grid { gap:30px; }
    .plans-grid .plan-card { padding:30px 26px 36px; }

    .corporate-section { padding:80px 0 70px; }
    .corporate-content { gap:44px; }

    .adhesion-section { padding:80px 0 60px; }
    .entities-grid { gap:18px; }

    .testimonials-section { padding:80px 0 70px; }
    .testimonials-grid { gap:30px; }

    .cta-section { padding:90px 0; }
    .cta-content h2 { font-size:2.2rem; }

    .footer { padding-top:80px; }
}

/* Small Mobile */
@media (max-width: 520px) {
    /* Top Bar para telas muito pequenas */
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        padding: 8px 0;
    }
    
    .top-bar-item {
        font-size: 0.7rem;
        justify-content: center;
        width: 100%;
        text-align: center;
    }
    
    .top-bar-item span {
        display: inline;
    }
    
    /* Logos em mobile pequeno */
    .nav-logo.logo-amil img {
        max-height: 40px;
    }
    
    .nav-logo.logo-corretora img {
        max-height: 50px;
    }
    
    .hero-title { font-size:2.25rem; }
    .stat-item strong { font-size:1.3rem; }
    .plan-price .value { font-size:2.1rem; }
    .cta-buttons { gap:14px; }
    .hero-form { padding:24px 18px 30px; }
}

/* Ultra Small */
@media (max-width: 400px) {
    /* Top Bar ultra small */
    .top-bar-item {
        font-size: 0.65rem;
    }
    
    .top-bar-item i {
        font-size: 0.8rem;
    }
    
    /* Logos em mobile ultra pequeno */
    .nav-logo.logo-amil img {
        max-height: 35px;
    }
    
    .nav-logo.logo-corretora img {
        max-height: 45px;
    }
    
    .top-bar-item strong {
        font-size: 0.75rem;
    }
    
    .hero-title { font-size:2rem; }
    .hero-form { padding:22px 14px 26px; }
    .btn-submit,
    .btn-plan { font-size:.75rem; letter-spacing:.5px; }
}

/* Landscape Mobile tweak */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section { padding:70px 0 50px; }
    .nav-menu { height:calc(100vh - 60px - 34px); overflow-y:auto; }
    
    /* Top bar em landscape */
    .top-bar {
        padding: 6px 0;
    }
    
    .top-bar-content {
        gap: 12px;
    }
    
    .top-bar-item:last-child {
        display: none; /* Esconde horário em landscape mobile */
    }
}

/* Print override for new sections */
@media print {
    .hero-section,
    .benefits-section,
    .plans-section,
    .adhesion-section,
    .testimonials-section,
    .cta-section { page-break-inside:avoid; }
}
/* ========================================================================== */

/* ================= MELHORIAS MOBILE 2025 ================= */

/* Otimizações para Touch Targets e Acessibilidade Mobile */
@media screen and (max-width: 768px) {
    /* Aumentar área de toque para todos os elementos interativos */
    a, button, input[type="submit"], input[type="button"], .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Melhorar espaçamento entre elementos clicáveis */
    .nav-menu ul li {
        margin: 8px 0;
    }
    
    /* Otimizar campos de formulário para mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 14px 16px;
        min-height: 48px;
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Melhorar visualização de select no mobile */
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 40px;
    }
    
    /* Espaçamento otimizado entre campos */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* Labels mais legíveis */
    .form-group label {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
    }
    
    /* Mensagens de erro mais visíveis */
    .form-group.error input,
    .form-group.error select,
    .form-group.error textarea {
        border-color: #e53e3e;
        border-width: 2px;
    }
    
    /* Texto de consentimento mais legível */
    .form-consent-text {
        font-size: 13px;
        line-height: 1.6;
        padding: 12px;
        background: #f7fafc;
        border-radius: 6px;
    }
    
    /* Links de política mais fáceis de tocar */
    .form-consent-text a {
        padding: 2px 4px;
        text-decoration: underline;
        text-underline-offset: 2px;
    }
    
    /* Cards de planos otimizados */
    .plan-card {
        padding: 24px 20px;
        margin-bottom: 20px;
    }
    
    .plan-card ul li {
        padding: 12px 0;
        font-size: 15px;
        line-height: 1.5;
    }
    
    /* FAQ otimizado para mobile */
    .faq-question {
        padding: 16px 20px;
        font-size: 15px;
        line-height: 1.5;
        min-height: 56px;
        display: flex;
        align-items: center;
    }
    
    .faq-answer {
        padding: 20px;
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* Hero form melhorado */
    .hero-form {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .hero-form .form-grid {
        gap: 16px;
    }
    
    /* Estatísticas mais compactas */
    .hero-stats {
        gap: 20px;
        padding: 24px 16px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-item strong {
        font-size: 24px;
        display: block;
        margin-bottom: 4px;
    }
    
    .stat-item span {
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* Melhorar botão WhatsApp flutuante */
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .whatsapp-float i {
        font-size: 28px;
    }
    
    /* Benefícios otimizados */
    .benefit-card {
        padding: 24px 20px;
        text-align: center;
    }
    
    .benefit-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin: 0 auto 16px;
    }
    
    .benefit-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .benefit-card p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Melhorias específicas para iPhones (notch e home indicator) */
@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: max(10px, env(safe-area-inset-top));
    }
    
    .whatsapp-float {
        bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px));
        right: max(20px, calc(env(safe-area-inset-right) + 20px));
    }
    
    .footer {
        padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px));
    }
}

/* Otimizações para Android (especialmente Chrome) */
@media screen and (max-width: 768px) {
    /* Remover highlight touch em elementos */
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
        -webkit-touch-callout: none;
    }
    
    /* Melhorar scroll */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* Prevenir zoom em landscape */
    @media (orientation: landscape) {
        input[type="text"],
        input[type="email"],
        input[type="tel"],
        select,
        textarea {
            font-size: 16px;
        }
    }
}

/* Melhorias para telas pequenas específicas (iPhone SE, etc) */
@media screen and (max-width: 375px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .btn {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .plan-price .value {
        font-size: 32px;
    }
    
    .hero-form {
        padding: 20px 16px 24px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 15px;
        padding: 12px 14px;
    }
}

/* Performance: Reduzir animações em dispositivos móveis */
@media screen and (max-width: 768px) {
    *, *::before, *::after {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Manter animações essenciais mais rápidas */
    .nav-menu {
        transition-duration: 0.25s !important;
    }
    
    .btn:active {
        transform: scale(0.98);
        transition-duration: 0.1s !important;
    }
}

