/**
 * NetBoost Rocket - Responsive Styles
 * Mobile-first approach with progressive enhancement
 */

/* ==========================================
   SMALL MOBILE (up to 480px) - iPhone SE, etc.
   ========================================== */

@media (max-width: 480px) {
  /* Exit Popup - Extra small screens */
  .exit-popup__content {
    margin: var(--spacing-xs);
    padding: var(--spacing-md);
  }

  .exit-popup__content h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
  }

  .exit-popup__content p {
    font-size: 0.9rem;
  }

  .exit-popup__form button {
    font-size: 0.95rem;
    padding: 0.875rem 1rem;
  }
}

/* ==========================================
   MOBILE (up to 767px)
   ========================================== */

@media (max-width: 767px) {

  /* Navigation */
  .nav__menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-xl);
    gap: 0;
    transition: left var(--transition-normal);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }

  .nav__menu.active {
    left: 0;
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--color-light-gray);
    padding: var(--spacing-md) 0;
  }

  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: var(--spacing-sm) 0 0 var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
  }

  .nav__item--dropdown.active .nav__dropdown {
    max-height: 300px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__cta {
    margin-top: var(--spacing-md);
  }

  .nav__cta .btn {
    width: 100%;
  }

  /* Hero Section */
  .hero {
    min-height: 80vh;
    padding-top: 120px;
  }

  .hero__headline {
    font-size: 2rem;
  }

  .hero__subheadline {
    font-size: 1.125rem;
  }

  .hero__supporting-text {
    font-size: 1rem;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
  }

  /* Trust Bar */
  .trust-bar__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  /* Problem Statement */
  .problem-statement__grid {
    grid-template-columns: 1fr;
  }

  /* Products */
  .product-showcase,
  .product-showcase--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--spacing-xl);
  }

  .product-showcase__content {
    padding: 0;
  }

  .product-showcase__title {
    font-size: 1.75rem;
  }

  /* Process Flow */
  .process-flow {
    grid-template-columns: 1fr;
  }

  .process-flow::before {
    display: none;
  }

  /* Tech Specs */
  .tech-specs__grid {
    grid-template-columns: 1fr;
  }

  /* Industries */
  .industries__grid {
    grid-template-columns: 1fr;
  }

  /* ROI Stats */
  .roi-stats__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .stat-card__number {
    font-size: 3rem;
  }

  .stat-card__symbol {
    font-size: 2.5rem;
  }

  /* Differentiators */
  .differentiators__grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  /* Final CTA */
  .final-cta__headline {
    font-size: 2rem;
  }

  .final-cta__buttons {
    flex-direction: column;
  }

  .final-cta__buttons .btn {
    width: 100%;
  }

  /* Footer */
  .footer__main {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .footer__brand {
    max-width: 100%;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .footer__legal {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  /* Sticky CTA */
  .sticky-cta .container {
    flex-direction: column;
    text-align: center;
  }

  .sticky-cta__close {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
  }

  /* Exit Popup */
  .exit-popup__content {
    margin: var(--spacing-sm);
    padding: var(--spacing-lg);
    max-width: 95vw;
  }

  .exit-popup__form {
    flex-direction: column;
  }

  .exit-popup__form input,
  .exit-popup__form button {
    width: 100%;
    min-width: auto;
  }

  .exit-popup__form button {
    padding: 1rem 1.5rem;
    text-align: center;
    white-space: normal;
    line-height: 1.4;
  }

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

  .contact-info {
    order: -1;
  }

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

  .team-member {
    grid-template-columns: 1fr;
  }

  .team-member__expertise-list {
    grid-template-columns: 1fr;
  }

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

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

  .about-cta__title {
    font-size: 1.75rem;
  }

  .about-cta__text {
    font-size: 1.0625rem;
  }

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

/* ==========================================
   TABLET (768px to 1023px)
   ========================================== */

@media (min-width: 768px) and (max-width: 1023px) {

  /* Trust Bar */
  .trust-bar__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-bar__item:nth-child(4),
  .trust-bar__item:nth-child(5) {
    grid-column: span 1;
  }

  /* Problem Statement */
  .problem-statement__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Products */
  .product-showcase {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .product-showcase--reverse {
    direction: ltr;
  }

  .product-showcase__title {
    font-size: 2rem;
  }

  /* Process Flow */
  .process-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-flow::before {
    display: none;
  }

  /* Tech Specs */
  .tech-specs__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* ROI Stats */
  .roi-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  /* Footer */
  .footer__main {
    grid-template-columns: 1fr;
  }

  .footer__links {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* About Page */
  .values__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-member {
    grid-template-columns: 1fr;
  }

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

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

/* ==========================================
   LARGE DESKTOP (1440px+)
   ========================================== */

@media (min-width: 1440px) {

  .container {
    max-width: 1400px;
  }

  .hero__headline {
    font-size: 4rem;
  }

  .section__title {
    font-size: 3rem;
  }

  .product-showcase__title {
    font-size: 3rem;
  }

  .final-cta__headline {
    font-size: 3.5rem;
  }
}

/* ==========================================
   LANDSCAPE PHONE (Small Height)
   ========================================== */

@media (max-height: 600px) and (orientation: landscape) {

  .hero {
    min-height: auto;
    padding: var(--spacing-3xl) 0;
  }

  .nav__menu {
    height: auto;
    max-height: 70vh;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {

  .header,
  .nav,
  .sticky-cta,
  .exit-popup,
  .footer__social,
  .btn,
  .cta {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

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

  section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }

  .testimonial-card,
  .industry-card,
  .tech-card {
    page-break-inside: avoid;
  }
}

/* ==========================================
   REDUCED MOTION (Accessibility)
   ========================================== */

@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;
  }

  .hero__background::after {
    transition: none;
  }

  .process-step,
  .tech-card,
  .industry-card,
  .testimonial-card {
    transition: none;
  }

  .stat-card__number {
    animation: none;
  }
}

/* ==========================================
   HIGH CONTRAST MODE (Accessibility)
   ========================================== */

@media (prefers-contrast: high) {

  .btn--primary,
  .btn--secondary {
    border: 3px solid currentColor;
  }

  .hero__background::after {
    background: rgba(0, 0, 0, 0.9);
  }

  .tech-card {
    border-width: 2px;
  }
}

/* ==========================================
   TOUCH DEVICE SPECIFIC
   ========================================== */

@media (hover: none) and (pointer: coarse) {

  /* Ensure all interactive elements are min 44x44px */
  .btn,
  .nav__link,
  .footer__social-link,
  .contact-info__social-link {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover states on touch devices */
  .btn:hover,
  .card:hover,
  .tech-card:hover,
  .industry-card:hover {
    transform: none;
  }

  /* Make dropdowns work with tap instead of hover */
  .nav__item--dropdown .nav__dropdown {
    display: none;
  }

  .nav__item--dropdown.active .nav__dropdown {
    display: block;
  }
}
