/* ============================================================
   RAS SPORTSWEAR — RESPONSIVE
   Mobile-first breakpoints for all sections and components
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   BASE: Mobile (<480px) — default styles in other files
   All other files are written mobile-first; this file adds
   progressive enhancements at each breakpoint.
   ───────────────────────────────────────────────────────────── */

/* Touch-friendly defaults */
button,
a,
[role="button"],
input,
select,
textarea {
  min-height: 44px;
}

/* Reduce decorative elements on smallest screens */
.hero::before,
.hero::after {
  opacity: 0.5;
}

.final-cta::before,
.final-cta::after {
  display: none;
}

.final-cta-decoration {
  display: none;
}

.hero-floating-shape {
  display: none;
}


/* ─────────────────────────────────────────────────────────────
   SMALL TABLET (≥480px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 480px) {
  :root {
    --container-padding: var(--space-6);
  }

  /* Hero */
  .hero-cta-row {
    flex-direction: row;
    justify-content: center;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Products */
  .product-card {
    flex: 0 0 260px;
  }



  /* Why Choose */
  .why-choose-grid {
    grid-template-columns: 1fr;
  }

  /* Factory */
  .factory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials */
  .testimonials-track .testimonial-card {
    flex: 0 0 85%;
  }

  /* Final CTA */
  .final-cta-buttons {
    flex-direction: row;
    justify-content: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}


/* ─────────────────────────────────────────────────────────────
   TABLET (≥768px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-8);
  }

  /* Section padding */
  .section {
    padding-block: var(--space-20);
  }

  .section--lg {
    padding-block: 6rem;
  }

  /* Hero */
  .hero-title {
    font-size: var(--text-5xl);
  }

  .hero-subtitle {
    font-size: var(--text-xl);
  }

  .hero-floating-shape {
    display: block;
  }

  .hero::before,
  .hero::after {
    opacity: 1;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
  }

  .stats .stat-card::after {
    display: block;
  }

  /* Products */
  .product-card {
    flex: 0 0 300px;
  }



  /* Why Choose */
  .why-choose-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }

  .why-choose-card {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Factory — masonry grid starts */
  .factory-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: var(--space-5);
  }

  .factory-item--wide {
    grid-column: span 2;
  }

  .factory-item--tall {
    grid-row: span 2;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Industries */
  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }

  /* Timeline */
  .timeline-track {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials */
  .testimonials-track .testimonial-card {
    flex: 0 0 70%;
  }

  /* FAQ — side-by-side layout */
  .faq-layout {
    flex-direction: row;
    gap: var(--space-12);
    align-items: flex-start;
  }

  .faq-header {
    flex: 0 0 340px;
    position: sticky;
    top: 6rem;
  }

  .faq-content {
    flex: 1;
    min-width: 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }

  /* Final CTA decorative shapes */
  .final-cta::before,
  .final-cta::after {
    display: block;
  }

  .final-cta-decoration {
    display: block;
  }
}


/* ─────────────────────────────────────────────────────────────
   DESKTOP (≥1024px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-10);
  }

  /* Navigation — show desktop links */
  .mobile-menu-btn {
    display: none;
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: 0;
  }

  .hero-title {
    font-size: var(--text-6xl);
  }

  /* Stats */
  .stats {
    margin-top: calc(-1 * var(--space-16));
  }

  .stats-grid {
    gap: var(--space-6);
  }

  /* Products */
  .product-card {
    flex: 0 0 320px;
  }



  /* Why Choose */
  .why-choose-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Factory */
  .factory-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
  }

  /* Timeline — switch to 4 columns grid */
  .timeline-track {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Industries */
  .industries-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }

  /* Testimonials */
  .testimonials-track .testimonial-card {
    flex: 0 0 50%;
  }

  /* FAQ */
  .faq-header {
    flex: 0 0 400px;
  }

  /* Section headers */
  .section-title {
    font-size: var(--text-5xl);
  }
}


/* ─────────────────────────────────────────────────────────────
   LARGE DESKTOP (≥1280px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1280px) {
  :root {
    --container-padding: var(--space-12);
  }



  /* Why Choose */
  .why-choose-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Products */
  .product-card {
    flex: 0 0 340px;
  }



  /* Testimonials */
  .testimonials-track .testimonial-card {
    flex: 0 0 calc(50% - var(--space-3));
  }

  /* Portfolio grid bigger items */
  .portfolio-grid {
    gap: var(--space-8);
  }
}


/* ─────────────────────────────────────────────────────────────
   EXTRA LARGE (≥1440px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1440px) {
  :root {
    --container-padding: var(--space-14);
  }

  /* Hero */
  .hero-content {
    max-width: 1000px;
  }



  /* Stats — more spacing */
  .stats-grid {
    gap: var(--space-8);
  }

  .stat-number {
    font-size: var(--text-5xl);
  }

  /* Products */
  .product-card {
    flex: 0 0 360px;
  }

  /* Factory */
  .factory-grid {
    grid-auto-rows: minmax(240px, auto);
    gap: var(--space-6);
  }



  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-card {
    aspect-ratio: 3 / 2;
  }

  /* Final CTA */
  .final-cta {
    padding-block: 7rem;
  }

  .final-cta-title {
    font-size: var(--text-6xl);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-16);
  }
}


/* ─────────────────────────────────────────────────────────────
   ULTRA WIDE (≥1800px) — subtle enhancements
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1800px) {
  :root {
    --container-max: 1600px;
  }

  .hero-content {
    max-width: 1100px;
  }


}


/* ─────────────────────────────────────────────────────────────
   HEIGHT-BASED: Short viewports
   ───────────────────────────────────────────────────────────── */
@media (max-height: 700px) {
  .hero {
    min-height: auto;
    padding-block: 6rem 3rem;
  }

  .hero-scroll-indicator {
    display: none;
  }
}


/* ─────────────────────────────────────────────────────────────
   INTERACTION QUERIES: Hover vs. Touch
   ───────────────────────────────────────────────────────────── */
@media (hover: none) {
  /* On touch devices, show overlays by default */
  .product-card-overlay {
    opacity: 1;
    background: linear-gradient(
      180deg,
      transparent 50%,
      var(--color-overlay-heavy) 100%
    );
  }

  .portfolio-card-info {
    opacity: 1;
    transform: translateY(0);
  }

  /* Remove hover effects that look glitchy on touch */
  .card-hover:hover {
    transform: none;
  }

  .capability-card:hover,
  .why-choose-card:hover,
  .industry-card:hover,
  .stat-card:hover,
  .testimonial-card:hover,
  .portfolio-card:hover,
  .product-card:hover {
    transform: none;
  }

  /* Ensure tap targets are large enough */
  .product-tab,
  .portfolio-filter,
  .accordion-header,
  .nav-links a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }
}

@media (hover: hover) {
  /* Only add hover animations on hover-capable devices */
  .card-hover {
    will-change: transform, box-shadow;
  }
}


/* ─────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────── */
@media print {
  .navbar,
  .mobile-menu,
  .whatsapp-btn,
  .back-to-top,
  .hero-scroll-indicator,
  .hero::before,
  .hero::after,
  .hero-floating-shape,
  .final-cta-decoration,
  .autoplay-indicator {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding-block: 1.5rem;
  }

  .card,
  .card-glass,
  .stat-card {
    border: 1px solid #CCC;
    box-shadow: none;
    background: #FFFFFF;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}


/* ─────────────────────────────────────────────────────────────
   CONTAINER QUERIES (Progressive Enhancement)
   ───────────────────────────────────────────────────────────── */
@supports (container-type: inline-size) {
  .card {
    container-type: inline-size;
  }

  @container (min-width: 400px) {
    .card-content {
      padding: var(--space-8);
    }

    .why-choose-card {
      flex-direction: row;
    }
  }

  .testimonials-carousel {
    container-type: inline-size;
  }

  @container (min-width: 600px) {
    .testimonials-track .testimonial-card {
      flex: 0 0 calc(50% - var(--space-3));
    }
  }

  @container (min-width: 900px) {
    .testimonials-track .testimonial-card {
      flex: 0 0 calc(33.333% - var(--space-4));
    }
  }
}


/* ─────────────────────────────────────────────────────────────
   FORCED COLORS (High Contrast Mode)
   ───────────────────────────────────────────────────────────── */
@media (forced-colors: active) {
  .btn-primary,
  .btn-secondary {
    border: 2px solid ButtonText;
  }

  .gradient-text,
  .gradient-text-animated {
    -webkit-text-fill-color: unset;
    background: none;
    color: LinkText;
  }

  .card,
  .card-glass,
  .stat-card,
  .accordion-item {
    border: 1px solid ButtonText;
  }

  .capability-card {
    border-top: 3px solid Highlight;
  }

  .product-tab.active,
  .portfolio-filter.active,
  .testimonials-dot.active {
    background: Highlight;
    color: HighlightText;
  }
}
