/*
 * Wendo — Responsive Styles
 * Mobile-first breakpoints.
 */

/* ============================================
   Animations & Transitions
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Mobile nav animation (< 768px)
   ============================================ */
@media (max-width: 767px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--wendo-background);
    flex-direction: column;
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--wendo-shadow-lg);
    z-index: 100;
  }

  .nav-open .nav-menu {
    transform: translateX(0);
  }

  .nav-open .nav-overlay {
    display: block;
  }
}

/* ============================================
   Mobile base (default, < 640px)
   ============================================ */

/* Reduced section padding on mobile */
.section-padding {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Nav: logo smaller on mobile */
.nav-bar__logo img {
  height: 28px;
}

/* Hero: full-width bg */
.hero {
  padding-top: 100px;
  padding-bottom: var(--wendo-space-12);
  min-height: 440px;
}

.hero__title {
  font-size: var(--wendo-text-2xl);
}

.hero__subtitle {
  font-size: var(--wendo-text-base);
}

/* Search bar: stack input row on mobile */
.hero .search-bar__row {
  flex-direction: column;
}

.hero .search-bar__row .search-bar__icon {
  display: none;
}

.hero .search-bar__btn {
  width: 100%;
}

/* Influencer grid: horizontal scroll on mobile */
@media (max-width: 639px) {
  .influencers-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--wendo-space-4);
    padding-bottom: var(--wendo-space-4);
  }

  .influencers-grid .influencer-card {
    min-width: 260px;
    max-width: 300px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* Category grid: 2 columns (already default in components.css) */

  /* Stats: 2x2 grid (already default in components.css) */

  /* Features: 1 column (already default in components.css) */

  /* Trust: 1 column (already default in components.css) */

  /* How-it-works steps: 1 column (already default in components.css) */

  /* Testimonials: 1 card visible, full width */
  .testimonial-card {
    min-width: 100%;
    max-width: 100%;
  }

  /* Case studies: 1 column (already default in components.css) */

  /* Footer: 1 column, centered */
  .footer-grid {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* CTA banner: smaller on mobile */
.cta-banner {
  padding: var(--wendo-space-10) var(--wendo-space-4);
}

.cta-banner h2 {
  font-size: var(--wendo-text-2xl);
}

.cta-banner p {
  font-size: var(--wendo-text-base);
}

/* Container padding on mobile */
.container {
  padding-left: 16px;
  padding-right: 16px;
}

/* Section title smaller on mobile */
.section-title {
  font-size: var(--wendo-text-2xl);
}

.section-subtitle {
  font-size: var(--wendo-text-base);
}

/* ============================================
   sm — 640px
   ============================================ */
@media (min-width: 640px) {
  /* Restore container padding */
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Section title at sm */
  .section-title {
    font-size: var(--wendo-text-3xl);
  }

  .section-subtitle {
    font-size: var(--wendo-text-lg);
  }

  /* Category grid: 3 columns — handled in components.css */

  /* Stats: 4 in a row */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Trust: 2x2 grid — handled in components.css */

  /* Footer: 2 columns — handled in components.css */
}

/* ============================================
   md — 768px
   ============================================ */
@media (min-width: 768px) {
  /* Restore section padding */
  .section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  /* Nav: show nav links inline, hide hamburger — handled in components.css */

  /* Hero */
  .hero {
    padding-top: 140px;
    padding-bottom: var(--wendo-space-20);
    min-height: 560px;
  }

  .hero__title {
    font-size: var(--wendo-text-4xl);
  }

  .hero__subtitle {
    font-size: var(--wendo-text-lg);
  }

  .hero .search-bar__row {
    flex-direction: row;
  }

  .hero .search-bar__row .search-bar__icon {
    display: block;
  }

  .hero .search-bar__btn {
    width: auto;
  }

  /* Nav bar logo restore */
  .nav-bar__logo img {
    height: 36px;
  }

  /* Influencer grid: handled in components.css (3 cols at 768px) */

  /* Features: 3 columns — handled in components.css */

  /* Steps: handled in components.css (4 cols at 768px) */

  /* Testimonials: 2 cards visible */
  .testimonial-card {
    min-width: calc(50% - var(--wendo-space-3));
    max-width: calc(50% - var(--wendo-space-3));
  }

  /* CTA banner restore */
  .cta-banner {
    padding: var(--wendo-space-20) var(--wendo-space-8);
  }

  .cta-banner h2 {
    font-size: var(--wendo-text-3xl);
  }

  .cta-banner p {
    font-size: var(--wendo-text-lg);
  }

  /* Container */
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ============================================
   lg — 1024px
   ============================================ */
@media (min-width: 1024px) {
  /* Influencer grid: 3 columns — already handled at 768 in components.css */

  /* Category grid: 4 columns — handled in components.css at 768px,
     but spec wants 4 at 1024px. Override: */
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Trust: 4 columns — handled in components.css at 768px */

  /* Testimonials: 3 cards visible */
  .testimonial-card {
    min-width: calc(33.333% - var(--wendo-space-4));
    max-width: calc(33.333% - var(--wendo-space-4));
  }

  /* Case studies: side by side — already handled at 768px in components.css */

  /* Footer: 4 columns — already handled at 768px in components.css */
}

/* ============================================
   xl — 1280px
   ============================================ */
@media (min-width: 1280px) {
  /* Container max-width */
  .container {
    max-width: 1280px;
  }

  /* Influencer grid: 4 columns */
  .influencers-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Wider spacing */
  .section-padding {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .section-header {
    margin-bottom: var(--wendo-space-16);
  }
}

/* ============================================
   Reduced motion preference
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-to-top {
    transition: none;
  }

  .mobile-menu {
    transition: none;
  }

  .nav-menu {
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
