/**
 * FUNDACIÓN CAMINANTES HACIA EL ÉXITO
 * Optimizaciones Responsive Mobile-First
 * Diseñado y probado para 360px, 375px, 390px, 414px, 768px, 992px, 1200px+
 */

/* ==========================================================================
   1. STICKY MOBILE DONATE BAR (SOLO EN SMARTPHONES)
   ========================================================================== */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(15, 40, 65, 0.12);
  z-index: 1025;
  border-top: 1px solid var(--c-border);
}

.mobile-sticky-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-sticky-bar-info {
  line-height: 1.2;
}

.mobile-sticky-bar-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--c-dark);
  display: block;
}

.mobile-sticky-bar-sub {
  font-size: 0.72rem;
  color: var(--c-accent);
  font-weight: 700;
}

/* ==========================================================================
   2. BREAKPOINTS MÓVILES (360px A 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
  :root {
    --header-height: 68px;
  }

  body {
    padding-bottom: 70px; /* Espacio para barra sticky móvil */
  }

  .mobile-sticky-bar {
    display: block;
  }

  .floating-actions-container {
    bottom: 85px; /* Elevar flotante de WhatsApp para no solapar la barra */
    right: 16px;
  }

  .site-header {
    height: 68px;
  }

  .brand-logo-img {
    height: 42px;
  }

  .section-pad {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }

  .hero-section {
    padding-top: calc(var(--header-height) + 1.25rem);
    padding-bottom: 3.5rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 0.6rem;
  }

  .hero-cta-group .btn-caminantes {
    flex: 1 1 auto;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    min-height: 42px;
    white-space: nowrap;
  }

  .hero-img-card img {
    height: 320px;
  }

  .hero-floating-badge {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: -30px;
    margin-left: 10px;
    margin-right: 10px;
    padding: 0.75rem 1rem;
    animation: none;
  }

  /* Impact Counters en Móvil */
  .impact-bar-section {
    margin-top: 1rem;
  }

  .impact-card-container {
    padding: 1.5rem 1rem;
  }

  .impact-stat-item:not(:last-child)::after {
    display: none;
  }

  .impact-stat-item {
    border-bottom: 1px dashed var(--c-border);
    padding: 1.25rem 0.5rem;
  }

  .impact-stat-item:last-child {
    border-bottom: none;
  }

  /* Camino Timeline Móvil */
  .path-timeline::before {
    left: 20px;
    transform: none;
  }

  .path-milestone-dot {
    left: 20px;
    transform: none;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .path-milestone-card {
    margin-left: 45px;
    padding: 1.25rem;
  }

  /* Donaciones Móvil */
  .donation-card-box {
    padding: 1.5rem 1rem;
  }

  .donation-presets-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .preset-amount-pill {
    padding: 0.75rem 0.5rem;
  }

  .preset-amount-val {
    font-size: 1.1rem;
  }

  .payment-tabs-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }

  /* Galería Móvil */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Footer Móvil */
  .site-footer {
    padding-top: 3.5rem;
    text-align: center;
  }

  .site-footer h5::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-social-box {
    display: flex;
    justify-content: center;
  }
}

/* ==========================================================================
   3. TABLETS (576px A 991.98px)
   ========================================================================== */
@media (min-width: 576px) and (max-width: 991.98px) {
  .hero-img-card img {
    height: 380px;
  }

  .hero-floating-badge {
    left: 10px;
    bottom: 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .path-timeline::before {
    left: 24px;
    transform: none;
  }

  .path-milestone-dot {
    left: 24px;
    transform: none;
  }

  .path-milestone-card {
    margin-left: 55px;
  }
}

/* ==========================================================================
   4. ESCRITORIO (992px+)
   ========================================================================== */
@media (min-width: 992px) {
  .navbar-toggler-custom {
    display: none;
  }

  .path-milestone:nth-child(even) .path-milestone-card {
    margin-left: auto;
    width: 45%;
  }

  .path-milestone:nth-child(odd) .path-milestone-card {
    margin-right: auto;
    width: 45%;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   5. PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
