/* ---------- PALETA OTOÃ‘AL (valores por defecto editables) ---------- */
:root {
  --bg: #f6f2ee;
  --panel-bg: #fff;
  --text: #2b2b2b;
  --muted: #7a6d60;
  --accent: #a94f2e; /* tono terracota */
  --accent-2: #c98f62; /* tono marrÃ³n claro */
  --shadow: rgba(40, 30, 20, 0.08);
  --radius: 12px;
  --max-width: 1100px;
}
/* Reset bÃ¡sico */
* { box-sizing: border-box }
html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: url('img/Fondo.jpg') no-repeat center center fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Top nav fijo */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px var(--shadow);
  z-index: 1000;
}
.topnav nav {
  height: 100%;
  display: flex; align-items: center; justify-content: center
}
.topnav ul {
  list-style: none; display: flex; gap: 18px; margin: 0; padding: 0 20px;
}
.topnav a {
  text-decoration: none; color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-weight: 600;
}
.topnav a.active {
  background: linear-gradient(90deg, rgba(169, 79, 46, 0.12), rgba(201, 143, 98, 0.06));
  border-bottom: 3px solid var(--accent);
}
/* Main */
main#main {
  margin-top: 64px; /* este valor serÃ¡ sobreescrito por el bloque FULLSCREEN */
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.panel {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
/* Imagen hero */
.panel-image { background-size: cover; background-position: center; position: relative; overflow: hidden; }
.hero-overlay { width: 100%; max-width: var(--max-width); padding: 40px; background: transparent; color: #fff; text-align: center; border-radius: var(--radius); position: relative; z-index: 5; }
.hero-title { font-family: "Dancing Script", cursive; font-size: clamp(48px, 10vw, 96px); margin: 0; letter-spacing: 2px; font-weight: 400; text-shadow: 2px 2px 4px rgba(0,0,0,.3); }
.hero-paragraph { font-family: "Dancing Script", cursive; font-size: clamp(30px, 2.5vw, 20px); text-align: center; margin: 0; letter-spacing: 1px; font-weight: 400; text-shadow: 1px 1px 2px rgba(0,0,0,.2); }
.hero-sub { margin: 0 0 16px; opacity: .95 }
.hero-cta { display: inline-block; margin-top: 8px; padding: 10px 18px; background: var(--accent); color: #fff; text-decoration: none; border-radius: 8px; font-weight: 700 }
/* Contenido general */
.panel-content { background: rgba(255,255,255,.5); }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 40px; }
/* TipografÃ­a y utilidades */
h2 { margin: 0 0 12px; font-size: 28px; color: var(--accent) }
.muted { color: var(--muted); margin-bottom: 8px; font-family: Brush Script MT; }
.note { margin-top: 12px; color: var(--muted) }
/* Contador */
.contador { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 24px; justify-content: center; }
.contador-item { background: var(--panel-bg); box-shadow: 0 6px 18px var(--shadow); padding: 10px 18px; border-radius: 10px; text-align: center; min-width: 90px; }
.contador-item div { font-size: 22px; font-weight: 700; color: var(--accent) }
.contador-item span { display: block; font-size: 12px; color: var(--muted) }
/* FOTO HERO (SecciÃ³n fullscreen) */
#foto.panel-photo-hero { min-height: 100vh; padding: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.photo-hero { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.photo-hero img { width: 80%; height: 100%; object-fit: cover; display: block; }
#foto .photo-countdown { position: absolute; top: 25%; left: 50%; transform: translateX(-50%); z-index: 10; margin: 0; }
#foto .photo-countdown.contador { gap: 18px; }
#foto .photo-countdown .contador-item { padding: 16px 28px; min-width: 120px; }
#foto .photo-countdown .contador-item div { font-size: 32px; }
#foto .photo-countdown .contador-item span { font-size: 14px; }
/* Foto a pantalla completa con countdown superpuesto */
.full-width-photo-container { position: relative; width: 100vw; height: 100vh; left: 50%; right: 50%; margin: 24px -50vw; margin-left: -50vw; margin-right: -50vw; }
.full-width-photo { width: 100%; height: 100%; }
.full-width-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.full-width-photo-container .contador { position: absolute; top: 25%; left: 50%; transform: translateX(-50%); z-index: 10; }


/* === Contador más pequeño en móvil (markup actual: texto plano en #countdown) === */
@media (max-width: 768px) {
  #countdown {
    font-size: clamp(14px, 3.8vw, 18px); /* reduce un poco en tablets/móviles */
    line-height: 1.2;
    letter-spacing: 0.4px;
    text-align: center;
    font-weight: 600; /* opcional: mejor legibilidad con tamaño menor */
  }

  /* Opcional: recoloca el contador un poco más arriba en móvil */
  #foto .photo-countdown {
    top: 8%;
  }
}

@media (max-width: 480px) {
  #countdown {
    font-size: clamp(12px, 4.2vw, 16px); /* más compacto en móviles pequeños */
  }

  /* Ajuste fino de la posición en móviles pequeños */
  #foto .photo-countdown {
    top: 1%;
  }
}

/* Mapa */
.map-wrapper { margin-top: 18px; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 30px var(--shadow) }
.map-wrapper iframe { width: 100%; height: 300px; border: 0; display: block }
/* Formulario */
.form-container { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 600; color: var(--text); font-size: 16px; }
.form-group input, .form-group select { padding: 14px 16px; border-radius: 10px; border: 1px solid #e4dcd3; background: var(--panel-bg); color: var(--text); font-size: 15px; font-family: inherit; transition: all .3s ease; box-shadow: 0 2px 6px var(--shadow); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 4px 12px rgba(169,79,46,.15); background: #fefdfb; }
.form-group input::placeholder { color: #b0a89d; }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a94f2e' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
/* FAQ */
.faq-container { margin-top: 20px; }
.faq-item { margin-bottom: 12px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px var(--shadow); background: var(--panel-bg); }
.faq-question { width: 100%; padding: 16px 20px; border: none; background: linear-gradient(90deg, #f9f6f2, #fefdfb); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--text); font-size: 16px; transition: all .3s ease; }
.faq-question:hover { background: linear-gradient(90deg, #f0ebe5, #f8f6f2); color: var(--accent); }
.faq-icon { font-size: 20px; transition: transform .3s ease; color: var(--accent); }
.faq-item.active .faq-question { background: linear-gradient(90deg, rgba(169,79,46,.08), rgba(201,143,98,.04)); color: var(--accent); }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0 20px; margin: 16px 0; color: var(--muted); line-height: 1.6; }
.faq-answer p:first-child { padding-top: 8px; }
.faq-answer p:last-child { padding-bottom: 16px; }
/* Carrusel estilos base */
.panel-hero { background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.05)); padding: 40px 20px; display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); }

.carousel{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
}
.carousel-title { position: absolute; 
  top: 20%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  z-index: 20; 
  font-family: 'Great Vibes', cursive; 
  font-size: clamp(52px, 12vw, 120px); 
  margin: 0; 
  letter-spacing: 3px; 
  font-weight: 400; color: #fff; 
  text-shadow: 3px 3px 8px rgba(0,0,0,.4), 0 0 20px rgba(0,0,0,.2); 
  text-align: center; 
  animation: fadeInTitle 1s ease-out; 
width: 65%; height: auto;}

.slides{
  position:absolute;
  inset:0;
  display:flex;
  gap:0;
  width:max-content;   /* <- clave: el track crece con TODAS las slides */
  height:100%;
  will-change:transform;
}

.slide{
  flex:0 0 100vw;      /* <- una slide ocupa 100% del viewport */
  width:100vw;
  height:100vh;
  position:relative;
}

.slide img{
  width:100%;
  height:100%;
  object-fit:cover;    /* <- soporta resoluciones distintas sin deformar */
  display:block;
}

.control { position: absolute; top: 50%; transform: translateY(-50%); border: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); color: #fff; font-size: 32px; cursor: pointer; transition: all .3s ease; z-index: 10; backdrop-filter: blur(4px); border: 2px solid rgba(255,255,255,.3); }
.control:hover { background: rgba(255,255,255,.4); transform: translateY(-50%) scale(1.1); border-color: rgba(255,255,255,.6); }
.control.prev { left: 20px; }
.control.next { right: 20px; }
.indicators { position: absolute; left: 0; right: 0; bottom: 25px; display: flex; gap: 10px; justify-content: center; z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.5); border: 2px solid rgba(255,255,255,.3); cursor: pointer; transition: all .3s ease; }
.dot:hover { background: rgba(255,255,255,.7); transform: scale(1.15); }
.dot.is-active { background: #fff; border-color: #fff; transform: scale(1.2); }
.btn { padding: 10px 16px; border-radius: 10px; border: none; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer }
/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 700ms cubic-bezier(.2,.9,.3,1); will-change: transform, opacity }
.reveal.show { opacity: 1; transform: translateY(0) }
/* Responsive */
@media (max-width:900px) {
  .hero-overlay { padding: 28px }
  /* Carrusel mÃ¡s compacto (serÃ¡ sobreescrito por FULLSCREEN) */
  .carousel { width: 95vw; height: 70vh; max-width: 100%; max-height: 600px; }
  .carousel-title { font-size: clamp(36px, 8vw, 72px); }
}
@media (max-width:768px) {
  .panel-hero { min-height: 65vh; padding: 15px 10px; }
  .carousel { width: 90vw; height: 50vh; max-height: 450px; }
  .carousel-title { font-size: clamp(28px, 7vw, 52px); }
  .control { width: 44px; height: 44px; font-size: 24px; }
  .control.prev { left: 10px; }
  .control.next { right: 10px; }
  .container { padding: 30px 16px; }
  .hero-overlay { padding: 20px }
  h2 { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width:480px) {
  .panel { padding: 15px 10px; }
  .panel-hero { min-height: 50vh; }
  .carousel { width: 85vw; height: 40vh; max-height: 320px; }
  .carousel-title { font-size: clamp(20px, 5vw, 36px); }
  .topnav { height: 56px; }
  main#main { margin-top: 56px; height: calc(100vh - 56px); }
  .panel { min-height: calc(100vh - 56px); }
  .container { padding: 20px 12px; }
  h2 { font-size: 20px; margin-bottom: 10px; }
  .hero-paragraph { font-size: clamp(12px, 2vw, 16px); }
  .muted { font-size: 12px; }
  .contador { gap: 8px; margin: 12px 0 16px; }
  .contador-item { padding: 8px 12px; min-width: 75px; }
  .contador-item div { font-size: 18px; }
  .contador-item span { font-size: 10px; }
  .map-wrapper iframe { height: 250px; }
  .btn { padding: 10px 14px; font-size: 14px; }
}
/* Small niceties */
a.btn:hover { filter: brightness(.95) }

/* ============ NUEVO TIMELINE (SecciÃ³n #horario) ============ */
#horario .container { padding-block: 32px; }
.schedule { 
  position: relative;
  list-style: none; 
  margin: 24px 0 0; 
  padding: 8px 0; 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: clamp(14px, 3vw, 28px); }
.schedule::before { content: ""; position: absolute; inset: 0; left: 18px; width: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 6px; pointer-events: none; opacity: .9; }
.event { position: relative; display: grid; align-items: start; grid-template-columns: 1fr; gap: 10px; margin-block: clamp(8px, 1.2vw, 18px); }
.event:nth-child(odd) { grid-column: 1; }
.event:nth-child(even) { grid-column: 1; }
.event-dot { position: absolute; top: 14px; left: 18px; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 10px var(--shadow); z-index: 2; }
.event-time { justify-self: start; 
  background: rgba(255,255,255,.7); 
  color: var(--accent); 
  font-weight: 800; 
  font-size: 20px;
  font-variant-numeric: tabular-nums; 
  padding: 6px 10px; 
  border-radius: 999px; 
  border: 1px solid rgba(0,0,0,.04); 
  box-shadow: 0 4px 12px var(--shadow); 
  margin-left: 36px; }
.event:nth-child(even) .event-time { justify-self: start; }
.event-card { position: relative; 
  background: rgba(255,255,255,.7); 
  border-radius: 14px; 
  left: 32px;
  padding: 14px; 
  box-shadow: 0 12px 32px var(--shadow); 
  max-width: 800px; 
  transition: transform .2s ease, box-shadow .2s ease; }

.event-card h3 { margin: 0 0 10px; color: var(--accent); font-weight: 800; }
.event-media { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.06); background: #fff; box-shadow: 0 10px 24px var(--shadow); }
.event-media img { display: block; width: 100%; height: auto; }

@media (hover:hover) and (pointer:fine) { .event-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px var(--shadow); } }
@media (max-width:900px) {
  .schedule { grid-template-columns: 1fr; }
  .schedule::before { left: 18px; transform: none; }
  .event, .event:nth-child(even), .event:nth-child(odd) { grid-column: 1; }
  .event-time { margin-left: 36px; }
  .event-dot { left: 18px; }
  .event-card { margin-left: 36px; }
  .event-card::before { left: -9px; right: auto; }
}
@media (max-width:480px) {
  .event-card { padding: 12px; border-radius: 12px; }
  .event-card h3 { font-size: 16px; margin-bottom: 8px; }
  .event-time { font-size: 14px; padding: 5px 9px; }
}

/* ======= HERO + CAROUSEL FULLSCREEN (Overrides) ======= */
main#main { margin-top: 0; height: auto; overflow: visible; }
#inicio.panel-hero { min-height: 100vh; padding: 0; }
#inicio .carousel { width: 100vw; height: 100vh; max-width: none !important; max-height: none; border-radius: 0; box-shadow: none; overflow: hidden; position: relative; }
#inicio .slides {
  display: flex !important;
  height: 100%;
  gap: 0 !important;
  transition: none !important;
  overflow: hidden !important;
  position: relative !important;
}

#inicio .slide {
  /* Volvemos a 1 slide = 100% del viewport, para cuadrar con el JS */
  flex: 0 0 100vw !important;
  width: 100vw !important;
  height: 100vh; /* como ya tienes */
  margin: 0 !important;
  padding: 0 !important;
}

#inicio .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
main section { scroll-margin-top: 72px; }
@media (max-width:900px){ #inicio.panel-hero{min-height:100vh;} #inicio .carousel{width:100vw;height:100vh;max-height:none;} }
@media (max-width:768px){ #inicio.panel-hero{min-height:100vh;} #inicio .carousel{width:100vw;height:100vh;max-height:none;} }
@media (max-width:480px){ #inicio.panel-hero{min-height:100vh;} #inicio .carousel{width:100vw;height:100vh;max-height:none;} }


/* Evitar “scroll” horizontal por elementos a 100vw */
html, body {
  overflow-x: hidden;
}

/* Permitir que el menú rompa línea en móvil */
@media (max-width: 480px) {
  .topnav ul { 
    flex-wrap: wrap;
    gap: 10px;
  }
  .topnav a { 
    font-size: 14px;
    padding: 8px 10px;
  }
}

/* —— Carrusel amigable en móvil: no a pantalla completa y sin corte lateral —— */
@media (max-width: 768px) {
  /* El carrusel deja de forzar 100vh y se limita en altura */
  #inicio .carousel {
    width: 100vw;
    height: min(70vh, 90vw); /* no ocupa toda la pantalla en vertical */
    max-height: 600px;       /* tope razonable */
  }

  /* El track y cada slide toman la misma altura del carrusel */
  #inicio .slides,
  #inicio .slide {
    height: 100%;
  }

  /* Mostrar la foto completa: sin recorte lateral (letterbox arriba/abajo) */
  #inicio .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover ;     /* clave para no cortar a lo ancho */
  }

  /* Ajuste opcional del título encima del carrusel en pantallas pequeñas */
  .carousel-title {
    top: 30%;
    width: 75%;
  }
}

@media (max-width: 480px) {
  #inicio .carousel {
    height: min(55vh, 75vw);
    max-height: 420px;
  }
  .carousel-title {
    top: 45%;
    width: 80%;
  }
}



/* ——— Opción B: 16:9 en móvil + espacio arriba/abajo sin crecer en alto ——— */
@media (max-width: 768px) {
  /* La sección deja de forzar 100vh y añade aire por arriba y abajo */
  #inicio.panel-hero {
    min-height: auto;
    padding-block: 16px;       /* 16px arriba + 16px abajo */
  }

  /* El carrusel mantiene 16:9, pero compensamos el padding para que el
     alto total de la sección no aumente y siga asomando la siguiente */
  #inicio .carousel {
    width: 100vw;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: calc(60vh - 32px); /* 32px = 16 + 16 */
    margin-inline: auto;
  }

  /* El track y cada slide igualan la altura del carrusel */
  #inicio .slides,
  #inicio .slide { height: 100%; }
}

@media (max-width: 480px) {
  /* Un poco menos de padding y un toquecito más compacto */
  #inicio.panel-hero { padding-block: 12px; }
  #inicio .carousel { max-height: calc(58vh - 24px); } /* 24px = 12 + 12 */
}

/* Form de preguntas dentro del FAQ */
.form-group textarea {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e4dcd3;
  background: var(--panel-bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all .3s ease;
  box-shadow: 0 2px 6px var(--shadow);
}
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(169,79,46,.15);
  background: #fefdfb;
}

/* Más altura disponible cuando el acordeón está abierto (para que quepa el form) */
.faq-item.active .faq-answer {
  max-height: 2000px; /* sobreescribe el 500px actual */
}

/* Honeypot oculto (anti‑spam) */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}


/* ===== Avisos coherentes con la paleta del sitio ===== */
.alert {
  display: none; /* se activa por JS */
  margin: 12px auto 18px;
  padding: 12px 14px;
  max-width: var(--max-width);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 6px 18px var(--shadow);
  background: linear-gradient(90deg, rgba(169,79,46,.10), rgba(201,143,98,.06)); /* tono acorde */
  color: var(--text);
  font-weight: 600;
}

.alert--ok {
  background: linear-gradient(90deg, rgba(46, 169, 98, .10), rgba(98, 201, 143, .06));
  border-color: rgba(46,169,98,.25);
}

.alert--warn {
  background: linear-gradient(90deg, rgba(169,79,46,.12), rgba(201,143,98,.08));
  border-color: rgba(169,79,46,.25);
}

.alert__content {
  display: flex; align-items: center; gap: 10px;
}

.alert__icon {
  font-size: 20px; line-height: 1;
}

.alert__close {
  margin-left: auto;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 4px 6px; border-radius: 8px;
}
.alert__close:hover { background: rgba(0,0,0,.04); }

/* En móvil, un pelín más compacto */
@media (max-width: 480px) {
  .alert { padding: 10px 12px; }
}

/* === MENÚ DESLIZABLE EN MÓVIL (scroll horizontal sin segunda línea) === */
@media (max-width: 600px) {
  .topnav nav {
    justify-content: flex-start;            /* alinea a la izquierda para que el scroll sea natural */
    overflow: hidden;                        /* el scroll lo hará el <ul> */
  }
  .topnav ul {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;                       /* clave: no partir a segunda línea (override) */
    overflow-x: auto;                        /* scroll horizontal */
    overflow-y: hidden;
    padding: 0 8px;
    -webkit-overflow-scrolling: touch;       /* inercia en iOS */
    scrollbar-width: none;                   /* oculta scrollbar en Firefox */
  }
  .topnav ul::-webkit-scrollbar { display: none; }  /* oculta scrollbar en WebKit */
  .topnav li { flex: 0 0 auto; }                     /* que los ítems no se encojan */
  .topnav a  { font-size: clamp(12px, 3.6vw, 14px); padding: 8px 10px; }
}
