/* ============================================================================
   Responsive Design - Mobile First Approach
   Breakpoints: 640px (tablet), 1024px (desktop), 1280px (large desktop)
   ============================================================================ */

/* Tablet (640px - 1023px) */
@media (max-width: 1023px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }

  .hero-visual {
    height: 300px;
  }

  .hero-shape {
    opacity: 0.6;
  }

  .shape-1 {
    width: 150px;
    height: 150px;
  }

  .shape-2 {
    width: 120px;
    height: 120px;
  }

  .shape-3 {
    width: 100px;
    height: 100px;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mega-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* Mobile (320px - 639px) */
@media (max-width: 639px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  h4 { font-size: 1rem; }

  .container {
    padding: 0 1rem;
  }

  .header-wrapper {
    padding: 1rem;
  }

  .logo a {
    font-size: 1.25rem;
  }

  .logo-icon {
    font-size: 1.5rem;
  }

  /* Mobile Navigation */
  .mobile-toggle {
    display: flex;
  }

  .nav-primary {
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    background: var(--bg-white);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    box-shadow: var(--shadow-md);
  }

  .nav-primary.active {
    max-height: 500px;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-item a,
  .nav-link {
    padding: 1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-item.cta {
    border-bottom: none;
  }

  .nav-item.cta a {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--bg-white);
    margin: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
  }

  /* Mega Menu Mobile */
  .mega-menu {
    position: static;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: max-height 300ms ease;
  }

  .nav-item.has-submenu.active .mega-menu {
    max-height: 400px;
    padding: 1rem;
  }

  .mega-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mega-column h4 {
    font-size: 0.85rem;
  }

  /* Hero Mobile */
  .hero {
    padding: 3rem 0;
  }

  .hero-text h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-primary-lg,
  .btn-secondary-lg {
    width: 100%;
    justify-content: center;
  }

  /* Sections Mobile */
  .testimonial-cards,
  .solutions-grid,
  .industries-grid,
  .case-studies-grid,
  .insights-grid,
  .values-grid,
  .benefits-grid,
  .jobs-list,
  .team-info {
    grid-template-columns: 1fr;
  }

  .case-metrics {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .team-info {
    gap: 1rem;
  }

  /* Trust Bar Mobile */
  .trust-logos {
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  /* Contact Mobile */
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-form {
    gap: 1rem;
  }

  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }

  /* Back to Top Mobile */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  /* Page Hero Mobile */
  .page-hero {
    padding: 2rem 1rem;
  }

  .page-hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .page-hero p {
    font-size: 1rem;
  }

  /* Services Detail Mobile */
  .services-detailed,
  .industry-detail {
    padding: 2rem 0;
  }

  .service-detail,
  .industry-overview {
    max-width: 100%;
  }

  /* Testimonial Card Mobile */
  .testimonial-card {
    padding: 1.5rem;
  }

  .quote {
    font-size: 0.95rem;
  }

  /* Solution Card Mobile */
  .solution-card {
    padding: 1.5rem;
  }

  .card-icon {
    font-size: 2rem;
  }

  /* Industry Card Mobile */
  .industry-card {
    padding: 1.5rem;
  }

  .industry-number {
    font-size: 2rem;
  }

  /* CTA Section Mobile */
  .cta-section {
    padding: 2rem 1rem;
  }

  .cta-content {
    padding: 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .cta-section p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  /* Case Study Mobile */
  .case-study-card {
    padding: 1.5rem;
  }

  .case-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Job Card Mobile */
  .job-card {
    padding: 1.5rem;
  }

  .job-meta {
    gap: 0.5rem;
  }

  /* Insight Card Mobile */
  .insight-card {
    padding: 1.5rem;
  }

  /* Benefit Card Mobile */
  .benefit-card {
    padding: 1.5rem;
  }

  .benefit-icon {
    font-size: 2.5rem;
  }

  /* Value Card Mobile */
  .value-card {
    padding: 1.5rem;
  }

  .value-icon {
    font-size: 2.5rem;
  }

  /* Form Mobile */
  .form-group input,
  .form-group textarea {
    padding: 0.65rem 0.75rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .error-msg {
    font-size: 0.8rem;
  }

  /* Culture Section Mobile */
  .culture-header {
    margin-bottom: 1.5rem;
  }

  /* Features List Mobile */
  .features-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Section Padding Adjustments */
  .hero,
  .testimonials-featured,
  .solutions-preview,
  .industries-section,
  .services-detailed,
  .case-studies,
  .insights-section,
  .jobs-section,
  .culture-section,
  .team-culture,
  .mission-section,
  .values-section,
  .contact-section {
    padding: 2rem 0;
  }

  .trust-bar {
    padding: 1.5rem 1rem;
  }

  .trust-content p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  /* Stat Mobile */
  .stat-number {
    font-size: 2rem;
  }

  /* Metric Mobile */
  .metric-value {
    font-size: 1.25rem;
  }
}

/* Extra Large Screens (1280px+) */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

  .hero-content {
    gap: 5rem;
  }

  .hero-visual {
    height: 500px;
  }

  .solutions-grid,
  .industries-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .mega-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Landscape Mobile */
@media (max-width: 639px) and (orientation: landscape) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .hero {
    padding: 2rem 0;
  }

  .hero-content {
    gap: 1rem;
  }

  .hero-visual {
    height: 200px;
  }

  .shape-1 { width: 100px; height: 100px; }
  .shape-2 { width: 80px; height: 80px; }
  .shape-3 { width: 60px; height: 60px; }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .back-to-top,
  .mobile-toggle,
  .cta-section {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .btn {
    border: 1px solid #000;
  }
}
