/* ==========================================================================
   RESPONSIVE.CSS - ADAPTACIÓN MULTI-DISPOSITIVO: MÓVIL, TABLET Y PC (100% FULL-WIDTH)
   MIS XV AÑOS - VALENTINA (MODELO 03 - ESTILO BOTÁNICO VERDE & DORADO)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DISPOSITIVOS MÓVILES PEQUEÑOS Y COMPACTOS (<= 480px)
      Flores grandes y claramente visibles en todos los bordes; contenedores
      centrales adaptados (o apilados en fila) para que ningún elemento sobresalga.
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .main-invitation-container {
    --xv-wall-flower-w: clamp(3.85rem, 16vw, 4.9rem);
    --xv-corner-flower-w: clamp(8.4rem, 35vw, 10.5rem);
    --xv-safe-pad-x: clamp(3.15rem, 13vw, 4.1rem);
  }

  .xv-edge-garland {
    width: clamp(5.8rem, 25vw, 7.5rem);
  }

  /* Esquinas de Galería bien visibles en móvil */
  .xv-gallery-corner--top-left,
  .xv-gallery-corner--top-right {
    width: clamp(6.2rem, 26vw, 7.8rem);
  }

  .xv-gallery-corner--bottom-left,
  .xv-gallery-corner--bottom-right {
    width: clamp(6.4rem, 27vw, 8rem);
  }

  /* Esquinas superiores del Hero con tamaño propio reducido para lucir sobre la foto de ancho completo */
  .xv-top-corner-flower {
    width: clamp(12.2rem, 25vw, 7.6rem);
    top: -0.2rem;
  }

  /* Foto principal a ancho completo en móvil */
  .xv-hero-portrait-frame {
    max-width: 100%;
    aspect-ratio: 4 / 4.3;
  }

  .xv-quince-name {
    font-size: clamp(3.15rem, 12.5vw, 4rem);
  }

  .xv-roman-xv {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .xv-anos-word {
    font-size: clamp(1.12rem, 4.4vw, 1.38rem);
  }

  .xv-hero-invite-subtitle {
    font-size: clamp(1.04rem, 4.1vw, 1.22rem);
  }

  .xv-hero-invite-message,
  .xv-section-lead,
  .xv-rsvp-lead {
    font-size: clamp(0.86rem, 3.5vw, 0.96rem);
  }

  .xv-gold-separator {
    width: clamp(6.8rem, 28vw, 8.8rem);
  }

  .xv-audio-player-block {
    width: calc(100% - (var(--xv-safe-pad-x) * 2));
    max-width: 100%;
    padding: 0.7rem 0.85rem;
  }

  .xv-family-block,
  .xv-countdown-block,
  .xv-calendar-block {
    max-width: 100%;
    padding: 1.05rem 0.65rem;
  }

  .xv-script-names-group,
  .xv-gold-script-heading {
    font-size: clamp(1.65rem, 6.8vw, 1.9rem);
  }

  /* Cuenta regresiva en móvil: números y etiquetas escalables para no salir nunca del contenedor padre */
  .xv-countdown-timer-row {
    gap: 0.08rem;
  }

  .xv-cd-number {
    font-size: clamp(1.32rem, 5.4vw, 1.75rem);
  }

  .xv-cd-colon {
    font-size: clamp(1.1rem, 4.5vw, 1.45rem);
  }

  .xv-cd-label {
    font-size: clamp(0.48rem, 2vw, 0.58rem);
    letter-spacing: 0.04em;
  }

  .xv-calendar-table th {
    font-size: 0.6rem;
  }

  .xv-calendar-table td {
    font-size: 0.8rem;
    padding: 0.24rem 0;
  }

  .xv-calendar-highlight {
    width: 1.7rem;
    height: 1.7rem;
  }

  .xv-ruled-section-title {
    gap: 0.35rem;
    padding: 0 0.15rem;
  }

  .xv-ruled-section-title h2 {
    font-size: clamp(0.86rem, 3.7vw, 1.06rem);
    letter-spacing: 0.07em;
    white-space: normal;
    line-height: 1.22;
  }

  .xv-rule-line {
    min-width: 0.75rem;
  }

  .xv-hero-section {
    padding-top: 0;
    padding-bottom: 1.85rem;
  }

  .xv-palette-section {
    padding-bottom: 4.1rem;
  }

  /* Ceremonia y Recepción: si no entran horizontalmente, poner en 1 columna (uno debajo del otro) */
  .xv-locations-two-cols {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .xv-event-card {
    max-width: 100%;
    background-color: rgba(255, 253, 248, 0.65);
    border: 1px solid var(--xv-border-gold);
    border-radius: 1rem;
    padding: 1.15rem 0.85rem;
  }

  .xv-gold-outline-icon svg {
    width: 2.85rem;
    height: 2.85rem;
  }

  .xv-event-title-serif {
    font-size: 0.96rem;
    letter-spacing: 0.07em;
  }

  .xv-event-venue-name,
  .xv-event-venue-italic {
    font-size: 0.9rem;
  }

  .xv-event-address {
    font-size: 0.84rem;
  }

  .xv-event-time-line {
    font-size: 0.92rem;
  }

  .xv-sage-pill-btn {
    padding: 0.38rem 0.75rem;
    font-size: 0.74rem;
    gap: 0.35rem;
  }

  .xv-subtle-map-link {
    font-size: 0.76rem;
  }

  /* Detalles del Evento: todos los cards con el mismo ancho y el mismo alto exacto */
  .xv-details-5col-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 0.55rem 0.35rem;
  }

  .xv-detail-item {
    grid-column: span 2;
    width: 100%;
    height: 100%;
    min-height: 5.4rem;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    justify-content: center;
    padding: 0.45rem 0.25rem;
    background-color: rgba(255, 253, 248, 0.62);
    border: 1px solid rgba(176, 141, 76, 0.28);
    border-radius: 0.75rem;
  }

  .xv-detail-item:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .xv-detail-item:not(:last-child)::after {
    display: none;
  }

  .xv-detail-icon {
    height: 1.85rem;
    margin-bottom: 0.22rem;
  }

  .xv-detail-icon svg {
    width: 1.55rem;
    height: 1.55rem;
  }

  .xv-detail-icon--dress img {
    width: 1.5rem;
    height: 1.75rem;
  }

  .xv-detail-label,
  .xv-detail-title,
  .xv-detail-val {
    font-size: clamp(0.68rem, 2.7vw, 0.78rem);
    word-break: break-word;
  }

  /* Ajuste del itinerario con curva punteada en pantallas móviles compactas */
  .timeline-container {
    width: 100%;
    max-width: 340px;
    box-sizing: border-box;
  }

  .timeline-items-list {
    padding: 0 0.5rem;
  }

  /* Confirmación de asistencia y Regalos en móvil */
  .xv-olive-confirm-btn {
    padding: 0.58rem 1.25rem;
    gap: 0.5rem;
    max-width: 100%;
  }

  .xv-confirm-label-italic {
    font-size: 1rem;
  }

  .toggle-rsvp-form-btn {
    padding: 0.4rem 0.7rem;
    font-size: 9px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .xv-gifts-editorial-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .xv-gifts-left-col {
    flex-direction: column;
    text-align: center;
  }

  .xv-gifts-vertical-divider {
    width: 60%;
    height: 1px;
    min-height: 1px;
    margin: 0 auto;
  }

  .xv-gifts-right-col {
    align-items: center;
  }

  .xv-palette-swatches {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .xv-swatch {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* En móviles muy estrechos (<= 360px), mantener las flores grandes y visibles */
@media (max-width: 360px) {
  .main-invitation-container {
    --xv-wall-flower-w: 3.45rem;
    --xv-corner-flower-w: 7.5rem;
    --xv-safe-pad-x: 2.85rem;
  }

  .xv-top-corner-flower {
    width: 8.5rem;
  }

  .xv-cd-number {
    font-size: 1.22rem;
  }

  .xv-cd-colon {
    font-size: 1.05rem;
  }

  .xv-cd-label {
    font-size: 0.45rem;
  }
}

/* --------------------------------------------------------------------------
   2. COMPOSICIÓN TIPO PORTADA EDITORIAL (min-width: 540px)
      Foto de Valentina a ancho completo arriba y "MIS XV AÑOS Valentina" debajo
   -------------------------------------------------------------------------- */
@media (min-width: 540px) {
  .xv-top-corner-flower {
    width: clamp(7.2rem, 20vw, 9.8rem);
  }

  .xv-hero-editorial-grid {
    max-width: 100%;
    gap: 1.5rem;
    padding: 0;
  }

  .xv-hero-portrait-frame {
    max-width: 100%;
    aspect-ratio: 16 / 11;
    max-height: 75vh;
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS (min-width: 768px) - DISEÑO EXPANDIDO Y FLUIDO A PANTALLA COMPLETA
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .main-invitation-container {
    --xv-wall-flower-w: clamp(6rem, 10.5vw, 9.2rem);
    --xv-corner-flower-w: clamp(11.5rem, 18.5vw, 16.5rem);
    --xv-safe-pad-x: calc(var(--xv-wall-flower-w) + 0.35rem);
  }

  .xv-top-corner-flower {
    width: clamp(8.5rem, 14vw, 12rem);
  }

  .xv-hero-section {
    padding: 0 0 2.75rem 0;
  }

  .xv-hero-editorial-grid {
    max-width: 100%;
    gap: 1.75rem;
  }

  .xv-hero-portrait-frame {
    max-width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 78vh;
  }

  .xv-audio-player-block {
    max-width: 420px;
    padding: 1rem 1.75rem;
  }

  /* Padres, Padrinos, Cuenta Regresiva y Calendario:
     En Tablet (768px-1023px) usar 2 columnas flexibles + 1 centrada para que el contador
     y el calendario tengan ancho holgado y nunca sobresalgan de su contenedor padre */
  .xv-family-date-section {
    padding: var(--xv-section-space) var(--xv-safe-pad-x);
  }

  .xv-family-date-grid {
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
    justify-items: center;
  }

  .xv-calendar-block {
    grid-column: 1 / -1;
    max-width: 380px;
  }

  .xv-family-block,
  .xv-countdown-block {
    max-width: 100%;
    height: 100%;
    justify-content: center;
    padding: 1.45rem 1rem;
  }

  .xv-cd-number {
    font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  }

  .xv-cd-colon {
    font-size: clamp(1.3rem, 2.1vw, 1.85rem);
  }

  .xv-cd-label {
    font-size: clamp(0.54rem, 0.9vw, 0.65rem);
  }

  /* Ceremonia y Recepción en Tablet con Divisor Central */
  .xv-locations-two-cols {
    max-width: 820px;
    grid-template-columns: 1fr 1px 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }

  .xv-locations-center-divider {
    display: block;
    width: 1px;
    height: 80%;
    align-self: center;
    background: linear-gradient(180deg, transparent, rgba(176, 141, 76, 0.45), transparent);
  }

  .xv-event-card {
    max-width: 340px;
    background-color: rgba(255, 253, 248, 0.65);
    border: 1px solid var(--xv-border-gold);
    border-radius: 1.15rem;
    padding: 1.5rem 1.15rem;
    box-shadow: 0 10px 28px rgba(90, 110, 78, 0.06);
    justify-content: space-between;
  }

  /* Detalles del Evento en Tablet */
  .xv-details-5col-grid {
    max-width: 880px;
    background-color: rgba(255, 253, 248, 0.62);
    border: 1px solid var(--xv-border-gold);
    border-radius: 1.1rem;
    padding: 1.15rem 0.55rem;
    box-shadow: 0 10px 26px rgba(90, 110, 78, 0.05);
  }

  /* Itinerario con Curva Punteada en Tablet */
  .timeline-container {
    width: 100%;
    max-width: 620px;
    margin: 2.5rem auto 0 auto;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
  }

  .timeline-items-list {
    gap: 2.5rem;
  }

  .timeline-row {
    width: 48%;
    max-width: 290px;
  }

  .timeline-row.timeline-step-left {
    margin-right: auto;
    margin-left: 0;
    flex-direction: row;
    text-align: left;
  }

  .timeline-row.timeline-step-right {
    margin-left: auto;
    margin-right: 0;
    flex-direction: row-reverse;
    text-align: right;
  }

  .timeline-icon-badge {
    width: 60px;
    height: 60px;
  }

  .timeline-icon-badge img {
    width: 34px;
    height: 34px;
  }

  .timeline-time {
    font-size: 1.2rem;
  }

  .timeline-desc {
    font-size: 0.95rem;
  }

  .timeline-heart-sep {
    margin: -1rem 0;
    font-size: 12px;
  }

  /* Galería en Tablet */
  .gallery-block {
    max-width: 860px;
  }

  /* Regalos en Tablet */
  .xv-gifts-editorial-row {
    max-width: 680px;
    gap: 1.35rem;
  }
}

/* --------------------------------------------------------------------------
   4. ESCRITORIO Y PC (min-width: 1024px) - 100% PANTALLA COMPLETA SIN BORDES EXTERNOS
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .main-invitation-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    --xv-wall-flower-w: clamp(8rem, 11.2vw, 12.2rem);
    --xv-corner-flower-w: clamp(14rem, 18vw, 19.5rem);
    --xv-safe-pad-x: calc(var(--xv-wall-flower-w) + 0.5rem);
  }

  .xv-top-corner-flower {
    width: clamp(10rem, 13.5vw, 14rem);
  }

  .xv-hero-section {
    padding: 0 0 2.75rem 0;
  }

  .xv-hero-editorial-grid {
    max-width: 100%;
    gap: 2rem;
  }

  .xv-hero-portrait-frame {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 82vh;
  }

  .xv-family-date-section {
    padding: var(--xv-section-space) var(--xv-safe-pad-x);
  }

  .xv-family-date-grid {
    max-width: 1120px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
  }

  .xv-calendar-block {
    grid-column: auto;
    max-width: 100%;
  }

  .xv-family-block,
  .xv-countdown-block,
  .xv-calendar-block {
    padding: 1.5rem 1rem;
  }

  .xv-cd-number {
    font-size: clamp(1.5rem, 2.1vw, 2.25rem);
  }

  .xv-cd-colon {
    font-size: clamp(1.25rem, 1.7vw, 1.85rem);
  }

  .xv-cd-label {
    font-size: clamp(0.52rem, 0.65vw, 0.66rem);
  }

  .xv-locations-two-cols {
    max-width: 900px;
    gap: 2.25rem;
  }

  .xv-event-card {
    max-width: 390px;
  }

  .xv-details-5col-grid {
    max-width: 980px;
  }

  .timeline-container {
    width: 100%;
    max-width: 740px;
    margin: 3.5rem auto 0 auto;
    padding: 1.5rem 2rem;
    box-sizing: border-box;
  }

  .timeline-items-list {
    gap: 3rem;
  }

  .timeline-row {
    width: 47%;
    max-width: 330px;
  }

  .timeline-row.timeline-step-left {
    margin-right: auto;
    margin-left: 0;
    flex-direction: row;
    text-align: left;
  }

  .timeline-row.timeline-step-right {
    margin-left: auto;
    margin-right: 0;
    flex-direction: row-reverse;
    text-align: right;
  }

  .timeline-time {
    font-size: 1.35rem;
  }

  .timeline-desc {
    font-size: 1.05rem;
  }

  .timeline-icon-badge {
    width: 66px;
    height: 66px;
  }

  .timeline-icon-badge img {
    width: 38px;
    height: 38px;
  }

  .timeline-heart-sep {
    margin: -1.25rem 0;
    font-size: 13px;
  }

  .gallery-block {
    max-width: 980px;
  }

  .xv-gifts-editorial-row {
    max-width: 780px;
  }
}

/* --------------------------------------------------------------------------
   5. MONITORES GRANDES Y ULTRAWIDE (min-width: 1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  .main-invitation-container {
    --xv-wall-flower-w: clamp(9.5rem, 11.5vw, 12.8rem);
    --xv-corner-flower-w: clamp(15rem, 18vw, 20.5rem);
    --xv-safe-pad-x: calc(var(--xv-wall-flower-w) + 1rem);
  }

  .xv-top-corner-flower {
    width: clamp(11rem, 13vw, 15rem);
  }

  .xv-hero-editorial-grid {
    max-width: 100%;
    gap: 2.25rem;
  }

  .xv-family-date-grid,
  .xv-details-5col-grid,
  .gallery-block {
    max-width: 1220px;
  }

  .xv-locations-two-cols {
    max-width: 1020px;
  }
}