/* ==========================================================================
   VoteMyBaby — Responsive Stylesheet
   ========================================================================== */

/* Breakpoint: <= 1024px */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .leaderboard-item {
    grid-template-columns: 48px 56px 1fr 110px 140px;
    gap: 1rem;
    padding: 0.85rem 1rem;
  }
  
  .leaderboard-progress-col {
    display: none;
  }
}

/* Breakpoint: <= 960px (Mobile & Tablet Navigation) */
@media (max-width: 960px) {
  .site-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: #FFFFFF !important;
  }

  .site-header .main-nav {
    display: none;
  }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FFFFFF;
    padding: 1.5rem 1.5rem 2.5rem 1.5rem;
    overflow-y: auto;
    border-top: 2px solid #FF6B00;
    box-shadow: 0 20px 40px rgba(15, 15, 18, 0.2);
    gap: 1rem;
    z-index: 9999;
  }

  .site-header.nav-open .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.25rem;
  }

  .site-header.nav-open .nav-link {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    padding: 0.85rem 0.5rem;
    width: 100%;
    color: #0F0F12;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .site-header.nav-open .nav-link.active {
    color: #FF6B00;
    background-color: #FFF6F0;
    padding-left: 0.85rem;
    border-radius: var(--radius-sm);
  }

  .site-header.nav-open .nav-link.active::after {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
  }

  .site-header.nav-open .mobile-nav-toggle {
    background-color: #0F0F12;
    color: #FFFFFF;
    border-color: #FF6B00;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 2.5rem !important;
  }

  .hero-content {
    margin: 0 auto;
    max-width: 600px;
  }

  .hero-ctas {
    justify-content: center !important;
  }

  .hero-trust-row {
    justify-content: center !important;
  }

  .podium-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .podium-card.rank-1-card {
    order: -1;
    transform: none !important;
  }

  .podium-card {
    padding: 1.5rem 1rem;
  }

  .leaderboard-item {
    grid-template-columns: 40px 48px 1fr 90px;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .leaderboard-action-col {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
  }

  .detail-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-photo-column {
    position: static !important;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Breakpoint: <= 640px */
@media (max-width: 640px) {
  .section {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal-links {
    justify-content: center;
  }

  .baby-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    width: 100%;
  }

  .filter-actions {
    width: 100%;
    justify-content: space-between;
  }

  .form-card {
    padding: 1.5rem 1rem;
  }

  .cert-showcase-box {
    padding: 1.5rem 1rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

  .comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cert-deluxe-frame {
    padding: 1.25rem 0.75rem;
    border-width: 6px;
  }

  .cert-inner-border {
    padding: 1.25rem 0.75rem;
  }

  .cert-main-title {
    font-size: 1.4rem;
  }

  .cert-recipient-name {
    font-size: 1.5rem;
  }

  .floating-reaction {
    display: none; /* Hide floating badges on tight mobile screens to avoid overlap */
  }

  .contest-countdown-wrap {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }
}

