/**
 * Master Responsive Stylesheet - Hindustan Power EV
 * Comprehensive breakpoint tuning for 1920px down to 320px mobile screens.
 *
 * @package HindustanPowerEV
 * @version 4.0.0
 */

/* ==========================================================================
   1. Large Desktop & Ultrawide (1600px - 1920px)
   ========================================================================== */
@media (min-width: 1600px) {
  .hp-container {
    max-width: 1400px !important;
  }
}

/* ==========================================================================
   2. Standard Desktop & Laptops (1280px - 1440px)
   ========================================================================== */
@media (max-width: 1440px) {
  .hp-container {
    max-width: 1200px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

@media (max-width: 1280px) {
  .hp-nav-menu {
    gap: 1.5rem;
  }

  .hp-nav-menu a {
    font-size: 0.8rem;
  }

  .hp-footer-grid {
    grid-template-columns: 1.6fr 1fr 1.3fr 0.9fr 0.9fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   3. Tablet & Small Laptops (992px - 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  /* Vertical Rhythm */
  .hp-section,
  section.wp-block-group {
    padding-top: var(--hp-section-gap-tablet, 80px) !important;
    padding-bottom: var(--hp-section-gap-tablet, 80px) !important;
  }

  /* Typography */
  h1, .hp-hero-title, .hp-contact-hero-title {
    font-size: 2.75rem !important;
    line-height: 1.2 !important;
  }

  h2, .hp-section-title, .hp-contact-main-heading {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }

  p, body {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Footer Grid */
  .hp-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   4. Mobile Navigation & Tablet Recomposition (<= 992px)
   ========================================================================== */
@media (max-width: 992px) {
  /* Full-Screen Mobile Navigation Overlay */
  .hp-mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: inherit !important;
    cursor: pointer;
    z-index: 1002;
  }

  .hp-mobile-toggle svg {
    stroke: currentColor;
  }

  .hp-nav-menu,
  .hp-site-header .hp-nav-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(11, 13, 25, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1.75rem !important;
    padding: 2rem !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hp-nav-menu.is-active,
  .hp-site-header .hp-nav-menu.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .hp-nav-menu a,
  .hp-site-header .hp-nav-menu a {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.06em !important;
    padding: 0.75rem 2rem !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .hp-site-header .hp-nav-menu a:hover,
  .hp-site-header .hp-nav-menu a.current-menu-item {
    color: #11b2a4 !important;
  }

  /* Universal 2-Column Recomposition for Tablet */
  .hp-why-grid,
  .hp-team-grid,
  .hp-products-grid,
  .hp-about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem !important;
  }
}

/* ==========================================================================
   5. Mobile Devices (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Vertical Rhythm */
  .hp-section,
  section.wp-block-group {
    padding-top: var(--hp-section-gap-mobile, 56px) !important;
    padding-bottom: var(--hp-section-gap-mobile, 56px) !important;
  }

  /* Container */
  .hp-container {
    width: 92% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Typography */
  h1, .hp-hero-title, .hp-contact-hero-title {
    font-size: 2.25rem !important;
    line-height: 1.25 !important;
  }

  h2, .hp-section-title, .hp-contact-main-heading {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  h3 {
    font-size: 1.35rem !important;
  }

  p, body {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  /* Header Controls on Mobile */
  .hp-header-inner .hp-btn {
    width: auto !important;
    min-height: 38px !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.725rem !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .hp-mobile-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    flex-shrink: 0 !important;
    background: rgba(17, 178, 164, 0.12) !important;
    color: #11b2a4 !important;
    border-radius: 10px !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  .hp-mobile-toggle svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
  }

  .hp-site-header .hp-logo-badge {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.65rem !important;
  }

  .hp-site-header .hp-logo-title {
    font-size: 0.95rem !important;
  }

  .hp-site-header .hp-logo-tagline {
    display: none !important;
  }

  /* Universal Section Button Touch Sizes */
  .hp-hero-section .hp-btn,
  .hp-cta-banner .hp-btn,
  .hp-cta-btn-primary,
  .hp-cta-btn-outline,
  .hp-contact-submit-btn,
  .hp-map-directions-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 0.875rem !important;
  }

  /* Form Controls */
  input, select, textarea, .hp-form-control {
    font-size: 0.95rem !important;
    padding: 0.875rem 1rem !important;
    min-height: 48px;
  }

  /* Stacked Card & Grid Layouts for Mobile */
  .hp-hero-specs-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem 1rem !important;
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
  }

  .hp-hero-spec-col {
    width: 100% !important;
  }

  .hp-products-swiper .swiper-slide {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .hp-products-swiper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
  }

  .hp-why-grid,
  .hp-features-grid,
  .hp-about-grid,
  .hp-home-about-grid,
  .hp-team-grid,
  .hp-products-grid,
  .hp-trending-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }

  .hp-trending-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    padding: 1.5rem 1.25rem !important;
  }

  .hp-trending-img-wrap {
    width: 100% !important;
    height: 220px !important;
    margin: 0 auto !important;
  }

  .hp-trending-img-wrap img {
    max-height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .hp-trending-body {
    width: 100% !important;
  }

  .hp-trending-specs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .hp-why-visual,
  .hp-why-card,
  .hp-about-visual,
  .hp-about-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hp-trust-strip-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .hp-trust-item {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 1.25rem !important;
    padding-right: 0 !important;
    width: 100% !important;
  }

  .hp-trust-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  .hp-stats-grid,
  .hp-about-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Footer Adjustments */
  .hp-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .hp-footer-bottom {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   6. Compact Mobile (<= 430px - 320px)
   ========================================================================== */
@media (max-width: 430px) {
  h1, .hp-hero-title, .hp-contact-hero-title {
    font-size: 1.95rem !important;
  }

  h2, .hp-section-title, .hp-contact-main-heading {
    font-size: 1.5rem !important;
  }

  .hp-about-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .hp-site-header {
    padding: 0.85rem 0 !important;
  }

  .hp-logo-title {
    font-size: 1.05rem !important;
  }
}

@media (max-width: 360px) {
  .hp-container {
    width: 94% !important;
  }

  h1, .hp-hero-title {
    font-size: 1.75rem !important;
  }

  .hp-btn {
    font-size: 0.8rem !important;
    padding: 0.75rem 1.25rem !important;
  }
}
