/* =========================================================
   Smart Solutions — Shared Service Page Additions
   File: assets/css/service-page-additions.css
   Use this same file for Sub-Zero, Bosch Dishwasher, and future service pages.
   Load AFTER assets/css/style.css
   ========================================================= */

/* ---------- Page safety reset ---------- */

body {
  overflow-x: hidden;
}

.service-page main,
main.service-page {
  overflow: hidden;
}

/* ---------- Shared spacing ---------- */

.service-page .section,
body .service-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.service-page .section:first-of-type {
  padding-top: 56px;
}

.service-page .container {
  max-width: 1280px;
}

/* Center section headings by default on service pages */
.service-page .section .eyebrow,
.service-page .section h2,
.service-section .eyebrow,
.service-section h2 {
  text-align: center;
}

/* Keep these sections left-aligned */
.service-page .service-policy .eyebrow,
.service-page .service-policy h2,
.service-page .faq .eyebrow,
.service-page .faq h2,
.service-page .contact .eyebrow,
.service-page .contact h2,
.service-page #faq .eyebrow,
.service-page #faq h2,
.service-page #contact .eyebrow,
.service-page #contact h2,
.service-page .service-call-policy .eyebrow,
.service-page .service-call-policy h2 {
  text-align: left;
}

/* =========================================================
   HERO — compact, professional, fixed image window
   ========================================================= */

.service-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(15, 35, 61, 0.08);
  padding: 70px 0 64px;
}

.service-hero .container,
.service-hero-grid,
.service-hero .grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: 54px;
}

.service-hero-content,
.service-hero .hero-copy,
.service-hero .content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.service-hero .eyebrow {
  text-align: left;
  margin-bottom: 16px;
  color: #0f233d;
  letter-spacing: 0.16em;
  font-weight: 800;
}

.service-hero h1 {
  margin: 0 0 22px;
  color: #0f233d;
  font-size: clamp(42px, 5.2vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  max-width: 680px;
  text-align: left;
}

.service-hero .lead {
  color: #52647c;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 28px;
  text-align: left;
}

.service-hero .actions,
.service-hero .hero-actions {
  justify-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.service-hero-media,
.service-hero-image,
.service-hero-visual,
.service-hero figure {
  width: 100%;
  max-width: 560px;
  height: clamp(340px, 36vw, 460px);
  margin: 0;
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  background: #eef2f7;
  box-shadow: 0 24px 70px rgba(15, 35, 61, 0.18);
  border: 1px solid rgba(15, 35, 61, 0.10);
  position: relative;
}

/* IMPORTANT:
   object-fit: contain keeps the whole photo visible inside a small hero window.
   If one specific photo has empty borders, crop that photo separately, not the CSS.
*/
.service-hero-media img,
.service-hero-image img,
.service-hero-visual img,
.service-hero figure img,
.service-hero picture,
.service-hero picture img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #eef2f7;
}

/* Small white label over hero image */
.service-hero-badge,
.service-hero-card,
.hero-service-card {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 35, 61, 0.08);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 16px 40px rgba(15, 35, 61, 0.12);
  backdrop-filter: blur(12px);
}

.service-hero-badge h2,
.service-hero-card h2,
.hero-service-card h2,
.service-hero-badge h3,
.service-hero-card h3,
.hero-service-card h3,
.service-hero-badge p,
.service-hero-card p,
.hero-service-card p {
  margin: 0;
  text-align: left;
}

.service-hero-badge h3,
.service-hero-card h3,
.hero-service-card h3 {
  color: #0f233d;
  font-size: 20px;
  line-height: 1.25;
}

.service-hero-badge p,
.service-hero-card p,
.hero-service-card p {
  margin-top: 6px;
  color: #52647c;
  font-weight: 700;
}

/* =========================================================
   WHY / TRUST GRID — light attractive cards
   ========================================================= */

.service-why,
.why-service,
.service-trust-section {
  padding-top: 76px;
  padding-bottom: 76px;
  background: #ffffff;
}

.service-why .container,
.why-service .container,
.service-trust-section .container {
  max-width: 1180px;
}

.service-why .eyebrow,
.why-service .eyebrow,
.service-trust-section .eyebrow {
  color: #0f233d;
}

.service-why h2,
.why-service h2,
.service-trust-section h2 {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 34px;
}

/* Covers all class variants we already used */
.trust-bar-grid,
.service-trust-grid,
.service-why-grid,
.why-grid,
.why-cards,
.feature-grid,
.benefit-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 30px;
  align-items: stretch;
}

/* Direct children become cards even if HTML uses div/li/article */
.trust-bar-grid > *,
.service-trust-grid > *,
.service-why-grid > *,
.why-grid > *,
.why-cards > *,
.feature-grid > *,
.benefit-grid > * {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 22px 20px;
  border-radius: 22px;
  background: #ffffff !important;
  color: #0f233d !important;
  border: 1px solid rgba(15, 35, 61, 0.10);
  box-shadow: 0 16px 42px rgba(15, 35, 61, 0.08);
  text-align: center;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

/* If cards contain paragraphs/headings */
.trust-bar-grid > * *,
.service-trust-grid > * *,
.service-why-grid > * *,
.why-grid > * *,
.why-cards > * *,
.feature-grid > * *,
.benefit-grid > * * {
  color: inherit;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Prevent dark inherited cards from old CSS */
.service-page 
.service-page 
.trust-bar-card {
  background: #ffffff;
  color: #0f233d;
}

/* Dark panel only if explicitly needed on homepage, not service pages */
.service-page 
.trust-bar-card {
  border-radius: 28px;
  padding: 36px;
  border: 1px solid rgba(15, 35, 61, 0.08);
  box-shadow: 0 18px 50px rgba(15, 35, 61, 0.08);
}

/* =========================================================
   Common issues / service cards
   ========================================================= */

.service-problems,
.service-issues {
  background: #f8fafc;
}

.service-problem-grid,
.problem-grid,
.issue-grid,
.service-card-grid,
.service-grid-small {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.service-problem-grid > *,
.problem-grid > *,
.issue-grid > *,
.service-card-grid > *,
.service-grid-small > * {
  background: #ffffff;
  border: 1px solid rgba(15, 35, 61, 0.08);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(15, 35, 61, 0.06);
}

.service-problem-grid h3,
.problem-grid h3,
.issue-grid h3,
.service-card-grid h3,
.service-grid-small h3 {
  color: #0f233d;
  margin-top: 0;
  margin-bottom: 10px;
}

.service-problem-grid p,
.problem-grid p,
.issue-grid p,
.service-card-grid p,
.service-grid-small p {
  color: #52647c;
  line-height: 1.6;
}

/* =========================================================
   Real service photo gallery
   ========================================================= */

.service-gallery,
.real-service-gallery {
  background: #ffffff;
}

.service-photo-grid,
.service-gallery-grid,
.service-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.service-photo-card,
.service-gallery-card,
.service-page .gallery-grid article {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(15, 35, 61, 0.08);
  box-shadow: 0 18px 48px rgba(15, 35, 61, 0.09);
}

.service-photo-card img,
.service-gallery-card img,
.service-page .gallery-grid article img {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.service-photo-card p,
.service-gallery-card p,
.service-page .gallery-grid article p {
  margin: 0;
  padding: 14px 16px 16px;
  color: #0f233d;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

/* =========================================================
   Service Call & Warranty / CTA
   ========================================================= */

.service-policy,
.service-call-policy,
.policy-section {
  background: #f8fafc;
}

.service-policy-card,
.policy-card,
.service-call-card {
  background: #ffffff;
  border: 1px solid rgba(15, 35, 61, 0.08);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 18px 50px rgba(15, 35, 61, 0.08);
}

.service-policy-card h2,
.policy-card h2,
.service-call-card h2 {
  margin-top: 0;
  color: #0f233d;
}

.service-policy-card p,
.policy-card p,
.service-call-card p {
  color: #52647c;
  line-height: 1.65;
}

.service-cta,
.final-cta {
  background: #0f233d;
  color: #ffffff;
  border-radius: 32px;
  padding: 46px;
  text-align: center;
}

.service-cta h2,
.final-cta h2,
.service-cta p,
.final-cta p {
  color: #ffffff;
  text-align: center;
}

/* ================================
   Shared expanded footer refinements
   ================================ */

.footer .footer-grid {
  grid-template-columns: 1fr 1.35fr 1.5fr 1.1fr;
  align-items: start;
}

.footer-brand {
  align-items: center;
  text-align: center;
}

.footer-bottom {
  align-items: center;
  text-align: center;
}

.footer-legal {
  justify-content: center;
}

.footer-info {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.18);
  text-align: center;
}

.footer-info p {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.5;
}

/* Tablet footer layout */
@media (min-width: 641px) and (max-width: 1049px) {
  .footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px 48px;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-services {
    align-items: flex-start;
    text-align: left;
  }

  .footer-homepage-link {
    grid-column: 1 / 2;
    text-align: center;
    align-self: start;
  }

  .footer-homepage-link p {
    max-width: 520px;
    margin: 0 auto;
  }

  .footer-bottom {
    grid-column: 2 / 3;
    align-items: center;
    text-align: center;
    align-self: start;
  }

  .footer-legal {
    justify-content: center;
  }
}

/* Desktop footer phone alignment */
@media (min-width: 1050px) {
  .footer-bottom {
    align-items: center;
  }

  .footer-legal {
    width: 100%;
    justify-content: center;
  }

  #footer-call-button {
    display: block;
    text-align: center;
  }
}

/* Mobile footer */
@media (max-width: 640px) {
  .footer-info {
    margin-top: 30px;
    padding: 18px 20px 0;
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .service-hero .container,
  .service-hero-grid,
  .service-hero .grid-2 {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .service-hero-content,
  .service-hero .hero-copy,
  .service-hero .content {
    max-width: 760px;
    margin: 0 auto;
  }

  .service-hero .eyebrow,
  .service-hero h1,
  .service-hero .lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .service-hero .actions,
  .service-hero .hero-actions {
    justify-content: center;
  }

  .service-hero-media,
  .service-hero-image,
  .service-hero-visual,
  .service-hero figure {
    justify-self: center;
    max-width: 680px;
    height: 390px;
  }

  .trust-bar-grid,
  .service-trust-grid,
  .service-why-grid,
  .why-grid,
  .why-cards,
  .feature-grid,
  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-photo-grid,
  .service-gallery-grid,
  .service-page .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-problem-grid,
  .problem-grid,
  .issue-grid,
  .service-card-grid,
  .service-grid-small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .service-page .section,
  body .service-section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .service-hero {
    padding: 48px 0 48px;
  }

  .service-hero h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .service-hero .lead {
    font-size: 17px;
  }

  .service-hero-media,
  .service-hero-image,
  .service-hero-visual,
  .service-hero figure {
    max-width: 100%;
    height: 330px;
    border-radius: 22px;
  }

  .service-hero-badge,
  .service-hero-card,
  .hero-service-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 15px 16px;
    border-radius: 18px;
  }

  .trust-bar-grid,
  .service-trust-grid,
  .service-why-grid,
  .why-grid,
  .why-cards,
  .feature-grid,
  .benefit-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trust-bar-grid > *,
  .service-trust-grid > *,
  .service-why-grid > *,
  .why-grid > *,
  .why-cards > *,
  .feature-grid > *,
  .benefit-grid > * {
    min-height: 88px;
    font-size: 17px;
    padding: 20px 18px;
  }

  .service-problem-grid,
  .problem-grid,
  .issue-grid,
  .service-card-grid,
  .service-grid-small,
  .service-photo-grid,
  .service-gallery-grid,
  .service-page .gallery-grid {
    grid-template-columns: 1fr;
  }

  .service-photo-card img,
  .service-gallery-card img,
  .service-page .gallery-grid article img {
    height: 250px;
  }

  .service-policy-card,
  .policy-card,
  .service-call-card,
  .service-cta,
  .final-cta {
    padding: 28px 22px;
    border-radius: 24px;
  }
}

/* Very small phones */
@media (max-width: 420px) {
  .service-hero-media,
  .service-hero-image,
  .service-hero-visual,
  .service-hero figure {
    height: 300px;
  }
}

/* =========================================================
   Sticky Mobile Call Bar
   — shows on mobile only (below 900px)
   — hidden when user reaches #contact section
   — controlled via .mobile-cta-bar--hidden class (main.js)
   ========================================================= */

.mobile-cta-bar {
  display: none; /* hidden on desktop */
}

@media (max-width: 900px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    gap: 0;
    background: var(--navy);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .mobile-cta-bar--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-cta-call {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--gold);
    color: var(--navy);
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: 0.01em;
  }

  .mobile-cta-call:hover {
    background: #b8892e;
    color: var(--navy);
  }

  .mobile-cta-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: transparent;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-cta-form:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  /* Push main content up so bar doesn't cover bottom of page */
  body.service-page main {
    padding-bottom: 60px;
  }
}
