/* ===================================================================
   MOBILE RESPONSIVE CSS - GUIDED HUMAN DESIGN
   Otimizações para dispositivos móveis e tablets
   =================================================================== */

/* ===================================================================
   ACCESSIBILITY - SKIP TO CONTENT
   =================================================================== */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #BD0451;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 5px 0;
    font-weight: bold;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ===================================================================
   GLOBAL MOBILE STYLES
   =================================================================== */

@media (max-width: 991px) {
    /* Ajuste de fontes para tablets */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 32px !important;
    }
    
    h2 {
        font-size: 24px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
    
    /* Espaçamentos reduzidos */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    section {
        padding: 40px 0 !important;
    }
}

@media (max-width: 768px) {
    /* Fontes ainda menores para mobile */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 28px !important;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 22px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    h4 {
        font-size: 16px !important;
    }
    
    /* Container mais estreito */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    section {
        padding: 30px 0 !important;
    }
}

@media (max-width: 480px) {
    /* Fontes extra pequenas para mobile pequeno */
    h1 {
        font-size: 24px !important;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
}

/* ===================================================================
   BANNER / HERO SECTION
   =================================================================== */

@media (max-width: 991px) {
    .banner {
        min-height: 400px !important;
        background-attachment: scroll !important; /* Melhor performance em mobile */
    }
    
    .banner-caption h1 {
        font-size: 2.5em !important;
        margin-bottom: 15px;
    }
    
    .banner-caption h3 {
        font-size: 1.3em !important;
        line-height: 1.4;
    }
    
    .banner .fa-4x {
        font-size: 3em !important;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 768px) {
    .banner {
        min-height: 350px !important;
    }
    
    .banner-caption {
        padding: 20px 15px !important;
    }
    
    .banner-caption h1 {
        font-size: 2em !important;
        margin-bottom: 10px;
    }
    
    .banner-caption h3 {
        font-size: 1.1em !important;
        margin-bottom: 15px;
    }
    
    .banner .fa-4x {
        font-size: 2.5em !important;
        margin-bottom: 15px !important;
    }
}

@media (max-width: 480px) {
    .banner {
        min-height: 300px !important;
    }
    
    .banner-caption h1 {
        font-size: 1.5em !important;
    }
    
    .banner-caption h3 {
        font-size: 1em !important;
    }
    
    .banner .fa-4x {
        font-size: 2em !important;
    }
}

/* ===================================================================
   BUTTONS
   =================================================================== */

@media (max-width: 768px) {
    .btn {
        padding: 12px 25px;
        font-size: 14px;
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-lg {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    .btn-group {
        display: block;
    }
    
    .btn-group .btn {
        margin-bottom: 10px;
    }
}

/* ===================================================================
   FORMS
   =================================================================== */

@media (max-width: 768px) {
    .form-control {
        font-size: 16px; /* Evita zoom automático no iOS */
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* Inputs lado a lado em telas pequenas viram full width */
    .row .col-sm-6 .form-group {
        width: 100%;
    }
}

/* ===================================================================
   TABLES
   =================================================================== */

@media (max-width: 768px) {
    /* Tabelas responsivas com scroll horizontal */
    .table-responsive {
        border: 0;
        margin-bottom: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 13px;
    }
    
    table thead {
        display: none; /* Esconde cabeçalho em mobile para layout vertical */
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }
    
    table tbody td {
        display: block;
        text-align: right;
        padding: 8px 5px;
        border: none;
    }
    
    table tbody td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #BD0451;
    }
    
    /* Tabelas que precisam manter layout horizontal */
    .keep-table-layout table thead {
        display: table-header-group;
    }
    
    .keep-table-layout table tbody tr {
        display: table-row;
        border: none;
        padding: 0;
    }
    
    .keep-table-layout table tbody td {
        display: table-cell;
        text-align: left;
        padding: 8px;
    }
    
    .keep-table-layout table tbody td:before {
        content: none;
    }
}

/* ===================================================================
   CARDS / PANELS
   =================================================================== */

@media (max-width: 991px) {
    .panel {
        margin-bottom: 20px;
    }
    
    .panel-heading {
        padding: 15px;
    }
    
    .panel-body {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    /* Cards empilhados em mobile */
    .col-md-4,
    .col-md-6,
    .col-sm-6 {
        margin-bottom: 20px;
    }
    
    /* Ajuste de cards com imagens */
    .panel img {
        max-height: 200px;
        object-fit: cover;
    }
}

/* ===================================================================
   NAVIGATION / MENU
   =================================================================== */

@media (max-width: 991px) {
    /* Menu mobile melhorado */
    .navbar-toggle {
        margin-right: 0;
        padding: 10px 12px;
        border: 2px solid #fff;
    }
    
    .navbar-toggle:hover,
    .navbar-toggle:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .navbar-collapse {
        border: none;
        box-shadow: none;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-nav {
        margin: 0;
    }
    
    .navbar-nav > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav > li > a {
        padding: 15px 20px !important;
        font-size: 16px;
    }
    
    .navbar-nav .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.8);
        border: none;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-menu > li > a {
        padding: 12px 30px;
        color: #fff;
    }
}

/* ===================================================================
   FOOTER
   =================================================================== */

@media (max-width: 768px) {
    footer {
        text-align: center;
    }
    
    footer .col-sm-3,
    footer .col-sm-4,
    footer .col-sm-6 {
        margin-bottom: 30px;
    }
    
    footer h3,
    footer h4 {
        margin-top: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ===================================================================
   PRICING TABLES
   =================================================================== */

@media (max-width: 768px) {
    .pricing-table {
        margin-bottom: 30px;
    }
    
    .pricing-table .panel {
        margin-bottom: 20px;
    }
    
    .price {
        font-size: 36px !important;
    }
}

/* ===================================================================
   MODAL / POPUP
   =================================================================== */

@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
}

/* ===================================================================
   RESULTADO DO MAPA (JavaScript Generated Content)
   =================================================================== */

@media (max-width: 768px) {
    /* Resultado cards */
    #mapa-resultado .gradient-card {
        margin-bottom: 15px;
        padding: 15px !important;
    }
    
    #mapa-resultado h2 {
        font-size: 20px !important;
        padding: 15px !important;
    }
    
    #mapa-resultado h3 {
        font-size: 18px !important;
        margin-top: 15px !important;
    }
    
    #mapa-resultado h4 {
        font-size: 16px !important;
    }
    
    #mapa-resultado p,
    #mapa-resultado ul,
    #mapa-resultado li {
        font-size: 14px !important;
    }
    
    /* Tabelas do resultado */
    #mapa-resultado table {
        font-size: 12px !important;
    }
    
    #mapa-resultado th,
    #mapa-resultado td {
        padding: 8px 5px !important;
    }
    
    /* Print button */
    #mapa-resultado .print-button {
        width: 100%;
        margin-top: 20px;
        padding: 15px;
        font-size: 16px;
    }
    
    /* CTA section */
    #mapa-resultado .cta-section {
        padding: 20px !important;
        margin-top: 20px !important;
    }
    
    #mapa-resultado .cta-section h3 {
        font-size: 18px !important;
    }
    
    #mapa-resultado .cta-section button {
        width: 100%;
        font-size: 16px;
    }
}

/* ===================================================================
   EBOOKS PAGE
   =================================================================== */

@media (max-width: 768px) {
    .ebook-card {
        margin-bottom: 20px;
    }
    
    .ebook-image {
        max-height: 250px;
    }
    
    .ebook-benefits li {
        font-size: 14px;
        padding: 8px 0;
    }
}

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */

@media (max-width: 768px) {
    /* Spacing utilities para mobile */
    .mobile-mt-20 { margin-top: 20px !important; }
    .mobile-mb-20 { margin-bottom: 20px !important; }
    .mobile-pt-20 { padding-top: 20px !important; }
    .mobile-pb-20 { padding-bottom: 20px !important; }
    
    .mobile-text-center { text-align: center !important; }
    .mobile-hidden { display: none !important; }
    .mobile-block { display: block !important; }
    
    /* Remove margens extras em mobile */
    .no-mobile-margin {
        margin: 0 !important;
    }
    
    .no-mobile-padding {
        padding: 0 !important;
    }
}

/* ===================================================================
   PERFORMANCE OPTIMIZATIONS
   =================================================================== */

@media (max-width: 768px) {
    /* Desabilita animações complexas em mobile para performance */
    .reduce-motion,
    .reduce-motion * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Otimiza scroll */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===================================================================
   TOUCH IMPROVEMENTS
   =================================================================== */

@media (max-width: 768px) {
    /* Aumenta área de toque para links e botões */
    a,
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover states em touch devices */
    .no-touch-hover:hover {
        background-color: inherit !important;
        color: inherit !important;
    }
}

/* ===================================================================
   ACCESSIBILITY IMPROVEMENTS
   =================================================================== */

@media (max-width: 768px) {
    /* Melhora contraste e legibilidade */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Skip to content link visível em foco */
    .skip-to-content:focus {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 9999;
        padding: 10px 20px;
        background: #BD0451;
        color: white;
        text-decoration: none;
        border-radius: 5px;
    }
}
