:root {
  --navy: #163867;
  --navy-dark: #102b4f;
  --red: #e04444;
  --text: #1d2a3b;
  --muted: #6f7d90;
  --bg: #f4f6f8;
  --card: #ffffff;
  --border: #dfe6ee;
  --light-border: #eef2f6;
  --light-bg: #f7f9fc;
  --shadow: 0 8px 24px rgba(11, 34, 68, 0.08);
  --shadow-lg: 0 10px 28px rgba(16, 43, 79, 0.06);
  --container: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background: #ffffff;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: 100%;
  min-height: 100vh;
  background: #fff;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1300;
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  transition: min-height 0.3s ease;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.brand img,
#header-logo {
  width: 270px;
  height: auto;
  object-fit: contain;
  transition: width 0.3s ease;
}

.site-header.shrunk .header-inner {
  min-height: 68px;
}

.site-header.shrunk .brand img,
.site-header.shrunk #header-logo {
  width: 200px;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  position: static;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 34px;
  min-height: 58px;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  position: relative;
  padding: 10px 0;
  color: #33465d;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 0;
  height: 3px;
  background: var(--red);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  color: var(--red);
  outline: none;
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a.active::after {
  width: 50px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 44px;
}

.menu-toggle::before,
.menu-toggle::after,
.menu-toggle span {
  content: "";
  position: absolute;
  left: 50%;
  width: 24px;
  height: 3px;
  background: var(--navy);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: block;
}

.menu-toggle::before {
  top: 13px;
}

.menu-toggle span {
  top: 20px;
}

.menu-toggle::after {
  top: 27px;
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translateX(-50%) rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateX(-50%) rotate(-45deg) translate(5px, -5px);
}

/* =========================
   HERO
========================= */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #fff;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(14, 42, 78, 0.84) 0%,
      rgba(14, 42, 78, 0.70) 24%,
      rgba(14, 42, 78, 0.14) 58%,
      rgba(14, 42, 78, 0) 100%
    );
  z-index: 0;
}

.hero {
  min-height: 320px;
}

.page-hero-sm {
  min-height: 260px;
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 36px 0;
}

.hero-content {
  max-width: 500px;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 2.6vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero-content h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.hero p,
.page-hero p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.eyebrow {
  margin: 0 0 10px;
  color: #f0b6b6;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Page-specific heroes */
.hero-home {
  background-image: url('../images/home-hero.png');
}

.hero-services {
  background-image: url('../images/services-hero.jpg');
}

.hero-commercial {
  background-image: url('../images/commercial-hero.jpg');
}

.hero-residential {
  background-image: url('../images/residential-hero.jpg');
}

.hero-company {
  background-image: url('../images/company-hero.jpg');
}

.hero-contact {
  background-image: url('../images/contact-hero.jpg');
}

/* =========================
   BUTTONS
========================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(224, 68, 68, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(224, 68, 68, 0.34);
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 34px 0;
}

.section-alt {
  background: var(--light-bg);
}

.section-title {
  margin: 0 0 22px;
  text-align: center;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* =========================
   HOME PAGE SERVICES
========================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}

.service-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid #edf1f6;
  box-shadow: 0 5px 16px rgba(16, 43, 79, 0.06);
  border-radius: 4px;
  min-height: 124px;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: #7ba7d8;
  box-shadow: 0 10px 20px rgba(33, 86, 148, 0.12);
}

.service-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 124px;
  padding: 18px 12px;
  color: inherit;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  overflow: hidden;
}

.service-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.service-card span {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  text-align: center;
}

/* =========================
   CONTENT LAYOUT
========================= */

.content-grid {
  display: grid;
  gap: 28px;
}

.two-col {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.info-block h3,
.content-card h3,
.content-grid h2 {
  margin-top: 0;
  color: var(--navy);
}

.info-block h3 {
  margin: 0 0 12px;
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 700;
}

.info-block p,
.content-card p,
.content-grid p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #4a5a70;
}

.content-card {
  background: #fff;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.content-card-wide {
  max-width: 860px;
  margin: 0 auto;
}

.license-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f6f7f9;
  border: 1px solid #e9edf2;
  border-radius: 999px;
  padding: 8px 12px;
  color: #6d7786;
  font-size: 12px;
  font-weight: 600;
}

/* =========================
   LISTS
========================= */

.check-list,
.feature-list,
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.check-list li,
.feature-list li,
.contact-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: #33465d;
  line-height: 1.6;
}

.feature-list li,
.contact-list li {
  margin-bottom: 12px;
}

.check-list li::before,
.feature-list li::before,
.contact-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--navy);
  font-weight: 700;
}

.contact-list strong {
  color: var(--navy);
}

/* =========================
   SERVICE DETAIL PAGE
========================= */

.service-detail-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 22px;
  align-items: start;
}

.service-detail-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.service-detail h2 {
  margin: 0 0 10px;
  color: var(--navy);
}

.service-detail p:last-child {
  margin-bottom: 0;
}

/* =========================
   BRAND LOGOS
========================= */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.brand-card {
  background: #fff;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 43, 79, 0.06);
  padding: 24px 20px;
  text-align: center;
}

.brand-logo {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.brand-logo img {
  max-width: 140px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.1rem;
}

.brand-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #4a5a70;
}

/* =========================
   FOOTER
========================= */

.footer {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 34px 0 40px;
}

.footer h4 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.footer p,
.footer a,
.footer li {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.8;
}

.footer .accent {
  color: #ff6f61;
  font-weight: 700;
}

.socials {
  display: flex;
  gap: 14px;
  padding-top: 6px;
}

.socials a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
  .header-inner {
    min-height: 82px;
  }

  .brand img,
  #header-logo {
    width: 220px;
  }

  .site-header.shrunk .brand img,
  .site-header.shrunk #header-logo {
    width: 180px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
    z-index: 1320;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    padding: 16px 0 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    gap: 0;
    min-height: 0;
    z-index: 1290;
    border-top: 1px solid var(--light-border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    text-align: center;
    border-bottom: 1px solid var(--light-border);
    font-size: 15.5px;
    color: var(--text);
    box-sizing: border-box;
  }

  .nav a::after,
  .nav a:hover::after,
  .nav a:focus-visible::after,
  .nav a.active::after {
    display: none;
    width: 0;
  }

  .nav a:hover,
  .nav a:focus-visible,
  .nav a.active {
    color: var(--red);
    background: rgba(224, 68, 68, 0.06);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .info-grid,
  .footer-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    padding: 0 14px;
    min-height: 74px;
  }

  .brand img,
  #header-logo {
    width: 190px;
  }

  .site-header.shrunk .brand img,
  .site-header.shrunk #header-logo {
    width: 165px;
  }

  .hero {
    min-height: 280px;
  }

  .hero-content {
    max-width: 320px;
    padding: 28px 0;
  }

  .page-hero-sm {
    min-height: 220px;
  }

  .page-hero-content {
    padding: 28px 0;
  }

  .services-grid,
  .check-list {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-detail-icon {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 520px) {
  .brand-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .services-grid,
  .check-list {
    grid-template-columns: 1fr;
  }
}
