/* responsive.css - Solución completa para móviles */

/* ===== MÓVILES (max-width: 768px) ===== */
@media (max-width: 768px) {
  /* Ajustes generales */
  html {
    font-size: 14px;
    scroll-padding-top: 60px;
  }

  body {
    overflow-x: hidden;
    width: 100vw;
  }

  /* Intro Section - Corrección completa */
  .intro-section {
    height: 100vh;
    width: 100vw;
    padding: 20px;
  }

  .intro-container {
    height: auto;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .envelope-wrapper {
    width: 280px !important;
    height: 210px !important;
    margin: 0 auto;
  }

  .envelope {
    width: 100% !important;
    height: 100% !important;
  }

  .envelope-front {
    width: 100% !important;
    height: 100% !important;
  }

  .envelope-flap {
    width: 320px !important;
    height: 100px !important;
    top: -40px !important;
    left: -20px !important;
  }

  .envelope-flap .seal {
    width: 40px !important;
    height: 40px !important;
    top: 25px !important;
  }

  .seal i {
    font-size: 1.2rem !important;
  }

  .invitation-text h3 {
    font-size: 1.8rem !important;
    margin-top: 20px;
  }

  .envelope-back {
    width: 240px !important;
    height: 160px !important;
    padding: 15px !important;
  }

  .letter-header h2 {
    font-size: 1.8rem !important;
  }

  .letter-body .date {
    font-size: 1.2rem !important;
  }

  .intro-instructions {
    position: fixed;
    bottom: 30px;
    width: 100%;
    padding: 0 20px;
  }

  .instruction-text {
    font-size: 0.8rem !important;
  }

  /* Hero Section - Corrección */
  .hero-section {
    min-height: 100vh;
    height: 100vh;
  }

  .hero-content {
    padding: 20px;
    width: 100%;
  }

  .hero-title {
    font-size: 3rem !important;
  }

  .hero-title .ampersand {
    font-size: 1.8rem !important;
    margin: 10px 0 !important;
  }

  .hero-date {
    font-size: 1.2rem !important;
  }

  /* Countdown Section */
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 0 20px;
  }

  .countdown-item {
    padding: 20px 10px !important;
  }

  .countdown-number {
    font-size: 2.5rem !important;
  }

  /* Navigation */
  .nav-container {
    padding: 10px 15px;
  }

  .nav-toggle {
    display: flex !important;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: rgba(245, 240, 232, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(139, 155, 110, 0.2);
    z-index: var(--z-dropdown);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
  }

  /* Timeline */
  .timeline::before {
    left: 30px !important;
  }

  .timeline-item {
    flex-direction: row !important;
    margin-left: 60px;
    margin-bottom: 30px;
  }

  .timeline-time {
    position: absolute;
    left: -80px;
    top: 0;
    width: 60px;
    text-align: right;
    padding-right: 10px;
    background: transparent;
    box-shadow: none;
  }

  .timeline-icon {
    position: absolute;
    left: -50px;
    top: 0;
    width: 40px !important;
    height: 40px !important;
    margin: 0;
  }

  .timeline-content {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Details Card */
  .details-card {
    padding: 20px !important;
    margin: 0 15px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Accommodation Grid */
  .accommodation-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 0 15px;
  }

  /* FAQ */
  .faq-container {
    padding: 0 15px;
  }

  .faq-question {
    font-size: 1rem;
    padding: 15px;
  }

  /* RSVP Form */
  .rsvp-form {
    padding: 20px !important;
    margin: 0 15px;
  }

  .checkbox-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer {
    padding: 40px 20px;
  }

  .footer-title {
    font-size: 2rem !important;
  }

  /* Music Toggle */
  .music-toggle {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  /* Back to Top */
  .back-to-top {
    bottom: 80px;
    right: 20px;
  }
}

/* ===== MÓVILES PEQUEÑOS (max-width: 480px) ===== */
@media (max-width: 480px) {
  .intro-container {
    padding: 10px;
  }

  .envelope-wrapper {
    width: 240px !important;
    height: 180px !important;
  }

  .envelope-flap {
    width: 280px !important;
    height: 80px !important;
    top: -30px !important;
  }

  .envelope-flap .seal {
    width: 35px !important;
    height: 35px !important;
    top: 20px !important;
  }

  .invitation-text h3 {
    font-size: 1.5rem !important;
  }

  .invitation-text p {
    font-size: 0.9rem !important;
  }

  .envelope-back {
    width: 200px !important;
    height: 140px !important;
    padding: 10px !important;
  }

  .letter-header h2 {
    font-size: 1.5rem !important;
  }

  .letter-body p {
    font-size: 0.9rem !important;
  }

  /* Hero */
  .hero-title {
    font-size: 2.5rem !important;
  }

  .hero-divider {
    margin: 20px 0;
  }

  .divider-line {
    width: 40px;
  }

  /* Countdown */
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .countdown-item {
    padding: 15px 5px !important;
  }

  .countdown-number {
    font-size: 2rem !important;
  }

  .countdown-label {
    font-size: 0.75rem !important;
  }

  /* Section Titles */
  .section-title {
    font-size: 2.5rem !important;
  }

  .section-subtitle {
    font-size: 1rem !important;
  }

  /* Timeline en móvil */
  .timeline-item {
    margin-left: 45px;
  }

  .timeline-time {
    left: -65px;
    width: 50px;
    font-size: 0.9rem;
  }

  .timeline-icon {
    left: -40px;
    width: 30px !important;
    height: 30px !important;
  }

  .timeline-icon i {
    font-size: 1rem !important;
  }

  /* Form Inputs */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 12px;
    font-size: 16px; /* Previene zoom en iOS */
  }

  /* Radio Group */
  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  /* Fix viewport height en iOS Safari */
  .intro-section,
  .hero-section,
  .loading-overlay {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }
}

/* ===== TABLETS (max-width: 1024px) ===== */
@media (max-width: 1024px) and (min-width: 769px) {
  .intro-container {
    max-width: 90%;
  }

  .envelope-wrapper {
    width: 300px;
    height: 225px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
  }

  .timeline::before {
    left: 50%;
  }

  .timeline-item {
    width: 45%;
  }

  .timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    text-align: right;
  }

  .timeline-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
  }

  .accommodation-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ===== ORIENTACIÓN LANDSCAPE ===== */
@media (max-height: 600px) and (orientation: landscape) {
  .intro-section {
    padding: 10px 0;
  }

  .intro-container {
    height: auto;
    min-height: auto;
  }

  .envelope-wrapper {
    width: 200px;
    height: 150px;
  }

  .intro-instructions {
    position: relative;
    bottom: auto;
    margin-top: 10px;
  }

  .hero-content {
    padding-top: 80px;
  }

  .hero-scroll {
    display: none;
  }
}

/* ===== SOLUCIÓN PARA iOS SAFARI ===== */
@supports (-webkit-touch-callout: none) {
  .intro-section,
  .hero-section {
    min-height: -webkit-fill-available;
  }

  .music-toggle,
  .back-to-top {
    bottom: env(safe-area-inset-bottom, 20px);
  }

  .nav-container {
    padding-top: env(safe-area-inset-top, 0);
  }
}

/* ===== FIX PARA DISPOSITIVOS CON NOTCH ===== */
@media (max-width: 768px) {
  .main-nav {
    padding-top: env(safe-area-inset-top, 0);
  }

  .nav-container {
    padding-top: calc(10px + env(safe-area-inset-top, 0));
    padding-bottom: 10px;
  }

  .hero-content {
    padding-top: calc(80px + env(safe-area-inset-top, 0));
  }

  .music-toggle {
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
  }

  .back-to-top {
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
  }
}

/* ===== ANIMACIONES SUAVES EN MÓVIL ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== MEJORA DE TAP HIGHLIGHTS ===== */
@media (max-width: 768px) {
  button,
  a,
  input,
  .nav-link,
  .faq-question,
  .envelope {
    -webkit-tap-highlight-color: rgba(138, 155, 110, 0.2);
    tap-highlight-color: rgba(138, 155, 110, 0.2);
  }
}

/* ===== FIX PARA FORMULARIOS EN MÓVIL ===== */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
    min-height: 44px; /* Tamaño mínimo para touch */
  }

  .btn-submit {
    min-height: 50px;
  }
}

/* ===== IMPROVE SCROLLING ===== */
@media (max-width: 768px) {
  html {
    -webkit-overflow-scrolling: touch;
  }

  .main-content {
    overflow-x: hidden;
  }
}
/* ============ TIMELINE MOBILE CLEAN LAYOUT ============ */

.timeline-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Ocultamos el timeline desktop */
  .timeline {
    display: none;
  }

  /* Mostramos el móvil */
  .timeline-mobile {
    display: block;
    position: relative;
    margin-top: 40px;
  }

  .timeline-mobile-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.2);
  }

  .timeline-mobile-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
  }

  .timeline-mobile-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-light);
    border: 2px solid var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    font-size: 1.1rem;
  }

  .timeline-mobile-content {
    flex: 1;
    padding-top: 2px;
    display: flex;
    align-items: baseline;
    gap: .75rem;
  }
.timeline-mobile-conetent-text {
    display: flex;
    flex-direction: column;
  }
  .timeline-mobile-time {
    background: #2f5d50;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
  }

  .timeline-mobile-content h3 {
    margin: 0;
    font-size: 1rem;
  }

  .timeline-mobile-content p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #666;
  }
}