/* Breakpoints principais:
   - 320px: iPhone SE, Galaxy S5
   - 375px: iPhone 6/7/8, iPhone X/11/12 mini
   - 390px: iPhone 12/13/14
   - 414px: iPhone 6/7/8 Plus, iPhone XR/11
   - 428px: iPhone 12/13/14 Pro Max
   - 480px: Landscape phones
   - 768px: iPad portrait
   - 1024px: iPad landscape, small laptops
*/

/* Base mobile styles (320px+) */
@media screen and (max-width: 767px) {
    body {
        font-size: 14px;
        line-height: 1.5;
        overflow-x: hidden;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .main-container {
        padding: 20px !important;
        margin-bottom: 20px;
        border-radius: 20px !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    }
    
    /* Header melhorado */
    .flex.flex-col.md\\:flex-row.justify-between.items-center.mb-8 {
        margin-bottom: 32px;
        gap: 16px;
        position: relative;
    }
    
    .back-to-site-btn {
        font-size: 13px;
        padding: 8px 16px;
        position: absolute;
           top: -40px;
        left: -7px;
        z-index: 10;
        border-radius: 20px;
        transition: all 0.3s ease;
    }
    
    .back-to-site-btn:hover {
        transform: translateY(-2px);
    }
    
    .logo {
        margin-top: 40px;
    }
    
    .logo img {
        width: 280px;
        height: auto;
        max-width: 100%;
    }
    
    /* Títulos responsivos */
    .text-3xl.md\\:text-5xl {
        font-size: 24px !important;
        line-height: 1.3;
        margin-bottom: 32px;
        text-align: center;
        padding: 0 10px;
    }
    
    .text-3xl.md\\:text-5xl .block {
        font-size: 12px;
        margin-top: 16px;
        padding-top: 16px;
        opacity: 0.8;
    }
    
    /* Seleção de tipo de imóvel */
    .text-2xl.font-semibold.mb-6.text-center {
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 600;
    }
    
    .flex.justify-center.gap-6.mb-8 {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 32px;
        align-items: center;
        padding: 0 20px;
    }
    
    .radio-container {
        width: 100%;
        max-width: 280px;
        padding: 16px 20px;
        justify-content: center;
        border-radius: 12px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .radio-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }
    
    .radio-container label {
        font-size: 16px;
        font-weight: 500;
    }
    
    /* Seção valor da conta */
    .flex.items-center.justify-center.mb-8 {
        margin-bottom: 24px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .flex.items-center.justify-center.mb-8 span {
        font-size: 28px;
        font-weight: 700;
    }
    
    .form-input.w-full.max-w-xs {
        font-size: 28px;
        padding: 16px 20px;
        max-width: 200px;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }
    
    .form-input.w-full.max-w-xs:focus {
        border-color: #F2A81D;
        box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.1);
    }
    
    /* Slider melhorado */
    .mb-10.max-w-2xl.mx-auto {
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .slider {
        height: 8px;
        border-radius: 4px;
        background: linear-gradient(to right, #F2A81D, #e09a18);
        outline: none;
        -webkit-appearance: none;
    }
    
    .slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #F2A81D;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
    
    .flex.justify-between.mt-3.text-sm {
        font-size: 12px;
        font-weight: 500;
    }
    
    /* Botões aprimorados */
    .button-default,
    .bg-\\[\\#F2A81D\\] {
        font-size: 18px !important;
        padding: 16px 32px !important;
        border-radius: 30px;
        font-weight: 700;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(242, 168, 29, 0.3);
    }
    
    .button-default:hover,
    .bg-\\[\\#F2A81D\\]:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(242, 168, 29, 0.4);
    }
    
    /* Resultados da simulação */
    .intSimula {
        padding: 24px !important;
        margin-bottom: 40px;
        border-radius: 16px;
        /*background: linear-gradient(135deg, rgba(242, 168, 29, 0.05), rgba(242, 168, 29, 0.1));*/
        border: 1px solid rgba(242, 168, 29, 0.2);
    }
    
    .intSimula h3 {
        font-size: 20px;
        margin-bottom: 24px;
        font-weight: 600;
    }
    
    .flex.flex-col.md\\:flex-row.justify-center.items-center.gap-10 {
        gap: 24px;
        flex-direction: column;
    }
    
    .text-3xl.md\\:text-5xl.font-bold {
        font-size: 28px !important;
        font-weight: 800;
    }
    
    .text-lg.dark\\:opacity-80 {
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    /* Cards de bandeiras */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 40px;
    }
    
    .flag-card {
        padding: 20px !important;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
    }
    
    .flag-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    .flag-card h4 {
        font-size: 16px;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .flag-card p:first-of-type {
        font-size: 13px;
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .flag-card .text-2xl {
        font-size: 24px !important;
        font-weight: 700;
    }
    
    /* Formulário de contato */
    .contact-form {
        padding: 24px !important;
        margin-top: 40px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .contact-form h3 {
        font-size: 26px;
        margin-bottom: 28px;
        font-weight: 700;
    }
    
    .contact-form label {
        font-size: 15px;
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .contact-form .form-input {
        font-size: 16px;
        padding: 14px 18px;
        border-radius: 10px;
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }
    
    .contact-form .form-input:focus {
        border-color: #F2A81D;
        box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.1);
    }
    
    .flex.flex-col.sm\\:flex-row.gap-4 {
        flex-direction: column;
        gap: 16px;
    }
    
    .flex.flex-col.sm\\:flex-row.gap-4 button {
        font-size: 16px;
        padding: 14px 24px;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    /* Checkboxes */
    .checkbox-container {
        margin-bottom: 20px;
        align-items: flex-start;
        gap: 12px;
    }
    
    .checkbox-label {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .checkbox-label a {
        color: #F2A81D;
        font-weight: 600;
        text-decoration: underline;
    }
    
    /* Mensagem de sucesso */
    #successMessage {
        padding: 28px !important;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    }
    
    #successMessage h3 {
        font-size: 24px;
        margin-bottom: 16px;
        font-weight: 700;
        color: #059669;
    }
    
    #successMessage p {
        font-size: 16px;
        margin-bottom: 28px;
        color: #374151;
    }
    
    .flex.flex-col.items-center.gap-4 button {
        font-size: 15px;
        padding: 12px 24px;
        border-radius: 10px;
        font-weight: 600;
        min-width: 200px;
    }
    
    /* Theme toggle */
    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .theme-toggle:hover {
        transform: scale(1.1);
    }
    
    /* Modais responsivos */
    .fixed.inset-0 .bg-white {
        margin: 20px;
        max-height: calc(100vh - 40px);
        padding: 24px;
        border-radius: 16px;
        max-width: calc(100vw - 40px);
    }
    
    .fixed.inset-0 h3 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 20px;
    }
    
    .fixed.inset-0 h4 {
        font-size: 16px;
        margin-top: 20px;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .fixed.inset-0 p {
        font-size: 14px;
        margin-bottom: 16px;
        line-height: 1.6;
    }
    
    .contact-form .input-menor { font-size: 18px !important; }
}

/* iPhone SE e dispositivos muito pequenos (320px-374px) */
@media screen and (max-width: 374px) {
    
 .quero-economizar {
     font-size: 12px !important;
     padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
line-height: 16px !important;
    }
    
    .main-container {
        padding: 16px !important;
        margin: 0 8px 16px 8px;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .logo img {
        width: 220px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 20px !important;
        padding: 0 5px;
    }
    
    .text-3xl.md\\:text-5xl .block {
        font-size: 11px;
    }
    
    .form-input.w-full.max-w-xs {
        font-size: 24px !important;
        max-width: 160px;
        padding: 12px 16px;
    }
    
    .flex.items-center.justify-center.mb-8 span {
        font-size: 24px;
    }
    
    .button-default,
    .bg-\\[\\#F2A81D\\] {
        font-size: 16px !important;
        padding: 14px 28px !important;
    }
    
    .radio-container {
        max-width: 240px;
        padding: 14px 18px;
    }
    
    .intSimula {
        padding: 20px !important;
    }
    
    .text-3xl.md\\:text-5xl.font-bold {
        font-size: 24px !important;
    }
    
    .flag-card {
        padding: 16px !important;
    }
    
    .flag-card h4 {
        font-size: 15px;
    }
    
    .flag-card .text-2xl {
        font-size: 18px !important;
    }
    
    .contact-form {
        padding: 20px !important;
    }
    
    .contact-form h3 {
        font-size: 22px;
    }
}

/* iPhone padrão (375px-413px) */
@media screen and (min-width: 375px) and (max-width: 413px) {
    .logo img {
        width: 260px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 22px !important;
    }
    
    .form-input.w-full.max-w-xs {
        max-width: 180px;
    }
    
    .flex.justify-center.gap-6.mb-8 {
        flex-direction: row;
        gap: 12px;
        padding: 0 10px;
    }
    
    .radio-container {
        max-width: 160px;
        font-size: 14px;
    }
    
    .radio-container label {
        font-size: 15px;
    }
}

/* iPhone Plus e XR (414px-479px) */
@media screen and (min-width: 414px) and (max-width: 479px) {
    .logo img {
        width: 300px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 26px !important;
    }
    
    .form-input.w-full.max-w-xs {
        max-width: 200px;
    }
    
    .flex.justify-center.gap-6.mb-8 {
        flex-direction: row;
        gap: 16px;
    }
    
    .radio-container {
        max-width: 180px;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .flex.flex-col.md\\:flex-row.justify-center.items-center.gap-10 {
        flex-direction: row;
        gap: 32px;
    }
}

/* Landscape mobile (480px-767px) */
@media screen and (min-width: 480px) and (max-width: 767px) {
    .logo img {
        width: 320px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 28px !important;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .flex.flex-col.md\\:flex-row.justify-center.items-center.gap-10 {
        flex-direction: row;
        gap: 40px;
    }
    
    .contact-form {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .flex.flex-col.sm\\:flex-row.gap-4 {
        flex-direction: row;
        gap: 16px;
    }
}

/* Tablet portrait (768px-1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .main-container {
        padding: 40px !important;
        max-width: 700px;
        margin: 0 auto 32px auto;
    }
    
    .logo img {
        width: 380px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 36px !important;
    }
    
    .flex.justify-center.gap-6.mb-8 {
        flex-direction: row;
        gap: 32px;
    }
    
    .radio-container {
        max-width: 200px;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .intSimula {
        padding: 32px !important;
    }
    
    .contact-form {
        padding: 32px !important;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Orientação landscape para mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .min-h-screen {
        min-height: auto;
    }
    
    .py-10.md\\:py-16 {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .text-3xl.md\\:text-5xl {
        font-size: 20px !important;
        margin-bottom: 20px;
    }
    
    .text-3xl.md\\:text-5xl .block {
        font-size: 10px;
        margin-top: 8px;
        padding-top: 8px;
    }
    
    .intSimula {
        margin-bottom: 24px !important;
        padding: 20px !important;
    }
    
    .contact-form {
        margin-top: 24px;
    }
    
    .logo {
        margin-top: 20px;
    }
    
    .logo img {
        width: 200px;
    }
}

/* Melhorias gerais de UX */
@media screen and (max-width: 767px) {
    /* Área de toque otimizada */
    button, 
    .radio-container, 
    .checkbox-container,
    input[type="range"] {
        min-height: 16px;
        touch-action: manipulation;
    }
    
    .quero-economizar {
     padding-left: 2rem;
    padding-right: 2rem;
    }
    
    /* Prevenção de zoom em inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"] {
        font-size: 21px !important;
    }
    
    /* Scroll suave */
    html {
        scroll-padding-top: 20px;
    }
    
    /* Espaçamentos consistentes */
    .mb-12 {
        margin-bottom: 40px !important;
    }
    
    .mb-8 {
        margin-bottom: 32px !important;
    }
    
    .mb-6 {
        margin-bottom: 24px !important;
    }
    
    /* Loading overlay */
    .loading-overlay {
        padding: 24px;
    }
    
    .loading-text {
        font-size: 16px;
        margin-top: 20px;
        font-weight: 500;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    /* Error messages */
    .error-message {
        font-size: 13px;
        margin-top: 6px;
        padding: 8px 12px;
        border-radius: 6px;
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.2);
    }
    
    /* Estados de foco melhorados */
    button:focus,
    input:focus,
    .radio-container:focus,
    .checkbox-container:focus {
        outline: 3px solid rgba(242, 168, 29, 0.5);
        outline-offset: 2px;
    }
    
    /* Animações suaves */
    * {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    /* Otimização para telas de alta densidade */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        .logo img {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
    }
}

/* Dark mode adjustments para mobile */
@media screen and (max-width: 767px) {
    .dark .main-container {
        background: rgba(15, 41, 64, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dark .intSimula {
        background: rgba(242, 168, 29, 0.1);
        border: 1px solid rgba(242, 168, 29, 0.2);
    }
    
    .dark .flag-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dark .contact-form {
        background: rgba(15, 41, 64, 0.9);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dark .form-input {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .dark .form-input:focus {
        border-color: #F2A81D;
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Performance optimizations */
@media screen and (max-width: 767px) {
    /* GPU acceleration para animações */
    .button-default,
    .bg-\\[\\#F2A81D\\],
    .flag-card,
    .radio-container {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Otimização de imagens */
    img {
        image-rendering: optimizeQuality;
        image-rendering: -webkit-optimize-contrast;
    }
}



@media screen and (min-width: 220px) and (max-width: 400px) {
    #simularButton { /*font-size: 15px;*/ }
    
    .custom-radio {
        width: 25px;
        height: 20px;
        border: 3px solid #F2A81D;
        border-radius: 50%;
        display: inline-block;
        position: relative;
        cursor: pointer;
        margin-right: 12px;
        vertical-align: middle;
        transition: all 0.2s ease;
    }
    
    .custom-radio.checked:after {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        background-color: #F2A81D;
        border-radius: 50%;
        top: -2px;
        left: -2px;
        transition: all 0.2s ease;
     }
    
}
























