/* ============================================================
   styles.css — Federación UNAHUR SPA
   ============================================================ */

:root {
  --c-black:      #000000;
  --c-white:      #ffffff;
  --c-bg-light:   #f5f5f7;
  --c-border:     #e2e2e8;
  --c-text:       #111118;
  --c-text-soft:  #5a5a70;
  --c-text-muted: #9898aa;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 6px rgba(0,0,0,0.07);
  --shadow:    0 3px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --container: 1120px;
  --header-h:  68px;
  --section-py: 80px;
  --t: 0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font-body); color: var(--c-text); background: var(--c-white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; display: block; }
ul    { list-style: none; }
a     { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); cursor: pointer; }

#spa-root { min-height: 60vh; }


/* ── Tipografía ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; color: var(--c-text); }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--c-text-soft); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }


/* ── Utilidades ── */
.container    { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section-pad  { padding: var(--section-py) 24px; }
.bg-light     { background: var(--c-bg-light); }

.section-tag  { display: inline-block; font-size: 0.71rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--c-text-muted); margin-bottom: 0.6rem; }
.section-intro { font-size: 1rem; max-width: 560px; margin-bottom: 2.5rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.75rem 1.75rem; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  border-radius: var(--radius); border: 2px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }
.btn-primary:hover { background: #222; box-shadow: 0 4px 18px rgba(0,0,0,0.28); }
.btn-outline { background: transparent; color: var(--c-white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--c-white); }
.btn-accent  { background: var(--accent); color: var(--c-white); border-color: var(--accent); width: 100%; padding: 0.85rem; font-size: 0.98rem; margin-top: 0.5rem; justify-content: center; }
.btn-accent:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(0,0,0,0.18); }

.nav-link.is-active { color: var(--c-white) !important; background: rgba(255,255,255,0.12) !important; }


/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 500; height: var(--header-h); background: var(--c-black); border-bottom: 1px solid #1e1e1e; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.logo { display: flex; flex-direction: column; line-height: 1.1; gap: 1px; }
.logo-fed { font-family: var(--font-body); font-weight: 300; font-size: 0.67rem; color: rgba(255,255,255,0.42); text-transform: uppercase; letter-spacing: 0.13em; }
.logo-uni { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; color: var(--c-white); letter-spacing: 0.02em; }

.main-nav > ul { display: flex; align-items: center; gap: 2px; }

.nav-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 0.48rem 0.85rem;
  font-family: var(--font-display); font-size: 0.87rem; font-weight: 600;
  color: rgba(255,255,255,0.72); border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t); background: none; border: none; line-height: 1;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--c-white); background: rgba(255,255,255,0.09); outline: none; }

.has-dropdown { position: relative; }
.dropdown-toggle .arrow { font-size: 0.65rem; transition: transform var(--t); display: inline-block; }
.dropdown-toggle[aria-expanded="true"] .arrow { transform: rotate(180deg); }

/* Dropdown — OCULTO por defecto, JS agrega .is-open */
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: #141414; border: 1px solid #2c2c2c; border-radius: var(--radius);
  padding: 6px; min-width: 270px; box-shadow: 0 10px 36px rgba(0,0,0,0.5);
  flex-direction: column; gap: 2px; z-index: 600;
}
.dropdown-menu.is-open { display: flex; animation: dropIn 0.18s ease forwards; }

@keyframes dropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-menu li { width: 100%; }
.dropdown-menu .nav-link { width: 100%; font-size: 0.85rem; padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); gap: 10px; }
.dm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-white); border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ── Hero ── */
.hero-section {
  position: relative; background: var(--c-black); color: var(--c-white);
  padding: 110px 0 90px; overflow: hidden; min-height: 86vh; display: flex; align-items: center;
}
.hero-bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 52px 52px;
}
.hero-content  { position: relative; z-index: 2; max-width: 680px; }
.hero-eyebrow  { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 1.2rem; }
.hero-title    { color: var(--c-white); margin-bottom: 1.5rem; }
.hero-title strong { display: block; font-weight: 800; }
.hero-desc     { font-size: 1.05rem; color: rgba(255,255,255,0.6); max-width: 510px; margin-bottom: 2.5rem; }
.hero-ctas     { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-color-blocks { position: absolute; right: 0; bottom: 0; display: flex; width: 50%; height: 5px; z-index: 3; }
.hero-color-blocks span { flex: 1; }


/* ── Acceso rápido a centros ── */
.centros-acceso { padding: 0; }
.centros-grid { display: grid; grid-template-columns: repeat(4, 1fr); }

.centro-card {
  display: flex; flex-direction: column; background: var(--c-white);
  border: 1px solid var(--c-border); border-top: none; overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}
.centro-card:hover { box-shadow: var(--shadow-lg); z-index: 2; transform: translateY(-3px); }
.cc-bar  { height: 5px; background: var(--accent); width: 100%; }
.cc-body { padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-label { font-size: 0.69rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-muted); }
.cc-name  { font-family: var(--font-display); font-size: 0.94rem; font-weight: 700; color: var(--c-text); line-height: 1.3; flex: 1; }
.cc-arrow { font-size: 1.1rem; color: var(--accent); margin-top: 10px; display: inline-block; transition: transform var(--t); }
.centro-card:hover .cc-arrow { transform: translateX(5px); }


/* ── Sección institucional ── */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.col-text h2 { margin-bottom: 1.25rem; }
.info-box { background: var(--c-bg-light); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 28px; }
.info-box h4 { margin-bottom: 12px; }
.info-box p  { font-size: 0.88rem; }
.ig-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: #c13584; transition: opacity var(--t); }
.ig-link:hover { opacity: 0.75; }
.ig-link svg   { width: 18px; height: 18px; }


/* ── Calendario / Anuncios ── */
.anuncios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.anuncio-card {
  display: flex; gap: 18px; background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.anuncio-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.anuncio-card.accent-border { border-left: 4px solid var(--accent); }
.anuncio-fecha { display: flex; flex-direction: column; align-items: center; min-width: 46px; padding-top: 2px; }
.anuncio-dia   { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--c-text); line-height: 1; }
.anuncio-mes   { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-muted); margin-top: 3px; }
.anuncio-info  { flex: 1; }
.anuncio-tipo  { display: inline-block; font-size: 0.67rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-muted); margin-bottom: 6px; }
.anuncio-info h4 { font-size: 0.94rem; margin-bottom: 6px; }
.anuncio-info p  { font-size: 0.83rem; }


/* ── Contacto / Redes ── */
.redes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.red-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--c-bg-light); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); border-left: 4px solid var(--accent, #888);
  transition: box-shadow var(--t), transform var(--t), background var(--t); color: var(--c-text);
}
.red-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); background: var(--c-white); }
.red-card--fed  { --accent: var(--c-black); border-left-color: var(--c-black); }
.red-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; background: var(--c-white); border: 1px solid var(--c-border); color: var(--accent, #c13584); }
.red-card--fed .red-icon { color: var(--c-black); }
.red-icon svg  { width: 18px; height: 18px; }
.red-info      { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.red-label     { font-size: 0.71rem; color: var(--c-text-muted); font-weight: 500; }
.red-handle    { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--c-text); }
.red-arrow     { font-size: 1.1rem; color: var(--accent, #888); opacity: 0.6; transition: opacity var(--t), transform var(--t); }
.red-card:hover .red-arrow { opacity: 1; transform: translate(2px, -2px); }


/* ── Páginas de Centro ── */
.centro-page-header { background: var(--accent); padding: 56px 0 48px; color: var(--c-white); }
.breadcrumb { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: rgba(255,255,255,0.6); transition: color var(--t); }
.breadcrumb a:hover { color: var(--c-white); }
.centro-page-header h1 { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--c-white); margin-bottom: 0.5rem; }
.centro-page-header .subtitulo { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin: 0; }

.centro-desc-section { padding: 60px 24px 40px; }
.centro-desc-section h2 { font-size: clamp(1.15rem, 2.5vw, 1.65rem); margin-bottom: 1rem; color: var(--accent); }
.centro-desc-section p  { max-width: 760px; }

.centro-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; padding: 0 24px 80px; }

.card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 1.05rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--c-border); }

/* Formularios */
.form-group { display: flex; flex-direction: column; margin-bottom: 1rem; }
.form-group label { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; color: var(--c-text); margin-bottom: 5px; }
.req { color: #e53e3e; }
.form-group input,
.form-group select { padding: 0.65rem 0.9rem; border: 1.5px solid var(--c-border); border-radius: var(--radius); font-family: var(--font-body); font-size: 0.94rem; color: var(--c-text); background: var(--c-white); transition: border-color var(--t), box-shadow var(--t); outline: none; }
.form-group input:focus,
.form-group select:focus { border-color: var(--accent, #555); box-shadow: 0 0 0 3px rgba(0,0,0,0.07); }
.form-group input.is-invalid,
.form-group select.is-invalid { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,0.12); }
.field-error { font-size: 0.76rem; color: #e53e3e; margin-top: 4px; min-height: 15px; font-weight: 500; }
.form-success { display: none; margin-top: 1rem; padding: 14px 16px; border-radius: var(--radius); background: #f0fdf4; border: 1px solid #86efac; color: #166534; font-size: 0.88rem; font-weight: 500; }
.form-success.is-visible { display: block; }

/* Planes de Estudio */
.carreras-list { display: flex; flex-direction: column; }
.carreras-list li { display: flex; align-items: baseline; gap: 9px; padding: 0.58rem 0; font-size: 0.88rem; color: var(--c-text-soft); border-bottom: 1px solid var(--c-border); transition: color var(--t); }
.carreras-list li:last-child { border-bottom: none; }
.carreras-list li::before { content: "–"; color: var(--accent); font-weight: 600; flex-shrink: 0; font-size: 0.75rem; }
.carreras-list li:hover { color: var(--c-text); }

.centro-calendario { padding: 60px 24px; background: var(--c-bg-light); }
.centro-calendario h2 { margin-bottom: 0.5rem; }


/* ── Footer ── */
.site-footer { background: #0a0a0a; color: rgba(255,255,255,0.65); padding-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1.5fr 1.2fr; gap: 48px; padding-bottom: 48px; }
.footer-brand .logo-fed { color: rgba(255,255,255,0.3); }
.footer-brand .logo-uni { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: var(--c-white); letter-spacing: 0.02em; }
.footer-brand p { margin-top: 10px; font-size: 0.81rem; color: rgba(255,255,255,0.38); line-height: 1.7; }
.footer-links h4,
.footer-redes h4 { font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.48); margin-bottom: 14px; }
.footer-links ul,
.footer-redes ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a,
.footer-redes a { font-size: 0.86rem; color: rgba(255,255,255,0.48); transition: color var(--t); }
.footer-links a:hover,
.footer-redes a:hover { color: var(--c-white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); text-align: center; padding: 20px 24px; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.28); margin: 0; }


/* ── Responsive ── */
@media (max-width: 900px) {
  .centros-grid     { grid-template-columns: repeat(2, 1fr); }
  .two-col          { grid-template-columns: 1fr; gap: 32px; }
  .anuncios-grid    { grid-template-columns: 1fr 1fr; }
  .redes-grid       { grid-template-columns: 1fr 1fr; }
  .footer-inner     { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand     { grid-column: 1 / -1; }
  .centro-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; --section-py: 56px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #111; border-bottom: 1px solid #222;
    padding: 14px; display: none; flex-direction: column;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > ul    { flex-direction: column; align-items: stretch; gap: 3px; }
  .dropdown-menu    { position: static; transform: none; box-shadow: none; border: none; background: rgba(255,255,255,0.04); border-radius: var(--radius); padding: 4px 0 4px 10px; margin-top: 4px; animation: none; }
  .dropdown-menu.is-open { display: flex; }
  .hero-section  { padding: 64px 0; min-height: auto; }
  .hero-ctas     { flex-direction: column; }
  .centros-grid  { grid-template-columns: 1fr 1fr; }
  .anuncios-grid { grid-template-columns: 1fr; }
  .redes-grid    { grid-template-columns: 1fr; }
  .footer-inner  { grid-template-columns: 1fr; gap: 28px; }
  .card          { padding: 22px 18px; }
}

@media (max-width: 380px) {
  .centros-grid { grid-template-columns: 1fr; }
}
