.hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: 92px max(24px, calc((100vw - var(--container)) / 2)) 76px;
  color: var(--paper);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 10%, rgba(245, 165, 36, 0.22), transparent 24%),
    linear-gradient(135deg, #071a2d 0%, #0f3358 48%, #0c6f7b 100%);
}

/* When a hero image is configured, it becomes the section's actual
   background (background-image is set inline from the uploaded URL - see
   home.ejs); this class supplies the sizing/position and a dark gradient
   overlay so the heading/body text stays readable over any photo. The
   default gradient above still shows for every visitor until an image is
   uploaded, and reappears immediately if the image is ever removed. */
.hero.hero-with-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero.hero-with-image::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, rgba(7, 26, 45, 0.92) 0%, rgba(15, 51, 88, 0.82) 45%, rgba(12, 111, 123, 0.55) 100%);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: 0;
  right: -8%;
  bottom: -24%;
  width: 55vw;
  height: 55vw;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero .eyebrow {
  color: #ffcf70;
}

.hero p {
  max-width: 700px;
  color: #e6f2fb;
  font-size: 20px;
}

.hero-actions,
.section-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.hero-stat-grid article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
}

.hero-stat-grid span {
  color: #cce6f5;
  font-size: 13px;
  font-weight: 800;
}

.hero-stat-grid strong {
  color: var(--paper);
  font-size: 20px;
  line-height: 1.2;
}

.filter-pills a {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 800;
}

.band,
.content-section,
.cta-band,
.page-hero {
  padding: 88px max(24px, calc((100vw - var(--container)) / 2));
}

.offers-section {
  padding: 56px max(24px, calc((100vw - var(--container)) / 2));
  background: var(--paper);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.offer-item {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.offer-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.offer-item div {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.offer-item span {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: #7a3e00;
  background: #fff2d2;
  font-size: 13px;
  font-weight: 900;
}

.band {
  background: var(--soft);
}

.split-layout,
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 48px;
}

.about-summary-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.about-summary-card h3 {
  color: var(--navy);
  font-size: 30px;
}

.professional-list {
  display: grid;
  gap: 12px;
  padding-left: 18px;
}

.professional-list li {
  padding-left: 4px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.feature-grid,
.service-grid,
.card-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card,
.service-grid article,
.content-card,
.review-card,
.career-card,
.contact-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.feature-card,
.service-grid article,
.review-card,
.career-card,
.contact-panel,
.contact-form {
  padding: 24px;
}

.service-grid article {
  display: grid;
  gap: 12px;
  padding: 32px;
  border-radius: 12px;
}

.consent-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  margin: 2px 0 0;
  font-size: 1rem;
  accent-color: var(--navy);
}

.consent-checkbox span {
  flex: 1 1 auto;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2));
  background: var(--line);
}

.stats-strip div {
  display: grid;
  place-items: center;
  min-height: 150px;
  background: var(--navy);
  color: var(--paper);
}

.stats-strip strong {
  font-size: 42px;
}

.content-card {
  overflow: hidden;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:focus-visible {
  outline: 3px solid rgba(245, 165, 36, 0.75);
  outline-offset: 3px;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.12);
}

.content-card img,
.content-card video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.solar-card-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  height: 220px;
  padding: 18px;
  background: linear-gradient(135deg, #eaf5fb, #f7fbfd);
}

.solar-card-visual.compact-visual {
  height: 300px;
  border-radius: var(--radius);
}

.content-card:hover img {
  transform: scale(1.05);
}

.content-card h2,
.content-card h3,
.content-card p,
.content-card .button {
  margin-left: 18px;
  margin-right: 18px;
}

.content-card h2,
.content-card h3 {
  margin-top: 18px;
  font-size: 21px;
}

.content-card .button {
  margin-bottom: 18px;
}

.stars,
.price {
  color: var(--amber-2);
  font-weight: 900;
}

.card-meta,
.product-meta {
  color: var(--teal);
  font-weight: 900;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 16px;
}

.product-meta span {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--soft);
}

.cta-band {
  text-align: center;
  color: var(--paper);
  background: linear-gradient(135deg, var(--navy), var(--teal));
}

.page-hero {
  color: var(--paper);
  background:
    radial-gradient(circle at 88% 20%, rgba(245, 165, 36, 0.26), transparent 24%),
    linear-gradient(135deg, var(--navy), var(--teal));
}

.compact-hero {
  min-height: 340px;
}

.page-hero .eyebrow {
  color: #ffcf70;
}

.page-hero p {
  max-width: 720px;
  color: #e5f4fb;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-pills a {
  border: 1px solid var(--line);
  background: var(--paper);
}

.filter-pills a.active {
  color: var(--paper);
  background: var(--teal);
  border-color: var(--teal);
}

.product-group {
  margin-bottom: 48px;
}

.product-dialog {
  max-height: 88vh;
  overflow: auto;
}

.dialog-media img,
.dialog-media video {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--soft);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.spec-table th,
.spec-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

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

.gallery-grid img,
.gallery-grid video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

.career-list {
  display: grid;
  gap: 18px;
}

.career-card {
  display: grid;
  gap: 16px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
}

.office-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.office-gallery img {
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.map-frame {
  width: 100%;
  height: 360px;
  margin-top: 28px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.accordion {
  display: grid;
  gap: 12px;
}

.accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.accordion summary {
  padding: 18px 20px;
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.accordion details p {
  padding: 0 20px 20px;
}

.auth-shell {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 72px 18px;
  background: var(--soft);
}

.auth-panel {
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.auth-panel img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-bottom: 18px;
}

.auth-panel h1 {
  color: var(--navy);
  font-size: 32px;
}

@media (max-width: 900px) {
  .split-layout,
  .about-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .service-grid,
  .card-grid,
  .review-grid,
  .offer-grid,
  .hero-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .band,
  .content-section,
  .cta-band,
  .page-hero {
    padding: 56px 18px;
  }

  .hero {
    min-height: auto;
    padding: 56px 18px 38px;
  }

  .offers-section {
    padding: 34px 18px 52px;
  }

  .section-heading,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .feature-grid,
    .service-grid,
    .card-grid,
    .review-grid,
    .offer-grid,
    .hero-stat-grid,
    .gallery-grid,
    .office-gallery {
    grid-template-columns: 1fr;
  }
}
