/* ============================================================
   styles.css — Estilos compartidos · Cooperación Popular
   Usar en: index.html, noticias.html (y demás páginas)
   ============================================================ */

/* ─── VARIABLES & RESET ─── */
:root {
    --rojo:        #c0392b;
    --rojo-oscuro: #96281b;
    --azul:        #1a3a5c;
    --azul-claro:  #2a5298;
    --oro:         #d4a017;
    --blanco:      #fdfcf9;
    --gris-claro:  #f4f2ed;
    --gris-medio:  #8a8680;
    --texto:       #1c1c1c;
    --fuente-display: 'Playfair Display', Georgia, serif;
    --fuente-cuerpo:  'Source Sans 3', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--blanco);
    color: var(--texto);
    overflow-x: hidden;
}

/* ─── NAVBAR ─── */
.navbar {
    background: var(--azul) !important;
    border-bottom: 3px solid var(--oro);
    padding: 0;
}

.navbar-brand img { height: 52px; }

.navbar-brand span {
    font-family: var(--fuente-display);
    font-size: 1rem;
    color: #fff;
    letter-spacing: .03em;
    line-height: 1.2;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,.88) !important;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 1.35rem .9rem !important;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--oro) !important;
    border-bottom-color: var(--oro);
}

.dropdown-menu {
    border: none;
    border-top: 3px solid var(--oro);
    border-radius: 0 0 6px 6px;
    background: var(--azul);
    min-width: 220px;
}

.dropdown-item {
    color: rgba(255,255,255,.82);
    font-size: .83rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .65rem 1.2rem;
}

.dropdown-item:hover {
    background: rgba(212,160,23,.15);
    color: var(--oro);
}

.navbar-toggler { border-color: rgba(255,255,255,.3); }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ─── PAGE HEADER ─── */
.page-header {
    background: linear-gradient(100deg, var(--azul) 60%, #0d1f3c 100%);
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 30px,
        rgba(255,255,255,.018) 30px,
        rgba(255,255,255,.018) 31px
    );
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--oro), var(--rojo), var(--oro));
}

.page-header-content { position: relative; z-index: 1; }

.page-eyebrow {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--oro);
    border-left: 3px solid var(--oro);
    padding-left: .6rem;
    margin-bottom: .8rem;
}

.page-header h1 {
    font-family: var(--fuente-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    margin: 0;
}

.page-header p {
    color: rgba(255,255,255,.65);
    font-size: 1rem;
    margin: .8rem 0 0;
}

/* ─── SECCIÓN: LABELS Y TÍTULOS ─── */
.section-label {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rojo);
    border-left: 3px solid var(--rojo);
    padding-left: .6rem;
    margin-bottom: .8rem;
}

.section-title {
    font-family: var(--fuente-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: var(--azul);
    line-height: 1.15;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: var(--oro);
    margin: 1rem 0 1.5rem;
}

/* ─── BTN MORE ─── */
.btn-more {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rojo);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
    padding-bottom: 1px;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.btn-more:hover {
    border-bottom-color: var(--rojo);
    color: var(--rojo);
}

/* ─── SOCIAL BUTTONS ─── */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.75);
    font-size: 1rem;
    border-radius: 50%;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.social-btn:hover { background: var(--oro); color: var(--azul); }

/* ─── BTN HERO PRIMARY ─── */
.btn-hero-primary {
    background: var(--oro);
    color: var(--azul);
    font-weight: 700;
    font-size: .88rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: none;
    padding: .85rem 2rem;
    border-radius: 0;
    transition: all .25s;
    text-decoration: none;
    display: inline-block;
}
.btn-hero-primary:hover {
    background: #e8b520;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212,160,23,.4);
    color: var(--azul);
}

/* ─── LOGOS INSTITUCIONALES ─── */
.inst-logo {
    height: 36px;
    width: auto;
    filter: grayscale(1) brightness(2) opacity(.7);
    transition: filter .2s;
}

.inst-logo:hover { filter: none; }

/* ─── FOOTER ─── */
.footer {
    background: #0d1f3c;
    color: rgba(255,255,255,.72);
    padding: 64px 0 0;
}

.footer-brand img { height: 50px; margin-bottom: 1rem; }

.footer-brand p {
    font-size: .86rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer h6 {
    font-family: var(--fuente-display);
    font-size: .95rem;
    color: #fff;
    margin-bottom: 1.2rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: .5rem; }

.footer-links a {
    color: rgba(255,255,255,.62);
    font-size: .85rem;
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover { color: var(--oro); }

.footer-bottom {
    margin-top: 3rem;
    background: rgba(0,0,0,.25);
    padding: 1rem 0;
    font-size: .78rem;
    color: rgba(255,255,255,.42);
}

.footer-bottom a {
    color: rgba(255,255,255,.42);
    text-decoration: none;
    transition: color .2s;
}
.footer-bottom a:hover { color: var(--oro); }

/* ─── MODAL ─── */
.modal-header {
    background: var(--azul);
    color: #fff;
    border-radius: 0;
}

.modal-title { font-family: var(--fuente-display); }

.btn-close-white { filter: invert(1); }

/* =============================================================
   DRAWER MÓVIL
   ============================================================= */

.drawer-toggler {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
}
.drawer-toggler span {
    display: block;
    width: 26px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.drawer-toggler.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.drawer-toggler.open span:nth-child(2) { opacity: 0; }
.drawer-toggler.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1200;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .3s;
}
.drawer-overlay.active { display: block; opacity: 1; }

.drawer {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(320px, 85vw);
    background: var(--azul);
    z-index: 1300;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,.35);
}
.drawer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(to bottom, var(--oro), var(--rojo));
}
.drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.2);
    flex-shrink: 0;
}
.drawer-close {
    background: none; border: none;
    color: rgba(255,255,255,.7);
    font-size: 1.3rem; cursor: pointer;
    padding: .3rem .5rem;
    transition: color .2s; line-height: 1;
}
.drawer-close:hover { color: var(--oro); }

.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 0; }

.drawer .navbar-nav { flex-direction: column !important; width: 100%; }

.drawer .nav-link {
    padding: .85rem 1.5rem !important;
    border-bottom: none !important;
    border-left: 3px solid transparent !important;
    font-size: .88rem !important;
    letter-spacing: .05em !important;
    transition: background .2s, border-color .2s, color .2s !important;
}
.drawer .nav-link:hover,
.drawer .nav-link.active {
    background: rgba(255,255,255,.07) !important;
    border-left-color: var(--oro) !important;
    color: var(--oro) !important;
}

.drawer .dropdown-menu {
    position: static !important;
    transform: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    background: rgba(0,0,0,.2) !important;
    min-width: 100% !important;
    box-shadow: none !important;
    padding: 0;
    display: none;
}
.drawer .dropdown-menu.show { display: block; }

.drawer .dropdown-item {
    padding: .65rem 2.2rem !important;
    font-size: .8rem !important;
    border-left: 3px solid transparent;
    color: rgba(255,255,255,.75) !important;
}
.drawer .dropdown-item:hover {
    border-left-color: var(--oro) !important;
    background: rgba(212,160,23,.1) !important;
    color: var(--oro) !important;
}

.drawer .dropdown-toggle::after { transition: transform .25s; }
.drawer .dropdown-toggle.dropdown-open::after { transform: rotate(180deg); }

@media (max-width: 991.98px) { .drawer-toggler { display: flex; } }
@media (min-width: 992px) {
    .drawer         { display: none !important; }
    .drawer-overlay { display: none !important; }
    .drawer-toggler { display: none !important; }
}