/* 1. RESET Y FUNDAMENTOS */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --m3-primary: #631e32;
    --m3-gold: #D4AF37;
    --m3-surface: #f4f4f4;
    --shadow-deep: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.m3-wrapper {
    font-family: 'Roboto', sans-serif;
    background-color: var(--m3-surface);
    color: #212121;
    width: 100%;
    min-height: 100vh;
}

/* 2. NAVBAR MAESTRA ACTUALIZADA (Diseño específico para el Nav) */
.m3-main-nav-fixed {
    position: sticky;
    top: 0;
    width: 100% !important;
    background: white;
    z-index: 9999;
    border-bottom: 4px solid var(--m3-gold);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.m3-master-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
}

.m3-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.m3-logo-img {
    height: 55px;
    width: auto;
}

.m3-brand-text h1 {
    margin: 0;
    color: var(--m3-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ESTILOS DEL MENÚ CENTRAL */
.m3-nav-menu {
    display: flex;
    list-style: none !important;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.m3-nav-menu li {
    position: relative;
    list-style: none !important;
}

.m3-nav-menu a {
    text-decoration: none !important;
    color: #444 !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
    text-transform: uppercase;
    display: block;
}

.m3-nav-menu a:hover, 
.m3-nav-menu a.active {
    color: var(--m3-primary) !important;
}

/* DROPDOWN ESPECÍFICO DEL NAV */
.m3-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    list-style: none !important;
    padding: 10px 0;
    margin: 0;
    border-top: 3px solid var(--m3-primary);
    z-index: 1000;
}

.m3-dropdown-content li a {
    padding: 12px 20px !important;
    text-transform: none;
    font-weight: 500;
    font-size: 0.85rem;
    color: #666 !important;
}

.m3-dropdown-content li a:hover {
    background-color: #f8f8f8;
    color: var(--m3-primary) !important;
}

.m3-dropdown:hover .m3-dropdown-content {
    display: block;
}

.m3-arrow {
    font-size: 0.7rem;
    margin-left: 5px;
}

/* ICONOS REDES SOCIALES ACTUALIZADOS */
.m3-nav-socials {
    display: flex;
    gap: 10px;
    align-items: center;
}

.m3-social-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #eee;
    transition: 0.3s ease;
    text-decoration: none !important;
}

.m3-social-icon img {
    width: 18px;
    height: 18px;
    filter: grayscale(100%);
    transition: 0.3s;
}

.m3-social-icon:hover {
    transform: translateY(-2px);
}

/* Colores de fondo en hover */
.m3-social-icon.fb:hover { background-color: #1877f2; } /* Azul Facebook */
.m3-social-icon.tw:hover { background-color: #000; }    /* Negro X/Twitter */
.m3-social-icon.yt:hover { background-color: #f00; }    /* Rojo YouTube */

/* El icono pasa a ser blanco en hover para resaltar sobre el fondo de color */
.m3-social-icon:hover img {
    filter: brightness(0) invert(1);
}

/* 3. HERO */
.m3-hero-section {
    background: var(--m3-primary);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.m3-hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 5s infinite;
}

@keyframes shine {
    100% { left: 125%; }
}

/* 4. ACORDEONES */
.m3-transparencia-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px 60px 20px;
}

.m3-card-primaria {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-deep);
    overflow: hidden;
    border: 1px solid #dcdcdc;
    transition: 0.3s;
}

.m3-card-primaria.m3-active {
    border-left: 8px solid var(--m3-gold);
}

.m3-header-primario {
    padding: 25px 35px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--m3-primary);
    font-size: 1.15rem;
    background: #fff;
}

.m3-content-primario {
    display: none;
    padding: 10px 35px 20px 35px;
    background: #fff;
    border-top: 1px solid #eee;
}

.m3-trimestre-header {
    color: #444;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 15px 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--m3-gold);
    display: inline-block;
}

.m3-card-secundaria {
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--m3-primary);
    overflow: hidden;
    transition: 0.3s;
}

.m3-card-secundaria.m3-arena {
    background-color: #C5B086; 
    margin-bottom: 20px;
}

.m3-header-secundario {
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.m3-content-secundario {
    display: none;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #eee;
    border-top: none;
}

/* 5. BOTONES DE DOCUMENTO */
.m3-btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.m3-doc-item {
    list-style: none;
}

.m3-doc-item a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    text-decoration: none !important;
    color: #555 !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.m3-doc-item a:hover {
    border-color: var(--m3-primary);
    color: var(--m3-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.m3-doc-item a::before {
    content: '📄';
    margin-right: 12px;
    font-size: 1.1rem;
    opacity: 0.4;
}

/* LÓGICA DE ICONOS Y VISIBILIDAD */
.m3-chevron {
    transition: transform 0.4s;
    font-size: 0.8rem;
}

.m3-active>*>.m3-chevron {
    transform: rotate(180deg);
}

.m3-active>.m3-content-primario,
.m3-active>.m3-content-secundario {
    display: block;
}

/* 6. FOOTER */
.m3-footer-transparencia {
    background: #fff;
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding: 60px 20px;
    text-align: center;
}

.m3-footer-transparencia img {
    height: 80px;
    margin-bottom: 20px;
}