/* ===== 18. RESPONSIVE DESIGN ===== */

/* ===== TABLET (992px and below) ===== */
@media (max-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .container {
    padding: 0 15px;
  }
}

/* ===== TABLET / MOBILE LARGE (768px and below) ===== */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer h5 {
    font-size: var(--font-size-lg);
  }
  
  .social-links {
    justify-content: center;
  }
  
  .contact-info li {
    flex-direction: column;
    text-align: center;
  }
  
  .alert-container {
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    top: calc(var(--header-height-mobile) + 10px);
  }
  
  [dir="rtl"] .alert-container {
    right: 10px;
    left: 10px;
  }
  
  /* Improve spacing on mobile */
  .main-content > section {
    padding: var(--spacing-lg) 0;
  }
  
  .main-content > section:first-child {
    padding-top: var(--spacing-lg);
  }
  
  .main-content > section:last-child {
    padding-bottom: var(--spacing-lg);
  }
  
  /* Better text readability */
  body {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
}

/* ===== MOBILE (576px and below) ===== */
@media (max-width: 576px) {
  .container {
    padding: 0 10px;
  }
  
  /* Hero styles (.main-slogan, .desc-text, .company-age-badge, .hero-btns) are in hero.css */
  /* Page title styles (.page-title) are in page-title.css */
  /* Button styles (.btn-modern) are in buttons.css */
  /* Trust quote box styles are in sections.css */
  /* Factory logo item styles are in sections.css */
  
  /* Improve touch targets */
  button, .btn, .nav-link, .social-links a, .footer-lang-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Better spacing */
  .main-content > section {
    padding: var(--spacing-md) 0;
  }
  
  .main-content > section:first-child {
    padding-top: var(--spacing-md);
  }
  
  .main-content > section:last-child {
    padding-bottom: var(--spacing-md);
  }
  
  /* Improve text readability */
  body {
    font-size: 0.9rem;
    line-height: 1.65;
  }
  
  h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 1.25rem;
    line-height: 1.4;
  }
  
  h4 {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  
  /* Better card spacing */
  .card {
    margin-bottom: var(--spacing-md);
  }
  
  /* Improve form inputs */
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }
  
  /* Better button spacing */
  .btn-modern {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Alert container adjustments */
  .alert-container {
    top: calc(var(--header-height-mobile) + 5px);
    right: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
  }
}


/* Keyboard access and stable mobile navigation. */
.skip-link {
    position: fixed;
    inset-inline-start: 1rem;
    top: -100px;
    z-index: 10000;
    padding: .75rem 1rem;
    color: #fff;
    background: #123c56;
    border-radius: .4rem;
}
.skip-link:focus { top: 1rem; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 3px solid #ba7400 !important;
    outline-offset: 3px;
}
#main-content { scroll-margin-top: 100px; }
.back-to-top:not(.show) { visibility: hidden; }
@media (max-width: 991.98px) {
    body.menu-open { overflow: hidden !important; position: static !important; height: auto !important; }
    html[dir="ltr"] .header .navbar-collapse { direction: ltr !important; }
    html[dir="ltr"] .header .nav-link { text-align: left !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.hero-section .btn-modern.btn-outline, .hero-slider .btn-modern.btn-outline,
.carousel .btn-modern.btn-outline { color: #fff; border-color: #fff; }

/* Long customized menus switch to a disclosure instead of covering the logos. */
.header.navigation-overflow .navbar-toggler { display:inline-flex !important; align-items:center; justify-content:center; min-width:46px; min-height:46px; order:1; }
.header.navigation-overflow .navbar-collapse,
html[dir="rtl"] .header.navigation-overflow .navbar-collapse {
    position:fixed !important; top:var(--navigation-top,90px) !important;
    inset-inline:0 !important; width:100% !important; max-width:100% !important;
    height:calc(100dvh - var(--navigation-top,90px)); overflow-y:auto !important;
    background:#fff !important; padding:12px 20px 32px !important;
    display:none !important; z-index:1450;
}
.header.navigation-overflow .navbar-collapse.show,
html[dir="rtl"] .header.navigation-overflow .navbar-collapse.show { display:block !important; }
.header.navigation-overflow .navbar-nav,
html[dir="rtl"] .header.navigation-overflow .navbar-nav { flex-direction:column !important; width:100% !important; align-items:stretch !important; }
.header.navigation-overflow .navbar-nav .nav-link { white-space:normal; overflow-wrap:anywhere; min-height:48px; text-align:start; display:flex; align-items:center; }
body.menu-open { overflow:hidden !important; }
.header .nav-link { overflow-wrap:anywhere; }
.main-content [id] { scroll-margin-top:110px; }
.main-content p, .main-content h1, .main-content h2, .main-content h3,
.footer .contact-info a { overflow-wrap:break-word; }

/* Center desktop links on the full header width, with the account action at the edge. */
@media (min-width: 992px) {
    .header:not(.navigation-overflow) .navbar .container { position: static !important; }
    .header:not(.navigation-overflow) .navbar-collapse,
    html[dir="rtl"] .header:not(.navigation-overflow) .navbar-collapse,
    html[dir="ltr"] .header:not(.navigation-overflow) .navbar-collapse {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        pointer-events: none;
    }
    .header:not(.navigation-overflow) .navbar-nav,
    html[dir="rtl"] .header:not(.navigation-overflow) .navbar-collapse .navbar-nav,
    html[dir="ltr"] .header:not(.navigation-overflow) .navbar-collapse .navbar-nav {
        justify-content: center !important;
        margin: 0 !important;
        pointer-events: auto;
    }
    .header:not(.navigation-overflow) .nav-account-item,
    .header:not(.navigation-overflow) .user-menu-item {
        position: absolute !important;
        left: var(--spacing-md);
        top: 50%;
        transform: translateY(-50%);
    }
    html[dir="ltr"] .header:not(.navigation-overflow) .nav-account-item,
    html[dir="ltr"] .header:not(.navigation-overflow) .user-menu-item {
        left: auto;
        right: var(--spacing-md);
    }
}
.main-content .form-control, .main-content .form-select { max-width:100%; min-height:48px; }
.main-content textarea.form-control { min-height:150px; resize:vertical; }
.main-content input[type="email"], .main-content input[type="tel"] { direction:ltr; text-align:start; }
.main-content .alert { overflow-wrap:anywhere; }
.gallery-item img[role="button"] { cursor:zoom-in; }
.gallery-item img[role="button"]:focus-visible { outline:3px solid #ba7400; outline-offset:4px; }
@media (max-width:767.98px) {
    .main-content .form-control, .main-content .form-select { font-size:16px; }
    .main-content .btn { white-space:normal; max-width:100%; }
    .footer .contact-info a { max-width:100%; }
}

/* Bootstrap-like rows use padded gutters, not an extra flex column gap. */
:where(.main-content, .footer) .row { column-gap:0 !important; width:auto; }
:where(.main-content, .footer) .row > [class*="col-"] { width:100%; min-width:0; }
:where(.main-content, .footer) .row > .col-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-12 { width:100.00000000%; }
@media (min-width:576px) {
:where(.main-content, .footer) .row > .col-sm-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-sm-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-sm-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-sm-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-sm-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-sm-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-sm-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-sm-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-sm-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-sm-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-sm-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-sm-12 { width:100.00000000%; }
}
@media (min-width:768px) {
:where(.main-content, .footer) .row > .col-md-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-md-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-md-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-md-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-md-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-md-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-md-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-md-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-md-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-md-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-md-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-md-12 { width:100.00000000%; }
}
@media (min-width:992px) {
:where(.main-content, .footer) .row > .col-lg-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-lg-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-lg-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-lg-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-lg-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-lg-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-lg-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-lg-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-lg-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-lg-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-lg-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-lg-12 { width:100.00000000%; }
}
@media (min-width:1200px) {
:where(.main-content, .footer) .row > .col-xl-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-xl-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-xl-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-xl-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-xl-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-xl-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-xl-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-xl-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-xl-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-xl-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-xl-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-xl-12 { width:100.00000000%; }
}
@media (min-width:1400px) {
:where(.main-content, .footer) .row > .col-xxl-1 { width:8.33333333%; }
:where(.main-content, .footer) .row > .col-xxl-2 { width:16.66666667%; }
:where(.main-content, .footer) .row > .col-xxl-3 { width:25.00000000%; }
:where(.main-content, .footer) .row > .col-xxl-4 { width:33.33333333%; }
:where(.main-content, .footer) .row > .col-xxl-5 { width:41.66666667%; }
:where(.main-content, .footer) .row > .col-xxl-6 { width:50.00000000%; }
:where(.main-content, .footer) .row > .col-xxl-7 { width:58.33333333%; }
:where(.main-content, .footer) .row > .col-xxl-8 { width:66.66666667%; }
:where(.main-content, .footer) .row > .col-xxl-9 { width:75.00000000%; }
:where(.main-content, .footer) .row > .col-xxl-10 { width:83.33333333%; }
:where(.main-content, .footer) .row > .col-xxl-11 { width:91.66666667%; }
:where(.main-content, .footer) .row > .col-xxl-12 { width:100.00000000%; }
}
