/* =========================================================
   Pleasant MEP Solutions — Responsive Overrides
   ========================================================= */

html,
body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

@media (max-width: 1199.98px) {
  :root {
    --nav-height: 76px;
  }

  .navbar-pleasant .navbar-shell {
    width: min(100% - 1.5rem, var(--container));
    max-width: 100%;
  }

  .navbar-pleasant .navbar-collapse {
    background: #fff;
    margin-top: 0.75rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-soft);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .navbar-pleasant .nav-link {
    font-size: 0.95rem;
    padding: 0.7rem 0.85rem !important;
    white-space: normal;
  }

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

  .navbar-pleasant .dropdown-menu {
    border: none;
    box-shadow: none;
    padding: 0 0.5rem 0.5rem;
  }

  .navbar-cta {
    margin: 0.5rem 0 0;
    width: 100%;
  }

  .navbar-cta .btn {
    width: 100%;
  }

  .process-track {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2rem;
  }

  .process-track::before {
    display: none;
  }

  .services-spotlight {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 2.5rem) 0 2rem;
  }

  .hero-inner {
    width: min(100% - 1.75rem, var(--container));
    max-width: 100%;
    gap: 2rem;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-content {
    max-width: none;
    padding-left: 1rem;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .hero-aside {
    justify-content: flex-start;
  }

  .hero-aside-card {
    width: 100%;
    max-width: 420px;
  }

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

  .stats-bridge {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hvac-product,
  .hvac-product:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .project-grid,
  .gallery-grid {
    columns: 2 220px;
  }
}

/* Tablets */
@media (max-width: 991.98px) {
  .section-padding {
    padding: 3.75rem 0;
  }

  .split-media,
  .split-media img {
    min-height: 320px;
  }

  .page-hero {
    padding: calc(var(--nav-height) + 2.5rem) 0 2.75rem;
  }

  .counter-section .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile landscape / large phones */
@media (max-width: 767.98px) {
  .container-pleasant {
    width: min(100% - 1.5rem, var(--container));
  }

  .hero-inner {
    width: min(100% - 1.5rem, var(--container));
    max-width: 100%;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 1.75rem);
  }

  .hero-content {
    padding-left: 0.85rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
    max-width: none;
  }

  .hero .lead {
    max-width: none;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .stats-bridge {
    gap: 0.5rem;
    padding: 1rem;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .counter-section .stat-item {
    min-height: 132px;
    padding: 1.35rem 0.85rem 1.2rem;
  }

  .process-track {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .search-field {
    width: 100%;
  }

  .cta-band {
    text-align: center;
    padding: 2rem 1.25rem;
  }

  .cta-band .d-flex {
    justify-content: center !important;
  }

  .cta-band .btn {
    width: 100%;
  }

  .site-footer {
    padding-top: 3.25rem;
  }

  #backToTop,
  #whatsappFloat {
    right: 0.85rem;
    width: 44px;
    height: 44px;
  }

  #whatsappFloat {
    font-size: 1.55rem;
  }

  #backToTop {
    bottom: 5rem;
  }
}

/* Small phones */
@media (max-width: 575.98px) {
  :root {
    --nav-height: 70px;
  }

  .navbar-pleasant .navbar-brand img {
    height: 44px;
    max-width: 132px;
  }

  .navbar-pleasant .navbar-shell {
    width: min(100% - 1.25rem, var(--container));
  }

  .hero-inner {
    width: min(100% - 1.25rem, var(--container));
    gap: 1.5rem;
  }

  .stats-bridge {
    grid-template-columns: 1fr 1fr;
  }

  .process-track {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .gallery-grid {
    columns: 1;
  }

  .section-title {
    max-width: none;
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .page-hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .contact-panel {
    padding: 1.25rem;
  }

  .hvac-product .media,
  .hvac-product .media img {
    min-height: 240px;
  }
}

/* Short landscape phones */
@media (orientation: landscape) and (max-height: 520px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 1rem);
    padding-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 0.75rem;
  }

  .hero .lead {
    margin-bottom: 1rem;
  }

  .hero-inner {
    gap: 1.25rem;
  }

  .stats-bridge {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.75rem;
  }

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

/* Prevent horizontal scroll from wide elements */
img,
video,
iframe,
.table,
.swiper,
.swiper-wrapper {
  max-width: 100%;
}

.swiper {
  overflow: hidden;
}

/* Large laptops */
@media (max-width: 1399.98px) {
  .navbar-pleasant .nav-link {
    font-size: 0.84rem;
    padding: 0.4rem 0.5rem !important;
  }

  .navbar-pleasant .nav-link::after {
    left: 0.5rem;
    right: 0.5rem;
  }
}
