/* ===================================
   RESPONSIVE STYLES - GoNorth Media
   =================================== */

/* ── Tablet (max-width: 1024px) ── */
@media (max-width: 1024px) {
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 1, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 30px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
  }

  .header-nav.open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 15px;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .header-cta {
    margin: 30px 0 0 0;
  }

  .menu-toggle {
    display: flex;
  }

  /* Grids → 1 column on tablet */
  .about-grid,
  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

  /* Steps → 2 columns */
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Bento → 2 columns, remove span */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-card.span-2 {
    grid-column: span 2;
  }

  /* FAQ grid */
  .faq-grid {
    grid-template-columns: 1fr;
  }

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

  /* Partner header */
  .partner-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* About principles → 1 column */
  .about-principles {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile (max-width: 768px) ── */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 100px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero-animated-text {
    font-size: 1.8rem;
    margin-bottom: 30px;
    min-height: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

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

  .about-image-wrapper {
    order: -1;
  }

  .about-image-wrapper img {
    max-height: 280px;
    width: 100%;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
  }

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

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

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

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

  .stat-item .counter-value {
    font-size: 2.5rem;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

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

  /* Steps */
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  /* Bento / Partner */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card.span-2 {
    grid-column: span 1;
  }

  .partner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  /* CTA Banner */
  .cta-banner {
    padding: 40px 20px;
  }

  .cta-banner .check-list {
    flex-direction: column;
    align-items: center;
  }

  /* FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

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

  /* Float buttons spacing */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }

  .phone-float {
    bottom: 84px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  /* Page Hero */
  .page-hero {
    padding: 120px 0 60px;
  }

  .page-hero h1 {
    font-size: 2.5rem;
  }
}

/* ── Small Mobile (max-width: 480px) ── */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-animated-text {
    font-size: 1.4rem;
  }

  .header-logo img {
    height: 42px;
    width: 42px;
    max-width: 42px;
  }

  .cta-banner {
    padding: 30px 20px;
  }

  /* Stats → 1 column on very small */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Steps → 1 column on very small */
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* Bento rating card */
  .bento-rating .counter-value {
    font-size: 2.5rem;
  }

  /* About stats on very small */
  .about-stats {
    gap: var(--space-sm);
  }
}

/* ── Global Overflow Fix ── */
/* Prevent any element from causing horizontal scroll */
@media (max-width: 768px) {
  /* Disable horizontal slide animations on mobile to prevent overflow */
  .reveal-right,
  .reveal-left {
    transform: translateY(30px) !important;
  }

  .reveal-right.active,
  .reveal-left.active {
    transform: translateY(0) !important;
  }

  /* Clip any overflowing sections */
  .hero-section,
  .about-section,
  .why-section,
  .partner-section,
  .steps-section,
  .stats-section,
  .services-section,
  .faq-section,
  .contact-section,
  .clients-section,
  .cta-section {
    overflow-x: hidden;
  }

  /* Fix clients carousel overflow */
  .clients-track {
    animation-play-state: running;
  }

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

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

  .blog-sidebar {
    position: static;
  }

  /* Fix contact details grid */
  .contact-details-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Nuclear Overflow Fix (Mobile) ── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Hide the ::before decoration that sticks out -20px */
  .about-image-wrapper::before {
    display: none;
  }

  /* Prevent header-nav from causing invisible horizontal space */
  .header-nav {
    max-width: 100vw;
  }

  /* Hero pseudo elements - restrict them */
  .hero::before,
  .hero::after {
    display: none;
  }

  /* Ensure all sections never overflow */
  section,
  footer,
  header,
  main,
  .container,
  .site-header,
  .site-footer {
    max-width: 100vw;
    overflow-x: hidden;
  }
}
