/* GLOBAL RESPONSIVE BREAKPOINTS SYSTEM */

/* Laptop / Small Desktop (max-width: 1199px) */
@media (max-width: 1199px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 30px;
  }
}

/* Tablet (max-width: 991px) */
@media (max-width: 991px) {
  :root {
    --section-padding-desktop: var(--section-padding-tablet);
  }

  .nav-menu, .header-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .grid-50-50, .grid-60-40, .grid-40-60 {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .home-about-text {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .home-about-text .eyebrow {
    margin-left: -12px !important;
    display: inline-block !important;
  }
}

/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
  :root {
    --section-padding-desktop: var(--section-padding-mobile);
  }

  .header-container {
    height: 70px;
  }

  .header-logo img {
    height: 44px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* Section headers text-gravity start (left-aligned) for mobile view */
  .section-header {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    margin-bottom: 2rem !important;
  }

  /* Optical alignment: shift pill left by its own padding (12px) so the text
     inside aligns flush with the heading and paragraph below */
  .section-header .eyebrow,
  .home-about-text .eyebrow {
    margin-left: -12px !important;
    margin-right: auto !important;
    display: inline-block !important;
  }

  /* Portfolio section header left-aligned */
  .portfolio-header {
    align-items: flex-start !important;
    text-align: left !important;
    margin-bottom: 20px !important;
  }

  .portfolio-header-content {
    text-align: left !important;
    padding-right: 0 !important;
  }

  .portfolio-header-content .eyebrow {
    margin-left: -12px !important;
    margin-right: auto !important;
    display: inline-block !important;
  }

  /* Hide desktop header nav on mobile */
  .portfolio-desktop-nav {
    display: none !important;
  }

  .portfolio-header-nav {
    justify-content: flex-start !important;
  }

  /* Work Gallery Portfolio Filter & Mobile Nav System */
  .gallery-filter {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 24px !important;
  }

  .filter-row {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Row 1 on mobile: All Projects (left) & Navigation Arrows (right) */
  .filter-row-1 {
    justify-content: space-between !important;
  }

  .filter-row-1 .filter-btn {
    flex: 0 0 auto !important;
  }

  .filter-row-1 .portfolio-mobile-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    position: static !important;
    margin: 0 !important;
    z-index: 2 !important;
  }

  /* Row 2 on mobile: Electrical Works & Generator */
  .filter-row-2 {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  /* Row 3 on mobile: EV Station & Solar / Green Energy */
  .filter-row-3 {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .filter-row .filter-btn {
    padding: 8px 16px !important;
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  .portfolio-mobile-nav .portfolio-nav-btn {
    width: 38px !important;
    height: 38px !important;
  }

  .portfolio-mobile-nav .portfolio-nav-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Logo ticker caption */
  .logo-ticker-caption {
    text-align: center !important;
    white-space: normal !important;
    padding: 0 16px !important;
  }

  /* CTA banner text-gravity start */
  .home-cta-box {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .home-cta-box .eyebrow {
    margin-left: -12px !important;
    margin-right: auto !important;
    display: inline-block !important;
  }

  .home-about-text {
    align-items: flex-start !important;
    text-align: left !important;
  }

  /* Mobile Hero Banner  -  Mobile cover shifted up 15%, bottom 30-40% white overlay shadow, and 2 buttons side-by-side */
  .hero-banner.home-hero,
  .home-hero {
    background-image: none !important;
    background-color: #ffffff !important;
    min-height: calc(100vh - 70px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
    padding: 20px 0 24px 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .home-hero::before {
    content: "" !important;
    position: absolute !important;
    top: -15% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -5% !important;
    background-image: url('../assets/images/home_cover_mobile.webp') !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  /* 30-40% from bottom white overlay shadow */
  .home-hero-overlay {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 55%,
      rgba(255, 255, 255, 0.50) 68%,
      rgba(255, 255, 255, 0.85) 82%,
      rgba(255, 255, 255, 0.98) 100%
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  .home-hero .hero-container {
    margin-top: auto !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
    padding-bottom: 4px !important;
  }

  .home-hero .hero-content {
    max-width: 100% !important;
    margin-top: auto !important;
  }

  .hero-eyebrow {
    font-size: 0.72rem !important;
    padding: 4px 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(4px) !important;
  }

  .hero-title {
    font-size: 1.6rem !important;
    line-height: 1.22 !important;
    margin-top: 8px !important;
    margin-bottom: 0.55rem !important;
  }

  .hero-desc {
    font-size: 0.86rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.15rem !important;
    color: #1E293B !important;
  }

  /* 2 buttons set in ONE line: one left and one right */
  .hero-btn-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }

  .hero-btn-group .btn {
    flex: 1 1 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    padding: 11px 6px !important;
    font-size: clamp(0.72rem, 3.2vw, 0.82rem) !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* ==========================================================================
     Service Pages Mobile Hero Banners (Electrical, Generator, EV, Solar)
     Mirrors Home Page Mobile Hero Layout:
     - Mobile cover image via ::before
     - Content positioned at bottom (justify-content: flex-end)
     - Bottom gradient overlay shadow
     - Scaled-down title and text for mobile readability
     ========================================================================== */
  .service-hero {
    background-image: none !important;
    background-color: #ffffff !important;
    min-height: calc(100vh - 70px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
    padding: 20px 0 28px 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .service-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  .service-hero.electrical-hero::before {
    background-image: url('../assets/images/electrical-cover-mobile.webp') !important;
  }

  .service-hero.generator-hero::before {
    background-image: url('../assets/images/generator-cover-mobile.webp') !important;
  }

  .service-hero.ev-hero::before {
    top: -12% !important;
    bottom: -5% !important;
    background-image: url('../assets/images/ev-cover-mobile.webp') !important;
  }

  .service-hero.solar-hero::before {
    top: -12% !important;
    bottom: -5% !important;
    background-image: url('../assets/images/solar-cover-mobile.webp') !important;
  }

  /* Bottom 30-45% gradient overlay shadow so text is crisp and readable */
  .service-hero-overlay {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0.55) 60%,
      rgba(255, 255, 255, 0.88) 78%,
      rgba(255, 255, 255, 0.98) 100%
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  .service-hero .hero-container {
    margin-top: auto !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
    padding-bottom: 4px !important;
  }

  .service-hero .service-hero-content {
    max-width: 100% !important;
    margin-top: auto !important;
    text-align: left !important;
  }

  .service-hero-eyebrow {
    font-size: 0.72rem !important;
    padding: 4px 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(4px) !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
  }

  .service-hero-title {
    font-size: 1.6rem !important;
    line-height: 1.22 !important;
    margin-top: 6px !important;
    margin-bottom: 0.5rem !important;
    font-weight: 800 !important;
  }

  .service-hero-desc {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    color: #1E293B !important;
    margin-bottom: 0 !important;
    font-weight: 500 !important;
  }

  .logo-ticker-track {
    gap: 32px;
  }

  .ticker-item img {
    height: 48px;
    max-width: 120px;
  }

  .spec-grid-card {
    padding: 8px 12px;
  }

  .spec-accordion-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .spec-detail-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .spec-detail-panel {
    padding: 14px 16px;
  }
}

/* Small Mobile (max-width: 580px) */
@media (max-width: 580px) {
  .hero-banner.home-hero,
  .home-hero {
    min-height: calc(100vh - 65px) !important;
    padding: 16px 0 24px 0 !important;
    justify-content: flex-end !important;
  }

  .hero-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
  }

  .hero-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .service-hero {
    min-height: calc(100vh - 65px) !important;
    padding: 16px 0 24px 0 !important;
    justify-content: flex-end !important;
  }

  .service-hero-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
  }

  .service-hero-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .hero-btn-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }

  .hero-btn-group .btn {
    flex: 1 1 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    padding: 10px 4px !important;
    font-size: clamp(0.70rem, 3.1vw, 0.78rem) !important;
  }

  .btn {
    width: 100%;
  }

  .modal-card {
    border-radius: var(--radius-md);
  }

  .modal-body {
    padding: 20px;
  }

  .data-table th, .data-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .spec-accordion-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .spec-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .spec-detail-panel {
    position: relative;
    padding: 14px 12px;
  }

  .spec-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .charger-tab-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

/* ==========================================================================
   Responsive: Our Journey / Milestones Section
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .ht-journey-sec {
    padding: 60px 0 75px 0;
  }
  .ht-journey-top-header {
    margin-bottom: 36px;
  }
  .ht-curved-timeline-wrapper {
    overflow-x: auto;
    padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
  }
  .ht-curved-milestones-grid {
    min-width: 760px;
    gap: 12px;
  }
  .ht-journey-path-svg {
    min-width: 760px;
  }
}

@media (max-width: 768px) {
  .ht-journey-sec {
    padding: 50px 16px 65px 16px;
  }
  .ht-journey-sec .hi-tech-container {
    padding: 0 12px;
  }
  .ht-journey-top-header {
    margin-bottom: 32px;
  }
  .ht-journey-top-header .ht-heading-lg {
    font-size: 28px;
    line-height: 1.15;
  }
  .ht-journey-top-header .ht-subtitle {
    font-size: 0.88rem;
    margin-bottom: 0;
    padding: 0 8px;
  }

  /* Mobile Vertical Roadmap Layout (No Horizontal Scroll Needed) */
  .ht-journey-path-svg {
    display: none !important;
  }
  .ht-curved-timeline-wrapper {
    overflow: visible;
    padding-bottom: 0;
    max-width: 480px;
  }
  .ht-curved-milestones-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-left: 64px;
    margin: 0 auto;
    width: 100%;
    min-width: 0 !important;
  }
  .ht-curved-milestones-grid::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    border-left: 2.5px dashed rgba(11, 93, 59, 0.45);
    z-index: 1;
  }
  .ht-curved-node-item {
    position: relative;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(11, 93, 59, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    z-index: 2;
  }
  .ht-curved-node-item:hover {
    transform: none;
  }
  .ht-curved-node-item .ht-node-circle-outer {
    position: absolute;
    left: -64px;
    top: 50%;
    transform: translateY(-50%);
    margin-bottom: 0;
    width: 54px;
    height: 54px;
    z-index: 3;
  }
  .ht-curved-node-item .ht-node-circle-icon {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  .ht-curved-node-item .ht-node-year {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--color-dark);
  }
  .ht-curved-node-item .ht-node-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin: 0 0 4px 0;
  }
  .ht-curved-node-item .ht-node-desc {
    font-family: var(--font-body);
    max-width: 100%;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--color-body);
  }
  .ht-curved-node-item:last-child {
    border-color: rgba(5, 75, 36, 0.3);
    background: rgba(232, 244, 236, 0.9);
  }

  .ht-journey-bottom-wrap {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 28px;
    padding-right: 0;
  }
  .ht-journey-bottom-wrap .ht-journey-script-header {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    text-align: center;
    color: var(--color-primary);
  }
}





