/* ==========================================================================
   Forwarders - Comprehensive Responsive Engine & Mobile Optimization
   ========================================================================== */

/* Global safety & fluid typography */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

.nav-menu-mobile-header,
.nav-menu-mobile-footer {
  display: none;
}

/* ==========================================================================
   Large Tablets & Laptops (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
  .hero-headline {
    font-size: 2.9rem;
  }

  .services-cards-row,
  .services-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

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

  .about-values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  .footer-top-grid {
    grid-template-columns: 1.3fr 0.9fr 1fr 1.3fr;
    gap: 30px;
  }
}

/* ==========================================================================
   Tablets & Medium Devices (max-width: 992px)
   ========================================================================== */
@media (max-width: 992px) {

  /* Navbar & Brand */
  .navbar {
    height: 76px;
  }

  .brand-logo {
    margin-left: 0;
  }

  .brand-logo img,
  .brand-logo-img {
    height: 56px;
  }

  .site-header.scrolled .navbar {
    height: 64px;
  }

  .site-header.scrolled .brand-logo img,
  .site-header.scrolled .brand-logo-img {
    height: 44px;
  }

  /* Mobile Navigation Drawer */
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-size: 1.25rem;
    cursor: pointer;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(85vw, 340px);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, #1E4474 0%, #17365D 100%);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 24px 32px;
    gap: 6px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    overflow-y: auto;
  }

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

  .nav-menu-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mobile-nav-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
  }

  .mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  .nav-menu-mobile-footer {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-link {
    font-size: 1.05rem;
    color: #F1F5F9;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 6px;
    display: block;
  }

  /* Hero Adjustments */
  .hero-section {
    padding-top: 110px;
    padding-bottom: 45px;
  }

  .hero-brand-strip {
    border-radius: 14px;
    padding: 8px 16px;
    margin-top: 0;
    margin-bottom: 20px;
    gap: 10px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .hero-map-col {
    justify-content: center;
    width: 100%;
  }

  .hero-map-card {
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
  }

  /* Sections Grids */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-overview-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .about-overview-heading {
    font-size: 2rem !important;
  }

  .about-overview-grid img {
    height: 340px !important;
  }

  .contact-page-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .network-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .testimonial-card-wrapper {
    grid-template-columns: 1fr;
  }

  .testimonial-photo-col {
    min-height: 260px;
  }

  .testimonial-content-col {
    padding: 30px 24px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   Small Tablets & Landscape Mobiles (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-headline {
    font-size: clamp(1.9rem, 6vw, 2.5rem);
    line-height: 1.2;
  }

  .hero-description {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-map-card .map-badge-tag {
    bottom: 12px;
    left: 12px;
    right: auto;
    top: auto;
    width: max-content;
    padding: 5px 12px;
    font-size: 0.72rem;
  }

  .stat-items-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

  /* Services Strip & Catalog */
  .services-cards-row,
  .services-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .services-main-card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .section-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .process-steps-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .industries-head-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Modals */
  .modal-dialog {
    width: min(94vw, 540px);
    margin: 16px auto;
  }

  .modal-body-content {
    padding: 20px 18px;
  }

  .quote-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-group-full {
    grid-column: span 1;
  }

  .quote-usp-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Subpages Header Adjustments */
  .about-hero-title,
  .services-hero-title {
    font-size: 1.95rem !important;
  }

  .contact-form-container {
    padding: 26px 18px !important;
  }

  .contact-form-row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #googleMapContact {
    height: 320px !important;
    min-height: 320px !important;
  }

  /* CTA */
  .cta-section {
    padding: 65px 0 55px;
    min-height: auto;
  }

  .cta-box .cta-heading {
    font-size: 1.85rem;
  }

  .cta-box .cta-text {
    font-size: 0.95rem;
  }

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

  .footer-bottom-bar {
    padding: 20px 0;
    width: 100%;
  }

  .footer-bottom-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    justify-items: center;
  }

  .footer-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  .footer-bottom-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    white-space: normal;
  }

  .footer-bottom-left .footer-copyright {
    text-align: center;
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0;
  }

  .footer-rights-sub {
    text-align: center;
  }

  .footer-social-center {
    justify-self: center;
  }

  .footer-powered {
    justify-self: center;
    justify-content: center;
    width: 100%;
  }

  .footer-powered-by {
    align-items: center;
  }
}

/* ==========================================================================
   Mobiles & Narrow Viewports (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {

  /* Hide navbar quote button on mobile so header items fit with breathing room */
  .navbar .nav-actions>.open-quote-modal {
    display: none;
  }

  .nav-actions {
    gap: 10px;
  }

  .brand-logo img,
  .brand-logo-img {
    height: 48px;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .search-trigger-btn {
    padding: 6px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

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

  .section-stats-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .about-stat-boxes {
    flex-direction: column;
    width: 100%;
  }

  .about-stat-boxes>div {
    width: 100%;
  }

  .contact-card-box {
    padding: 14px 16px !important;
  }

  .network-metrics-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  .quote-usp-strip {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Small Mobile Devices (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {

  .container,
  .container-wide {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-headline {
    font-size: 1.85rem;
  }

  .hero-brand-text .brand-title {
    font-size: 0.84rem;
  }

  .hero-brand-text .brand-sub {
    font-size: 0.68rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

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

  .about-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .about-actions .btn,
  .about-actions .btn-video {
    width: 100%;
    justify-content: center;
  }

  .hero-map-card .map-badge-tag {
    bottom: 8px;
    left: 8px;
    top: auto;
    padding: 4px 8px;
    font-size: 0.64rem;
    gap: 4px;
  }

  #googleMapContact {
    height: 260px !important;
    min-height: 260px !important;
  }

  .footer-bottom-bar .footer-copyright {
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 0 4px;
  }
}