/* assets/css/area-triangulo.css */
/* CSS ISOLADO - Apenas para Calculadora de Área do Triângulo */
/* CORES DA GEOMETRIA: Verde Construção (#11998e), Verde Espacial (#38ef7d), Amarelo Medidas (#ffd32a) */

/* ===================================
   SEÇÃO DA CALCULADORA ÁREA DO TRIÂNGULO
   ================================== */
.triangle-calculator-section {
    margin-bottom: 3rem;
}

.triangle-header {
    text-align: center;
    margin-bottom: 2rem;
}

.triangle-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.triangle-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
}

.triangle-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
}

.triangle-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===================================
   SISTEMA DE ABAS ESPECÍFICO TRIÂNGULO
   ================================== */
.triangle-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 1rem;
}

.triangle-tab-btn {
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    color: #5a6c7d;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 110px;
}

.triangle-tab-btn:hover {
    background: #11998e;
    color: white;
    border-color: #11998e;
    transform: translateY(-2px);
}

.triangle-tab-btn.active {
    background: #11998e;
    color: white;
    border-color: #11998e;
    box-shadow: 0 3px 10px rgba(17, 153, 142, 0.3);
}

/* ===================================
   CONTEÚDO DAS ABAS TRIÂNGULO
   ================================== */
.triangle-tab-content {
    display: none;
}

.triangle-tab-content.active {
    display: block;
    animation: fadeInTriangleTab 0.3s ease;
}

@keyframes fadeInTriangleTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   INPUTS HORIZONTAIS TRIÂNGULO - OTIMIZADO
   ================================== */
.triangle-inputs-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
    margin-bottom: 1.5rem;
    padding: 1rem 0.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    overflow-x: auto;
    min-width: 100%;
}

.triangle-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem;
    background: #e8fff8;
    border-radius: 6px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
    min-width: 65px;
    flex-shrink: 0;
}

.triangle-input-group:hover {
    border-color: #11998e;
    transform: translateY(-1px);
}

.triangle-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
}

.triangle-input-group input {
    width: 55px;
    padding: 0.5rem 0.3rem;
    border: 2px solid #11998e;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.triangle-input-group input:focus {
    outline: none;
    border-color: #11998e;
    transform: scale(1.02);
    background: #e8fff8;
    box-shadow: 0 0 0 2px rgba(17, 153, 142, 0.15);
}

.triangle-input-group input:valid:not(:placeholder-shown) {
    border-color: #11998e;
    background: #e8fff8;
}

.triangle-operation-symbol {
    font-size: 1.4rem;
    font-weight: bold;
    color: #11998e;
    min-width: 25px;
    text-align: center;
    padding: 0.2rem;
    flex-shrink: 0;
}

/* ===================================
   RESULTADO DISPLAY TRIÂNGULO - OTIMIZADO
   ================================== */
.triangle-result-display {
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 75px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.triangle-result-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(17, 153, 142, 0.2);
}

.triangle-result-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #11998e;
    font-family: 'Courier New', monospace;
}

.triangle-result-unit {
    font-size: 0.7rem;
    color: #11998e;
    font-weight: 600;
}

/* ===================================
   FÓRMULA ESPECÍFICA TRIÂNGULO
   ================================== */
.triangle-formula {
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #11998e;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLOS E AJUDA TRIÂNGULO
   ================================== */
.triangle-examples {
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.triangle-examples.hidden {
    display: none;
}

.triangle-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.triangle-example-btn {
    background: #e8fff8;
    border: 2px solid #11998e;
    color: #11998e;
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.triangle-example-btn:hover {
    background: #11998e;
    color: white;
    transform: translateY(-2px);
}

.triangle-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
}

.triangle-help.hidden {
    display: none;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO TRIÂNGULO
   ================================== */
.triangle-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.triangle-explanation h3 {
    color: #11998e;
    margin-bottom: 1rem;
    text-align: center;
}

.triangle-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #11998e;
}

.triangle-step h4 {
    color: #11998e;
    margin-bottom: 0.5rem;
}

.triangle-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   CARDS DINÂMICOS COMPATIBILIDADE (MANTIDO INTACTO)
   ================================== */
/* Classes para cards de explicação dinâmicos criados via JavaScript */
.explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.explanation h3 {
    color: #11998e;
    margin-bottom: 1rem;
    text-align: center;
}

.explanation h4 {
    color: #11998e;
    margin-bottom: 0.5rem;
}

.explanation p {
    margin: 0.3rem 0;
    color: #444;
}

/* Classes para cards de fundamentação dinâmicos */
.legal-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.calc-legal {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.legal-explanation h3,
.calc-legal h3 {
    color: #11998e;
    margin-bottom: 1rem;
    text-align: center;
}

.legal-explanation h4,
.calc-legal h4 {
    color: #11998e;
    margin-bottom: 0.8rem;
}

.legal-explanation p,
.calc-legal p {
    margin: 0.5rem 0;
    color: #11998e;
    line-height: 1.6;
}

/* ===================================
   CONTEÚDO EDUCACIONAL TRIÂNGULO
   ================================== */
.triangle-educational-content {
    margin-top: 3rem;
}

.triangle-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;
}

.triangle-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #11998e;
    padding-bottom: 0.5rem;
}

.triangle-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.triangle-content-block strong {
    color: #11998e;
}

/* ===================================
   FORMULA DISPLAY TRIÂNGULO
   ================================== */
.triangle-formula-display {
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.triangle-formula-display h4 {
    color: #11998e;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.triangle-formula-display .formula p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #11998e;
    font-weight: 600;
}

/* ===================================
   GRIDS EXEMPLOS E DICAS TRIÂNGULO
   ================================== */
.triangle-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.triangle-example-item {
    background: #e8fff8;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.triangle-example-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #11998e;
}

.triangle-example-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #11998e;
}

.triangle-example-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.triangle-example-item p {
    color: #5a6c7d;
    font-size: 0.95rem;
    margin: 0;
}

.triangle-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.triangle-tip-item {
    background: #e8fff8;
    border: 1px solid #38ef7d;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.triangle-tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.triangle-tip-item h4 {
    color: #11998e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.triangle-tip-item p {
    color: #11998e;
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLO DE SOLUÇÃO TRIÂNGULO
   ================================== */
.triangle-example-solution {
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.triangle-example-solution h4 {
    color: #11998e;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.triangle-solution-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #11998e;
}

.triangle-solution-step h5 {
    color: #11998e;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.triangle-solution-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

.triangle-solution-final {
    background: #e8fff8;
    border: 2px solid #11998e;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.triangle-solution-final h5 {
    color: #11998e;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.triangle-solution-final p {
    color: #11998e;
    margin: 0;
    font-family: inherit;
}

/* ===================================
   SEÇÕES ADICIONAIS (FAQ, REFERÊNCIAS, CREDIBILIDADE)
   ================================== */

/* Content Block - Estilo base para FAQ, Referências e Credibilidade */
.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: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #11998e;
    padding-bottom: 0.5rem;
}

/* ===== FAQ CONTAINER ===== */
.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #11998e;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.1);
}

.faq-question {
    padding: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border-radius: 8px;
}

.faq-question:hover {
    background: #e8fff8;
    color: #11998e;
}

.faq-item[open] .faq-question {
    background: #11998e;
    color: white;
    border-bottom: 1px solid #11998e;
    border-radius: 8px 8px 0 0;
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e0e6ed;
}

.faq-answer p {
    margin: 0;
    color: #444;
    line-height: 1.6;
    font-size: 1rem;
}

.faq-answer strong {
    color: #11998e;
}

/* ===== REFERÊNCIAS LISTA (MANTENDO CLASSES FUNCIONAIS) ===== */
.referencias-lista {
    margin-top: 1.5rem;
}

.referencia-item {
    background: #e8fff8;
    border: 1px solid #11998e;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid #11998e;
}

.referencia-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.15);
}

.referencia-item strong {
    color: #11998e;
    font-weight: 600;
}

/* ===== CREDIBILIDADE CONTAINER ===== */
.credibilidade-container {
    background: linear-gradient(135deg, #e8fff8 0%, #e8fff8 100%);
    border: 2px solid #11998e;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.1);
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
    color: #11998e;
}

.credibilidade-title {
    color: #11998e;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.credibilidade-content {
    color: #11998e;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    color: #11998e;
    font-weight: 700;
    font-size: 1.2rem;
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: #11998e;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.credibilidade-badge:hover {
    background: #38ef7d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.4);
}

/* ===================================
   ANIMAÇÕES TRIÂNGULO
   ================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE TRIÂNGULO - HORIZONTAL MANTIDO
   ================================== */
@media (max-width: 768px) {
    .triangle-header h1 {
        font-size: 2rem;
    }
    
    .triangle-tabs {
        gap: 0.3rem;
    }
    
    .triangle-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 90px;
    }
    
    .triangle-inputs-horizontal {
        gap: 0.6rem;
        padding: 0.8rem 0.3rem;
        /* MANTER HORIZONTAL - apenas scroll se necessário */
        justify-content: flex-start;
    }
    
    .triangle-input-group {
        padding: 0.5rem;
        min-width: 55px;
    }
    
    .triangle-input-group input {
        width: 45px;
        padding: 0.4rem 0.2rem;
        font-size: 0.85rem;
    }
    
    .triangle-input-group label {
        font-size: 0.65rem;
    }
    
    .triangle-operation-symbol {
        font-size: 1.2rem;
        min-width: 20px;
    }
    
    .triangle-result-display {
        min-width: 60px;
        padding: 0.6rem;
    }
    
    .triangle-result-value {
        font-size: 1.1rem;
    }
    
    .triangle-result-unit {
        font-size: 0.6rem;
    }
    
    .triangle-examples-grid,
    .triangle-tips-grid {
        grid-template-columns: 1fr;
    }

    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .triangle-header h1 {
        font-size: 1.8rem;
    }
    .triangle-inputs-horizontal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 1.2rem 0.6rem;
        align-items: center;
        row-gap: 0.8rem;
    }
    
    .triangle-operation-symbol {
        font-size: 1.1rem;
        padding: 0.2rem 0.3rem;
        flex-shrink: 0;
    }
    
    .triangle-input-group {
        padding: 0.6rem 0.8rem;
        min-width: auto;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
    }
    
    .triangle-input-group input {
        width: 65px;
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    
    .triangle-input-group label {
        font-size: 0.75rem;
    }
    
    /* Forçar quebra após "÷ 2" (5º símbolo) */
    .triangle-inputs-horizontal > .triangle-operation-symbol:nth-child(5) {
        margin-right: 100%;
    }
    
    /* Resultado em nova linha */
    .triangle-result-display {
        flex-basis: 100%;
        max-width: 200px;
        margin-top: 0.5rem;
        padding: 1rem 1.2rem;
    }
    
    .triangle-result-value {
        font-size: 1.3rem;
    }
    
    .triangle-result-unit {
        font-size: 0.75rem;
    }
    
    .triangle-container {
        padding: 1rem;
    }
    
    .triangle-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .triangle-tab-btn {
        width: 140px;
    }
    
    .triangle-inputs-horizontal {
        gap: 0.4rem;
        padding: 0.6rem 0.2rem;
        /* MANTER HORIZONTAL mesmo em mobile pequeno */
        justify-content: flex-start;
    }
    
    .triangle-input-group {
        min-width: 45px;
        padding: 0.4rem;
    }
    
    .triangle-input-group input {
        width: 40px;
        padding: 0.3rem 0.1rem;
        font-size: 0.8rem;
    }
    
    .triangle-input-group label {
        font-size: 0.6rem;
    }
    
    .triangle-operation-symbol {
        font-size: 1rem;
        min-width: 18px;
        padding: 0.1rem;
    }
    
    .triangle-result-display {
        min-width: 50px;
        padding: 0.5rem;
    }
    
    .triangle-result-value {
        font-size: 1rem;
    }
    
    .triangle-result-unit {
        font-size: 0.55rem;
    }
    
    .triangle-example-icon {
        font-size: 2rem;
    }

    .content-block {
        padding: 1.5rem;
    }
    
    .content-block h3 {
        font-size: 1.5rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 1rem;
    }
    
    .credibilidade-container {
        padding: 1.5rem;
    }
    
    .credibilidade-title {
        font-size: 1.2rem;
    }
    
    .credibilidade-content {
        font-size: 1rem;
    }
}