/* ============================================
   Estilos para el Directorio Institucional
   ============================================ */

/* Banner del título */
.directory-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;
}

/* Sección del directorio */
.directory-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.directory-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    min-height: 500px;
}

/* Menú lateral */
.directory-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;
}

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

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

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

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

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

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

.menu-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    font-weight: 400;
}

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

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

.menu-button[aria-expanded="true"] .menu-arrow {
    transform: rotate(90deg);
}

/* Área de contenido principal */
.directory-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    min-height: 500px;
}

.download-section {
    margin-bottom: 30px;
}

.btn-download {
    background: linear-gradient(135deg, #2d8a3e 0%, #359444 100%);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(53, 148, 68, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #267234 0%, #2d8a3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(53, 148, 68, 0.4);
}

.btn-download:active {
    transform: translateY(0);
}

.download-icon {
    font-size: 20px;
}

.content-info {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #359444;
}

.content-info p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

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

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

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

    .directory-sidebar {
        position: static;
    }

    .directory-content {
        padding: 25px;
    }

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

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

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

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

    .directory-section {
        padding: 20px 15px;
    }

    .directory-content {
        padding: 20px;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
    }

    .menu-button {
        font-size: 13px;
        padding: 12px 10px;
    }
}

/* Estados activos */
.menu-item.active .menu-button {
    background: #f0f8f1;
    color: #359444;
    font-weight: 600;
}

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

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

.directory-content {
    animation: slideDown 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 {
    .directory-sidebar,
    .btn-download {
        display: none;
    }

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