/* ==========================================================================
   MK DIGITAL - RESPONSIVE STYLESHEET & BREAKPOINTS
   Ensures seamless presentation on desktop, tablet, and mobile with ZERO horizontal scrolling.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOPS & SMALL DESKTOPS (<= 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root {
    --space-4xl: 4.5rem;
    --space-3xl: 3.5rem;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-2xl);
  }

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

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

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

  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* --------------------------------------------------------------------------
   2. TABLETS & LARGE MOBILE (<= 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  :root {
    --header-height: 72px;
    --space-4xl: 3.75rem;
    --space-3xl: 2.75rem;
    --space-2xl: 2.25rem;
  }

  .main-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .header-cta-group .btn {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    text-align: center;
  }

  .hero-badge-row {
    justify-content: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-social-proof {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .about-imagery-composition {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

/* --------------------------------------------------------------------------
   3. SMALL TABLETS & PHONES (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --space-4xl: 3rem;
    --space-3xl: 2.25rem;
    --space-2xl: 1.75rem;
  }

  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
  }

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

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

  .why-choose-grid,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr !important;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-pill-cards {
    grid-template-columns: 1fr;
  }

  .form-group-grid {
    grid-template-columns: 1fr;
  }

  .floating-stat-card {
    padding: 10px 14px;
  }

  .stat-icon-wrap {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .stat-info-title {
    font-size: 1.05rem;
  }

  .floating-stat-card.top-right {
    top: -10px;
    right: -10px;
  }

  .floating-stat-card.bottom-left {
    bottom: -15px;
    left: -15px;
  }

  .cta-banner-card {
    padding: var(--space-2xl) var(--space-lg);
  }

  .cta-buttons-row {
    flex-direction: column;
    width: 100%;
  }

  .cta-buttons-row .btn {
    width: 100%;
  }

  .testimonial-slide {
    padding: var(--space-xl) var(--space-lg);
  }

  .testimonial-text {
    font-size: 1.08rem;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

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

/* --------------------------------------------------------------------------
   4. COMPACT MOBILE SCREENS (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --space-lg: 1rem;
    --space-xl: 1.25rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

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

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

  .why-choose-grid,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr !important;
  }

  .about-image-primary {
    width: 100%;
  }

  .about-image-primary img {
    height: 320px;
  }

  .about-image-secondary {
    display: none;
  }

  .about-experience-badge {
    position: static;
    margin-top: var(--space-md);
    display: inline-block;
  }

  .why-choose-card {
    padding: var(--space-lg);
  }

  .contact-form-card {
    padding: var(--space-xl) var(--space-md);
  }

  .modal-content-card {
    padding: var(--space-xl) var(--space-md);
  }

  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   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;
  }

  .marquee-track {
    animation: none;
    overflow-x: auto;
  }

  .floating-stat-card {
    animation: none;
  }
}
