/* ============================================
   ESTILOS GENERALES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    line-height: 1.6;
}

/* ============================================
   BARRA SUPERIOR
============================================ */
.top-bar {
    background: #17698f;
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-content span {
    margin-right: 20px;
}

/* ============================================
   HEADER
============================================ */
.header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    background: #3414c2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.header-text h1 {
    color: #17698f;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.header-text p {
    color: #666;
    font-size: 1em;
}

/* ============================================
   NAVEGACIÓN
============================================ */
.navigation {
    background: #17bed2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-content a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-content a:hover {
    background: #17698f;
}

.nav-content a.active {
    background: #17698f;
}

/* ============================================
   BREADCRUMB
============================================ */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #2d8659;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ============================================
   CONTENEDOR PRINCIPAL
============================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.page-title {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #17bed2;
}

.page-title h2 {
    color: #1a1b5f;
    font-size: 2em;
    margin-bottom: 10px;
}

.page-title p {
    color: #666;
    font-size: 1.1em;
}

/* ============================================
   SELECTOR DE AÑOS
============================================ */
.year-selector {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.year-selector h3 {
    color: #1a385f;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.year-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.year-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid #17bed2;
    color: #17698f;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: #17bed2;
    color: white;
    transform: translateY(-2px);
}

.year-btn.active {
    background: #17bed2;
    color: white;
}

/* ============================================
   CONTENIDO
============================================ */
.content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.year-content {
    display: none;
}

.year-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TRIMESTRES
============================================ */
.trimestre {
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trimestre:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.trimestre-header {
    background: #17bed2;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.3s ease;
}

.trimestre-header:hover {
    background: #17698f;
}

.trimestre-header h4 {
    font-size: 1.2em;
    font-weight: 600;
}

.trimestre-header .icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.trimestre.collapsed .icon {
    transform: rotate(-90deg);
}

.trimestre-body {
    background: #f9f9f9;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.trimestre.collapsed .trimestre-body {
    max-height: 0;
}

/* ============================================
   DOCUMENTOS
============================================ */
.documento {
    background: white;
    padding: 15px 20px;
    margin: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid #17bed2;
}

.documento:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.documento-info h5 {
    color: #17698f;
    font-size: 1.05em;
    margin-bottom: 5px;
}

.documento-info p {
    color: #888;
    font-size: 0.9em;
}

.documento-link {
    padding: 8px 20px;
    background: #17bed2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.documento-link:hover {
    background: #17698f;
    transform: scale(1.05);
}

/* ============================================
   ESTADO VACÍO
============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #17698f;
    margin-bottom: 10px;
    font-size: 1.5em;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: #17698f;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 2px solid #17bed2;
    padding-bottom: 10px;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    line-height: 1.8;
    font-size: 0.95em;
    display: block;
    margin-bottom: 5px;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.footer-bottom p {
    margin: 5px 0;
}

/* ============================================
   REDES SOCIALES
============================================ */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icon {
    width: 35px;
    height: 35px;
    background: #17bed2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
}

.social-icon:hover {
    background: white;
    color: #17698f;
    transform: scale(1.1);
}

/* ============================================
   BOTÓN IR ARRIBA
============================================ */
.btn-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #17bed2;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.btn-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-top:hover {
    background: #17698f;
    transform: translateY(-5px);
}

.btn-top span {
    font-size: 24px;
    font-weight: bold;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .top-bar-content span {
        margin: 0;
        display: block;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-text h1 {
        font-size: 1.4em;
    }

    .nav-content {
        flex-direction: column;
    }

    .nav-content a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .page-title h2 {
        font-size: 1.5em;
    }

    .year-buttons {
        flex-direction: column;
    }

    .year-btn {
        width: 100%;
    }

    .documento {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .documento-link {
        width: 100%;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .btn-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.2em;
    }

    .page-title {
        padding: 20px;
    }

    .page-title h2 {
        font-size: 1.3em;
    }

    .content {
        padding: 20px 15px;
    }
}