/* ==========================================================================
   KGN Aluminium Sliding Window & Glass Work - Master Responsive Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Global Zero-Overflow & Width Clamping
   -------------------------------------------------------------------------- */
html {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
}

body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

.site-header,
.hero-banner-section,
.hero-stats-wrapper,
section,
footer {
  max-width: 100% !important;
  overflow-x: hidden;
}

img {
  max-width: 100% !important;
  height: auto;
}

/* --------------------------------------------------------------------------
   1. Large Screens (1400px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* --------------------------------------------------------------------------
   2. Desktops & Tablets Landscape (992px to 1199px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .section-title {
    font-size: 2.1rem;
  }
  .process-timeline {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   3. Tablets Portrait & Mobile Devices (Max Width: 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* Navigation & Mobile Header */
  .site-header {
    padding: 5px 0;
    width: 100% !important;
  }

  .brand-logo-img {
    height: 58px;
    max-width: 250px;
    padding: 2px 6px;
  }

  .navbar-collapse {
    background: #091A23;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-top: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    max-height: 80vh;
    overflow-y: auto !important;
    width: 100% !important;
  }

  .navbar-nav {
    gap: 8px;
  }

  .nav-link {
    padding: 10px 14px !important;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
  }

  .nav-link:hover, 
  .nav-link.active {
    background: rgba(56, 189, 248, 0.12);
  }

  .nav-link::after {
    display: none;
  }

  .header-btn {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    padding: 12px 20px;
  }

  /* Services Mobile Megamenu Accordion */
  .services-megamenu {
    display: none;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px;
    padding: 12px !important;
    background: rgba(14, 38, 53, 0.95) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: var(--radius-sm);
    box-shadow: none !important;
    pointer-events: auto !important;
  }

  .services-megamenu.show,
  .dropdown-services.show > .services-megamenu {
    display: block !important;
  }

  .services-dropdown-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .service-dropdown-item {
    padding: 8px 10px;
  }

  .service-dropdown-desc {
    display: none !important;
  }

  /* Hero Banner Section - Full Graphic Flush to Edges */
  .hero-banner-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .hero-banner-slide {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-banner-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
  }

  .hero-swiper-nav,
  .swiper-btn-custom {
    display: none !important;
  }

  .hero-swiper-pagination {
    bottom: 8px !important;
  }

  .hero-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
  }

  .hero-swiper-pagination .swiper-pagination-bullet-active {
    width: 24px;
  }

  /* Hero Stats 2x2 Grid */
  .hero-stats-wrapper {
    margin-top: 0;
    padding: 14px 0;
    width: 100% !important;
  }

  .hero-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .hero-stat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    gap: 10px;
  }

  .hero-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .hero-stat-number {
    font-size: 1.15rem;
    line-height: 1.1;
  }

  .hero-stat-label {
    font-size: 0.7rem;
  }

  /* General Grid & Sections */
  .about-image-wrapper img {
    height: 340px;
    margin-bottom: 25px;
  }

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

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

  .footer-bottom-links {
    justify-content: flex-start;
    margin-top: 15px;
  }

  .service-sidebar {
    position: static;
    margin-top: 24px;
  }
}

/* --------------------------------------------------------------------------
   4. Mobile Devices (Max Width: 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    max-width: 100% !important;
  }

  .row {
    margin-left: -8px !important;
    margin-right: -8px !important;
  }

  .row > * {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .section-padding {
    padding: 50px 0;
  }

  .section-padding-sm {
    padding: 35px 0;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-tag {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
  }

  .section-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Page Banner on Mobile */
  .page-banner {
    padding: 100px 0 45px 0;
    width: 100% !important;
  }

  .page-banner-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .page-banner-title {
    font-size: 1.95rem;
    margin-bottom: 10px;
  }

  .breadcrumb-custom {
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Hero Stats Bar (Compact 2x2 for small screens) */
  .hero-stats-wrapper {
    padding: 12px 0;
  }

  .hero-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .hero-stat-item {
    padding: 8px 10px;
    gap: 8px;
  }

  .hero-stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  .hero-stat-number {
    font-size: 1rem;
  }

  .hero-stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.2px;
  }

  /* Service Detail Components on Mobile */
  .service-featured-img-frame img {
    max-height: 280px;
  }

  .service-badge-pill {
    bottom: 12px;
    left: 12px;
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .service-quick-highlights-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 18px 0 25px 0;
  }

  .highlight-stat-box {
    padding: 12px 14px;
    gap: 12px;
  }

  .highlight-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .service-content-body {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .service-features-box,
  .service-workflow-section,
  .quote-form-card,
  .service-nav-card,
  .contact-info-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .service-feature-card {
    padding: 14px;
    gap: 10px;
  }

  .service-cta-banner-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
    gap: 16px;
  }

  .service-cta-text h4 {
    font-size: 1.2rem;
  }

  .service-cta-buttons {
    width: 100%;
    flex-direction: column;
  }

  .service-cta-buttons a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* About & Checklists */
  .about-image-wrapper img {
    height: 260px;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Projects & Processes */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  /* CTA Section */
  .cta-title {
    font-size: 1.8rem;
  }

  .cta-desc {
    font-size: 0.95rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .cta-buttons a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Floating Action Buttons */
  .floating-mobile-actions {
    bottom: 14px;
    right: 14px;
    gap: 10px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   5. Extra Small Devices (Max Width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .brand-logo-img {
    height: 52px;
    max-width: 230px;
    padding: 2px 5px;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .page-banner-title {
    font-size: 1.65rem;
  }

  .hero-stat-item {
    flex-direction: column;
    text-align: center;
    padding: 8px 6px;
    gap: 6px;
  }

  .hero-stat-icon {
    margin: 0 auto;
  }

  .hero-stat-number {
    font-size: 0.95rem;
  }

  .hero-stat-label {
    font-size: 0.62rem;
  }

  .filter-btn {
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .footer-title {
    font-size: 1rem;
  }

  .floating-btn {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  /* Google Reviews Mobile Adjustments */
  .google-trust-badge-wrap {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 10px 18px;
    gap: 10px;
  }

  .google-trust-text {
    border-left: none;
    border-top: 1px solid #E2E8F0;
    padding-left: 0;
    padding-top: 6px;
    width: 100%;
  }

  .btn-kgn-google {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

