/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-cream: #f5efe6;
  --color-cream-dark: #ede3d5;
  --color-green: #5a8a3c;
  --color-green-dark: #3e6428;
  --color-gold: #c8a44a;
  --color-coral: #e05a5a;
  --color-coral-btn: #d94f4f;
  --color-text: #3d3026;
  --color-text-light: #6b5b45;
  --color-border: #d0c4b0;
  --color-white: #ffffff;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Lato', Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-green);
  text-decoration: underline;
}

a:hover {
  color: var(--color-green-dark);
}

/* ══════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════ */
.site-header {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  /* elimina espacio bajo el SVG inline-block */
}

.site-header img {
  width: 100%;
  height: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════ */
.hero {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.hero-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════
   MAIN SECTION — Arte + Formulario
   ══════════════════════════════════════════════════════ */
.main-section {
  background: var(--color-white);
  margin: 24px auto;
  max-width: 900px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 32px 28px;
}

.main-inner {
  display: flex;
  gap: 42px;
  align-items: flex-start;
}

/* ── Columna izquierda: decorativa ── */
.deco-col {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.deco-art {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Plazo como SVG */
.plazo-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 12px;
}

/* ── Columna derecha: formulario ── */
.form-col {
  flex: 1;
}

.retrato-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-group input,
.field-group textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--color-text);
  background: var(--color-cream);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(90, 138, 60, 0.15);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.7;
}

.field-group textarea {
  resize: vertical;
  min-height: 90px;
}

/* Upload */
.upload-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.upload-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}

.upload-btn {
  display: inline-block;
  background: var(--color-cream-dark);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s;
}

.upload-btn:hover {
  background: var(--color-border);
}

.input-file {
  display: none;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-align: center;
  max-width: 300px;
}

/* Política */
.policy-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-cream);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.policy-check {
  margin-top: 3px;
  min-width: 16px;
  height: 16px;
  accent-color: var(--color-green);
  cursor: pointer;
}

.policy-label {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 1.5;
  cursor: pointer;
}

/* Botón submit */
.submit-group {
  text-align: center;
  margin-top: 4px;
}

.btn-subir {
  background: var(--color-coral-btn);
  color: var(--color-white);
  border: none;
  border-radius: 40px;
  padding: 14px 52px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(217, 79, 79, 0.35);
}

.btn-subir:hover {
  background: #c23e3e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 79, 79, 0.4);
}

.btn-subir:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════
   SECCIONES TE ESPERAMOS + PROGRÁMATE
   ══════════════════════════════════════════════════════ */
.esperamos-section,
.programacion-section {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.seccion-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--color-cream-dark);
  text-align: center;
  padding: 28px 16px 20px;
  border-top: 2px solid var(--color-border);
}

.footer-siguenos {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.social-icon img {
  width: auto;
  height: 36px;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
}

.social-icon:hover img {
  transform: scale(1.15);
  opacity: 0.85;
}

.footer-web {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.footer-web a {
  color: var(--color-green);
}

/* ══════════════════════════════════════════════════════
   ALERTA DE CAMPO (validación inline)
   ══════════════════════════════════════════════════════ */
.campo-error-msg {
  margin-top: 5px;
  padding: 6px 12px;
  background: #fff3f3;
  border-left: 4px solid var(--color-coral);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: #b83030;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════
   ERROR DEL SERVIDOR
   ══════════════════════════════════════════════════════ */
.msg-error-server {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: #c0392b;
  color: #fff;
  padding: 18px 28px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 90vw;
  width: 460px;
  animation: fadeUp 0.25s ease;
}

.msg-error-server[hidden] {
  display: none;
}

/* ══════════════════════════════════════════════════════
   UPLOAD — estado de error
   ══════════════════════════════════════════════════════ */
.upload-btn--error {
  border-color: var(--color-coral) !important;
  background: #fff3f3 !important;
}

/* ══════════════════════════════════════════════════════
   OVERLAY DE CARGA
   ══════════════════════════════════════════════════════ */
.overlay-carga {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.overlay-carga[hidden] {
  display: none;
}

.carga-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  min-width: 260px;
}

/* Spinner animado */
.spinner {
  width: 56px;
  height: 56px;
  border: 6px solid #d0e8c0;
  border-top-color: var(--color-green);
  border-radius: 50%;
  animation: girar 0.85s linear infinite;
  margin: 0 auto 20px;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

.carga-texto {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-text);
  font-weight: 700;
  margin: 0 0 6px;
}

.carga-sub {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   MODAL DE ÉXITO — accesible para adultos mayores
   ══════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.22);
  animation: fadeUp 0.3s ease;
  border-top: 6px solid var(--color-green);
}

/* Ícono grande */
.modal-icono {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
}

/* Título principal — grande y claro */
.modal-box h3 {
  font-family: var(--font-serif);
  color: var(--color-green-dark);
  font-size: 1.75rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* Nombre del ser querido */
.modal-nombre-ser {
  font-size: 1.05rem;
  color: var(--color-text);
  font-weight: 700;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: #f0f8eb;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--color-green);
}

/* Lista de confirmaciones */
.modal-checklist {
  text-align: left;
  background: #f5efe6;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.4;
}

.chk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--color-green);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
}

/* Aviso del correo */
.modal-correo-aviso {
  font-size: 0.98rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #fffbf0;
  border: 1.5px dashed var(--color-gold);
  border-radius: var(--radius-sm);
}

/* Botón cerrar — grande y accesible */
.btn-modal-cerrar {
  background: var(--color-green);
  color: var(--color-white);
  border: none;
  border-radius: 40px;
  padding: 16px 48px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(62, 100, 40, 0.3);
}

.btn-modal-cerrar:hover {
  background: var(--color-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(62, 100, 40, 0.4);
}

.btn-modal-cerrar:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ══════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .main-inner {
    flex-direction: column;
    gap: 24px;
  }

  .deco-col {
    flex: unset;
    width: 100%;
  }

  .main-section {
    margin-left: 12px;
    margin-right: 12px;
  }

  .site-header {
    justify-content: center;
  }
}