/*==================================================
ADVANCE NETWORK — RESPONSIVE (mobile-first refinements)
Loaded after style.css, so rules here win.
==================================================*/

/* Comfortable tap targets everywhere on touch devices */
a,
button,
.filter-btn,
#menu,
.faq-item h3 {
  -webkit-tap-highlight-color: transparent;
}

/*==================================================
LAPTOP / SMALL DESKTOP (<=1200px)
==================================================*/

@media (max-width: 1200px) {
  .hero h1 {
    font-size: 58px;
  }

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

/*==================================================
TABLET (<=1024px)
==================================================*/

@media (max-width: 1024px) {
  #header .container {
    padding: 0 25px;
  }

  #navbar ul {
    gap: 26px;
  }

  .hero-container,
  .about-grid,
  .project-wrapper,
  .why-grid,
  .contact-wrapper,
  .service-detail,
  .service-detail.reverse .service-detail-media {
    grid-template-columns: 1fr;
    order: unset;
  }

  .stats-grid,
  .timeline,
  .brands-slider,
  .testimonial-slider,
  .services-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 90px 0;
  }

  .page-banner {
    padding: 170px 0 70px;
  }
}

/*==================================================
LARGE PHONE / SMALL TABLET (<=880px)
==================================================*/

@media (max-width: 880px) {
  .header-buttons .call-btn {
    display: none;
  }
}

/*==================================================
MOBILE (<=768px)
==================================================*/

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  #header {
    height: 86px;
  }

  #header .container {
    padding: 0 16px;
  }

    .logo {
      gap: 10px; 
      align-items: center; 
    }
  
    .logo img {
      height: 48px; /* Perfectly scales down the graphic for mobile layouts */
    }
  
    .logo-text {
      margin-top: 0; 
      line-height: 1.1; 
      display: flex !important; 
    }
  
    .logo-name {
      font-size: 20px; /* Scaled down properly so it stays on one line on phones */
      letter-spacing: 0.5px;
    }
  
    .logo-tagline {
      /* Forced visibility parameters for stubborn mobile layouts */
      display: block !important;       
      visibility: visible !important;  
      opacity: 1 !important;           
      
      font-size: 10px; 
      letter-spacing: 0.8px;
      white-space: normal; 
      margin-top: 3px; 
    }

      /* 1. The Main Menu Box Overhaul */
      #navbar.mobile-open {
        top: 86px;
        max-height: calc(100vh - 86px);
        overflow-y: auto;
        background-color: transparent !important;
        
        background-image: linear-gradient(
            rgba(10, 25, 47, 0.88), 
            rgba(10, 25, 47, 0.95)
          ), 
          url('../images/solar_pane_linstall.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        
        padding: 15px 0 30px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      }
    
      #navbar.mobile-open ul li {
        width: 100%;
        display: block;
      }
    
      /* 2. Centered Text Links */
      #navbar.mobile-open ul li a {
        display: flex;
        align-items: center;
        #navbar.mobile-open ul li a.active {
          color: #ffb703 !important; /* <-- Swap this hex code out with any yellow you like! */
        }
        
        /* FIX 1: Centers the text links horizontally on the screen */
        justify-content: center; 
        text-align: center;
        
        padding: 16px 24px; 
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase; 
        color: rgba(255, 255, 255, 0.85) !important; 
        
        border-bottom: 1px solid rgba(255, 255, 255, 0.06); 
        text-decoration: none !important;
        transition: all 0.3s ease;
      }
    
      /* 3. The Perfect Color-Match Active State */
      #navbar.mobile-open ul li a:hover,
      #navbar.mobile-open ul li a.active {
        /* FIX 2: Swaps custom yellow for your exact theme's gold variable */
        color: var(--gold) !important; 
        
        background-color: rgba(255, 255, 255, 0.02); 
      }
    
      /* 4. Sleek Hover/Active State */
      #navbar.mobile-open ul li a:hover,
      #navbar.mobile-open ul li a.active {
        color: #ffb703 !important; /* Your signature gold color */
        background-color: rgba(255, 255, 255, 0.03); /* Subtle row highlights on tap */
        padding-left: 30px; /* Micro-interaction shift to the right */
      }

  .hero {
    padding: 120px 0 55px;
    text-align: center;
    min-height: auto;
  }

  .hero-badge {
    font-size: 13px;
    padding: 10px 18px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
    margin: 0 auto 24px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 30px;
  }

  .primary-btn,
  .secondary-btn {
    padding: 16px 24px;
    width: 100%;
  }

  .secondary-btn {
    margin-left: 0;
  }

  .hero-highlights {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .hero-highlights .highlight-card:last-child {
    grid-column: 1 / -1;
  }

  .highlight-card {
    min-height: auto;
    padding: 20px 14px;
    background: rgba(11, 46, 99, 0.55);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .highlight-card:hover {
    background: rgba(11, 46, 99, 0.65);
  }

  .hero-right {
    display: none;
  }

  .stats {
    padding: 36px 0 0;
  }

  .stats-grid,
  .timeline,
  .brands-slider,
  .testimonial-slider,
  .services-grid,
  .footer-grid,
  .service-detail-list,
  .gallery-grid,
  .project-list {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    gap: 16px;
  }

  .stat-card {
    min-height: auto;
    padding: 24px 20px;
  }

  .stat-card h2 {
    font-size: 40px;
  }

  .section {
    padding: 46px 0;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .section-heading p {
    font-size: 16px;
  }

  .page-banner {
    padding: 105px 0 42px;
  }

  .page-banner h1 {
    font-size: 32px;
  }

  .about-image {
    margin-bottom: 20px;
  }

  .why-grid {
    gap: 30px;
  }

  .check-item {
    margin-bottom: 14px;
  }

  .experience-box {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -50px auto 0;
    width: 160px;
    height: 160px;
  }

  .experience-box h2 {
    font-size: 44px;
  }

  .feature {
    padding: 18px;
    gap: 18px;
  }

  .feature .icon {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .service-content {
    padding: 28px;
  }

  .service-detail {
    padding: 34px 0;
    gap: 24px;
  }

  .service-detail-text h2 {
    font-size: 27px;
  }

  .project-wrapper {
    gap: 30px;
  }

  .filter-bar {
    gap: 10px;
    margin-bottom: 28px;
  }

  .filter-btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .brands {
    padding: 40px 0;
  }

  .contact-form,
  .contact-info {
    padding: 26px 20px;
  }

  .contact-wrapper {
    gap: 20px;
  }

  footer {
    padding: 48px 0 22px;
    text-align: center;
  }

  .footer-grid {
    gap: 40px;
  }

  .footer-about .footer-contact-quick {
    align-items: center;
  }

  .footer-address {
    justify-content: center;
  }

  footer img {
    margin: 0 auto 20px;
  }

  .cta-banner h2 {
    font-size: 28px;
  }

  .cta-banner .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  #topButton {
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
  }

  .whatsapp-float {
    left: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    font-size: 26px;
  }
}

/*==================================================
SMALL PHONE (<=480px)
==================================================*/

@media (max-width: 480px) {
  .container {
    width: 92%;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .hero-highlights .highlight-card:last-child {
    grid-column: auto;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .stat-card h2 {
    font-size: 36px;
  }

  .service-detail-list {
    gap: 10px;
  }

  .logo img {
    height: 48px;
  }

  .gallery-item .gallery-img-wrap {
    height: 210px;
  }
}

/*==================================================
VERY SMALL PHONE (<=360px)
==================================================*/

@media (max-width: 360px) {
  .hero h1 {
    font-size: 26px;
  }

  .section-heading h2 {
    font-size: 22px;
  }
}

/*==================================================
ACCESSIBILITY: REDUCED MOTION
==================================================*/

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .hidden {
    opacity: 1;
    transform: none;
  }
}

/*==================================================
VISIBLE KEYBOARD FOCUS
==================================================*/

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/*==================================================
ABOUT TEXT — MOBILE SCALING
==================================================*/

@media (max-width: 768px) {
  .about-title {
    font-size: 28px;
  }

  .about-lead {
    font-size: 15px;
  }

  .eyebrow {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .about-title {
    font-size: 24px;
  }
}

/*==================================================
MOBILE — CENTER TEXT BLOCKS EVENLY
(feature / check-item / service-detail text used to be
left-aligned next to an icon, which looked lopsided on
narrow screens; stack and center them instead)
==================================================*/

@media (max-width: 768px) {
  .feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature .icon {
    margin: 0 auto;
  }

  .check-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .check-item i {
    margin: 0 auto 8px;
  }

  .service-detail-text {
    text-align: center;
  }

  .service-detail-icon {
    margin: 0 auto 25px;
  }

  .service-detail-list {
    text-align: left;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-content,
  .why-content .check-item div,
  .project-right,
  .featured-project .project-right {
    text-align: center;
  }

  .project-list {
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-info h3,
  .contact-info > p {
    text-align: center;
  }

  .contact-info ul {
    display: inline-block;
    text-align: left;
  }

  /* Tighter, evener body copy on small screens */
  p,
  .about-lead,
  .service-detail-text > p,
  .feature p,
  .check-item p {
    font-size: 15px;
    line-height: 1.7;
  }
}
