/* ===========================
   BASE
=========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

:root {
  --header-bg-solid: rgba(0,0,0,0.96);
  --header-gradient: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,0));
  --pink: #ff66b3;
}

@media (prefers-reduced-motion: no-preference) {
  :root { --t-fast: .25s; --t-mid: .4s; }
}

/* ===========================
   HEADER
=========================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  background: transparent; /* arriba: transparente (degradado visible) */
  transition: background-color var(--t-mid, .35s) ease;
}
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; z-index: 1; }
.logo img { height: 88px; display: block; }

.header-gradient {
  position: absolute;
  inset: 0;
  background: var(--header-gradient);
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--t-mid, .35s) ease;
}

/* Estado sólido al hacer scroll */
.site-header.header-solid {
  background-color: var(--header-bg-solid);
}
.site-header.header-solid .header-gradient {
  opacity: 0; /* ocultamos el velo en estado sólido */
}

.main-nav ul { display: flex; gap: 32px; list-style: none; }
.main-nav a { font-weight: 400; transition: color var(--t-fast, .2s) ease; }
.main-nav a:hover, .main-nav a.active { color: var(--pink); }

/* CTA header */
.btn-primary {
  background: var(--pink);
  color: #fff; font-weight: 600;
  padding: 10px 20px; border-radius: 50px;
  transition: transform var(--t-mid, .3s) ease, background var(--t-mid, .3s) ease;
}
.btn-primary:hover { background: #ff85c4; transform: scale(1.05); }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  z-index: 0; /* crea stacking context separado del header */
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('images/imagen.jpg');
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
  margin-top: 80px;
}

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 50px;
  margin-bottom: 24px;
}
.badge-icon { color: var(--pink); }

/* Titulares */
.hero-title { font-size: clamp(2.2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.2; margin-bottom: 18px; }
.accent { color: var(--pink); }
.hero-subtitle { font-size: 1.05rem; font-weight: 300; color: #ccc; line-height: 1.6; margin-bottom: 32px; }

/* Botones hero */
.hero-ctas { display: flex; justify-content: center; gap: 16px; margin-bottom: 40px; }
.btn { padding: 10px 22px; border-radius: 50px; font-weight: 500; transition: background var(--t-mid,.3s) ease, transform var(--t-mid,.3s) ease; }
.btn-light { background: var(--pink); color: #fff; }
.btn-light:hover { background: #ff85c4; }
.btn-ghost { border: 1px solid #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Métricas */
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 20px; flex-wrap: wrap; }
.stat { text-align: center; min-width: 120px; }
.stat-number { font-size: 2rem; font-weight: 700; color: #fff; }
.stat-label { font-size: .9rem; color: #bbb; }
/* ==== HERO con video de fondo ==== */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.05) brightness(0.9);
  transform: scale(1.03);
  transition: filter 1s ease;
}

.hero-video::-webkit-media-controls {
  display: none !important; /* oculta controles en Safari */
}

/* Hover sutil si quieres */
.hero:hover .hero-video {
  filter: saturate(1.2) contrast(1.1) brightness(1);
}



/* ===========================
   SECCIONES
=========================== */
.section { padding: 96px 0; }
.about { background: #000; }
.section-title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; text-align: center; line-height: 1.15; margin-bottom: 12px; }
.divider { width: 180px; height: 2px; background: rgba(255,255,255,.7); margin: 12px auto 36px; border-radius: 2px; }
.about-body { max-width: 860px; margin: 0 auto; font-size: 1.05rem; line-height: 1.9; color: #e6e6e6; }
.about-body p + p { margin-top: 18px; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }




/* ================== FORMATS ================== */
.section-subtitle{
  text-align:center;
  margin: 8px auto 42px;
  max-width: 760px;
  color:#cfcfcf;
  font-weight:300;
  line-height:1.6;
}

.formatos { background:#000; }

.formatos-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.format-card{
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 18px;
  padding: 22px;
  min-height: 180px;
  display:flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.format-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.04);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}

.format-icon{
  width:56px; height:56px;
  border-radius:14px;
  background:#fff;
  color:#000;
  display:grid; place-items:center;
  margin-bottom:14px;
}

.format-title{
  font-size:1.15rem;
  font-weight:700;
  margin-bottom:6px;
}

.format-desc{
  color:#d9d9d9;
  line-height:1.7;
  font-weight:300;
}



/* ===== Sección sin contorno; cards con borde; scrollbar minimal; fades notorios ===== */
.ediciones{ --editions-bg:#111; background:var(--editions-bg); }

.editions-scroll{
  position:relative;
  background:transparent !important;
  border:0 !important; outline:none !important; box-shadow:none !important; border-radius:0 !important;
  padding:0;
  max-height:520px;
  overflow:auto;
  scrollbar-gutter:stable;
}

/* grid interno con padding para respirar */
.editions-list{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  padding:24px;
}

/* cards */
.edition-card{
  border:1.5px solid rgba(255,255,255,.35);
  border-radius:18px;
  background:#202020;
  padding:20px;
  transition:border-color .25s ease, transform .25s ease, background-color .25s ease;
}
.edition-card:hover{ border-color:rgba(255,255,255,.85); transform:translateY(-2px); background:#222; }

.edition-card__row{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }

/* chips (incluye Online/Presencial y Edición X) */
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 14px; border-radius:999px;
  font-size:.9rem; color:#fff; border:1.5px solid rgba(255,255,255,.6); background:transparent;
}
.pill--solid{ background:#fff; color:#000; border-color:#fff; }
.pill--ghost{ background:transparent; color:#fff; }

.edition-title{ font-size:1.15rem; font-weight:700; margin:10px 0 12px; }
.edition-meta{ display:flex; gap:24px; list-style:none; margin:0 0 14px; padding:0; color:#d7d7d7; font-weight:300; }
.meta-item{ display:inline-flex; align-items:center; gap:8px; }

.tags{ display:flex; gap:12px; flex-wrap:wrap; margin-top:6px; }
.chip{
  display:inline-flex; align-items:center; padding:8px 14px; border-radius:999px;
  background:linear-gradient(#f0f0f0,#cfcfcf); color:#000; font-weight:500;
}


/* scrollbar elegante */
.editions-scroll{ scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.96) transparent; }
.editions-scroll::-webkit-scrollbar{ width:10px; }
.editions-scroll::-webkit-scrollbar-track{ background:transparent; margin:14px 0; }
.editions-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.96); border-radius:999px;
  border:3px solid transparent; background-clip:padding-box;
}
.editions-scroll::-webkit-scrollbar-thumb:hover{ background:#fff; }

/* responsive */
@media (max-width:980px){
  .editions-list{ grid-template-columns:1fr; }
  .editions-scroll{ max-height:600px; }
}




/* ================== ÁREAS DE CONOCIMIENTO ================== */
.areas { background:#000; }

.areas-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:24px;
  margin-top: 10px;
}

.area-card{
  position:relative;
  border:1.5px solid rgba(255,255,255,.65);
  border-radius:18px;
  overflow:hidden;
  min-height: 220px;
  background: #111;
  isolation:isolate;            /* asegura capas correctas */
  cursor:default;
}

/* Imagen de fondo */
.area-card::after{
  content:"";
  position:absolute; inset:0;
  background-image: var(--img);
  background-size: cover; 
  background-position: center;
  filter: saturate(.9) contrast(.95);
  transform: scale(1.02);
  transition: transform .35s ease, filter .35s ease;
  z-index: 0;
}

/* Degradado negro → transparente (elige dirección con la clase) */
.area-card::before{
  content:"";
  position:absolute; inset:0;
  z-index: 1;
  pointer-events:none;
  /* valor default (izquierda) por si no se pone modificador */
  background: linear-gradient(to right, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 80%);
}

/* Modificadores de dirección */
.overlay-left::before{
  background: linear-gradient(to right, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 80%);
}
.overlay-right::before{
  background: linear-gradient(to left, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 80%);
}
.overlay-bottom::before{
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 80%);
}

/* Contenido encima del degradado (colocado en la zona negra) */
.area-content{
  position: relative;
  z-index: 2;
  padding: 22px;
  max-width: 70%;
  color: #f1f1f1;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.overlay-right .area-content{ margin-left:auto; text-align:right; }
.overlay-bottom .area-content{ margin-top:auto; }

/* Tipografía */
.area-content h3{
  font-size: 1.15rem;
  font-weight: 800;
}
.area-content p{
  color:#d9d9d9;
  font-weight:300;
  line-height:1.6;
}

/* Hover sutil */
.area-card:hover::after{
  transform: scale(1.06);
  filter: saturate(1) contrast(1);
}
.area-card:hover{
  border-color: rgba(255,255,255,.9);
}

/* Responsive */
@media (max-width: 1024px){ .areas-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){
  .areas-grid{ grid-template-columns: 1fr; }
  .area-content{ max-width: 85%; }
}

/* Reveal hereda tu sistema [data-reveal] */

/* ===== Responsive ===== */
@media (max-width: 1100px){
  .formatos-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px){
  .formatos-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px){
  .formatos-grid{ grid-template-columns: 1fr; }
  .format-card{ padding:18px; }
  .format-icon{ width:52px; height:52px; border-radius:12px; }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .hero-stats { gap: 24px; }
}

/* Accesibilidad foco teclado */
.using-keyboard :focus { outline: 2px solid var(--pink); outline-offset: 2px; }


/* ================== Newsletter ================== */
.newsletter { background:#111; padding-top:64px; padding-bottom:90px; }

.newsletter-card{
  border:1.5px solid rgba(255,255,255,.35);
  border-radius:18px;
  padding:28px;
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap:28px;
  align-items:center;
  background:#1a1a1a;
}

.pill-with-icon{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 14px; border-radius:999px;
  font-size:.92rem; color:#fff;
  border:1.5px solid rgba(255,255,255,.5);
  background:transparent; margin-bottom:16px;
}
.newsletter-title{ font-size: clamp(1.8rem, 3.5vw, 2.2rem); line-height:1.15; font-weight:800; margin-bottom:12px; }
.newsletter-copy{ color:#d7d7d7; line-height:1.7; margin-bottom:10px; max-width:42ch; }
.newsletter-note{ color:#bcbcbc; font-size:.95rem; margin-top:8px; }
.newsletter-left{ padding:8px; }

.newsletter-form{
  display:grid; grid-template-columns: 1fr; gap:12px;
  justify-items:start; align-content:center;
}
.newsletter-form input{
  width:100%; height:48px; border-radius:999px;
  border:1.5px solid rgba(255,255,255,.35);
  background:transparent; color:#fff;
  padding:0 18px; outline:none;
  transition:border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.newsletter-form input::placeholder{ color:#b6b6b6; }
.newsletter-form input:focus{
  border-color:#fff; box-shadow:0 0 0 4px rgba(255,255,255,.08);
}

.newsletter-form .btn{ width:100%; height:48px; border-radius:999px; font-weight:700; }
.newsletter-legal{ color:#a9a9a9; font-size:.85rem; margin-top:6px; }
.form-feedback{ min-height:22px; font-size:.95rem; color:#ddd; }
.form-feedback.success{ color:#8dffa6; }
.form-feedback.error{ color:#ff9a9a; }

/* Responsive */
@media (max-width:980px){
  .newsletter-card{ grid-template-columns:1fr; padding:22px; }
  .newsletter-left{ padding:0; }
}
@media (max-width:520px){
  .newsletter{ padding-top:48px; padding-bottom:70px; }
}
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* ================== FOOTER ================== */
.site-footer{
  background:#111;
  color:#fff;
  padding:48px 0 30px;
  font-size:.95rem;
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:18px;
}

.footer-logo{
  height:100px;
  filter:brightness(100%);
}

.footer-mail{
  color:#fff;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:400;
  transition:color .25s ease;
}
.footer-mail:hover{ color:var(--pink); }

.footer-divider{
  border:none;
  border-top:1px solid rgba(255,255,255,.15);
  margin:24px 0;
}

.footer-bottom{
  text-align:center;
  font-size:.85rem;
  color:#aaa;
}

/* Responsive */
@media(max-width:640px){
  .footer-inner{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.newsletter-form .btn {
  width: auto;
  min-width: 220px;
  font-weight: 700;
}
/* Imagen en hover para cards de ediciones (respeta layout existente) */
.edition-card.has-photo{
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.edition-card.has-photo > *{ position:relative; z-index:2; }

/* Capa imagen */
.edition-card.has-photo::after{
  content:"";
  position:absolute; inset:0;
  background-image: var(--bg);
  background-size:cover; background-position:center;
  opacity:0; transform:scale(1.02);
  transition:opacity .35s ease, transform .35s ease, filter .35s ease;
  z-index:0; filter:saturate(.95) contrast(1);
}
/* Degradado */
.edition-card.has-photo::before{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.28) 100%);
  opacity:0; transition:opacity .35s ease; z-index:1;
}

/* Estado hover/focus: muestra imagen y mejora contrastes */
.edition-card.has-photo:hover::after,
.edition-card.has-photo:focus-within::after{ opacity:1; transform:scale(1.06); }
.edition-card.has-photo:hover::before,
.edition-card.has-photo:focus-within::before{ opacity:1; }

/* Ajustes de color sobre imagen */
.edition-card.has-photo:hover,
.edition-card.has-photo:focus-within{
  background:transparent;
  border-color:rgba(255,255,255,.85);
}
.edition-card.has-photo:hover .edition-title,
.edition-card.has-photo:focus-within .edition-title{ color:#fff; }
.edition-card.has-photo:hover .edition-meta,
.edition-card.has-photo:focus-within .edition-meta{ color:#ececec; }
.edition-card.has-photo:hover .pill,
.edition-card.has-photo:focus-within .pill{ border-color:#fff; color:#fff; }
.edition-card.has-photo:hover .pill--solid,
.edition-card.has-photo:focus-within .pill--solid{ background:#fff; color:#000; border-color:#fff; }
.edition-card.has-photo:hover .chip,
.edition-card.has-photo:focus-within .chip{ background:#fff; color:#000; }
/* ==== Hover con imagen para las cards de ediciones ==== */
.edition-card.has-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.edition-card.has-photo > * {
  position: relative;
  z-index: 2;
}

/* Imagen de fondo */
.edition-card.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: var(--bg-pos, center);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
  z-index: 0;
  filter: saturate(0.95) contrast(1);
}

/* Degradado oscuro encima de la imagen */
.edition-card.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.55) 55%,
    rgba(0, 0, 0, 0.28) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

/* Hover y focus */
.edition-card.has-photo:hover::after,
.edition-card.has-photo:focus-within::after {
  opacity: 1;
  transform: scale(1.06);
}
.edition-card.has-photo:hover::before,
.edition-card.has-photo:focus-within::before {
  opacity: 1;
}

/* Colores al hover */
.edition-card.has-photo:hover,
.edition-card.has-photo:focus-within {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
}
.edition-card.has-photo:hover .edition-title,
.edition-card.has-photo:focus-within .edition-title {
  color: #fff;
}
.edition-card.has-photo:hover .edition-meta,
.edition-card.has-photo:focus-within .edition-meta {
  color: #ececec;
}
.edition-card.has-photo:hover .pill,
.edition-card.has-photo:focus-within .pill {
  border-color: #fff;
  color: #fff;
}
.edition-card.has-photo:hover .pill--solid,
.edition-card.has-photo:focus-within .pill--solid {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.edition-card.has-photo:hover .chip,
.edition-card.has-photo:focus-within .chip {
  background: #fff;
  color: #000;
}
