/**
 * Nombre: onepage-widgets.css
 * Proposito: Estilos para secciones adicionales tipo onepage en index.php
 * Autor: BtoAldas
 * Fecha: 2025-10-23
 * 
 * IMPORTANTE: Estos estilos NO afectan la pantalla inicial (primer viewport)
 * Solo aplican a las secciones de scroll hacia abajo
 */

/* ========================================
   SECCION 1: Contenedor principal onepage
   ======================================== */
.onepage-container {
    width: 100%;
    background: #f8f9fa;
    position: relative;
    z-index: 1;
}

/* Cada seccion ocupa el ancho completo */
.onepage-section {
    width: 100%;
    padding: 80px 0;
    position: relative;
}

/* Alternancia de colores de fondo */
.onepage-section:nth-child(even) {
    background: #ffffff;
}

.onepage-section:nth-child(odd) {
    background: #f8f9fa;
}

/* ========================================
   SECCION 2: Contenedor de contenido
   ======================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Titulos de seccion */
.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.section-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   SECCION 3: Grid de widgets/cards
   ======================================== */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.widget-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
}

.widget-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.widget-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
    text-align: center;
}

.widget-title {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.widget-description {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.8;
    text-align: center;
}

/* ========================================
   SECCION 4: Seccion de caracteristicas
   ======================================== */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #ecf0f1;
}

.feature-icon {
    font-size: 2rem;
    color: #2ecc71;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-content h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.feature-content p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   SECCION 5: FAQ - Acordeon
   ======================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    background: #ffffff;
    width: 100%;
    text-align: left;
}

.faq-question:hover {
    background: #ecf0f1;
}

.faq-question h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 25px;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   SECCION 6: Contacto
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.contact-icon {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-card p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.8;
}

.contact-card a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.contact-card a:hover {
    color: #2ecc71;
}

/* ========================================
   SECCION 7: Estadisticas
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-family: 'Roboto', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    opacity: 0.9;
}

/* ========================================
   SECCION 8: Footer
   ======================================== */
.onepage-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.footer-text {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2ecc71;
}

/* ========================================
   SECCION 9: Responsive
   ======================================== */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.2rem;
    }
    
    /* Mantener tamaños en px para moviles (igual que desktop) */
    .widget-title {
        font-size: 18px;
    }
    
    .widget-description {
        font-size: 15px;
        line-height: 1.8;
    }
    
    /* Mantener tamaños en px para features */
    .feature-item h3 {
        font-size: 18px;
    }
    
    .feature-item p {
        font-size: 15px;
        line-height: 1.8;
    }
    
    /* Mantener tamaños en px para estadisticas */
    .stat-label {
        font-size: 15px;
    }
    
    /* Mantener tamaños en px para contacto */
    .contact-card h3 {
        font-size: 18px;
    }
    
    .contact-card p,
    .contact-card a {
        font-size: 15px;
        line-height: 1.8;
    }
    
    /* Mantener tamaños en px para footer */
    .footer-text {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .footer-links a {
        font-size: 15px;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .onepage-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.15rem;
    }
    
    /* Mantener tamaños en px para celulares (mismo tamaño que desktop y tablet) */
    .widget-title {
        font-size: 18px;
    }
    
    .widget-description {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .feature-item h3 {
        font-size: 18px;
    }
    
    .feature-item p {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .stat-label {
        font-size: 15px;
    }
    
    .contact-card h3 {
        font-size: 18px;
    }
    
    .contact-card p,
    .contact-card a {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .footer-text {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .footer-links a {
        font-size: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* ========================================
   SECCION 9B: Graficas (Chart.js)
   ======================================== */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.chart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.chart-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.chart-canvas {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-family: 'Roboto', sans-serif;
}

.chart-error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    font-family: 'Roboto', sans-serif;
}

/* Indicador de fuente de datos */
.data-source-indicator {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #95a5a6;
    font-family: 'Roboto', sans-serif;
}

.data-source-indicator i {
    margin-right: 5px;
}

.data-source-indicator.source-bd {
    color: #27ae60;
}

.data-source-indicator.source-cache {
    color: #f39c12;
}

.data-source-indicator.source-fallback {
    color: #e74c3c;
}

/* ========================================
   SECCION 10: Animaciones scroll
   ======================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Indicador de scroll (flecha hacia abajo) */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.3s ease;
}

.scroll-indicator i:hover {
    color: rgba(255, 255, 255, 1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}
