/* ===== Variables ===== */
:root{
  --header-h: 64px;
  --brand-gradient-start: #b3a5c2;
  --brand-gradient-end: #2C0A4F;
  --brand-light-text: #f0e6ff;
  /*--nav-bg: rgba(106, 146, 129, 0.993);*/
  /*--nav-bg: var(--brand-dark-purple);*/
  --nav-bg: linear-gradient(to right, var(--brand-gradient-start), var(--brand-gradient-end));
  /*--nav-bg-scrolled: rgba(83, 148, 121, 0.87);*/
  --nav-bg-scrolled: rgba(44,10,79,0.95);
  /*--nav-text: #360a7c;*/
  --nav-text: var(--brand-light-text);
  /*--nav-text-scrolled: #fff;*/
  --nav-text-scrolled: #ffffff;

  --control-size: 52px;
  --dot-size: 10px;
  --dot-gap: 8px;
  --ctrl-bg: rgba(0,0,0,0.35);
  --ctrl-bg-hover: rgba(0,0,0,0.55);
  --dot-color: rgba(255,255,255,0.55);
  --dot-active: white;
}

/* ===== Reset mínimo útil ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:#111; }

/* Empuja todo el contenido debajo del header fijo */
body{ padding-top: var(--header-h); }

/* ===== Header fijo ===== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: saturate(1.1) blur(6px);
  transition: background .2s ease, box-shadow .2s ease;
  color: var(--nav-text);
}
.site-header.is-scrolled{
  background: var(--nav-bg-scrolled);
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  color: var(--nav-text-scrolled);
}

.nav-inner{
  /*max-width: 1200px;*/
  /*margin: 0 auto;*/
  height: var(--header-h, 64px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 16px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:inherit;
  justify-self: start;
}
.brand img{ display:block; height:50px; }

.menu-toggle{
  display:none;
  width:44px;
  height:44px;
  padding: 0;
  background:transparent;
  cursor:pointer;
  color: var(--nav-text-scrolled, #c7bebe);
  border: 1px solid rgba(146, 140, 140, 0.5);
  border-radius: 8px;
  transition: background .2s ease, border-color .2s ease;
}
/* Efecto visual al pasar el mouse por encima */
.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}
.menu-toggle span{
  display:block;
  height:2px;
  margin:6px 8px;
  background:currentColor;
}

.nav-links{
  list-style:none; margin:0; padding:0;
  display:flex; gap:20px;
}
.nav-links a{
  color:inherit; text-decoration:none; font-weight:600;
  padding:10px 6px; border-radius:8px;
}
.nav-links a:hover{ background:rgba(255,255,255,.12); }

/* Móvil */
@media (max-width: 900px){
  .nav-inner{ grid-template-columns: auto 1fr; }
  .menu-toggle{ display:block; justify-self: end;}
  .nav-links{
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--nav-bg-scrolled);
    flex-direction: column;
    gap: 0;
    transform: translateY(-8px);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-header.menu-open .nav-links{
    max-height: 60vh; /* menú desplegado */
  }
  .nav-links li{ border-top: 1px solid rgba(255,255,255,.15); }
  .nav-links a{ display:block; padding:14px 16px; }
}

/* ===== Carrusel Full-Viewport (debajo del header fijo) ===== */

.carousel{
  position: relative;
  width: 100%;
  /* Resta la altura del header para que la imagen visible sea pantalla completa */
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}
@supports (height: 100dvh){
  .carousel{ height: calc(100dvh - var(--header-h)); }
}

.carousel-track{
  width: 100%; height: 100%;
}
.slide{
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}
.slide.is-active{ opacity: 1; z-index:2;}
.slide img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* Controles */
.control{
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: var(--control-size); height: var(--control-size);
  border-radius: 50%; border: 0;
  background: var(--ctrl-bg); color: #fff;
  font-size: 28px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
  z-index: 5;
}
.control:hover{ background: var(--ctrl-bg-hover); transform: translateY(-50%) scale(1.05); }
.control:active{ transform: translateY(-50%) scale(0.98); }
.control.prev{ left: 12px; }
.control.next{ right: 12px; }

/* Dots */
.dots{
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex; gap: var(--dot-gap);
  z-index: 5;
}
.dot{
  appearance: none; 
  padding: 0;
  width: var(--dot-size);
  height: var(--dot-size);
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--dot-color);
  line-height: 0;
  flex: 0 0 auto;
  transition: transform .2s ease, background .2s ease;
}
.dot:hover{ transform: scale(1.2); }
.dot.is-active{ background: var(--dot-active); }

/* Foco accesible */
.control:focus-visible, .dot:focus-visible{
  outline: 2px solid #fff; outline-offset: 2px;
}

/* Menos animación si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce){
  .carousel-track{ transition: none; }
}

/* --- Ajustes Responsivos para el Carrusel -- */
@media (max-width: 768px) {
    .carousel {
        height: auto;
        aspect-ratio: 2 / 1;
    }
    
    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }
}

/* ===== Próximos eventos (cards) ===== */
.events-section{padding: 3rem 0 4rem; background: radial-gradient(1200px 600px at 100% -10%, rgba(207, 135, 255, 0.08), transparent 60%)}
    .section-header {text-align: center; margin-bottom: 3rem; /* Aumentamos el espacio antes de las tarjetas */}
    .events-section .section-title{
      font-size: clamp(1.5rem, 1.8vw, 2rem);
      margin: 0 0 0.5rem 0;
      position: relative;
      display: inline-block;
      padding-bottom: 0.75rem;
    }
    /* Línea decorativa que usa el degradado de la marca */
.events-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Ancho de la línea */
    height: 4px;  /* Grosor de la línea */
    background: linear-gradient(to right, var(--brand-gradient-start), var(--brand-gradient-end));
    border-radius: 2px;
}
    .events-section .section-subtitle{
      color:#555; 
      font-size: 1.1rem;
      max-width: 600px;
      margin: 0 auto;
    }
    .events-grid{
      display:grid;
      gap: 1.25rem;
      max-width: 1200px; /* evita más de 3 columnas */
      margin: 0 auto;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      justify-content: center;
    }
    .event-card{
      display:flex; flex-direction:column; gap:.75rem;
      border-radius: 16px;
      background:#fff;
      box-shadow: 0 8px 24px rgba(0,0,0,.06);
      border: 1px solid rgba(0,0,0,.06);
      padding: 1rem;
      max-width: 560px; /* con 1 evento, no se hace gigante */
      justify-self:center;
      overflow:hidden;
    }
    .event-media{width:100%; border-radius:12px; overflow:hidden; background:linear-gradient(135deg,#f3e8ff,#fde1f3)}
    .event-media img{width:100%; height:auto; object-fit:cover; display:block}
    .event-body h3{margin:.25rem 0 .25rem; font-size: clamp(1.05rem, 1.2vw, 1.25rem); line-height:1.35}
    .event-subtitle{margin:0 0 .5rem 0; color:#7a7a7a; font-size:.95rem}
    .event-meta{list-style:none; padding:0; margin:.25rem 0 .5rem 0; font-size:.95rem}
    .event-meta li{margin:.25rem 0}
    .event-meta .k{font-weight:600}
    .event-footer{margin-top:auto; display:flex; justify-content:center; padding-top:.5rem}
    .btn-register{
      display:inline-block; text-decoration:none; font-weight:700;
      padding:.7rem 1.25rem; border-radius:999px;
      background: linear-gradient(135deg, #6a00f4, #ff2e97);
      color:#fff; box-shadow: 0 6px 16px rgba(106,0,244,.25);
      transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    }
    .btn-register:hover{transform: translateY(-1px); box-shadow: 0 12px 28px rgba(106,0,244,.28)}
    @media (max-width: 480px){
      .events-section{padding: 2rem 0 3rem}
      .event-card{padding:.9rem}
    }

/**** Estilos para la página de registro de formulario *******/
.inscription-section {padding-top: 1rem;}
.inscription-card{
    max-width: 550px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}
.event-banner-wrap{padding: 1.25rem 0 0}
.event-banner{display:block; margin:1rem auto; max-width:600px; width:100%; height:auto; border-radius:16px; box-shadow:0 12px 28px rgba(0,0,0,.12)}
.event-title{font-size:clamp(1.25rem, 2vw, 1.8rem); text-align:center; margin:.8rem 0 .25rem}
.event-subtitle{text-align:center; margin:0 0 1rem 0; color:#666}

.form-wrap{padding: 1.5rem}
.card{background:#fff; border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,.08); padding:1.25rem}
.form-card{max-width:980px; margin: 0 auto}
.form-card h2{margin:.25rem 0 1rem 0}
.grid{display:grid; grid-template-columns:1fr; gap:.9rem}
.field label{display:block; font-weight:600; margin:0 0 .3rem}
.field input, .field select{width:100%; padding:.85rem 1rem; border:1px solid #d8dce0; border-radius:10px; background:#f6f8fb}
.field small{display:block; color:#777; margin-top:.35rem}
.check{margin:.8rem 0 1rem}
.btn-primary{display:block; width:100%; padding:1rem; border:0; border-radius:12px; font-weight:700; color:#fff; background:linear-gradient(135deg, #6a00f4, #ff2e97); cursor:pointer}
.btn-primary:hover{filter:brightness(1.05)}

.alert{max-width:980px; margin: 0 auto 1rem; padding: .9rem 1rem; border-radius:12px}
.alert.success{background:#e8fff3; border:1px solid #b3f0cf; color:#145e3d}
.alert.error{background:#fff3f3; border:1px solid #ffd1d1; color:#8f1f1f}
/* Estilos para el checkbox legal */
.legal-acceptance {
    display: flex;
    gap: 0.75rem;
    font-size: 0.95rem;
    padding: 0.95rem 0;
    color: #495057;
}
.legal-acceptance input[type="checkbox"] {
    margin-top: 0.25rem; /* Alinea el checkbox con el texto */
    min-width: 18px; /* Tamaño mínimo para ser clicable */
    min-height: 18px;
    accent-color: var(--brand); /* Cambia el color del checkbox nativo */
}

.legal-acceptance label {
    margin-bottom: 0; /* Elimina el margen por defecto de la etiqueta */
    font-weight: normal;
}

.legal-acceptance a {
    color: var(--brand-dark-purple); /* Color del enlace, similar a tu logo */
    text-decoration: underline;
    font-weight: 600;
}

.message-area {
    margin-bottom: 1.5rem;
}

.error-message {
    color: #dc3545; /* Rojo para mensajes de error */
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media(min-width: 720px){
  .grid{grid-template-columns: repeat(2, 1fr)}
  .grid .field:nth-child(3){grid-column: 1 / -1}
  .grid .field:nth-child(5){grid-column: 1 / -1}
}

/* ===== Estilos para la página de detalle del curso (info_curso.php) ===== */
:root {
  --bg: #ffffff;
  --text: #1a1325;
  --muted: #6c6480;
  --brand: #2C0A4F;          /* coherente con el header del proyecto */
  --brand-2: #7C4DFF;        /* acento */
  --card: #f7f4fb;
  --stroke: #e7dff1;
  --ok: #10b981;
  /* Nota: Estas variables son específicas para esta página.
     Se pueden integrar con las variables globales si se refactoriza el CSS general. */
}

/* Hero */
.course-hero {
      background-color: #f4f7f9; /* Un color de fondo suave y profesional */
      text-align: center;
      padding: 2.0rem 0;
      border-bottom: 1px solid #e0e6ec;
    }
.course-badges-container {padding-top: 1rem; margin-bottom: 0.25rem;}
.course-badge { display: inline-block; background: #e9ecef; color: #495057; padding: .35rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.course-title { margin: .8rem 0 .25rem; font-size: clamp(1.6rem, 2.3vw + 1rem, 2.2rem); line-height: 1.2; }
.course-subtitle { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Grid */
.course-layout { display: grid;
   grid-template-columns: 1.7fr .95fr;
   gap: 2rem;
   align-items: start;
   padding-bottom: 4rem;
   margin-top: 2rem; }
.course-content { 
  min-width: 0; 
  background: #ffffff; /* Fondo blanco para que la sombra resalte */
  border: 1px solid #e7dff1; /* Borde sutil, a juego con la paleta */
  border-radius: 1rem; /* Esquinas redondeadas (16px) */
  box-shadow: 0 10px 24px rgba(44, 10, 79, .06); /* Sombra suave y profesional */
  padding: 1.5rem; /* Espacio interno para que el texto no toque los bordes */
}

/* Secciones */
.course-section + .course-section { margin-top: 2rem; }
.section-title { font-size: 1.15rem; margin: 0 0 .6rem; color: var(--brand); }
.checklist { list-style: none; padding: 0; margin: .4rem 0 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin: .4rem 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1rem; height: 1rem; border-radius: .3rem; background: var(--brand-2); mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="white" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>') center/contain no-repeat; }
.checklist.small li { margin: .25rem 0; }

/* Presentador */
.presenter-card { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; background: var(--card); border: 1px solid var(--stroke); border-radius: 1rem; padding: 1rem; }
.presenter-photo { border-radius: .75rem; object-fit: cover; width: 120px; height: 120px; }
.presenter-name { margin: .1rem 0 .2rem; }
.presenter-bio { margin: 0; padding-left: 1.1rem; }
.presenter-bio li { margin-bottom: .25rem; }

/* Barra lateral */
.info-panel {
  position: -webkit-sticky; /* Para compatibilidad con Safari */
  position: sticky;
  /* Se pega 1.5rem por debajo del header fijo.
     var(--header-h) viene del CSS principal y es la altura del header. */
  top: calc(var(--header-h) + 1.5rem);
  align-self: start;
}
.info-inner { background: var(--card); border: 1px solid var(--stroke); border-radius: 1rem; padding: 1.25rem; box-shadow: 0 10px 24px rgba(44,10,79,.06); }
.info-block + .info-block { margin-top: 1rem; }
.info-title { margin: 0 0 .5rem; font-size: 1rem; color: var(--brand); }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .4rem; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--stroke); }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); }

.price-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.price-list li { background: #fff; border: 1px solid var(--stroke); border-radius: .75rem; padding: .6rem .75rem; }
.price-list b { display: block; }
.price-list strong { display: block; font-size: 1.25rem; margin-top: .15rem; color: var(--brand); }
.hint { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }

/* CTAs */
.cta { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: .75rem; padding: .7rem 1rem; font-weight: 700; border: 2px solid transparent; }
.cta-primary { background: var(--brand); color: #fff; }
.cta-primary:hover { filter: brightness(1.05); }
.cta-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.cta-secondary:hover { background: rgba(124,77,255,.08); }

/* Mobile sticky bar */
.mobile-sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--stroke); box-shadow: 0 -8px 18px rgba(0,0,0,.06); display: none; z-index: 999; }
.mobile-sticky-inner { width: min(1100px, 92%); margin-inline: auto; padding: .6rem .5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.mobile-sticky-info { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.mobile-sticky-info .badge { font-size: .85rem; color: var(--brand); font-weight: 700; }
.mobile-sticky-info .when { color: var(--muted); font-size: .9rem; }

/* Responsivo */
@media (max-width: 980px) {
  .course-layout { grid-template-columns: 1fr; }
  .info-panel { display: none; }
  .mobile-sticky-bar { display: block; }
  body { padding-bottom: 64px; } /* evitar que la barra tape contenido */
}
@media (prefers-reduced-motion: no-preference) {
  .cta { transition: transform .12s ease; }
  .cta:active { transform: translateY(1px); }
}


  /* Estilos para los íconos de los eventos */
  .event-meta li {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espacio entre el ícono y el texto */
  }

  .event-icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    background-color: currentColor; /* Usa el color del texto */
    flex-shrink: 0;
    opacity: 0.7;
  }

  /* --- Definición de cada ícono usando máscaras CSS --- */

  /* Ícono de Calendario */
  .icon-calendar {
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z"/></svg>') center / contain no-repeat;
  }

  /* Ícono de Reloj */
  .icon-clock {
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>') center / contain no-repeat;
  }

  /* Ícono de Video (para modalidad virtual) */
  .icon-video {
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></svg>') center / contain no-repeat;
  }

  /* Ícono de Persona (para ponente) */
  .icon-person {
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') center / contain no-repeat;
  }

  /* Estilos para la biografía del ponente */
  .speaker-bio {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
  }
  .speaker-bio-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
  }
  .speaker-credentials {
    list-style: disc;
    padding-left: 1.25rem; /* Ajuste para que las viñetas no estén tan pegadas */
    margin: 0;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
  }
  .speaker-credentials li + li { margin-top: 0.35rem; }
  


.mobile-sticky-meta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .9rem;
}
.mobile-sticky-meta .event-icon {
    font-size: 1.1rem;
    opacity: .7;
}

#inscripcion-info {
    text-align: center;
    color: var(--brand);
    font-size: 1.5rem; /* Make it a bit larger */
    margin-bottom: 1rem;
}

.info-inner .btn-register {
    display: block;
    margin: 1rem auto 0;
    width: -moz-fit-content;
    width: fit-content;
}


/* temporal el modal para el registro*/
/* ===== Estilos para el Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  
  /* Oculto por defecto */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  color: #333;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
  max-width: 450px;
  width: 90%;
  text-align: center;
  
  /* Animación de entrada */
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.is-visible .modal {
  transform: translateY(0);
}

.modal h2 {
  margin: 0 0 0.75rem;
  color: var(--brand-dark-purple, #2C0A4F);
}

.modal p {
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
    .presenter-card {
    /* Cambiamos el grid a una sola columna */
    grid-template-columns: 1fr;
    /* Aumentamos el espacio entre la foto y el texto */
    gap: 1.5rem; 
    padding: 1.5rem;
  }

  .presenter-photo {
    /* Centramos la foto horizontalmente */
    margin: 0 auto; 
  }

  .presenter-info {
    /* Centramos el texto para un mejor balance visual */
    text-align: center; 
  }
  
  .presenter-bio {
      /* Alineamos las viñetas a la izquierda dentro del bloque centrado */
      display: inline-block;
      text-align: left;
      margin-top: 1rem;
  }
}

/* --- Estilos para la Página de Contacto --- */
.contact-header {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.contact-title {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.contact-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 500px;
    margin-inline: auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 4rem;
    align-items: flex-start;
}

.contact-form-container {
    background-color: #f0f2f5;
    border: 1px solid #e0e2e6;
}

.contact-form-container, .contact-info-container {
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.contact-info-container h3 {
    margin-top: 0;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-info-list li + li {
    margin-top: 1.5rem;
}

.contact-info-list .event-icon {
    font-size: 1.5rem;
    margin-top: 0.25rem;
    color: var(--brand);
}

.contact-info-list a {
    color: #333;
    text-decoration: none;
}

.contact-info-list a:hover {
    text-decoration: underline;
}

/* Responsive para la página de contacto */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* En móviles, aseguramos que los grupos de formulario se apilen verticalmente */
@media (max-width: 768px) {
    .contact-form .form-group {
        /* Aseguramos que los elementos tomen el ancho completo en pantallas pequeñas */
        width: 100%; 
        margin-bottom: 1.5rem; /* Aumentamos el espacio entre grupos para mejor legibilidad */
    }

    .contact-form label {
        display: block; /* Asegura que la etiqueta esté en su propia línea */
        text-align: left; /* Alineamos las etiquetas a la izquierda */
        margin-bottom: 0.5rem; /* Espacio debajo de la etiqueta */
        font-size: 0.95rem; /* Un poco más pequeña en móvil */
    }

    .contact-form input,
    .contact-form textarea {
        display: block; /* Asegura que los inputs/textareas estén en su propia línea */
        width: 100%; /* Ocupan todo el ancho disponible */
        padding: 0.75rem 1rem; /* Ajuste del padding para móviles */
        font-size: 1rem; /* Tamaño de fuente estándar */
        border-radius: 6px; /* Bordes ligeramente más pequeños */
    }

    /* Aseguramos que el botón también tome el ancho completo y tenga un buen margen */
    .contact-form .btn-primary {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1.1rem;
        margin-top: 1rem;
    }

    /* Ajustes específicos para el contenedor de información de contacto en móvil */
    .contact-info-container {
        padding: 1.5rem; /* Menos padding */
        margin-top: 2rem; /* Espacio extra entre el formulario y la info en móvil */
        background-color: #ffffff; /* Fondo blanco si el formulario tiene color */
    }
    
    .contact-info-list li {
        flex-direction: column; /* Apila icono y texto si el espacio es muy reducido */
        align-items: center; /* Centra los elementos apilados */
        text-align: center;
        gap: 0.5rem; /* Reduce el espacio entre el icono y el texto */
    }

    .contact-info-list li div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-info-list li strong {
        margin-bottom: 0.2rem;
    }

    .contact-info-list li .event-icon {
        margin-bottom: 0.5rem; /* Espacio entre icono y texto */
    }
}

/* --- Estilos para Páginas Legales (Privacidad, Términos, etc.) --- */
.legal-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
    max-width: 800px; /* Ancho de línea ideal para lectura */
}

.legal-page h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-page .last-updated {
    text-align: center;
    color: #6c757d;
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.legal-page p, .legal-page li {
    line-height: 1.7;
    color: #343a40;
}

.legal-page ul {
    padding-left: 20px;
}
/* Ajuste para anclas con header */
.legal-page section {
    scroll-margin-top: 100px;
}

/* --- Estilos para la Navegación de la Página Legal --- */
.legal-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 2.5rem;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    position: sticky;
    top: var(--header-h); /* Se pega debajo del header principal */
    z-index: 900;
}

.legal-nav a {
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.legal-nav a:hover {
    background-color: #e9ecef;
    color: #000;
}

/* Ajuste para que las anclas no queden ocultas por los headers */
.legal-page section {
    scroll-margin-top: 150px; /* Aumentamos el espacio */
}

/* Responsive para el menú legal */
@media (max-width: 600px) {
    .legal-nav {
        flex-direction: column;
        align-items: center;
    }
}

/* --- Estilos para la Página "Sobre Nosotros" --- */
.about-hero {
    padding: 4rem 1rem;
    background-color: var(--brand-dark-purple, #2C0A4F);
    background: var(--nav-bg); /* Reutilizamos el degradado del header */
    color: white;
    text-align: center;
}

.about-hero-content {
    max-width: 800px;
}

.about-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.about-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.team-section {
    padding: 4rem 1rem;
    text-align: center;
}

.team-section .section-title {
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-member-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

.team-member-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid #f0e6ff;
}

.team-member-card h3 {
    margin: 0 0 0.25rem;
}

.team-member-card span {
    display: block;
    color: var(--brand);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-member-card p {
    color: #6c757d;
    line-height: 1.6;
}

/*--------------*/
/* --- ESTILOS MEJORADOS PARA LA PÁGINA DE INSCRIPCIÓN --- */

/* Contenedor principal de la página de inscripción */
.inscription-section {
    padding: 2rem 0 4rem 0; /* Espacio arriba y abajo */
}

/* Tarjeta que contiene el banner y el formulario */
.inscription-card {
    background: #fff;
    border-radius: 16px; /* Bordes más redondeados */
    box-shadow: 0 15px 40px rgba(0,0,0,.1);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
}

/* Banner superior de la tarjeta */
.inscription-card .event-banner {
    width: 100%;
    height: 200px; /* Altura controlada */
    object-fit: cover;
    display: block;
    /* ¡AQUÍ ESTÁ LA SEPARACIÓN! */
    margin-bottom: 2.5rem; 
}

/* Contenedor del formulario */
.form-wrap {
    padding: 0 2.5rem 2.5rem 2.5rem; /* Ajustamos padding para que no haya arriba */
}

/* Título del formulario */
.form-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    line-height: 1.3;
}
.form-title span {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--brand);
    font-weight: normal;
    margin-top: 0.5rem;
}

/* Grid para los campos del formulario */
.form-card .grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem; /* Más espacio entre campos */
}

/* Estilo para los campos de texto y select al hacerles foco */
.form-card input[type="text"]:focus,
.form-card input[type="email"]:focus,
.form-card input[type="tel"]:focus,
.form-card select:focus {
    outline: none;
    border-color: var(--brand); /* Color de tu marca */
    box-shadow: 0 0 0 3px rgba(167, 123, 245, 0.3); /* Resplandor suave */
}

/* Responsive para la tarjeta y formulario */
@media (max-width: 768px) {
    .inscription-card .event-banner {
        height: 150px;
        margin-bottom: 1.5rem;
    }
    .form-wrap {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    .form-card .grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
}

/* --- Estilos para la Cuenta Regresiva --- */
.countdown-block {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--stroke);
    margin-bottom: 1rem;
}
.countdown-timer {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.countdown-timer .dd {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--stroke);
    min-width: 50px;
}
.countdown-timer b {
    font-size: 1.75rem;
    color: var(--brand);
    line-height: 1;
}
.countdown-timer small {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .05em;
}
/* --- fin del bloque de estilos para el contador --- */

/* --- WhatsApp Flotante con Texto Siempre Visible (Versión Final) --- */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Alinea contenido a la derecha */
    text-decoration: none;
    gap: 15px; /* Espacio entre el texto y el ícono */
}

.whatsapp-icon-container {
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Evita que el ícono se encoja */
}

.whatsapp-text-container {
    background-color: white;
    color: #1E2328;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
}

/* --- ESTILOS PARA PANTALLA GRANDE (ESCRITORIO) --- */
@media (min-width: 769px) {
    /* Animación de hover solo en escritorio */
    .whatsapp-float:hover .whatsapp-icon-container {
        background-color: #1DA851;
        transform: rotate(360deg) scale(1.1);
    }
    
    /* Animación de pulso solo en escritorio */
    .whatsapp-icon-container svg {
        animation: whatsappPulse 2s infinite ease-in-out;
    }

    @keyframes whatsappPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.08); }
        100% { transform: scale(1); }
    }
}

/* --- ESTILOS PARA PANTALLA PEQUEÑA (MÓVIL) --- */
@media (max-width: 768px) {
    /* Unimos el texto y el botón en una sola "píldora" */
    .whatsapp-float {
        background-color: #25D366;
        border-radius: 30px;
        padding: 5px 10px 5px 10px; /* Espaciado interno */
        gap: 5px; /* Espacio menor entre texto e icono */
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-icon-container {
        width: 45px; /* Círculo del icono más pequeño */
        height: 45px;
        box-shadow: none; /* Quitamos la sombra del círculo, ya la tiene el contenedor principal */
    }

    .whatsapp-text-container {
        background-color: transparent; /* Fondo transparente */
        color: white; /* Texto blanco */
        box-shadow: none; /* Sin sombra */
        padding: 0;
        font-size: 0.95rem;
    }
    
    .whatsapp-icon-container svg {
       width: 30px;
       height: 30px;
    }
}