/* ===================================================================== */
/*                    ❤️ CALCULADORA DE FREQUÊNCIA CARDÍACA              */
/* ===================================================================== */

/* ===================================
   VARIÁVEIS DE COR - ÁREA FITNESS
   ================================== */
:root {
    --primary: #ea580c;        /* Laranja energia */
    --secondary: #dc2626;      /* Vermelho força */
    --accent: #22c55e;         /* Verde saúde */
    --light: #fef7ed;          /* Fundo laranja claro */
    --gradient: linear-gradient(135deg, #ea580c, #dc2626);
    --warning: #f59e0b;        /* Amarelo para avisos */
    --success: #22c55e;        /* Verde para sucesso */
    --info: #0ea5e9;           /* Azul para informações */
}

/* ===================================
   PREVENIR SCROLL HORIZONTAL
   ================================== */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.frequencia-cardiaca-calculator-section,
.frequencia-cardiaca-container,
.frequencia-cardiaca-input-row,
.frequencia-cardiaca-buttons,
.frequencia-cardiaca-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   LAYOUT PRINCIPAL
   ================================== */
.frequencia-cardiaca-calculator-section {
    margin-bottom: 3rem;
}

.frequencia-cardiaca-header {
    text-align: center;
    margin-bottom: 2rem;
}

.frequencia-cardiaca-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.frequencia-cardiaca-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.frequencia-cardiaca-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;
    overflow-x: hidden;
    max-width: 100%;
}

/* ===================================
   INPUTS E FORMULÁRIOS
   ================================== */
.frequencia-cardiaca-dados-basicos {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.frequencia-cardiaca-dados-basicos h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.frequencia-cardiaca-input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.frequencia-cardiaca-input-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.frequencia-cardiaca-input-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.frequencia-cardiaca-input-group input,
.frequencia-cardiaca-input-group select {
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
    background: white;
}

.frequencia-cardiaca-input-group input:focus,
.frequencia-cardiaca-input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.frequencia-cardiaca-input-group small {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* ===================================
   EXEMPLOS RÁPIDOS
   ================================== */
.frequencia-cardiaca-examples {
    text-align: center;
    margin-top: 1.5rem;
}

.frequencia-cardiaca-examples h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.frequencia-cardiaca-example-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.frequencia-cardiaca-example-btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 40px;
}

.frequencia-cardiaca-example-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(234, 88, 12, 0.3);
}

/* ===================================
   BOTÕES PRINCIPAIS
   ================================== */
.frequencia-cardiaca-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.frequencia-cardiaca-btn-calcular {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.3);
}

.frequencia-cardiaca-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
}

.frequencia-cardiaca-btn-limpar {
    background: #6b7280;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.frequencia-cardiaca-btn-limpar:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* ===================================
   ÁREA DE RESULTADO
   ================================== */
.frequencia-cardiaca-resultado {
    background: linear-gradient(135deg, var(--light) 0%, rgba(234, 88, 12, 0.05) 100%);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.frequencia-cardiaca-resultado-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.frequencia-cardiaca-resultado-header h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.frequencia-cardiaca-resultado-content {
    display: grid;
    gap: 1rem;
}

.frequencia-cardiaca-resultado-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.frequencia-cardiaca-resultado-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.frequencia-cardiaca-resultado-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.frequencia-cardiaca-resultado-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Cores específicas para diferentes zonas */
.frequencia-cardiaca-resultado-fc-max {
    border-left: 4px solid var(--secondary);
}

.frequencia-cardiaca-resultado-zona-1 {
    border-left: 4px solid #22c55e; /* Verde - Recuperação */
}

.frequencia-cardiaca-resultado-zona-2 {
    border-left: 4px solid #3b82f6; /* Azul - Aeróbica Base */
}

.frequencia-cardiaca-resultado-zona-3 {
    border-left: 4px solid #f59e0b; /* Amarelo - Aeróbica */
}

.frequencia-cardiaca-resultado-zona-4 {
    border-left: 4px solid #ea580c; /* Laranja - Limiar */
}

.frequencia-cardiaca-resultado-zona-5 {
    border-left: 4px solid #dc2626; /* Vermelho - Anaeróbica */
}

/* ===================================
   CARDS DINÂMICOS - FORMATAÇÃO ESPECIAL COMPATÍVEL COM ADS-CORE
   ================================== */
/* Cards criados dinamicamente pelo JavaScript - CLASSES DUPLAS */
.explanation.calc-explanation,
.explanation,
.calc-explanation {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.legal-explanation.calc-legal,
.legal-explanation,
.calc-legal {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.03) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(234, 88, 12, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.explanation.calc-explanation:hover,
.explanation:hover,
.calc-explanation:hover,
.legal-explanation.calc-legal:hover,
.legal-explanation:hover,
.calc-legal:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.explanation.calc-explanation h2,
.explanation h2,
.calc-explanation h2,
.legal-explanation.calc-legal h2,
.legal-explanation h2,
.calc-legal h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.explanation.calc-explanation h4,
.explanation h4,
.calc-explanation h4,
.legal-explanation.calc-legal h4,
.legal-explanation h4,
.calc-legal h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-explanation.calc-legal h4,
.legal-explanation h4,
.calc-legal h4 {
    color: var(--secondary) !important;
}

.explanation.calc-explanation p,
.explanation p,
.calc-explanation p,
.legal-explanation.calc-legal p,
.legal-explanation p,
.calc-legal p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.legal-explanation.calc-legal p,
.legal-explanation p,
.calc-legal p {
    color: #92400e !important;
}

/* ===================================
   CONTEÚDO EDUCACIONAL - VISUAL OBRIGATÓRIO
   ================================== */
/* Container educacional principal */
.educational-content {
    margin-top: 3rem;
}

.educational-content h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1rem;
}

/* Cards educacionais - ESSENCIAL para visual bonito */
.content-block {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
}

.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.content-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-block h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.content-block p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   ELEMENTOS VISUAIS ESPECIAIS
   ================================== */
/* Destaque de fórmulas */
.formula-highlight {
    background: linear-gradient(135deg, var(--light) 0%, rgba(234, 88, 12, 0.08) 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-main {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.formula-highlight p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Passos numerados */
.steps-list {
    margin: 1.5rem 0;
}

.step-item {
    background: rgba(234, 88, 12, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.step-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Grid de exemplos */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.example-item {
    background: rgba(234, 88, 12, 0.03);
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.example-item:hover {
    background: rgba(234, 88, 12, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.example-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.example-calculation {
    background: var(--light);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.example-calculation p {
    margin: 0.3rem 0;
    color: #2c3e50;
}

.example-calculation strong {
    color: var(--primary);
}

/* Lista de dicas com ícones */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tips-list li {
    background: rgba(34, 197, 94, 0.05);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: 0 8px 8px 0;
    color: #2c3e50;
}

.tips-list strong {
    color: var(--accent);
}

/* Grid de aplicações */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.application-item {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.application-item:hover {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.15);
}

.application-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Seção de referências */
.references-content {
    margin-top: 1rem;
}

.references-list {
    background: rgba(234, 88, 12, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.references-list li {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.references-list li:before {
    content: "📚";
    position: absolute;
    left: 0;
}

/* Aviso legal destacado */
.accuracy-note {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
    border: 2px solid var(--warning);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.accuracy-note h5 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accuracy-note p {
    color: #2c3e50;
    margin: 0;
    font-weight: 500;
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
    }
}

/* ===================================
   RESPONSIVIDADE
   ================================== */
@media (max-width: 768px) {
    .frequencia-cardiaca-header h1 {
        font-size: 2rem;
    }
    
    .frequencia-cardiaca-container {
        padding: 1.5rem;
    }
    
    .frequencia-cardiaca-input-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .frequencia-cardiaca-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .frequencia-cardiaca-example-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .frequencia-cardiaca-header h1 {
        font-size: 1.8rem;
    }
    
    .frequencia-cardiaca-header p {
        font-size: 1rem;
    }
    
    .content-block {
        padding: 1.5rem;
    }
}