/* ========================================
   ESTILOS - PÁGINA DE BAREMO
   Usando variables de colors.css
   ======================================== */

/* Hero Section */
.baremo-hero {
    background: var(--gradient-hero);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-white);
}

.baremo-hero h1 {
    margin: 0 0 15px 0;
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 20px;
    margin: 0;
    opacity: 0.95;
}

/* Container */
.baremo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Sections */
.baremo-section {
    margin-bottom: 50px;
}

.baremo-section h2 {
    color: var(--text-brand);
    font-size: clamp(26px, 4vw, 32px);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 10px;
}

/* Introducción */
.baremo-intro {
    background: var(--background-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--color-primary);
    margin-bottom: 50px;
}

.baremo-intro h2 {
    border-bottom: none;
    margin-top: 0;
}

.baremo-intro p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 15px 0;
}

/* Points Breakdown Cards */
.points-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.point-card {
    background: var(--background-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.point-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.point-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.point-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-brand);
    margin-bottom: 10px;
}

.point-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Merit Categories */
.merit-category {
    margin: 40px 0;
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.merit-category h3 {
    color: var(--color-primary);
    font-size: 24px;
    margin: 0 0 10px 0;
}

.category-description {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 20px;
}

/* Baremo Table */
.baremo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--background-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.baremo-table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.baremo-table thead th {
    color: var(--text-white);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
}

.baremo-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.baremo-table tbody tr:hover {
    background-color: rgba(102, 187, 106, 0.1);
}

.baremo-table tbody tr:last-child {
    border-bottom: none;
}

.baremo-table td {
    padding: 15px;
    color: var(--text-secondary);
    font-size: 15px;
}

.baremo-table td:last-child {
    font-weight: 700;
    color: var(--text-brand);
    text-align: center;
}

/* Notes */
.note {
    background: var(--porcelain);
    border-left: 4px solid var(--all-answer-filter-blue);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: var(--radius-sm);
}

.note strong {
    color: var(--text-brand);
}

/* Max Score Section */
.max-score {
    background: linear-gradient(135deg, var(--porcelain) 0%, var(--background-primary) 100%);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.total-points {
    margin-top: 30px;
}

.total-breakdown {
    background: var(--background-primary);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-of-type {
    border-bottom: 2px solid var(--color-primary);
}

.breakdown-label {
    font-size: 16px;
    color: var(--text-secondary);
}

.breakdown-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    margin-top: 10px;
}

.breakdown-total .breakdown-label {
    font-size: 20px;
    color: var(--text-brand);
}

.breakdown-total .breakdown-value.total {
    font-size: 32px;
    color: var(--color-primary);
}

/* Tips Section */
.tips {
    background: var(--background-light);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tip-card {
    background: var(--background-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.tip-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(102, 187, 106, 0.2));
}

.tip-card h4 {
    color: var(--text-brand);
    font-size: 18px;
    margin: 0 0 10px 0;
}

.tip-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.baremo-cta {
    background: var(--gradient-hero);
    color: var(--text-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 50px;
}

.baremo-cta h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
}

.baremo-cta p {
    font-size: 18px;
    margin: 0 0 25px 0;
    opacity: 0.95;
}

.baremo-cta .cta-button {
    background: white;
    color: var(--color-primary);
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.baremo-cta .cta-button:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .baremo-hero {
        padding: 40px 15px;
    }

    .baremo-container {
        padding: 30px 15px;
    }

    .baremo-intro {
        padding: 20px;
    }

    .merit-category {
        padding: 20px;
    }

    .baremo-table {
        font-size: 14px;
    }

    .baremo-table thead th,
    .baremo-table td {
        padding: 10px;
    }

    .total-breakdown {
        padding: 20px;
    }

    .breakdown-label {
        font-size: 14px;
    }

    .breakdown-value {
        font-size: 16px;
    }

    .breakdown-total .breakdown-value.total {
        font-size: 24px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .baremo-cta {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .baremo-table thead th:first-child {
        max-width: 200px;
    }

    .point-value {
        font-size: 36px;
    }

    .point-label {
        font-size: 18px;
    }
}

/* ========================================
   CALCULADORA - Estilo FormaApp
   ======================================== */

.calculator-section {
    margin-top: 50px;
}

.calculator-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

.calculator-container {
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Categorías */
.calculator-category {
    background: var(--porcelain);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.calculator-category:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.15);
}

.calculator-category h3 {
    color: var(--text-brand);
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.calculator-category h4 {
    color: var(--text-brand);
    font-size: 16px;
    margin: 20px 0 10px 0;
}

.calculator-category h4:first-of-type {
    margin-top: 0;
}

.max-points {
    font-size: 14px;
    color: #333;
    font-weight: normal;
}

.category-note {
    color: #333;
    font-size: 14px;
    margin: -5px 0 15px 0;
    font-style: italic;
}

/* Opciones */
.calculator-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Inputs numéricos */
.calc-option label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 8px;
}

.input-hint {
    display: block;
    font-size: 13px;
    color: #555;
    font-weight: normal;
    margin-top: 3px;
}

.calc-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    margin-top: 5px;
    background: white;
    color: #333;
    font-weight: 500;
}

.calc-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.1);
}

/* Radio buttons - Una línea */
.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.radio-option:hover {
    border-color: var(--color-primary);
    background: rgba(102, 187, 106, 0.05);
}

.radio-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.radio-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
}

.radio-points {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14px;
    flex-shrink: 0;
}

.radio-option:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(102, 187, 106, 0.1);
}

.radio-option:has(input:checked) .radio-text {
    color: var(--text-brand);
    font-weight: 600;
}

/* Checkboxes - Una línea */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-option:hover {
    border-color: var(--color-primary);
    background: rgba(102, 187, 106, 0.05);
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.checkbox-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-points {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 13px;
    flex-shrink: 0;
    margin-left: auto;
}

.checkbox-option:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(102, 187, 106, 0.1);
}

.checkbox-option:has(input:checked) .checkbox-text {
    color: var(--text-brand);
    font-weight: 600;
}

/* Subtotales */
.category-subtotal {
    text-align: right;
    font-size: 16px;
    color: #333;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.subtotal-value {
    font-weight: 700;
    color: var(--text-brand);
    margin-left: 10px;
}

/* Resultado */
.calculator-result {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-box {
    width: 100%;
    background: var(--gradient-hero);
    color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.result-label {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.95;
}

.result-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.score-number {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.score-max {
    font-size: 20px;
    opacity: 0.9;
}

.result-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Botón Reset */
.reset-button {
    padding: 12px 30px;
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 187, 106, 0.3);
}

/* Responsive Calculadora */
@media (max-width: 768px) {
    .calculator-container {
        padding: 20px;
    }
    
    .calculator-category h3 {
        font-size: 18px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .score-number {
        font-size: 40px;
    }
    
    .score-max {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 15px;
    }
    
    .calc-input {
        max-width: 100%;
    }
    
    .radio-option,
    .checkbox-option {
        padding: 10px 12px;
    }
}
