/* ==========================================================================
   Variables de Marca e Identidad Visual 
   ========================================================================== */
:root {
  --blue-dark:    #0a182c;
  --blue-medium:  #14253f;
  --blue-light:   #f1f5f9;
  --red-nebrija:  #b31b34;
  --red-hover:    #911124;
  --text-main:    #334155;
  --text-light:   #556377;  /* v3: oscurecido para contraste AA sobre fondos claros */
  --red-on-dark:  #e85a70;  /* v3: rojo Nebrija aclarado SOLO para fondos azul oscuro (contraste AA) */
  --white:        #ffffff;
  --max-width:    1200px;
  --radius:       8px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg:    0 10px 25px -5px rgba(10,24,44,0.08), 0 8px 10px -6px rgba(10,24,44,0.08);
}

/* ==========================================================================
   Estilos Globales
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif; 
  color: var(--text-main); 
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { display: block; max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }

/* ==========================================================================
   Secciones
   ========================================================================== */
.section { padding: 90px 0; }
.section-white { background-color: var(--white); }
.section-light { background-color: var(--blue-light); }

.section-header { max-width: 700px; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; color: var(--blue-dark); font-weight: 700; margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 1.1rem; }

.section-tag {
  display: inline-block;
  color: var(--red-nebrija);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

/* ==========================================================================
   Navegación
   ========================================================================== */
.nav {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 0 40px;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(10,24,44,0.05);
}

.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 46px; width: auto; object-fit: contain; }

.nav-divider {
  width: 1px;
  height: 30px;
  background-color: #e2e8f0;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  height: 100%;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-medium);
  padding: 8px 0;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--red-nebrija);
}

/* Botón Área Privada (nuevo) */
.btn-nav-acceso {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--blue-dark);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 16px;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s, transform 0.2s;
}
.btn-nav-acceso:hover {
  background-color: #132035;
  transform: translateY(-1px);
}
.btn-nav-acceso svg { flex-shrink: 0; }

.btn-nav-contact {
  background-color: var(--red-nebrija);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-nav-contact:hover {
  background-color: var(--red-hover);
  transform: translateY(-1px);
}

.nav-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Hamburguesa y menú móvil */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span { width: 24px; height: 2px; background: var(--blue-dark); transition: 0.3s; }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 80px; left: 0; width: 100%;
  background: var(--white);
  box-shadow: 0 10px 15px rgba(0,0,0,.05);
  z-index: 99;
  flex-direction: column;
  padding: 16px 0;
  border-top: 1px solid #edf2f7;
}
.nav-mobile-menu a { padding: 12px 32px; font-weight: 600; color: var(--blue-dark); }
.nav-mobile-menu a:hover { background: var(--blue-light); color: var(--red-nebrija); }
.nav-mobile-menu.open { display: flex; }

.mobile-acceso-link {
  margin: 8px 24px 4px !important;
  background-color: var(--blue-dark) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  padding: 12px 20px !important;
  text-align: center !important;
  font-size: 0.9rem !important;
}
.mobile-acceso-link:hover {
  background-color: #132035 !important;
  color: var(--white) !important;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(10,24,44,0.96) 20%, rgba(20,37,63,0.75) 100%), url('../img/campus-edificio.jpg') center/cover no-repeat;
  padding: 120px 0;
  color: var(--white);
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 850px; }
.hero h1 { font-size: 3rem; line-height: 1.25; font-weight: 700; margin-bottom: 24px; color: var(--white); letter-spacing: -0.5px; }
.hero p { font-size: 1.15rem; line-height: 1.65; color: #cbd5e1; margin-bottom: 20px; font-weight: 400; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}

.btn-primary { background: var(--red-nebrija); color: var(--white); }
.btn-primary:hover { background: var(--red-hover); transform: translateY(-2px); }

.btn-secondary { background: rgba(255,255,255,0.1); color: var(--white); border: 1px solid rgba(255,255,255,0.25); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* ==========================================================================
   Quick Bar
   ========================================================================== */
.quick-bar { background: var(--blue-dark); color: var(--white); padding: 32px 0; border-bottom: 4px solid var(--red-nebrija); }
.qb-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.qb-item { flex: 1 1 120px; text-align: center; }
.qb-num { display: block; font-size: 2.2rem; font-weight: 700; color: var(--red-on-dark); margin-bottom: 4px; }
.qb-txt { font-size: 0.9rem; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }

/* ==========================================================================
   Split
   ========================================================================== */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: 0.9fr 1.1fr; }
.split.reverse .split-info { grid-column: 2; }
.split.reverse .split-img { grid-column: 1; grid-row: 1; }

.split-info h2 { font-size: 2.4rem; color: var(--blue-dark); font-weight: 700; margin-bottom: 20px; line-height: 1.25; }
.split-info p { font-size: 1.05rem; color: var(--text-main); margin-bottom: 20px; }

.split-img { 
  width: 100%; 
  height: 480px; 
  background-position: center; 
  background-size: cover; 
  border-radius: var(--radius); 
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Cards deportivas / Misión-Visión
   ========================================================================== */
.sports-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

.sport-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sport-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(179,27,52,0.2);
}
.sp-icon { font-size: 2.5rem; margin-bottom: 20px; display: inline-block; }
.sport-card h3 { font-size: 1.3rem; color: var(--blue-dark); margin-bottom: 12px; font-weight: 700; }
.sport-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* ==========================================================================
   Instalaciones
   ========================================================================== */
.fac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 250px 250px;
  gap: 24px;
}

.fac-card {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-end;
  padding: 32px;
}

.fac-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(10,24,44,0.9) 0%, rgba(10,24,44,0.2) 100%);
  z-index: 1;
}

.fac-card.big { grid-row: 1 / 3; height: 100%; }

.fac-content { position: relative; z-index: 2; }
.fac-content h3 { color: var(--white); font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.fac-content p { color: #e2e8f0; font-size: 0.95rem; }

/* ==========================================================================
   SECCIÓN NOTICIAS
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Skeleton loaders */
.news-skeleton {
  background: #e2e8f0;
  border-radius: var(--radius);
  height: 320px;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Tarjeta de noticia */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(179,27,52,0.15);
}

.news-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.news-card-img-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, var(--blue-medium) 0%, var(--blue-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red-nebrija);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red-nebrija);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
}
.news-card-link:hover { color: var(--red-hover); gap: 8px; }

/* Estado de error */
.news-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: var(--blue-light);
  border-radius: var(--radius);
  border: 1px dashed #cbd5e1;
}
.news-error p { color: var(--text-light); font-size: 1rem; margin-bottom: 12px; }
.news-error a { color: var(--red-nebrija); font-weight: 700; font-size: 0.9rem; }

/* Botón "Ver todas" */
.news-footer {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-news-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid var(--blue-dark);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 13px 28px;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}
.btn-news-more:hover {
  background: var(--blue-dark);
  color: var(--white);
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-box {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: var(--blue-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ct-left { padding: 64px; color: var(--white); display: flex; flex-direction: column; justify-content: center; }
.ct-left h2 { font-size: 2.2rem; color: var(--white); font-weight: 700; margin-bottom: 16px; }
.ct-left p { color: #94a3b8; font-size: 1.05rem; margin-bottom: 40px; }

.ct-info-lines { display: flex; flex-direction: column; gap: 16px; }
.ct-line { font-size: 0.95rem; color: #e2e8f0; display: flex; align-items: center; gap: 12px; }
.ct-line span { font-size: 1.2rem; }

.ct-right { padding: 64px; background: #112240; display: flex; flex-direction: column; justify-content: center; }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #cbd5e1; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: var(--white);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--red-nebrija);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(179,27,52,0.25);
}

.form-submit {
  background: var(--red-nebrija);
  color: var(--white);
  border: none;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.form-submit:hover { background: var(--red-hover); }

.form-actions-flex { display: flex; gap: 16px; }
.form-actions-flex .form-submit { flex: 1; }
.form-actions-flex a.form-submit { text-decoration: none; display: flex; align-items: center; justify-content: center; }

.btn-secondary-action {
  background-color: #1a2942 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  flex: 1;
}
.btn-secondary-action:hover {
  background-color: #243754 !important;
  border-color: var(--red-nebrija) !important;
}

.form-msg {
  margin-top: 16px; padding: 12px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; text-align: center; display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: #071120; color: #94a3b8; }
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(3, 0.9fr); gap: 48px; padding-top: 80px; padding-bottom: 40px; }

.f-brand img { height: 52px; width: auto; margin-bottom: 24px; }
.f-brand p { font-size: 0.95rem; line-height: 1.6; max-width: 320px; }

.f-col h4 { color: var(--white); font-size: 1.1rem; font-weight: 700; margin-bottom: 24px; }
.f-col a { display: block; font-size: 0.95rem; color: #94a3b8; margin-bottom: 12px; }
.f-col a:hover { color: var(--white); padding-left: 4px; }

.footer-acceso-link {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  margin-top: 8px;
}
.footer-acceso-link:hover {
  background: rgba(255,255,255,0.15) !important;
  color: var(--white) !important;
  padding-left: 16px !important;
}

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding: 32px 0; }
.fb-content { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }

/* ==========================================================================
   Responsive — 1350px: nav compacta (reduce gaps y fuentes)
   ========================================================================== */
@media (max-width: 1350px) {
  .nav { padding: 0 24px; gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.77rem; }
  .btn-nav-acceso { font-size: 0.74rem; padding: 9px 11px; }
  .btn-nav-contact { font-size: 0.77rem; padding: 9px 13px; }
}

/* ==========================================================================
   Responsive — 1200px: ocultar nav-links, mostrar hamburguesa
   ========================================================================== */
@media (max-width: 1200px) {
  .nav-links { display: none; }
  .nav-logo img { height: 40px; }
  .nav-divider { display: none; }
  .hamburger { display: flex; }
  .hamburger { display: flex; }
  .nav { padding: 0 24px; }
  .hero h1 { font-size: 2.5rem; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-info { grid-column: 1; }
  .split.reverse .split-img { grid-column: 1; grid-row: auto; }
  .split-img { height: 350px; }
  .fac-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px; }
  .contact-box { grid-template-columns: 1fr; }
  .ct-left, .ct-right { padding: 48px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Responsive — 768px: móvil
   ========================================================================== */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav { padding: 0 20px; height: 70px; }
  .nav-mobile-menu { top: 70px; }
  /* En móvil ocultar los botones CTA del nav (están en el menú móvil) */
  .btn-nav-acceso { display: none !important; }
  .btn-nav-contact { display: none !important; }

  .hero { padding: 80px 0 70px; }
  .hero h1 { font-size: 1.9rem; letter-spacing: -0.3px; }
  .hero p { font-size: 1rem; }

  .section { padding: 64px 0; }
  .split-info h2 { font-size: 1.9rem; }
  .section-header h2 { font-size: 1.8rem; }

  .qb-grid { gap: 12px; justify-content: center; }
  .qb-item { flex: 1 1 42%; }
  .qb-num { font-size: 1.8rem; }

  .fac-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .fac-card.big { grid-row: auto; height: 220px; }
  .fac-card { height: 220px; }

  .news-grid { grid-template-columns: 1fr; gap: 20px; }
  .news-skeleton { height: 260px; }

  .contact-box { grid-template-columns: 1fr; }
  .ct-left, .ct-right { padding: 36px 28px; }
  .ct-left h2 { font-size: 1.7rem; }
  .form-actions-flex { flex-direction: column; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
  .fb-content { flex-direction: column; gap: 8px; text-align: center; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   Responsive — 480px: pantallas muy pequeñas
   ========================================================================== */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .split-info h2 { font-size: 1.6rem; }
  .qb-item { flex: 1 1 100%; }
  .sports-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v2 — Menú con desplegables (estructura cliente)
   ========================================================================== */
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-item > a, .nav-item > button {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--blue-medium);
  background: none; border: none; cursor: pointer; padding: 8px 0; white-space: nowrap;
  transition: color .25s ease;
}
.nav-item > button svg { transition: transform .25s ease; }
.nav-item:hover > a, .nav-item:hover > button,
.nav-item:focus-within > a, .nav-item:focus-within > button,
.nav-item > a.active, .nav-item > button.active { color: var(--red-nebrija); }
.nav-item:hover > button svg, .nav-item:focus-within > button svg { transform: rotate(180deg); }
.nav-item::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 18px; height: 2px;
  background: var(--red-nebrija); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-item:hover::after, .nav-item.current::after { transform: scaleX(1); }

.dropdown {
  position: absolute; top: 100%; left: -18px; min-width: 270px;
  background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
  border-top: 3px solid var(--red-nebrija);
  box-shadow: 0 18px 40px rgba(10,24,44,0.14);
  padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s ease; z-index: 120;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 20px; font-size: 0.85rem; font-weight: 600; color: var(--blue-dark); white-space: nowrap;
}
.dropdown a small { display: block; font-weight: 500; font-size: 0.74rem; color: var(--text-light); margin-top: 2px; }
.dropdown a:hover { background: var(--blue-light); color: var(--red-nebrija); padding-left: 24px; }
.ext-ico { flex-shrink: 0; opacity: .55; }

/* Menú móvil por grupos */
.nav-mobile-menu { max-height: calc(100vh - 80px); overflow-y: auto; }
.nav-mobile-menu details { border-bottom: 1px solid #edf2f7; }
.nav-mobile-menu summary {
  list-style: none; cursor: pointer; padding: 14px 32px; font-weight: 700; color: var(--blue-dark);
  display: flex; justify-content: space-between; align-items: center;
}
.nav-mobile-menu summary::-webkit-details-marker { display: none; }
.nav-mobile-menu details[open] summary { color: var(--red-nebrija); }
.nav-mobile-menu details[open] summary svg { transform: rotate(180deg); }
.nav-mobile-menu details a { padding: 10px 48px; font-weight: 500; font-size: 0.93rem; display: flex; gap: 8px; align-items: center; }
.nav-mobile-menu > a.m-top { border-bottom: 1px solid #edf2f7; padding: 14px 32px; font-weight: 700; }

/* ==========================================================================
   v2 — Iconos SVG (sustituyen emojis)
   ========================================================================== */
.ico-badge {
  width: 56px; height: 56px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(179,27,52,0.08); color: var(--red-nebrija); margin-bottom: 20px;
}
.ico-badge.blue { background: rgba(20,37,63,0.08); color: var(--blue-medium); }
.ct-line svg, .f-contact svg { flex-shrink: 0; color: var(--red-on-dark); }

/* ==========================================================================
   v2 — Nosotros + Misión / Visión integradas
   ========================================================================== */
.mv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 64px; }
.mv-card {
  position: relative; background: var(--blue-light); border-radius: var(--radius);
  padding: 40px 36px; border-left: 4px solid var(--red-nebrija); overflow: hidden;
}
.mv-card.blue { border-left-color: var(--blue-medium); }
.mv-card h3 { font-size: 1.35rem; color: var(--blue-dark); margin-bottom: 12px; }
.mv-card p { color: var(--text-main); font-size: 1rem; }
.mv-card .mv-num {
  position: absolute; right: 24px; top: 10px; font-size: 5rem; font-weight: 700; color: rgba(10,24,44,0.05); line-height: 1;
}
.split-img.stack { position: relative; }
.split-img .img-badge {
  position: absolute; left: -24px; bottom: 32px; background: var(--red-nebrija); color: var(--white);
  padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 230px;
}
.img-badge strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.img-badge span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: .9; }

/* ==========================================================================
   v2 — Galería campus
   ========================================================================== */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 16px; margin-top: 56px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: var(--shadow-md); }
.gallery figure:first-child { grid-row: 1 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(0.16,1,0.3,1); }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; color: var(--white); font-size: .85rem; font-weight: 600;
  background: linear-gradient(to top, rgba(10,24,44,.85), transparent);
}

/* ==========================================================================
   v2 — Áreas (accesos a secciones)
   ========================================================================== */
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.area-card {
  position: relative; min-height: 300px; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end;
  color: var(--white); box-shadow: var(--shadow-md); background: var(--blue-dark) center/cover no-repeat;
}
.area-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,24,44,.95) 10%, rgba(10,24,44,.25) 100%); transition: background .3s; }
.area-card:hover::before { background: linear-gradient(to top, rgba(10,24,44,.95) 25%, rgba(179,27,52,.45) 100%); }
.area-body { position: relative; padding: 28px; }
.area-kicker { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #fca5b4; }
.area-card h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.area-card p { font-size: .92rem; color: #e2e8f0; margin-bottom: 14px; }
.area-link { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.area-card:hover .area-link { gap: 10px; }
.area-card.solid { background: linear-gradient(135deg, var(--blue-medium), var(--blue-dark)); }
.area-card.red { background: linear-gradient(135deg, var(--red-nebrija), var(--red-hover)); }
.area-card.red::before, .area-card.solid::before { background: none; }

/* ==========================================================================
   v2 — Cabecera de páginas internas
   ========================================================================== */
.page-hero {
  position: relative; color: var(--white); padding: 96px 0 80px;
  background-color: var(--blue-dark); background-size: cover; background-position: center; background-repeat: no-repeat;
  border-bottom: 4px solid var(--red-nebrija);
}
.page-hero h1 { font-size: 2.8rem; line-height: 1.2; margin-bottom: 16px; max-width: 780px; }
.page-hero p { font-size: 1.12rem; color: #cbd5e1; max-width: 700px; }
.breadcrumb { font-size: .8rem; color: #94a3b8; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 6px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start; background: #fff7ed; border: 1px dashed #f59e0b;
  border-radius: var(--radius); padding: 16px 20px; color: #7c2d12; font-size: .9rem; margin-bottom: 40px;
}

/* ==========================================================================
   v2 — Banners de cursos (título + foto + descripción + horarios + CTA)
   ========================================================================== */
.course { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid #e2e8f0; margin-bottom: 32px; }
.course:nth-child(even) .course-media { order: 2; }
.course-media { min-height: 360px; background: var(--blue-medium) center/cover no-repeat; position: relative; }
.course-media.placeholder {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: rgba(255,255,255,.75);
  background: radial-gradient(circle at 30% 20%, #1d3557 0%, var(--blue-dark) 70%); font-size: .8rem; letter-spacing: 1px; text-transform: uppercase;
}
.course-tag { position: absolute; top: 20px; left: 20px; background: var(--red-nebrija); color: var(--white); font-size: .72rem;
  font-weight: 700; padding: 6px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; }
.course-body { padding: 44px; display: flex; flex-direction: column; }
.course-body h2 { font-size: 1.9rem; color: var(--blue-dark); margin-bottom: 12px; }
.course-body > p { color: var(--text-main); margin-bottom: 22px; }
.schedule { background: var(--blue-light); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 26px; }
.schedule h4 { display: flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--blue-dark); margin-bottom: 10px; }
.schedule ul { list-style: none; display: grid; gap: 6px; }
.schedule li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
.schedule li:last-child { border-bottom: none; padding-bottom: 0; }
.schedule li b { color: var(--blue-dark); font-weight: 600; }
.course-body .btn { align-self: flex-start; margin-top: auto; display: inline-flex; gap: 8px; align-items: center; }
.btn-dark { background: var(--blue-dark); color: var(--white); }
.btn-dark:hover { background: var(--blue-medium); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--blue-dark); color: var(--blue-dark); background: transparent; }
.btn-outline:hover { background: var(--blue-dark); color: var(--white); }

/* ==========================================================================
   v2 — Deportes (tarjetas con foto)
   ========================================================================== */
.sport-grid-v2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.sport-v2 { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid #e2e8f0; display: flex; flex-direction: column; transition: all .3s cubic-bezier(0.16,1,0.3,1); }
.sport-v2:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.sport-v2 .course-media { min-height: 240px; }
.sport-v2-body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.sport-v2 h3 { font-size: 1.4rem; color: var(--blue-dark); margin-bottom: 8px; }
.sport-v2 p { color: var(--text-light); font-size: .95rem; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { font-size: .74rem; font-weight: 600; color: var(--blue-medium); background: var(--blue-light); padding: 5px 10px; border-radius: 999px; }
.sport-v2 .btn { margin-top: auto; align-self: flex-start; padding: 11px 22px; font-size: .85rem; }

/* ==========================================================================
   v2 — Alquiler: elegir colectivo
   ========================================================================== */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.book-card { border-radius: var(--radius); padding: 44px 40px; color: var(--white); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.book-card.nebrija { background: linear-gradient(135deg, var(--red-nebrija), var(--red-hover)); }
.book-card.otros { background: linear-gradient(135deg, var(--blue-medium), var(--blue-dark)); }
.book-card .ico-badge { background: rgba(255,255,255,.15); color: var(--white); }
.book-card h3 { font-size: 1.6rem; margin-bottom: 10px; }
.book-card p { color: rgba(255,255,255,.85); margin-bottom: 18px; }
.book-card ul { list-style: none; margin-bottom: 28px; display: grid; gap: 8px; font-size: .92rem; }
.book-card li { display: flex; gap: 10px; align-items: center; }
.book-card .btn { margin-top: auto; align-self: flex-start; background: var(--white); color: var(--blue-dark); display: inline-flex; gap: 8px; align-items: center; }
.book-card .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.book-card .book-mail { margin-top: 14px; font-size: .85rem; color: rgba(255,255,255,.8); }

/* ==========================================================================
   v2 — Footer legal
   ========================================================================== */
.f-contact { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 10px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-legal a { color: #94a3b8; font-size: .82rem; }
.footer-legal a:hover { color: var(--white); }

/* ==========================================================================
   v2 — Animación de entrada
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   v2 — Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .split-img .img-badge { left: 16px; }
}
@media (max-width: 900px) {
  .course { grid-template-columns: 1fr; }
  .course:nth-child(even) .course-media { order: 0; }
  .course-media { min-height: 240px; }
  .sport-grid-v2, .book-grid, .mv-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 160px 160px; }
  .gallery figure:first-child { grid-column: 1 / 3; grid-row: auto; }
}
@media (max-width: 768px) {
  .areas-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 64px 0 56px; }
  .page-hero h1 { font-size: 2rem; }
  .course-body, .book-card { padding: 30px 24px; }
  .mv-grid { margin-top: 40px; }
  .nav-logo img { height: 34px; }
  .fb-content { gap: 14px; }
  .footer-legal { justify-content: center; }
}

/* ==========================================================================
   v3 — Accesibilidad
   ========================================================================== */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--blue-dark); color: var(--white);
  padding: 12px 18px; border-radius: var(--radius); font-weight: 700; font-size: .9rem; transition: top .2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red-nebrija); outline-offset: 3px; border-radius: 4px; }
.footer :focus-visible, .contact-box :focus-visible, .hero :focus-visible, .page-hero :focus-visible,
.quick-bar :focus-visible, .area-card:focus-visible, .book-card :focus-visible { outline-color: var(--white); }
.nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-item.open > button svg { transform: rotate(180deg); }
.nav-item.open > button { color: var(--red-nebrija); }

/* ==========================================================================
   v3 — Clases que sustituyen estilos en línea
   ========================================================================== */
.section-tag.tag-light { color: #cbd5e1; }
.hero p.hero-sub { font-size: 1.05rem; color: #cbd5e1; }
.split-info p.lead-strong { font-weight: 600; color: var(--blue-dark); }
.area-link-gap { margin-right: 18px; }
.ct-left p.ct-note { color: #cbd5e1; font-size: .95rem; margin-top: -20px; margin-bottom: 30px; }
.area-kicker { color: #f5a3b1; }

/* ==========================================================================
   v3 — Contacto: cómo llegar y RGPD
   ========================================================================== */
.ct-line small { color: #94a3b8; font-size: .85rem; }
.ct-line b { color: var(--white); }
a.ct-line:hover { color: var(--white); }
.btn-map {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 28px;
  background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.2);
}
.btn-map:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.form-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red-nebrija); flex-shrink: 0; cursor: pointer; }
.form-check label { font-size: .88rem; color: #cbd5e1; cursor: pointer; }
.form-check a { color: var(--white); text-decoration: underline; }
.form-legal { font-size: .74rem; line-height: 1.5; color: #94a3b8; margin-bottom: 22px; }
.form-legal b { color: #cbd5e1; font-weight: 600; }
a.f-contact { color: #94a3b8; margin-bottom: 10px; }
a.f-contact:hover { color: var(--white); padding-left: 0; }

/* ==========================================================================
   v3 — Volver arriba y barra fija móvil
   ========================================================================== */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  border: none; cursor: pointer; background: var(--red-nebrija); color: var(--white); box-shadow: 0 8px 20px rgba(10,24,44,.25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--red-hover); }
.mobile-cta { display: none; }

/* ==========================================================================
   v3 — Página 404
   ========================================================================== */
.hero-404 { padding: 120px 0; min-height: 60vh; display: flex; align-items: center; }
.e404-num { display: block; font-size: 6rem; font-weight: 700; line-height: 1; color: var(--red-on-dark); margin-bottom: 12px; }

@media (max-width: 768px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    box-shadow: 0 -6px 20px rgba(10,24,44,.15);
  }
  .mobile-cta a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 10px; font-weight: 700; font-size: .88rem; color: var(--white); }
  .mcta-info { background: var(--blue-dark); }
  .mcta-book { background: var(--red-nebrija); }
  body { padding-bottom: 56px; }
  .to-top { bottom: 72px; right: 16px; width: 44px; height: 44px; }
  .e404-num { font-size: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* v4 — Tarjeta ancha (evento destacado) */
.area-card.wide { grid-column: 1 / -1; min-height: 280px; background-position: center 30%; }
.area-card.wide::before { background: linear-gradient(90deg, rgba(10,24,44,.95) 15%, rgba(10,24,44,.35) 70%, rgba(179,27,52,.25) 100%); }
.area-card.wide .area-body { max-width: 560px; padding: 40px; }
.area-card.wide h3 { font-size: 1.8rem; }
.logo-noticia{position: absolute;right: 0;top: 0;}
.area-card .area-body.con-logo{padding-top: 60px}
@media (max-width: 768px) { 
  .area-card.wide .area-body { padding: 28px; } .area-card.wide h3 { font-size: 1.4rem; } 
  .area-card .area-body.con-logo{padding-top: 100px}
}

/* ==========================================================================
   v7 — Portada partida: texto a la izquierda, edificio a la derecha
   ========================================================================== */
.hero.hero-split {
  display: grid; grid-template-columns: 1fr 1fr; padding: 0; min-height: 620px;
  background: var(--blue-dark);
}
.hero-split .hero-content {
  max-width: none; margin: 0; align-self: center;
  padding: 80px 56px 80px max(32px, calc((100vw - 1200px) / 2 + 32px));
}
.hero-split h1 { font-size: 2.6rem; }
.hero-media {
  position: relative; min-height: 100%;
  background: url('../img/campus-edificio.jpg') 88% center / cover no-repeat;
}
.hero-media::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--red-nebrija);
}
@media (max-width: 1200px) {
  .hero-split h1 { font-size: 2.2rem; }
  .hero-split .hero-content { padding: 64px 40px 64px 24px; }
}
@media (max-width: 900px) {
  .hero.hero-split { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { order: -1; min-height: 280px; }
  .hero-media::before { top: auto; right: 0; width: auto; height: 5px; bottom: 0; }
  .hero-split .hero-content { padding: 48px 24px 56px; }
}
@media (max-width: 768px) {
  .hero-media { min-height: 240px; }
  .hero-split h1 { font-size: 1.9rem; }
  .hero-split .hero-content { padding: 40px 20px 48px; }
}

/* ==========================================================================
   v8 — Portada: degradado en el panel azul (contraste del texto comprobado)
   ========================================================================== */
.hero.hero-split {
  background:
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(179,27,52,.22) 0%, rgba(179,27,52,0) 70%),
    linear-gradient(150deg, #0a182c 0%, #102342 55%, #1a3358 100%);
}

/* ==========================================================================
   v8 — Menú sin solapes en anchos intermedios
   1) ≤1560px: el botón "Acceso / Área Privada" pasa a solo icono.
   2) ≤1280px: menú hamburguesa (antes 1200px).
   3) Red de seguridad JS (main.js): si aun así no cabe, activa la hamburguesa.
   ========================================================================== */
@media (max-width: 1560px) {
  .btn-nav-acceso .acc-txt { display: none; }
  .btn-nav-acceso { padding: 10px 12px; }
  .nav-links { gap: 20px; }
}
@media (max-width: 1280px) {
  .nav-links, .nav-divider { display: none; }
  .hamburger { display: flex; }
  .btn-nav-acceso .acc-txt { display: inline; }
  .btn-nav-acceso { padding: 9px 12px; }
}
body.nav-collapsed .nav-links, body.nav-collapsed .nav-divider { display: none; }
body.nav-collapsed .hamburger { display: flex; }
body.nav-collapsed .btn-nav-acceso .acc-txt { display: inline; }
@media (max-width: 480px) {
  .nav-logo img { height: 30px; }
}
