/* ##################################################
   #                   MEDIA QUERIES                #
   #  Bootstrap 5 breakpoints:                      #
   #  xxl >= 1400 | xl >= 1200 | lg >= 992          #
   #  md >= 768   | sm >= 576                       #
   ################################################## */

/* ==================================================
   Extra Large Desktops (>= 1400px)
   ================================================== */
@media (min-width: 1400px) {
  .about-section .about-top-wrapper::before {
    width: calc((100vw - 1320px) / 2 + 510px);
    max-width: 45%;
  }
}

/* ==================================================
   Desktops (1200px - 1399.98px)
   ================================================== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .about-section .about-top-wrapper::before {
    width: calc((100vw - 1140px) / 2 + 450px);
    max-width: 46%;
  }
}

/* ==================================================
   Large Devices (>= 992px)
   ================================================== */
@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }

  .dropdown-menu {
    background: var(--white-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;

    li a {
      font-size: 0.9rem;
      color: var(--second-color);
      border-radius: 6px;
      padding: 8px 16px;

      &:hover {
        background-color: var(--fourth-color);
        color: var(--main-color);
      }
    }
  }
}

/* ==================================================
   Laptops (992px - 1199.98px)
   ================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .header .brand-logo {
    height: 64px;
  }

  .header-main .nav-link {
    font-size: 0.9rem;
    padding: 8px 12px !important;
  }

  .about-section .about-top-wrapper::before {
    width: calc((100vw - 960px) / 2 + 380px);
    max-width: 47%;
  }
}

/* ==================================================
   < 1200px
   ================================================== */
@media (max-width: 1199.98px) {
  .hero .hero-content {
    width: 75%;
  }

  .solutions-section {
    .header-section .section-title {
      font-size: 2.4rem;
    }

    .solution-hero-body .solution-hero-title {
      font-size: 1.6rem;
    }

    .solution-card-footer .solution-card-title {
      font-size: 1.05rem;
      white-space: normal;
    }
  }

  .about-section .about-headline {
    font-size: 2.4rem;
  }

  .process-section .process-step-item .process-step-name {
    font-size: 1.15rem;
  }
}

/* ==================================================
   Tablets (< 992px)
   ================================================== */
@media (max-width: 991.98px) {
  .featured-products-section.products-bg {
    background-attachment: scroll;
  }

  /* Header */
  .header .brand-logo {
    height: 60px;
  }

  /* Hero */
  .hero .hero-content {
    width: 85%;
  }

  /* Solutions */
  .solutions-section {
    .header-section .section-title {
      font-size: 2.1rem;
    }

    .solution-bento-hero {
      min-height: 420px;
    }

    .solution-showcase-wrapper,
    .solution-showcase-card {
      min-height: 400px;
    }

    .solutions-header-desc {
      max-width: 100%;
    }
  }

  /* Engineered Banner */
  .engineered-banner-section {
    .engineered-banner-texture {
      width: 60%;
    }

    .engineered-headline {
      font-size: 2.1rem;
    }
  }

  /* About */
  .about-section {
    .about-top-wrapper::before {
      width: 100%;
      height: 380px;
      bottom: auto;
      border-radius: 0 0 24px 24px;
    }

    .about-visual-wrap .about-visual-img {
      height: 420px;
    }

    .about-headline {
      font-size: 2.2rem;
    }

    .about-desc {
      max-width: 100%;
    }

    .about-stats-row {
      .about-stat-item .stat-number-wrap {
        .stat-number {
          font-size: 2.8rem;
        }

        .stat-plus {
          font-size: 2.4rem;
        }
      }

      .about-stat-item .stat-label {
        font-size: 0.95rem;
      }

      .about-stat-divider {
        margin: 0 12px;
      }
    }
  }

  /* Industries (explicit heights: stacked columns have no height for 100% to resolve against) */
  .industries-section {
    .industry-bento-hero {
      height: 380px;
      min-height: 0;
    }

    .industry-bento-wide {
      height: 220px;
    }

    .industry-bento-small {
      height: 220px !important;
    }
  }

  /* Process */
  .process-section {
    .process-visual-box {
      height: 400px;
      min-height: 0;
    }

    .process-accordion-list {
      height: auto;
    }
  }

  /* Quote / Contact */
  .talk-team-card .talk-team-content {
    padding: 32px 28px 10px 28px;
  }

  .quote-form-card {
    padding: 32px 28px;
  }

  /* Inner Pages */
  .page-banner {
    padding: 150px 0 70px;
  }

  .industries-section .industry-bento-grid {
    height: 300px;
  }

  .cta-banner {
    padding: 44px 32px;
  }

  /* Details Pages */
  .details-sidebar {
    position: static;
  }

  .details-media {
    min-height: 320px;

    &.is-photo img {
      min-height: 340px;
    }
  }
}

/* ==================================================
   Small Tablets / Large Phones (< 768px)
   ================================================== */
@media (max-width: 767.98px) {
  /* Engineered Banner */
  .engineered-banner-section .engineered-headline {
    font-size: 1.85rem;
  }

  /* About */
  .about-section {
    .about-top-wrapper {
      padding: 40px 0 30px;

      &::before {
        height: 300px;
      }
    }

    .about-visual-wrap .about-visual-img {
      height: 340px;
    }
  }

  /* Featured Products */
  .featured-products-section {
    .products-line-pagination .swiper-pagination-bullet {
      width: 32px;
    }

    .product-card-title {
      font-size: 1.1rem;
    }
  }

  /* Process */
  .process-section {
    .process-visual-box {
      height: 340px;
    }

    .process-float-card {
      left: 16px;
      bottom: 16px;
      width: calc(100% - 32px);
      padding: 16px 18px;
    }
  }

  [dir="rtl"] .process-section .process-float-card {
    left: auto;
    right: 16px;
  }

  /* Footer */
  #footer {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background-size: cover !important;
  }

  .footer-logo {
    height: 80px;
  }

  .footer-btn-wrap,
  .btn-footer-touch {
    width: 100%;
    justify-content: center;
  }

  /* Back To Top */
  .back-to-top {
    inset-inline-end: 15px;
    bottom: 25px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* Inner Pages */
  .contact-map iframe {
    height: 340px;
  }

  .cta-banner::after {
    width: 70%;
  }
}

/* ==================================================
   Mobile Devices (< 576px)
   ================================================== */
@media (max-width: 575.98px) {
  /* Header */
  .header .brand-logo {
    height: 50px;
  }

  /* Hero Mobile */
  .hero-mobile .swiper .swiper-wrapper .swiper-slide .hero-content h2 {
    font-size: 1.75rem;
  }

  /* Section Headings */
  .header-section h2,
  .featured-products-section .section-headline,
  .industries-section .section-headline,
  .process-section .section-headline,
  .certifications-section .section-headline {
    font-size: 1.75rem;
  }

  .featured-products-section .section-subheadline,
  .industries-section .section-subheadline,
  .process-section .section-subheadline,
  .certifications-section .section-subheadline,
  .solutions-section .header-section .section-subtitle {
    font-size: 0.95rem;
  }

  /* Solutions */
  .solutions-section {
    .header-section .section-title {
      font-size: 1.75rem;
    }

    .solution-bento-hero {
      min-height: auto;

      .solution-hero-img-wrap {
        min-height: 220px;
        padding: 18px 18px 6px;
      }

      .solution-hero-body .solution-hero-title {
        font-size: 1.4rem;
      }
    }

    .solution-bento-card .solution-card-img-wrap {
      height: 180px;
    }

    .solution-showcase-wrapper,
    .solution-showcase-card {
      min-height: 300px;
    }

    .solution-showcase-bottom {
      padding: 16px 18px;
    }

    .solution-showcase-caption {
      font-size: 0.88rem;
    }

    .solution-nav-item {
      padding: 16px 18px;

      &.active {
        padding: 18px 20px 20px 20px;

        .solution-nav-title {
          font-size: 1.3rem;
        }
      }
    .solution-grid-card {
      padding: 14px 14px 18px 14px;
      border-radius: 22px;

      .solution-grid-img-wrap {
        height: 190px;
        padding: 16px;
      }

      .solution-grid-title {
        font-size: 1.25rem;
      }
    }
  }

  /* Engineered Banner */
  .engineered-banner-section .engineered-headline {
    font-size: 1.6rem;
  }

  /* About */
  .about-section {
    .about-top-wrapper::before {
      height: 240px;
    }

    .about-visual-wrap .about-visual-img {
      height: 260px;
    }

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

    .about-desc {
      font-size: 0.98rem;
    }

    .about-stats-row {
      flex-wrap: wrap;
      gap: 20px;

      .about-stat-item .stat-number-wrap {
        .stat-number {
          font-size: 2.3rem;
        }

        .stat-plus {
          font-size: 2rem;
        }
      }
    }

    .about-stat-divider {
      display: none;
    }
  }

  /* Industries */
  .industries-section {
    .industry-bento-hero {
      height: 320px;

      .industry-bento-title {
        font-size: 1.3rem;
      }
    }

    .industry-bento-small {
      height: 200px !important;
    }

    .industry-bento-card {
      .industry-bento-content {
        padding: 18px;
      }

      .industry-bento-title {
        font-size: 1.15rem;
      }
    }
  }

  /* Process */
  .process-section {
    .process-visual-box {
      height: 280px;
    }

    .process-float-card {
      .process-float-title {
        font-size: 1rem;
      }

      .process-float-desc {
        font-size: 0.82rem;
        margin-bottom: 10px;
      }
    }

    .process-step-item {
      padding: 14px 10px;

      &.active {
        padding: 16px;
      }

      .process-step-header-row {
        gap: 12px;
      }

      .process-step-idx {
        font-size: 1rem;
        min-width: 26px;
      }

      .process-step-name {
        font-size: 1.05rem;
      }

      .process-step-body {
        padding-left: 38px;
      }
    }
  }

  [dir="rtl"] .process-section .process-step-item .process-step-body {
    padding-left: 0;
    padding-right: 38px;
  }

  /* Quote / Contact */
  .quote-section {
    padding: 60px 0;

    .quote-main-subtitle {
      font-size: 1rem;
    }
  }

  .talk-team-card .talk-team-content {
    padding: 28px 20px 10px 20px;
  }

  .quote-form-card {
    padding: 28px 20px;
  }

  .btn-stacked-wrap,
  .btn-quote-send {
    width: 100%;
    justify-content: center;
  }

  /* Floating Social Icons */
  .social-icon {
    display: none;
  }

  /* Inner Pages */
  .page-banner {
    padding: 130px 0 56px;

    .page-subtitle {
      font-size: 0.98rem;
    }
  }

  .inner-section .section-headline {
    font-size: 1.75rem;
  }

  .inner-section .section-subheadline {
    font-size: 0.95rem;
  }

  .value-card {
    padding: 22px;
  }

  .industries-section .industry-bento-grid {
    height: 260px;
  }

  .contact-map iframe {
    height: 280px;
  }

  .cta-banner {
    padding: 36px 22px;
    text-align: center;
  }

  /* Details Pages (Clean Responsive) */
  .detailsSwiper .swiper-slide {
    height: 300px;
  }

  .details-slide-item {
    padding: 20px;

    img {
      max-height: 220px;
    }

    .slide-zoom-badge {
      top: 12px;
      bottom: auto;
      right: 12px;
      padding: 5px 12px;
      font-size: 0.72rem;
    }
  }

  [dir="rtl"] .details-slide-item .slide-zoom-badge {
    right: auto;
    left: 12px;
  }

  .details-thumbs-strip {
    gap: 8px;
    margin-bottom: 1.5rem;
  }

  .details-content {
    h3 {
      margin-top: 30px;
    }

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

  .specs-table {
    th,
    td {
      padding: 12px 14px;
      font-size: 0.88rem;
    }

    th {
      width: 45%;
    }
  }

  .product-gallery .product-gallery-thumbs {
    gap: 8px;
  }

  .product-info .product-info-actions > a {
    flex: 1 1 100%;
    justify-content: center;
  }
}
