/* ==============================================
   1. VARIABLES DE ENTORNO Y RESET
   ============================================== */
:root {
    --rosa-principal: #e58dd8;
    --morado-oscuro: #7b0c6e;
    --morado-logo: #5a2050;
    --rosa-claro: #fbeffd;
    --fondo-body: #fdf6ff;
    --texto-oscuro: #333;
    --texto-suave: #555;
    --blanco: #ffffff;
    --tono-elegante: #c49a6c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--fondo-body);
    font-family: 'Poppins', sans-serif;
    color: var(--texto-oscuro);
    line-height: 1.6;
}

p {
    letter-spacing: normal;
    word-spacing: normal;
    text-align: justify;
    hyphens: auto;
    margin-bottom: 1.5rem;
}

/* ==============================================
   2. CABECERA Y NAVEGACIÓN (COMPACTA Y FIJA)
   ============================================== */
.main-header {
    background: var(--rosa-principal);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.25rem 0;
}

.navbar {
    max-width: 1300px;
    margin: auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--blanco);
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
}

.menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--blanco);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--morado-oscuro);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menú Desplegable (Dropdown) */
.dropdown {
    position: relative;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background: var(--blanco);
    min-width: 240px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: 10px;
    padding: 10px 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(123, 12, 110, 0.1);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content li a {
    display: block;
    padding: 12px 20px;
    color: var(--texto-oscuro);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left; /* Alineación limpia a la izquierda */
    transition: background 0.2s, padding-left 0.2s;
}

.dropdown-content li a:hover {
    background: var(--rosa-claro);
    color: var(--morado-oscuro);
    padding-left: 25px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--morado-logo);
    cursor: pointer;
}

/* ==============================================
   3. MAQUETACIÓN DE CONTENIDO PRINCIPAL (SUBPÁGINAS)
   ============================================== */
.subpage-container {
    max-width: 950px;
    margin: 4rem auto;
    background: var(--blanco);
    padding: 4rem;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(123, 12, 110, 0.05);
}

.category-tag {
    color: var(--rosa-principal);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-block;
}

.subpage-content h2 {
    color: var(--morado-oscuro);
    font-size: 2.5rem;
    margin: 1rem 0 1.5rem;
    line-height: 1.2;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--rosa-principal);
    margin-bottom: 3rem;
}

.first-paragraph {
    font-size: 1.2rem;
    color: var(--texto-oscuro);
    font-weight: 400;
}

.main-body p {
    color: var(--texto-suave);
    font-size: 1.05rem;
}

/* Botón de Acción */
.btn-primary {
    background: var(--morado-oscuro);
    color: var(--blanco);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 2rem;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--morado-logo);
    transform: translateY(-2px);
}

/* Cajas de texto destacadas opcionales */
.quote-box {
    background: var(--morado-oscuro);
    color: var(--blanco);
    padding: 3rem;
    border-radius: 20px;
    margin-top: 4rem;
    position: relative;
    text-align: center;
}

.quote-icon {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

.quote-box p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--blanco);
    margin: 0;
}

/* ==============================================
   4. SISTEMA DESPLEGABLE DE TEMAS (ACORDEÓN)
   ============================================== */
.temario {
    max-width: 1000px;
    margin: 40px auto;
}

.bloque {
    margin-bottom: 20px;
    padding: 20px 25px;
    border-radius: 12px;
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
}

.bloque h4 {
    font-size: 1.3rem;
    color: var(--texto-oscuro);
    border-left: 4px solid var(--tono-elegante);
    padding-left: 12px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.bloque h4::after {
    content: "+";
    position: absolute;
    right: 0;
    transition: transform 0.3s;
}

.bloque.activo h4::after {
    content: "–";
}

/* Animación y Colapso Eficiente */
.bloque ul, .bloque h5, .bloque ol, .bloque p.texto-desplegables {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
}

.bloque.activo ul, .bloque.activo h5, .bloque.activo ol, .bloque.activo p.texto-desplegables {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 15px;
}

.bloque ul li {
    list-style: none;
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--texto-suave);
}

.bloque ul li::before {
    content: "•";
    color: var(--tono-elegante);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: -2px;
}

/* ==============================================
   5. PIE DE PÁGINA (FOOTER RESTRUCTURADO)
   ============================================== */


.menu-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logo_footer img {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

.menu-footer-list {
    border-right: 2px solid #520257;
    display: flex;
    flex-direction: column;
    padding-right: 40px;
}

.menu-footer-list h2 {
    color: #520257;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.menu-footer ul {
    list-style: none;
}

.menu-footer ul li {
    margin-bottom: 10px;
}

.menu-footer ul li a {
    text-decoration: none;
    color: #520257;
    font-weight: 600;
    transition: color 0.2s ease;
}

.menu-footer ul li a:hover {
    color: var(--morado-oscuro);
}

.social-media {
    display: flex;
    gap: 20px;
}

.media-ico wa-icon {
    font-size: 32px;
    color: #520257;
    transition: transform 0.2s ease;
}

.media-ico wa-icon:hover {
    transform: scale(1.15);
}

.copyright {
    background: #520257;
    color: var(--blanco);
    text-align: center;
    padding: 1.2rem;
}

.copyright p {
    margin: 0;
    font-size: 0.9rem;
    text-align: center !important;
}

/* ==============================================
   6. RESPONSIVIDAD TOTAL (MEDIA QUERIES)
   ============================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navbar {
        padding: 1rem 1.5rem;
    }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: var(--rosa-principal);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .menu.active {
        display: flex;
    }

    .menu li {
        width: 100%;
        text-align: center;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .dropdown-content {
        position: static;
        display: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.15);
        width: 100%;
        border: none;
    }

    .dropdown-content li a {
        text-align: center;
        color: var(--blanco);
    }

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

    /* Layout Adaptable móvil */
    .subpage-container {
        padding: 2rem 1.5rem;
        margin: 2rem 15px;
        border-radius: 20px;
    }

    .subpage-content h2 {
        font-size: 1.9rem;
    }

    /* Footer Móvil */
    .menu-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 35px;
    }

    .menu-footer-list {
        border-right: none;
        padding-right: 0;
    }

    .logo_footer img {
        width: 140px;
        height: 140px;
    }

    .social-media {
        justify-content: center;
    }
}