/* =========================================================
   GOOGLE FONT (SOLO MENÚ)
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

/* ===== GOOGLE FONT: RALEWAY (Contenido páginas internas) ===== */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');


/* =========================================================
   VARIABLES
========================================================= */
:root{
  /* Paleta */
  --primary:#B22222;      /* Topbar / Botón principal */
  --primary-2:#08145B;    /* Azul oscuro (títulos) */
  --secondary:#7E232E;    /* Burdeos soporte */
  --hover:#B22222;        /* Hover y activo menú */

  --ui:#5A6785;
  --muted:#8F90A1;
  --border:#C2BFBD;

  /* Neutros */
  --dark:#0b1220;
  --bg:#ffffff;
  --bg2:#f5f6f8;
  --card:#ffffff;

  /* UI */
  --radius:18px;
  --radius-pill:999px;
  --shadow:0 10px 30px rgba(0,0,0,.05);
  --shadow-2:0 14px 34px rgba(0,0,0,.08);

  /* Transiciones */
  --t-fast:150ms;
  --t:220ms;
  --t-slow:320ms;
  --ease:cubic-bezier(.2,.8,.2,1);

  /* Navegación */
  --nav-ease:cubic-bezier(.2,.8,.2,1);
  --nav-speed:220ms;
  --nav-speed-fast:160ms;
  --nav-shadow:0 14px 34px rgba(0,0,0,.10);

  /* Sticky (según tu header real) */
  --header-sticky-top:0px;
  --nav-sticky-top:124px;
}

/* =========================================================
   BASE
========================================================= */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color:var(--dark);
  background:var(--bg);
}
a{color:inherit; text-decoration:none}
.container{max-width:1180px; margin:0 auto; padding:0 16px}

/* =========================================================
   TOPBAR
========================================================= */
.topbar{
  background:var(--primary);
  color:#fff;
  font-size:14px;
}
.topbar__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}
.topbar__left{display:flex; gap:14px; flex-wrap:wrap}
.topbar__right{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.topbar__right a{
  opacity:.95;
  transition:opacity var(--t-fast) var(--ease);
}
.topbar__right a:hover{opacity:1; text-decoration:underline}
.sep{opacity:.7}

/* =========================================================
   HEADER (STICKY)
========================================================= */
.header{
  position:sticky;
  top:var(--header-sticky-top);
  z-index:200;
  background:#fff;
  border-bottom:1px solid rgba(194,191,189,.65);
}
.header__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 0;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.brand__img{
  width:87px;
  height:87px;
  flex:0 0 87px;
  object-fit:contain;
  display:block;
  
}
.brand__text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  line-height:1.1;
}
.brand__name{
  font-weight:900;
  color:var(--primary-2);
  font-size:22px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:560px;
}
.brand__tag{
  margin-top:4px;
  font-size:13px;
  color:var(--ui);
}

/* Chips */
.header__links{display:flex; gap:10px; align-items:center}
.chip{
  border:1px solid rgba(194,191,189,.75);
  padding:10px 12px;
  border-radius:var(--radius-pill);
  font-size:14px;
  background:#fff;
  transition:
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.chip:hover{
  border-color:rgba(42,60,100,.45);
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}

/* Burger */
.burger{
  display:none;
  border:1px solid rgba(194,191,189,.75);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:18px;
  cursor:pointer;
  transition:
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.burger:hover{
  border-color:rgba(42,60,100,.45);
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}

/* =========================================================
   NAV (STICKY + ROBOTO + Dropdown animado)
   FIXES incluidos: Alineación + Dropdown estable (sin parpadeo)
========================================================= */
.nav{
  position:sticky;
  top:var(--nav-sticky-top);
  z-index:150;
  background:#fff;
  border-bottom:1px solid rgba(194,191,189,.65);
}
.nav__row{
  display:flex;
  align-items:center; /* FIX: alineación */
  gap:8px;
  padding:10px 0;
  flex-wrap:wrap;
}

/* Roboto solo navegación */
.nav,
.nav__item,
.nav__dropbtn,
.nav__dropmenu a{
  font-family:'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* Dropdown contenedor */
.nav__dropdown{
  position:relative;
  display:inline-flex;     /* FIX: no baja con respecto a otros items */
  align-items:center;      /* FIX: centrado vertical */
}

/* FIX: puente invisible para evitar “parpadeo” */
.nav__dropdown::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:10px;            /* zona puente */
}

/* Items (normal: negro) + FIX: mismo modelo de caja */
.nav__item,
.nav__dropbtn{
  position:relative;

  display:inline-flex;     /* FIX: <a> y <button> iguales */
  align-items:center;      /* FIX: centrado vertical */
  justify-content:center;

  height:38px;             /* FIX: altura uniforme */
  line-height:1;           /* FIX: evita baseline distinto */

  padding:0 11px;          /* FIX: padding consistente */
  border-radius:var(--radius-pill);

  font-size:14.5px;
  font-weight:500;
  letter-spacing:0;
  color:#000;

  background:none;
  border:none;
  cursor:pointer;

  transition:
    background-color var(--nav-speed) var(--nav-ease),
    color var(--nav-speed) var(--nav-ease),
    transform var(--nav-speed) var(--nav-ease),
    box-shadow var(--nav-speed) var(--nav-ease);
  will-change:transform;
}

/* Hover */
.nav__item:hover,
.nav__dropdown:hover > .nav__dropbtn{
  background:var(--hover);
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.10);
}

/* FIX: evita micro-gap por transform en dropdown */
.nav__dropdown:hover > .nav__dropbtn{
  transform:none;
}

/* Activo */
.nav__item--active{
  background:#9f1f1f;
  color:#fff;
  font-weight:600;
}

/* Focus accesible */
.nav__item:focus-visible,
.nav__dropbtn:focus-visible{
  outline:2px dashed var(--hover);
  outline-offset:3px;
}

/* Dropdown menú */
.nav__dropmenu{
  position:absolute;
  top:calc(100% + 8px); /* FIX: más robusto que top fijo */
  left:0;
  min-width:230px;
  padding:10px;
  background:#fff;
  border:1px solid rgba(194,191,189,.75);
  border-radius:14px;
  box-shadow:var(--nav-shadow);
  z-index:9999; /* FIX: siempre encima del hero */

  opacity:0;
  visibility:hidden;
  transform:translateY(8px) scale(.98);
  pointer-events:none;

  transition:
    opacity var(--nav-speed) var(--nav-ease),
    transform var(--nav-speed) var(--nav-ease),
    visibility 0s linear var(--nav-speed);
}

.nav__dropdown:hover .nav__dropmenu{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}

.nav__dropmenu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  font-weight:400;
  color:#000;

  transition:
    background-color var(--nav-speed-fast) var(--nav-ease),
    color var(--nav-speed-fast) var(--nav-ease),
    transform var(--nav-speed-fast) var(--nav-ease);
}
.nav__dropmenu a:hover{
  background:var(--hover);
  color:#fff;
  transform:translateX(2px);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .nav__item,
  .nav__dropbtn,
  .nav__dropmenu{
    transition:none !important;
  }
}

/* =========================================================
   HERO / SLIDER
========================================================= */
.hero{
  position:relative;
  min-height:440px;
  overflow:hidden;
}
.hero__slide{
  min-height:440px;
  display:none;
  background:
    linear-gradient(90deg, rgba(8,20,91,.68), rgba(8,20,91,.20)),
    url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1600&q=60");
  background-size:cover;
  background-position:center;
}
.hero__slide--2{
  background:
    linear-gradient(90deg, rgba(8,20,91,.68), rgba(8,20,91,.20)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1600&q=60");
  background-size:cover;
  background-position:center;
}
.hero__slide.is-active{display:block;}
/*.hero__slide:first-child{display:block;}*/

.hero__content{
  padding:96px 0;
  color:#fff;
  max-width:780px;
}
.hero__pill{
  display:inline-block;
  background:linear-gradient(90deg, var(--secondary), var(--primary));
  padding:10px 14px;
  border-radius:var(--radius-pill);
  font-weight:900;
  letter-spacing:.6px;
  margin-bottom:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}
.hero h1{font-size:44px; margin:0 0 10px; line-height:1.05}
.hero p{font-size:18px; margin:0 0 18px; opacity:.95}

.hero__actions{display:flex; gap:12px; flex-wrap:wrap}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:16px;
  font-weight:900;
  border:1px solid transparent;
  cursor:pointer;
  transition:
    transform var(--t) var(--ease),
    filter var(--t) var(--ease),
    background-color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.btn--primary{
  background:var(--hover);
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.14);
}
.btn--primary:hover{filter:brightness(.97); transform:translateY(-1px)}
.btn--ghost{
  background:rgba(255,255,255,.14);
  color:#fff;
  border-color:rgba(255,255,255,.35);
}
.btn--ghost:hover{background:rgba(255,255,255,.22); transform:translateY(-1px)}

.hero__controls{
  position:absolute;
  left:0; right:0;
  bottom:16px;
  display:flex;
  gap:8px;
}
.dot{
  width:10px; height:10px;
  border-radius:var(--radius-pill);
  border:1px solid rgba(255,255,255,.7);
  background:transparent;
  cursor:pointer;
  transition:transform var(--t) var(--ease), background-color var(--t) var(--ease);
}
.dot:hover{transform:scale(1.05)}
.dot.is-active{background:#fff}

/* =========================================================
   SECTIONS / GRID / CARDS
========================================================= */
.section{padding:56px 0}
.section--muted{background:var(--bg2)}
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.section__head h2{margin:0; font-size:28px; color:var(--primary-2)}
.section__head p{margin:6px 0 0; color:var(--ui)}
.link{
  color:var(--hover);
  font-weight:900;
  transition:opacity var(--t) var(--ease);
}
.link:hover{text-decoration:underline; opacity:.9}

.grid{display:grid; gap:16px}
.grid--4{grid-template-columns:repeat(4, 1fr)}
.grid--3{grid-template-columns:repeat(3, 1fr)}

.card{
  background:var(--card);
  border:1px solid rgba(194,191,189,.65);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.card--link{
  padding:18px;
  transition:
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.card--link:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-2);
  border-color:rgba(42,60,100,.28);
}
.card__icon{
  font-size:26px;
  width:44px; height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(42,60,100,.10);
  color:var(--primary-2);
}
.card h3{margin:10px 0 6px; color:var(--primary-2)}
.card p{margin:0; color:var(--ui)}
.card__thumb{
  height:150px;
  background:linear-gradient(135deg, rgba(42,60,100,.14), rgba(178,34,34,.10));
}
.card__body{padding:14px 16px 18px}
.meta{font-size:13px; color:var(--muted)}

/* =========================================================
   FOOTER
========================================================= */
.footer{
  background:linear-gradient(180deg, #020873 0%, #02076b 100%);
  color:#e5e7eb;
}
.footer__grid{
  padding:42px 0;
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:18px;
}
.footer h4{margin:0 0 12px; color:#fff}
.footer p{margin:8px 0; color:rgba(255,255,255,.92)}
.footer a{
  display:block;
  opacity:.92;
  margin:8px 0;
  color:rgba(255,255,255,.92);
  transition:opacity var(--t) var(--ease);
}
.footer a:hover{opacity:1; color:#fff; text-decoration:underline}
.footer__bottom{
  border-top:1px solid rgba(255,255,255,.25);
  padding:14px 0;
  color:rgba(255,255,255,.85);
  font-size:13px;
}
.footer__bottomrow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 980px){
  :root{ --nav-sticky-top:0px; }

  .grid--4{grid-template-columns:repeat(2,1fr)}
  .grid--3{grid-template-columns:repeat(2,1fr)}
  .footer__grid{grid-template-columns:1fr 1fr}

  .header__links{display:none}
  .burger{display:inline-flex}

  .brand__img{
    width:72px;
    height:72px;
    flex:0 0 72px;
  }
  .brand__name{
    white-space:normal;
    max-width:320px;
    font-size:16px;
  }

  /* Menú móvil */
  .nav{
    position:static;
    display:none;
    border-bottom:none;
  }
  .nav.is-open{
    display:block;
    padding:10px 0 14px;
    box-shadow:0 12px 34px rgba(0,0,0,.10);
  }
  .nav__row{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }

  /* En móvil usamos tamaños propios */
  .nav__item,
  .nav__dropbtn{
    width:100%;
    height:auto;           /* móvil: libre */
    border-radius:14px;
    padding:12px 14px;
  }

  /* Sin lift en móvil */
  .nav__item:hover,
  .nav__dropdown:hover > .nav__dropbtn{
    transform:none;
    box-shadow:none;
  }

  /* Puente no necesario en móvil */
  .nav__dropdown::after{display:none;}

  /* Dropdown móvil por .is-open (JS) */
  .nav__dropmenu{
    position:static;
    top:auto;
    left:auto;
    min-width:unset;
    box-shadow:none;
    border:1px solid rgba(194,191,189,.55);
    border-radius:14px;
    transform:none;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:none;
    padding:8px;
    margin:6px 0 10px;
    display:none;
  }
  .nav__dropdown.is-open > .nav__dropmenu{display:block}

  /* Hero ajusta en móvil */
  .hero__content{padding:80px 0}
  .hero h1{font-size:36px}
}

@media (max-width: 560px){
  .grid--4,.grid--3{grid-template-columns:1fr}
  .hero h1{font-size:34px}
}

/* =========================================================
   PÁGINAS INTERNAS: MISIÓN Y VISIÓN
========================================================= */
.page{min-height:60vh}

/* Banner interno */
.page-hero{
  background:
    linear-gradient(90deg, rgba(8,20,91,.72), rgba(8,20,91,.22)),
    url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1600&q=60");
  background-size:cover;
  background-position:center;
  padding:56px 0;
}
.page-hero__content{color:#fff}
.page-title{
  margin:10px 0 8px;
  font-size:40px;
  line-height:1.1;
}
.page-subtitle{
  margin:0;
  max-width:850px;
  opacity:.95;
  font-size:16.5px;
}

/* Breadcrumb */
.breadcrumb{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  font-size:14px;
  opacity:.95;
}
.breadcrumb a{opacity:.95}
.breadcrumb a:hover{text-decoration:underline}
.breadcrumb strong{font-weight:800}

/* Misión/Visión */
.mv-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.mv-card{
  background:#fff;
  border:1px solid rgba(194,191,189,.65);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  padding:22px;
}
.mv-card__head{margin-bottom:10px}
.mv-card h2{
  margin:10px 0 0;
  color:var(--primary-2);
  font-size:22px;
}
.mv-badge{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:var(--hover);
  color:#fff;
  font-weight:900;
  letter-spacing:.4px;
  font-size:12px;
}
.mv-badge--alt{
  background:var(--primary-2);
}

.mv-text{
  color:var(--ui);
  line-height:1.7;
  margin:12px 0 14px;
}

.mv-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  color:#111;
  font-size:14.5px;
}

/* Mini cards valores */
.mv-mini h3{margin:10px 0 6px}
.mv-mini p{margin:0}

/* Responsive */
@media (max-width: 980px){
  .mv-grid{grid-template-columns:1fr}
  .page-title{font-size:34px}
}

/* =========================================================
   MISIÓN Y VISIÓN – TIPOGRAFÍA RALEWAY
========================================================= */

/* Aplica Raleway solo al contenido interno */
.page,
.page *{
  font-family:'Raleway', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* Ajustes finos de legibilidad */
.page-title{
  font-weight:800;
  letter-spacing:.3px;
}

.page-subtitle{
  font-weight:500;
}

.mv-card h2{
  font-weight:700;
}

.mv-text{
  font-weight:500;
  line-height:1.75;
}

.mv-list li{
  font-weight:500;
}

/* Valores institucionales */
.mv-mini h3{
  font-weight:700;
}
.mv-mini p{
  font-weight:500;
}

/* =========================================================
   COMISIÓN ORGANIZADORA (página interna)
========================================================= */
.team-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
}

.team-card{
  background:#fff;
  border:1px solid rgba(194,191,189,.65);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.team-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 34px rgba(0,0,0,.08);
  border-color:rgba(178,34,34,.25);
}

.team-photo{
  height:300px;
  background:#e9edf2;
}
.team-photo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.team-body{
  padding:16px 16px 18px;
}

.team-name{
  margin:6px 0 8px;
  color:var(--primary-2);
  font-size:16px;
  line-height:1.2;
  font-weight:800;
}
.team-name span{
  color:var(--primary);
  font-weight:900;
}

.team-role{
  margin:0 0 12px;
  color:#333;
  font-weight:700;
  letter-spacing:.3px;
}

.team-meta{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--ui);
  font-size:14px;
  line-height:1.5;
  margin-bottom:14px;
}
.team-meta a{
  color:var(--primary);
  font-weight:700;
}
.team-meta a:hover{
  text-decoration:underline;
}

/* Botones pequeños */
.btn--sm{
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  font-size:14px;
}
.team-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Nota */
.note-box{
  margin-top:18px;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(178,34,34,.07);
  border:1px solid rgba(178,34,34,.18);
  color:#333;
}

/* Responsive */
@media (max-width: 980px){
  .team-grid{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width: 560px){
  .team-grid{ grid-template-columns:1fr; }
  .team-photo{ height:240px; }
}

/* =========================================================
   RESEÑA HISTÓRICA
========================================================= */
.history-grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:18px;
}

.history-card{
  background:#fff;
  border:1px solid rgba(194,191,189,.65);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  padding:22px;
}
.history-card h2{
  margin:0 0 10px;
  color:var(--primary-2);
}
.history-card p{
  margin:10px 0 0;
  color:var(--ui);
  line-height:1.75;
  text-align: justify;        
  text-justify: inter-word;   
}

.history-aside{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.history-highlight{
  background:#fff;
  border:1px solid rgba(194,191,189,.65);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  padding:18px;
}
.history-highlight h3{
  margin:0 0 10px;
  color:var(--primary-2);
}
.history-highlight ul{
  margin:0;
  padding-left:18px;
  color:var(--ui);
  line-height:1.7;
}
.history-link{
  display:block;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(194,191,189,.65);
  margin-top:10px;
  background:#fff;
  font-weight:700;
  color:var(--primary-2);
}
.history-link:hover{
  border-color:rgba(178,34,34,.35);
  color:var(--primary);
}

/* Timeline */
.timeline{
  position:relative;
  padding-left:18px;
}
.timeline::before{
  content:"";
  position:absolute;
  left:6px;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(8,20,91,.18);
}

.timeline-item{
  position:relative;
  display:grid;
  grid-template-columns: 14px 1fr;
  gap:12px;
  padding:14px 0;
}
.timeline-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  margin-top:6px;
  background:var(--primary);
  box-shadow:0 8px 18px rgba(178,34,34,.25);
}
.timeline-content{
  background:#fff;
  border:1px solid rgba(194,191,189,.65);
  border-radius:18px;
  padding:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
}
.timeline-year{
  display:inline-block;
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
  color:#fff;
  background:var(--primary);
  padding:6px 10px;
  border-radius:999px;
}
.timeline-content h3{
  margin:10px 0 6px;
  color:var(--primary-2);
}
.timeline-content p{
  margin:0;
  color:var(--ui);
  line-height:1.7;
}

/* Galería */
.history-gallery{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
}
.history-photo{
  height:160px;
  border-radius:18px;
  background:
    linear-gradient(135deg, rgba(8,20,91,.12), rgba(178,34,34,.10));
  border:1px solid rgba(194,191,189,.55);
}

/* Responsive */
@media (max-width: 980px){
  .history-grid{grid-template-columns:1fr}
  .history-gallery{grid-template-columns:repeat(2, 1fr)}
}
@media (max-width: 560px){
  .history-gallery{grid-template-columns:1fr}
  .history-photo{height:190px}
}

@media (max-width: 768px){
  .history-card p{
    text-align: left;         
  }
}

/* ===============================
   AVISO POP UP
================================ */

#popup-aviso {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    justify-content: center;
    align-items: center;

    z-index: 99999;
}

.popup-contenido{
    background: white;
    padding: 10px;
    border-radius: 10px;

    width: 90vw;       /* ancho adaptable */
    max-width: 600px;  /* máximo en pantallas grandes */
    max-height: 90vh;  /* nunca más alto que la pantalla */

    overflow: hidden;
}

/* link ocupa todo */
.popup-contenido a{
    display:block;
}

/* imagen se adapta al contenedor */
.popup-contenido img{
    max-width:100%;
    max-height:80vh;   /* limita la altura */
    height:auto;
    display:block;
    margin:auto;
}

.cerrar{
  float:right;
  font-size:28px;
  cursor:pointer;
}

/* ===============================
   ORGANIGRAMA INSTITUCIONAL
================================ */
.content-raleway{
  font-family:'Raleway', system-ui, sans-serif;
}

.breadcrumb{
  font-size:14px;
  color:#5a6785;
  margin-bottom:16px;
}

.organigrama-card{
  padding:28px;
}

.organigrama-card h2{
  color:var(--primary-2);
  margin-bottom:12px;
}

.text-justify{
  text-align:justify;
  line-height:1.7;
  color:#374151;
}

.organigrama-img{
  margin:24px 0;
  text-align:center;
}

.organigrama-img img{
  max-width:100%;
  height:auto;
  border-radius:12px;
  border:1px solid rgba(194,191,189,.65);
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

/* Hero interno más compacto */
.hero--internal .hero__content{
  padding:72px 0;
}

/* ===== FOOTER REDES (FIX DEFINITIVO) ===== */
.footer__social{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.footer__social a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px;
  border-radius:10px;
  background:transparent;
  max-width:220px;
}

.footer__social svg{
  width:18px !important;
  height:18px !important;
  fill:#ffffff !important;
  flex-shrink:0;
}

.footer__social span{
  font-size:14px;
  font-weight:600;
  color:rgba(255,255,255,.95);
}

.footer__social a:hover{
  background:#B22222;
  transform:translateY(-1px);
}

/* =========================================================
   FOOTER – TIPOGRAFÍA ROBOTO
========================================================= */
.footer,
.footer h4,
.footer p,
.footer a,
.footer span {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
/* =========================================
   MENÚ MÓVIL: Submenús debajo (no a la derecha)
========================================= */
@media (max-width: 980px){

  /* El menú móvil en columna */
  .nav__row{
    flex-direction: column;
    align-items: stretch;
  }

  /* Cada dropdown ocupa todo el ancho */
  .nav__dropdown{
    width: 100%;
    display: block;
    position: relative;
  }

  /* Botón del item ocupa todo el ancho */
  .nav__dropbtn{
    width: 100%;
    justify-content: space-between; /* texto a la izquierda, flecha a la derecha */
  }

  /* Submenú SIEMPRE debajo (acordeón) */
  .nav__dropmenu{
    position: static !important;  /* clave: deja de ser absoluto */
    top: auto !important;
    left: auto !important;

    width: 100%;
    min-width: 0;

    margin: 8px 0 12px 0;         /* separación */
    padding: 10px;

    border-radius: 14px;
    box-shadow: none;

    display: none;                 /* se abre con .is-open */
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  /* Cuando JS pone .is-open, se muestra debajo */
  .nav__dropdown.is-open > .nav__dropmenu{
    display: block;
  }

  /* Ítems del submenú a ancho completo */
  .nav__dropmenu a{
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
  }
}