/* Updated: 2025-07-11 - Timestamp: 1752002600 */
/**
 * Home CSS - Estilos específicos para la página de inicio
 * Corrige el problema del scroll horizontal
 */

/* ===== PREVENCIÓN DE SCROLL HORIZONTAL ===== */

/* Asegurar que el body y html no tengan scroll horizontal */
html, body {
    
    max-width: 100vw;
}

/* Contenedor principal del home */
.page-home {
    
    width: 100%;
    max-width: 100vw;
}

/* Contenedor principal */
.page-home .container {
    
    width: 100%;
    max-width: 1380px;
    padding: 26px;
}

/* ===== SLIDER DE VISTOS RECIENTEMENTE ===== */

/* Asegurar que el slider no cause scroll horizontal */
.page-home .recently-viewed-section {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.page-home .slider-container {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.page-home .slider-wrapper {
    width: max-content;
    max-width: none;
}

/* ===== GRID DE COLEGIOS ===== */

.page-home .schools-grid {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .page-home .container {
        padding: 15px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        
    }
    
    .page-home .slider-container {
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .page-home .slider-wrapper {
        width: max-content;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .page-home .container {
        padding: 10px;
    }
}

/* ===== ESTILOS PARA LA PÁGINA DE HOME ===== */

/* Header principal */
.home-header {
    text-align: center;
    margin-bottom: 40px;
}

/* Navegación rápida */
.quick-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.quick-nav .btn {
    padding: 15px 30px;
    font-size: 16px;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-error {
    background: var(--color-orange-light);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Componente banner-page reemplaza al section-header */

/* Contador de instituciones */
.institutions-counter {
    background: linear-gradient(135deg, var(--color-dark-blue) 0%, var(--color-purple) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* Estado de no resultados */
.no-results-container {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 20px 0;
}

.no-results-icon {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-results-container h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-results-container p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-actions {
    margin-top: 20px;
}

.no-results-actions .btn {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.no-results-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Botones de acción en resultados */
.section-header .btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.section-header .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
}

/* Iconos de escuela */
.school-icon {
    font-size: 24px;
    color: var(--text-muted);
}

/* Descripción de escuela */
.school-description {
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Formulario inline */
.form-inline {
    display: inline;
}

/* Información de registro */
.registration-info {
    margin-top: 15px;
    font-size: 14px;
    color: #95a5a6;
}

/* ===== TARJETAS DE ESCUELAS ===== */
.school-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.school-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.school-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.school-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.school-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background: var(--primary-color); color: white; }
.badge-success { background: var(--success-color); color: white; }
.badge-info { background: #17a2b8; color: white; }
.badge-warning { background: #ffc107; color: #212529; }

.school-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.detail-item {
    font-size: 14px;
}

.detail-item strong {
    color: var(--text-secondary);
}

.school-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ===== BOTONES ===== */
/* Los estilos de botones están definidos en components.css */

/* ===== ESTADÍSTICAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--color-dark-blue) 0%, var(--color-purple) 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== ESTILOS RESPONSIVE ===== */
@media (max-width: 768px) {
    .quick-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .quick-nav .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Estilos responsivos del banner-page están en banner-page.css */
    
    .school-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .school-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .home-header {
        margin-bottom: 30px;
    }
    
    .quick-nav {
        margin-bottom: 25px;
    }
    
    .alert {
        padding: 12px;
        margin-bottom: 25px;
    }
    
    /* Estilos responsivos del banner-page están en banner-page.css */
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .school-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ===== CARGA AUTOMÁTICA ===== */
.load-more-container {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

/* Contenedor de carga automática - sin texto */

/* ===== INDICADOR DE PROGRESO CIRCULAR ===== */
.circular-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.circular-progress {
    position: relative;
    width: 60px;
    height: 60px;
}

.circular-progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-progress-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 3;
}

.circular-progress-bar {
    fill: none;
    stroke: var(--color-dark-blue);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: circular-progress 2s ease-in-out infinite;
}

@keyframes circular-progress {
    0% {
        stroke-dashoffset: 100;
    }
    50% {
        stroke-dashoffset: 20;
    }
    100% {
        stroke-dashoffset: 100;
    }
}

.circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-dark-blue);
    font-size: 19px;
}

/* Solo el indicador circular, sin texto */

/* ===== MENSAJE DE ERROR ===== */
.load-more-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--danger-color);
    font-size: 14px;
    padding: 15px;
    background: var(--color-orange-light);
    border: 1px solid var(--danger-color);
    border-radius: 8px;
    margin: 10px 0;
}

.retry-button {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: var(--color-red);
}

/* Responsive para carga automática */
@media (max-width: 768px) {
    .load-more-container {
        margin: 30px 0;
        padding: 15px;
    }
    
    .circular-progress {
        width: 50px;
        height: 50px;
    }
    
    .circular-progress-text {
        font-size: 16px;
    }
    
    /* Solo el indicador circular */
}

@media (max-width: 480px) {
    .circular-progress-container {
        padding: 15px;
    }
    
    .circular-progress {
        width: 45px;
        height: 45px;
    }
    
    .circular-progress-text {
        font-size: 14px;
    }
    
    /* Solo el indicador circular */
}

 