/**
 * Calculadora de Aguinaldo Completa - Estilos CSS
 * Version: 1.0
 * Author: CONTPAQi.pro
 * Description: Estilos para la calculadora comparativa de aguinaldo (Simplificado vs Oficial)
 */

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    border-radius: 15px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.hero-section .alert {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Cards y Secciones
   ======================================== */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    padding: 1.5rem;
    border-bottom: none;
    font-weight: 600;
}

.card-header h2,
.card-header h3 {
    margin-bottom: 0;
}

.card-header small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ========================================
   Formulario
   ======================================== */
.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: #667eea;
}

.form-control:focus,
.input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    font-weight: 600;
    color: #4a5568;
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.info-box {
    border-left: 4px solid #667eea;
}

.info-box h6 {
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.info-box ul {
    padding-left: 1.25rem;
}

.info-box li {
    margin-bottom: 0.25rem;
}

/* ========================================
   Botones
   ======================================== */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #718096;
    border: none;
}

.btn-secondary:hover {
    background-color: #4a5568;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 85, 104, 0.3);
}

/* ========================================
   Resultados - Resumen
   ======================================== */
#resultadosComparativos {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.bg-success .card-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

#resumenAguinaldoBruto {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Comparativa Lado a Lado
   ======================================== */
.border-info {
    border-width: 4px !important;
}

.border-success {
    border-width: 4px !important;
}

/* Método Simplificado (Info) */
.card.border-info .card-header {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
}

/* Método Oficial (Success) */
.card.border-success .card-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

/* ========================================
   Desglose de Cálculos
   ======================================== */
.calculo-steps {
    background-color: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.calculo-steps h6 {
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.calculo-steps ol {
    margin-bottom: 0;
}

.calculo-steps li {
    padding: 0.75rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.calculo-steps li:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.calculo-steps .text-end {
    margin-top: 0.25rem;
}

.calculo-steps .border-bottom {
    border-color: #cbd5e0 !important;
}

/* ========================================
   Alertas Personalizadas
   ======================================== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert i {
    margin-right: 0.5rem;
}

.alert-warning {
    background-color: #fef5e7;
    color: #c05621;
    border-left: 4px solid #ed8936;
}

.alert-success {
    background-color: #f0fff4;
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.alert-info {
    background-color: #ebf8ff;
    color: #2c5282;
    border-left: 4px solid #4299e1;
}

/* ========================================
   Comparativa Visual
   ======================================== */
.card.shadow-lg .card-header.bg-dark {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}

#chartComparativa {
    max-height: 400px;
}

#diferenciaISR,
#diferenciaNeto,
#metodoFavorable {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ========================================
   Tabla ISR Bracket
   ======================================== */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f7fafc;
}

.table tbody tr:hover {
    background-color: #edf2f7;
}

.table-bordered {
    border: 1px solid #e2e8f0;
}

.table-bordered th,
.table-bordered td {
    border-color: #e2e8f0;
}

/* ========================================
   Sección Educativa
   ======================================== */
.method-guide {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.method-guide h5 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.method-guide ul {
    padding-left: 1.5rem;
}

.method-guide li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-box {
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.legal-box:hover {
    background-color: #edf2f7 !important;
    border-left-color: #5568d3;
}

.legal-box h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.legal-box i {
    margin-right: 0.5rem;
}

/* ========================================
   Tabla ISR 2025
   ======================================== */
.table-dark {
    background-color: #2d3748;
}

.table-dark th {
    color: white;
    font-weight: 600;
    border-color: #4a5568;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* ========================================
   Accordion FAQ
   ======================================== */
.accordion-item {
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    color: #2d3748;
    background-color: #f7fafc;
}

.accordion-button:not(.collapsed) {
    background-color: #667eea;
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.accordion-body {
    padding: 1.5rem;
    background-color: white;
    line-height: 1.7;
}

/* ========================================
   Footer Info
   ======================================== */
.alert-secondary {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    #resumenAguinaldoBruto {
        font-size: 2rem;
    }

    .calculo-steps {
        padding: 1rem;
    }

    .method-guide {
        padding-left: 1rem;
        border-left-width: 3px !important;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    #diferenciaISR,
    #diferenciaNeto,
    #metodoFavorable {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-lg.ms-2 {
        margin-left: 0 !important;
    }

    #resumenAguinaldoBruto {
        font-size: 1.75rem;
    }

    .calculo-steps li {
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* ========================================
   Animaciones y Transiciones
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Utilidades
   ======================================== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.box-shadow-md {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.border-left-primary {
    border-left: 4px solid #667eea;
}

.border-left-success {
    border-left: 4px solid #48bb78;
}

.border-left-warning {
    border-left: 4px solid #ed8936;
}

.border-left-info {
    border-left: 4px solid #4299e1;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .hero-section,
    .btn,
    .accordion,
    #chartComparativa,
    .alert-secondary {
        display: none !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    .card-header {
        background-color: #f7fafc !important;
        color: #2d3748 !important;
    }

    body {
        font-size: 12pt;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}


/* ========================================
   Sección de Gráficos
   ======================================== */
.graficos-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.graficos-section h3 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.5rem;
}

.graficos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.grafico-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grafico-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.grafico-card.full-width {
    grid-column: 1 / -1;
}

.grafico-card canvas {
    max-height: 400px;
}

/* Responsive para gráficos */
@media (max-width: 768px) {
    .graficos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .grafico-card canvas {
        max-height: 300px;
    }
}

