/* ../shared/calculadoras/dinamica-forcas/dinamica-forcas.css */
/* CSS ISOLADO - Calculadora Dinâmica Forças - ÁREA FÍSICA */

/* ===== VARIÁVEIS DE COR - ÁREA FÍSICA ===== */
:root {
    --fisica-primary: #0984e3;      /* Azul energia */
    --fisica-secondary: #6c5ce7;    /* Roxo força */
    --fisica-accent: #00b894;       /* Verde movimento */
    --fisica-light: #e8f4fd;       /* Fundo azul claro */
    --fisica-gradient: linear-gradient(135deg, #0984e3, #6c5ce7);
    
    /* Cores específicas para tipos de força */
    --newton-color: #1e88e5;        /* Azul para Newton */
    --peso-color: #43a047;          /* Verde para peso */
    --atrito-color: #fb8c00;        /* Laranja para atrito */
    --centripeta-color: #8e24aa;    /* Roxo para centrípeta */
}

/* Garantir que todo o conteúdo se adapte ao layout principal */
.content {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.content > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* ===================================
   SEÇÃO PRINCIPAL DA CALCULADORA - FÍSICA
   ================================== */
.dinamica-calculator-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(9, 132, 227, 0.2);
    border: 1px solid rgba(9, 132, 227, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dinamica-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--fisica-primary);
}

.dinamica-calculator-section .dinamica-header h1 {
    color: var(--fisica-primary) !important;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(9, 132, 227, 0.1);
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: var(--fisica-primary) !important;
    background-clip: initial !important;
}

.dinamica-header p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.dinamica-container {
    max-width: 100%;
    overflow-x: hidden; /* Evita scroll horizontal */
}

/* ===================================
   SISTEMA DE TABS - FÍSICA
   ================================== */
.dinamica-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--fisica-primary);
    overflow-x: hidden; /* Remove scroll horizontal */
    gap: 5px;
    flex-wrap: wrap; /* Permite quebra de linha em mobile */
}

.dinamica-tab-btn {
    background: #f8f9fa;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px; /* Largura mínima adequada */
    max-width: 200px; /* Evita botões muito largos */
    font-size: 14px;
    flex: 1; /* Distribui espaço igualmente */
}

.dinamica-tab-btn:hover {
    background: var(--fisica-light);
    color: var(--fisica-primary);
}

.dinamica-tab-btn.active {
    background: var(--fisica-gradient);
    color: white;
    border-bottom: 2px solid var(--fisica-primary);
}

.dinamica-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dinamica-tab-content.active {
    display: block;
}

/* ===================================
   INPUTS DA CALCULADORA - FÍSICA
   ================================== */
.dinamica-inputs {
    background: var(--fisica-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    border: 2px solid var(--fisica-primary);
}

.dinamica-inputs h3 {
    color: var(--fisica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3em;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid var(--fisica-primary);
}

.dinamica-input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dinamica-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dinamica-input-group label {
    color: var(--fisica-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.dinamica-input-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--fisica-primary);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dinamica-input-group input:focus {
    outline: none;
    border-color: var(--fisica-secondary);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
}

.dinamica-input-group input:invalid {
    border-color: #dc3545;
}

/* ===================================
   BOTÕES DE EXEMPLO - FÍSICA
   ================================== */
.dinamica-example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.dinamica-btn-example {
    background: linear-gradient(135deg, var(--fisica-accent) 0%, #00a085 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.dinamica-btn-example:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
    background: linear-gradient(135deg, #00a085 0%, var(--fisica-accent) 100%);
}

/* ===================================
   BOTÃO CALCULAR - FÍSICA
   ================================== */
.dinamica-calculate-section {
    text-align: center;
    margin: 1.5rem 0;
}

.dinamica-calculate-btn {
    background: var(--fisica-gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.3);
}

.dinamica-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(9, 132, 227, 0.4);
    background: linear-gradient(135deg, var(--fisica-secondary) 0%, var(--fisica-primary) 100%);
}

.dinamica-calculate-btn:active {
    transform: translateY(-1px);
}

/* ===================================
   BOTÃO LIMPAR - FÍSICA
   ================================== */
.dinamica-clear-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--fisica-primary);
}

.dinamica-clear-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.dinamica-clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* ===================================
   RESULTADO DA DINÂMICA - FÍSICA
   ================================== */
.dinamica-resultado {
    background: linear-gradient(135deg, var(--fisica-accent) 0%, #00a085 100%);
    border: 2px solid var(--fisica-accent);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 1.5rem;
    animation: slideInUp 0.5s ease;
    color: white;
}

.dinamica-resultado h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.dinamica-result-highlight {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.dinamica-result-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.dinamica-result-details h4 {
    color: white;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.dinamica-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dinamica-result-item:last-child {
    border-bottom: none;
}

.dinamica-result-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.dinamica-result-value {
    font-weight: bold;
    color: white;
}

/* ===================================
   EXPLICAÇÃO DOS CÁLCULOS - FÍSICA
   ================================== */
.dinamica-explanation-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.1);
    border: 1px solid rgba(9, 132, 227, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dinamica-explanation-section h2 {
    color: var(--fisica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--fisica-primary);
}

.dinamica-calculation-steps {
    background: var(--fisica-light);
    border: 1px solid var(--fisica-primary);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.dinamica-calculation-steps h4 {
    color: var(--fisica-primary);
    margin-bottom: 15px;
    word-wrap: break-word;
}

.dinamica-step {
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--fisica-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.dinamica-step:last-child {
    margin-bottom: 0;
}

.dinamica-formula-highlight {
    background: #e7f3ff;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--fisica-primary);
    margin: 10px 0;
    text-align: center;
    border: 1px solid var(--fisica-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===================================
   CONTEÚDO EDUCACIONAL - FÍSICA
   ================================== */
.dinamica-educational-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.1);
    border: 1px solid rgba(9, 132, 227, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dinamica-educational-content h2 {
    color: var(--fisica-primary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--fisica-primary);
}

.dinamica-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dinamica-content-card {
    background: var(--fisica-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--fisica-primary);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.dinamica-content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.2);
    border-color: var(--fisica-secondary);
}

/* CORREÇÃO CRÍTICA: Garantir contraste nos headers */
.dinamica-content-card h3 {
    color: var(--fisica-primary) !important;
    background: transparent !important;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.dinamica-content-card p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 0;
}

.dinamica-content-card ul {
    color: #2c3e50;
    line-height: 1.6;
    padding-left: 1.2rem;
}

.dinamica-content-card li {
    margin-bottom: 0.5rem;
}

.dinamica-formula-box {
    background: var(--fisica-gradient);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.dinamica-formula-box p {
    margin: 8px 0;
    font-size: 1.1em;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: white;
}

/* ===================================
   FAQ + REFERÊNCIAS + CREDIBILIDADE - FÍSICA
   ================================== */
.content-block {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
}

.content-block h3 {
    color: var(--fisica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--fisica-primary);
    padding-bottom: 0.5rem;
}

/* FAQ específico */
.faq-container {
    margin-top: 1rem;
}

.faq-item {
    background: var(--fisica-light);
    border: 1px solid var(--fisica-primary);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.1);
}

.faq-question {
    background: var(--fisica-primary);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.faq-question:hover {
    background: var(--fisica-secondary);
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid rgba(9, 132, 227, 0.2);
}

.faq-answer p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

.faq-answer strong {
    color: var(--fisica-primary);
    font-weight: 600;
}

/* Referências específico */
.references-container {
    margin-top: 1rem;
}

.references-list {
    list-style: none;
    padding: 0;
}

.referencia-item {
    background: var(--fisica-light);
    border-left: 4px solid var(--fisica-primary);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
}

.referencia-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.referencia-item em {
    color: var(--fisica-secondary);
    font-weight: 600;
}

/* Credibilidade específico */
.credibilidade-container {
    background: linear-gradient(135deg, var(--fisica-light), #f0f8ff);
    border: 2px solid var(--fisica-primary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
}

.credibilidade-title {
    color: var(--fisica-primary);
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

.credibilidade-content {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    color: var(--fisica-primary);
    font-weight: bold;
    font-size: 1.1rem;
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: var(--fisica-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(9, 132, 227, 0.3);
}

/* ===================================
   AVISO LEGAL E REFERÊNCIAS - FÍSICA
   ================================== */
.dinamica-legal-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ffc107;
}

.dinamica-legal-notice p {
    color: #856404;
    margin: 0;
    line-height: 1.6;
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   RESPONSIVIDADE MOBILE
   ================================== */
@media (max-width: 768px) {
    .dinamica-calculator-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .dinamica-header h1 {
        font-size: 1.8rem;
    }
    
    .dinamica-tabs {
        flex-direction: column;
        gap: 8px;
        border-bottom: none;
        overflow-x: hidden;
    }
    
    .dinamica-tab-btn {
        min-width: auto;
        width: 100%;
        border-radius: 8px;
        margin-bottom: 0;
        font-size: 16px; /* Melhor para mobile */
        padding: 14px 16px; /* Mais área de toque */
    }
    
    .dinamica-tab-btn.active {
        border-bottom: none;
        border-left: 4px solid var(--fisica-primary);
        background: var(--fisica-gradient);
    }
    
    .dinamica-input-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dinamica-example-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .dinamica-btn-example {
        width: 100%;
        border-radius: 8px;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .dinamica-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .dinamica-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dinamica-educational-content {
        padding: 1.5rem;
    }
    
    .dinamica-explanation-section {
        padding: 1.5rem;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
    .dinamica-header h1 {
        font-size: 1.5rem;
    }
    
    .dinamica-inputs {
        padding: 1.5rem;
    }
    
    .dinamica-inputs h3 {
        font-size: 1.1em;
        padding: 12px;
    }
    
    .dinamica-tab-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .credibilidade-container {
        padding: 1rem;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Desktop - Adaptação ao sidebar */
@media (min-width: 769px) {
    .dinamica-tabs {
        justify-content: flex-start;
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .dinamica-tab-btn {
        flex: 0 1 auto; /* Não cresce, mas pode encolher */
        min-width: 140px;
        max-width: 180px;
    }
    
    /* Quando sidebar está colapsado, mais espaço para tabs */
    .main-container.sidebar-collapsed .dinamica-tab-btn {
        min-width: 160px;
        max-width: 200px;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .dinamica-tabs {
        overflow-x: hidden;
        flex-wrap: nowrap;
    }
    
    .dinamica-tab-btn {
        min-width: 120px;
        max-width: 150px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* ===================================
   ESTADOS DE LOADING
   ================================== */
.dinamica-loading {
    opacity: 0.7;
    pointer-events: none;
}

.dinamica-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--fisica-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* ===================================
   SOBRESCREVER CSS BASE - NO FINAL
   ================================== */

/* Forçar cor específica para H1 da dinâmica - DEVE FICAR NO FINAL */
body[data-page="dinamica-forcas"] .content .dinamica-calculator-section .dinamica-header h1,
body[data-page="dinamica-forcas"] .dinamica-calculator-section .dinamica-header h1,
body[data-page="dinamica-forcas"] .dinamica-header h1 {
    color: #0984e3 !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #0984e3 !important;
    background-clip: initial !important;
}