/* ===== MOBILE FIRST - BASE PARA TODOS DISPOSITIVOS ===== */
html {
    font-size: 14px;
}

body {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== SMARTPHONES PEQUENOS (até 390px) ===== */
@media (max-width: 390px) {
    html {
        font-size: 13px;
    }

    /* Topo/Hero */
    .topo {
        padding: 80px 0 40px !important;
        min-height: auto !important;
    }

    .topo h1.display-4 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .topo h5 {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    /* Botões */
    .btn {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-lg {
        font-size: 1rem !important;
    }

    /* Menu */
    .navbar-brand img {
        height: 50px !important;
    }

    .navbar-toggler {
        padding: 8px 12px;
        margin-top: 10px;
    }

    #navbarResponsivo {
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        margin: 2px 0;
    }

    .nav-link {
        padding: 12px !important;
        border-radius: 8px;
    }

    /* Cards */
    .card {
        margin-bottom: 20px;
    }

    .card-block {
        padding: 20px 15px !important;
    }

    .card-title {
        font-size: 1.5rem !important;
    }

    /* Lista de planos */
    #planos .list-unstyled li {
        font-size: 0.85rem;
        padding: 8px 0 8px 25px !important;
    }

    /* Métodos de pagamento */
    .metodo {
        width: 100%;
        margin: 8px 0 !important;
        padding: 12px !important;
        font-size: 0.85rem;
    }

    /* Formulário */
    .form-control {
        padding: 12px 20px !important;
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    /* Ícones */
    .fa-5x {
        font-size: 2.8rem !important;
    }

    /* Seções */
    section {
        padding: 40px 0 !important;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Números circulares */
    .circle-number {
        width: 60px !important;
        height: 60px !important;
        line-height: 60px !important;
        font-size: 22px !important;
    }

    /* Rodapé */
    .navbar-text {
        display: block;
        text-align: center;
        float: none !important;
        margin: 10px 0;
    }

    .footer b {
        display: block;
        margin-top: 5px;
    }

    /* Carrossel */
    #slider .carousel-item {
        padding: 30px 15px !important;
    }

    #slider p {
        font-size: 0.9rem !important;
        min-height: auto !important;
    }

    .aspas {
        font-size: 2.5rem !important;
    }
}

/* ===== SMARTPHONES MÉDIOS (391px - 576px) ===== */
@media (min-width: 391px) and (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .topo {
        padding: 90px 0 50px !important;
    }

    .topo h1.display-4 {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 25px;
    }

    .card-columns {
        column-count: 1;
    }

    .metodo {
        width: calc(50% - 20px);
        margin: 10px !important;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===== TABLETS (577px - 768px) ===== */
@media (min-width: 577px) and (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .topo {
        padding: 100px 0 60px !important;
    }

    .topo h1.display-4 {
        font-size: 2.2rem;
    }

    /* Ajuste para vantagens */
    #vantagens .row img {
        margin-bottom: 20px;
        max-width: 80%;
    }

    #vantagens1 .col-sm-6 {
        margin-bottom: 30px;
    }

    /* Cards em grid de 2 colunas */
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Menu */
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        margin: 0 5px;
    }

    .nav-link {
        padding: 8px 15px !important;
        font-size: 0.9rem;
    }

    /* Planos */
    #planos .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Formulário */
    .col-md-7 {
        margin-top: 30px;
    }

    .form-control {
        padding: 12px 20px;
    }

    /* Métodos de pagamento */
    .metodo {
        padding: 10px 20px;
        margin: 5px;
    }
}

/* ===== TABLETS GRANDES E LAPTOPS PEQUENOS (769px - 992px) ===== */
@media (min-width: 769px) and (max-width: 992px) {
    .topo h1.display-4 {
        font-size: 2.5rem;
    }

    /* Ajuste de cards */
    .col-lg-4 {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    /* Menu */
    .nav-link {
        padding: 8px 12px !important;
        font-size: 0.95rem;
    }

    .navbar-brand img {
        height: 70px;
    }
}

/* ===== SMART TVs E TELAS GRANDES (1200px+) ===== */
@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }

    .container {
        max-width: 1140px;
    }

    .topo {
        min-height: 700px !important;
    }

    .display-4 {
        font-size: 3.5rem;
    }
}

/* ===== ORIENTAÇÃO PAISAGEM EM SMARTPHONES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .topo {
        min-height: auto !important;
        padding: 70px 0 40px !important;
    }

    #navbarResponsivo {
        max-height: 90vh;
    }

    .nav-item {
        width: auto;
        display: inline-block;
        margin: 2px;
    }

    .navbar-collapse {
        text-align: center;
    }

    .card {
        margin-bottom: 20px;
    }

    .circle-number {
        width: 50px !important;
        height: 50px !important;
        line-height: 50px !important;
        font-size: 20px !important;
    }
}

/* ===== TABLETS EM ORIENTAÇÃO PAISAGEM ===== */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .topo {
        min-height: 500px !important;
    }

    .display-4 {
        font-size: 2.8rem;
    }
}

/* ===== CORREÇÕES ESPECÍFICAS PARA DISPOSITIVOS ===== */

/* iPhone SE e similares */
@media (max-width: 375px) {
    .topo h1.display-4 {
        font-size: 1.6rem;
    }

    .card-title {
        font-size: 1.3rem !important;
    }

    .metodo {
        font-size: 0.8rem;
        padding: 10px !important;
    }
}

/* Galaxy Fold e dispositivos muito estreitos */
@media (max-width: 280px) {
    html {
        font-size: 12px;
    }

    .navbar-brand img {
        height: 40px !important;
    }

    .display-4 {
        font-size: 1.4rem !important;
    }

    .btn {
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
    }

    .circle-number {
        width: 45px !important;
        height: 45px !important;
        line-height: 45px !important;
        font-size: 18px !important;
    }
}

/* ===== AJUSTES DE TOQUE PARA DISPOSITIVOS MÓVEIS ===== */
@media (max-width: 768px) {
    /* Aumenta área de clique em links e botões */
    .nav-link,
    .btn,
    .metodo,
    .job li {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove efeitos hover em dispositivos touch */
    .nav-link:hover,
    .btn:hover,
    .card:hover {
        transform: none;
    }

    /* Melhora scroll em modais */
    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Ajuste para tabelas de preços */
    .table-responsive {
        border: none;
    }

    /* Espaçamento entre elementos */
    .mb-1, .my-1 {
        margin-bottom: 0.8rem !important;
    }

    .mt-1, .my-1 {
        margin-top: 0.8rem !important;
    }

    /* Texto centralizado em mobile */
    .text-xs-center {
        text-align: center !important;
    }

    /* Imagens responsivas */
    .img-fluid {
        width: 100%;
        height: auto;
    }

    /* Ajuste para o formulário de contato */
    #suporte .col-md-5 {
        text-align: center;
    }

    #suporte img {
        max-width: 200px;
        margin-bottom: 20px;
    }

    /* Footer */
    .navbar .container {
        flex-direction: column;
        text-align: center;
    }

    .navbar-text {
        width: 100%;
        margin: 5px 0;
    }

    .float-sm-right {
        float: none !important;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    .navbar,
    .btn,
    .formulario,
    #slider,
    footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        width: 100%;
        max-width: none;
    }
}

/* ===== SUPORTE PARA DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        background: #1a1a2e;
        color: #fff;
    }
}

/* ===== ANIMAÇÕES REDUZIDAS (ACESSIBILIDADE) ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}