/* ============================================================
   BrightCore Systems LLC — Responsive Styles
   responsive.css | Version 1.0
   ============================================================ */

/* ── Breakpoints
   xs:  < 480px
   sm:  480px – 639px
   md:  640px – 767px
   lg:  768px – 1023px
   xl:  1024px – 1279px
   2xl: ≥ 1280px
   ============================================================ */

/* ── XL (1024–1279px) ────────────────────────────────────── */
@media (max-width: 1279px) {
  :root {
    --container-max: 100%;
  }

  .hero-float-card {
    display: none;
  }

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

  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .counters-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }

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

  .mega-menu {
    width: 560px;
  }
}

/* ── LG (768–1023px) ─────────────────────────────────────── */
@media (max-width: 1023px) {
  :root {
    --header-h: 70px;
    --spacing-3xl: 4.5rem;
  }

  /* Header */
  .site-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-search-btn,
  .dark-toggle,
  #header-cta {
    display: none !important;
  }

  /* Services & About Page Responsive Fixes */
  .service-detail-row {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    padding: 2.5rem 0 !important;
  }

  .service-stat-box {
    padding: 1.5rem !important;
  }

  .about-values-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Hero */
  .hero-content {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-content {
    padding-right: 0;
  }

  .about-badge-float {
    right: 0.5rem;
    bottom: -1rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

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

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

  /* Counters */
  .counters-grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2rem;
  }

  /* Process */
  .process-timeline {
    flex-direction: column;
    gap: 2rem;
  }

  .process-timeline::before {
    top: 0;
    bottom: 0;
    left: 39px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
    padding: 0;
  }

  .process-step-num {
    margin: 0;
    flex-shrink: 0;
  }

  .process-step-body {
    padding-top: 1rem;
  }

  /* Testimonials */
  .testimonial-card {
    flex: 0 0 calc(50% - 0.75rem);
  }

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

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info {
    position: static;
  }

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

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  /* Hero float card */
  .hero-float-card {
    display: none;
  }

  /* Scroll indicator */
  .scroll-indicator {
    display: none;
  }
}

/* ── MD (640–767px) ──────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --spacing-3xl: 4rem;
  }

  /* Section */
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

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

  /* Hero */
  #hero {
    min-height: 560px;
  }

  .hero-title {
    font-size: clamp(1.875rem, 7vw, 3rem);
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .hero-stat-number {
    font-size: 1.75rem;
  }

  /* About */
  .about-features {
    grid-template-columns: 1fr;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  /* Testimonials */
  .testimonial-card {
    flex: 0 0 100%;
  }

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

  /* Contact form */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 2rem 1.5rem;
  }

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

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

  .footer-bottom-links {
    gap: 1rem;
  }

  /* Process */
  .process-step-desc {
    display: none;
  }
}

/* ── SM (480–639px) ──────────────────────────────────────── */
@media (max-width: 639px) {
  :root {
    --container-pad: 1rem;
    --spacing-3xl: 3.5rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

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

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

  /* Counters */
  .counters-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Header */
  .logo-tagline {
    display: none;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-base);
  }

  /* CTA */
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Page hero */
  .page-hero {
    padding: calc(var(--header-h) + 3rem) 0 3rem;
  }

  /* Search modal */
  .search-modal {
    padding-top: 5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    align-items: flex-start;
  }

  /* Floating buttons */
  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
  }

  #whatsapp-btn {
    bottom: 4.5rem;
    right: 1.25rem;
    width: 46px;
    height: 46px;
  }

  /* Contact form */
  .form-submit-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .form-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── XS (< 480px) ────────────────────────────────────────── */
@media (max-width: 479px) {
  :root {
    --header-h: 64px;
  }

  h1 { font-size: clamp(1.875rem, 9vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 7vw, 2rem); }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero-stat {
    min-width: 100px;
  }

  .industries-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .industry-card {
    padding: 1.25rem 0.75rem;
  }

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

  .counter-value {
    font-size: 2rem;
  }

  .tech-logo-card {
    padding: 1rem 1.25rem;
    min-width: 90px;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .process-timeline::before {
    left: 31px;
  }

  .process-step-num {
    width: 64px;
    height: 64px;
  }

  .mobile-nav {
    width: 100vw;
  }

  /* Mobile nav close area */
  .hamburger {
    width: 38px;
    height: 38px;
  }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  #site-header,
  #site-footer,
  #back-to-top,
  #whatsapp-btn,
  .cursor-glow,
  .hero-particles,
  .hero-shapes,
  #loading-screen {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .section {
    padding: 2rem 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }
}

/* ── High contrast ───────────────────────────────────────── */
@media (forced-colors: active) {
  .btn {
    border: 2px solid ButtonText;
  }

  .service-card,
  .why-card,
  .industry-card {
    border: 1px solid ButtonText;
  }
}

/* ── Landscape mobile ────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
  }

  .hero-title {
    font-size: clamp(1.5rem, 5vh, 2.5rem);
  }

  .hero-subtitle {
    display: none;
  }

  .hero-stats {
    display: none;
  }

  .hero-controls {
    bottom: 1rem;
  }
}

/* ── Large screens ───────────────────────────────────────── */
@media (min-width: 1536px) {
  :root {
    --container-max: 1400px;
  }

  .hero-float-card {
    right: max(2rem, calc((100vw - 1400px) / 2 + 2rem));
  }
}
