/* ============================================
   Estilos para el Calendario Academico
   ============================================ */

/* Banner del titulo */
.calendar-banner {
    background: linear-gradient(135deg, #2d8a3e 0%, #359444 100%);
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.banner-content h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Seccion del calendario */
.calendar-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.calendar-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    min-height: 600px;
}

/* Menu lateral de años */
.calendar-sidebar {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.calendar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.year-item {
    border-bottom: 1px solid #e5e5e5;
}

.year-item:last-child {
    border-bottom: none;
}

.year-button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 15px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.year-button:hover {
    background: #f5f5f5;
    color: #359444;
}

.year-button:focus {
    outline: 2px solid #359444;
    outline-offset: -2px;
}

.year-text {
    flex: 1;
    font-weight: 500;
}

.year-arrow {
    font-size: 24px;
    color: #999;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.year-button:hover .year-arrow {
    color: #359444;
    transform: translateX(5px);
}

.year-item.active .year-button {
    background: #f0f8f1;
    color: #359444;
    font-weight: 600;
}

.year-item.active .year-button .year-arrow {
    color: #359444;
}

/* Area de contenido principal */
.calendar-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    min-height: 600px;
}

.calendar-viewer {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: relative;
}

.no-document {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 2px dashed #ddd;
}

.no-document p {
    color: #666;
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

.pdf-viewer {
    width: 100%;
    height: 800px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
}

.loading::after {
    content: 'Cargando...';
    color: #359444;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calendar-container {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }

    .banner-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .calendar-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calendar-sidebar {
        position: static;
    }

    .calendar-content {
        padding: 20px;
    }

    .banner-content h1 {
        font-size: 1.75rem;
    }

    .year-button {
        padding: 15px 12px;
        font-size: 15px;
    }

    .pdf-viewer {
        height: 600px;
    }

    .no-document {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .calendar-banner {
        padding: 40px 15px;
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .calendar-section {
        padding: 0 15px;
        margin: 20px auto;
    }

    .calendar-content {
        padding: 15px;
    }

    .year-button {
        font-size: 14px;
        padding: 12px 10px;
    }

    .pdf-viewer {
        height: 500px;
    }

    .no-document {
        height: 300px;
    }

    .no-document p {
        font-size: 14px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-content {
    animation: slideIn 0.4s ease-out;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .calendar-sidebar,
    .banner-content {
        display: none;
    }

    .calendar-container {
        grid-template-columns: 1fr;
    }

    .pdf-viewer {
        border: none;
    }
}
