/* Brand tokens (rarely change) */
:root {
  --brand-primary: #000000;   /* was --primary */
  --brand-accent:  #c71400;   /* was --accent */
  --brand-danger:  #d9534f;   /* was --error */
}

/* Semantic tokens (use these everywhere) */
:root {
  /* Surfaces */
  --surface-1: #ffffff;       /* page background / cards */
  --surface-2: #f6f7f8;       /* alt rows / subtle panels */
  --surface-3: #eef1f3;       /* headers / subtle stripes */

  /* Text */
  --text-1: #000000;          /* primary text */
  --text-2: #4b5563;          /* secondary text / muted */

  /* Borders & lines */
  --line-1: #e5e7eb;

  /* Actions */
  --accent: var(--brand-accent);
  --accent-contrast: #ffffff;
  --primary: var(--brand-primary);
  --primary-contrast: #ffffff;

  /* Status */
  --danger: var(--brand-danger);
  --danger-contrast: #ffffff;
  --success: #16a34a;
  --success-contrast: #ffffff;
  --warning: #eab308;
  --warning-contrast: #1f2937;

  /* Effects */
  --shadow-color: 0 10px 30px rgba(0,0,0,.08);
  --radius: 10px;

  /* Transitions */
  --transition: 180ms ease;


  --hdr-bg:#fff; 
  --hdr-fg:#000000;
  --hdr-border: color-mix(in srgb, var(--hdr-fg) 12%, transparent);
  --hdr-hover:  color-mix(in srgb, var(--hdr-fg) 10%, transparent);
  --u-shadow: rgba(0,0,0,.90);
  --hdr-row-divider: color-mix(in srgb, var(--hdr-fg) 20%, transparent);
  --hdr-tab-divider: color-mix(in srgb, var(--hdr-fg) 28%, transparent);
  --tab-hover-red: #c71400;
  --body-sides-bg: #db8b00;

  --link-color: #0a84ff;               /* light-mode link */
  --link-hover-color: #c71400;         /* your red on hover */
  --link-underline: color-mix(in srgb, var(--link-color) 35%, transparent);
}

/* Dark theme overrides */
html[data-theme="dark"] {
  --surface-1: #121212;
  --surface-2: #1a1a1a;
  --surface-3: #1f2530;

  --text-1: #ffffff;
  --text-2: #c7ced6;

  --line-1: #2b2f36;

  --accent: #c71400;
  --accent-contrast: #fff;
  --primary: #000000;

  --shadow-color: 0 12px 34px rgba(0,0,0,.45);


  --hdr-bg:#0b0b0b; 
  --hdr-fg:#f3f3f3;
  --hdr-border: color-mix(in srgb, var(--hdr-fg) 18%, transparent);
  --hdr-hover:  color-mix(in srgb, var(--hdr-fg) 12%, transparent);
  --u-shadow: rgba(255,255,255,.90);
  --hdr-row-divider: color-mix(in srgb, var(--hdr-fg) 26%, transparent);
  --hdr-tab-divider: color-mix(in srgb, var(--hdr-fg) 36%, transparent);
  --body-sides-bg: #c71400;

  --link-color: #9ecbff;               /* brighter blue for dark bg */
  --link-hover-color: #ff6a4d;         /* warm hover in dark */
  --link-underline: color-mix(in srgb, var(--link-color) 55%, transparent);
}

/* =========================
   RESET / BASE
   ========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body, html { margin: 0; padding: 0; height: 100%; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--surface-1);
  color: var(--text-1);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--body-sides-bg);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 0px !important; /* Must be >= .top-bar height */
  padding-bottom: 50px;
  z-index: 1;
  justify-content: center;
  align-items: center;
  background-color: var(--surface-1);
  width: 95vw;
}

#signup-form, #login-form {
  margin-top: 150px;
}

/* --- Mobile header bar --- */
.mh-bar{
  display:none; /* hidden on desktop */
  align-items:center; justify-content:space-between;
  gap:12px; padding:10px 16px;
  background: var(--hdr-bg); color: var(--hdr-fg);
  border-bottom: 1px solid var(--hdr-row-divider, rgba(0,0,0,.12));
  position: relative; z-index: 20;
}
.mh-logo img{ height: 36px; width:auto; display:block; }
.mh-toggle{
  appearance:none; border:none; background:transparent; color:currentColor;
  font-size: 24px; line-height: 1; padding:8px; border-radius:10px; cursor:pointer;
  max-width: fit-content;
}
.mh-toggle:focus-visible{ outline:2px solid var(--accent,#c71400); outline-offset:2px; }

/* --- Mobile nav (off-canvas right) --- */
.mnav{ position: fixed; inset: 0; z-index: 40; pointer-events:none; }
.mnav__backdrop{
  position:absolute; inset:0; background: rgba(0,0,0,.4);
  opacity:0; transition: opacity .25s ease;
}
.mnav__panel{
  position:absolute; top:0; right:0; height:100%; width:min(78vw, 360px);
  background: var(--hdr-bg); color: var(--hdr-fg);
  border-left: 1px solid var(--hdr-row-divider, rgba(0,0,0,.12));
  transform: translateX(100%); transition: transform .28s ease;
  display:flex; flex-direction:column; padding: 12px 14px;
}
.mnav__close{
  align-self:flex-end; appearance:none; border:none; background:transparent; color:currentColor;
  font-size:22px; padding:8px; border-radius:10px; cursor:pointer;
  max-width: fit-content;
}
.mnav__list{ list-style:none; margin:8px 0; padding:0; }
.mnav__list li + li{ margin-top: 6px; }
.mnav__list a{
  display:block; padding:12px 10px; border-radius:10px;
  text-decoration:none; color:inherit; font-weight:600;
  border:1px solid transparent;
}
.mnav__list a:hover{ background: var(--hdr-hover, rgba(0,0,0,.06)); border-color: var(--hdr-row-divider, rgba(0,0,0,.12)); }
.mnav__hr{ border:0; height:1px; background: var(--hdr-row-divider, rgba(0,0,0,.12)); margin:10px 0; }

/* Open state */
.mnav.is-open{ pointer-events:auto; }
.mnav.is-open .mnav__backdrop{ opacity:1; }
.mnav.is-open .mnav__panel{ transform: translateX(0); }

/* Prevent background scroll while menu open */
body.no-scroll{ overflow:hidden; }

/* Responsive: show mobile header, hide desktop grid */
@media (max-width: 900px){
  .mh-bar{ display:flex; }
  .site-header .hdr-grid { display: none !important; }
  main{
    padding-left: 0px !important;
    padding-right: 0px !important;
  }
  .hero-cta{
    padding:20px 40px !important;
    font-weight:700 !important;
    font-size: 18px !important;
    top: 400px !important;
  }
  
  .overlay-panel h3{ color: white; margin: 0 0 .25rem; font-size: 16px !important; }
  .overlay-panel p{ margin: 0; max-width: 900px; font-size: 14px !important; line-height: 1.5; color: white !important; }
  .hero {height: 600px !important;}
  .hero__tabs{
    height: 200px !important;
  }
  .hero-tab{
    line-height: 50px !important;
    height: 200px !important;
    margin: 0px;
  }
  .hero__overlay{
  top: 200px !important;             /* start just below the tabs */
  bottom: auto;
  height: 400px !important;  /* final open height */
  }
  .hero-tab:hover::before { transform: rotate(-45deg); }
  .hero-tab:hover::after  { transform: rotate(45deg); }

/* Open state (set via JS) */
.hero.is-open .hero__overlay{ height: var(--overlay-height); transform: scaleY(1);
  pointer-events: auto;}

}
@media (max-width: 768px) {
  .dropdown-menu { position: static; box-shadow: none; border: none; background: none; }
  .dropdown-menu a { padding: 12px 20px; }
  .nav-dropdown { width: 100%; }
  .dropdown-toggle { width: 100%; justify-content: center; text-align: center; }
}

/* =========================
   LAYOUT
   ========================= */
.container { max-width: 95vw; margin: 0 auto; padding: 1rem; }
.section { margin: 2rem 0; }
/* --- Add/confirm these vars on .hero --- */
.hero{
  --hero-min-h: 600px;           /* your overall hero height */
  --tabs-h: 200px;                /* height of the top tab bar */
  --overlay-height: 66.6%;         /* how far the panel drops (bottom half) */
  --overlay-bg: rgba(0,0,0,.65);
  --overlay-bg-hover: rgba(0, 0, 0, 0.733);
  --overlay-fg: #fff;

  position: relative;
  width: 100%;
  min-height: var(--hero-min-h);
  overflow: hidden;
}
.hero-commercial {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background-repeat: no-repeat;
  width: 100%;
}
.hero-commercial .hero-cta-c {
  position: static !important;   /* or position: relative */
  bottom: auto;
  left: auto;
  transform: none;
  margin-top: 1rem;              /* spacing under the text */
  display: inline-flex;
  top: calc(var(--tabs-h) + 250px); /* sits just below the tabs */
  z-index:2;
  padding:30px 60px;
  border-radius:999px;
  font-weight:700;
  font-size: 24px;
  text-decoration:none;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  background-color: var(--accent, #c71400);
  color:#fff;
  transition:
    background-color .25s ease,
    color           .25s ease,
    filter          .15s ease,
    transform       .20s ease,
    opacity         .20s ease;   
}
.hero-commercial .hero-cta-c:hover{
  background-color:#000;
  color:#fff;                    /* set explicitly if you want it to animate */
  filter:brightness(1.05);
}
@media (max-width: 768px){
  .hero-commercial .hero-cta-c{
    padding:10px 20px;
    border-radius:999px;
    font-weight:700;
    font-size: 14px;
  }
}
.hero-commercial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* Optional dark overlay */
}
.hero__content-commercial {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 700px;
  color: white !important;
}
.hero__content-commercial h1, p{
  color: white !important;
}
.section-commercial p{
  color: black !important;
}
html[data-theme="dark"] .section-commercial p{
  color: white !important;
}
.about__cols .about__col p{
  color: black !important;
}
html[data-theme="dark"] .about__cols .about__col p{
  color: white !important;
}
/* Background image */
.hero__bg{
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
  border-left: 3px solid black;
  border-right: 3px solid black;
  border-bottom: 3px solid black;
  border-top: none;
  opacity:0; transition:opacity .8s ease;  /* fade time */
  z-index:1; pointer-events:none;
}
.hero__bg.is-active{ opacity:1; }
/* A subtle dark gradient at the very top for tab contrast (optional) */
.hero::before{
  content:"";
  position:absolute; left:0; right:0; top:0; height:80px;
  background: linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,0));
  pointer-events:none;
}

/* ===== Top tab row ===== */
.hero__tabs{
  position: absolute; 
  left: 0; 
  right: 0; 
  top: 0;
  display: grid; 
  grid-template-columns: repeat(4, 1fr);
  height: var(--tabs-h);
  border-bottom: 1px solid #f3f3f3;
  z-index: 3; /* keep tabs above the overlay */
  overflow: visible;
}

.hero-tab{
  appearance: none; 
  background: var(--overlay-bg); 
  color: #fff;
  font: 600 24px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 0px 12px;
  text-align: center;
  width: 100%;
  cursor: pointer;
  transition: color .18s ease-in-out, var(--overlay-bg) .18s ease-in-out;
  border: 1px solid black;
  line-height: var(--tabs-h);
  border-radius: 0%;
  box-sizing: border-box;
  position: relative;
}
.hero-tab::before,
.hero-tab::after{
  content:"";
  position:absolute;
  bottom: 25px;                 /* inside the tab */
  width: 14px;                 /* arm length */
  height: 3px;                 /* arm thickness */
  background: currentColor;    /* follows text color (turns red on hover) */
  border-radius: 3px;          /* rounded ends like your image */
  pointer-events:none;
  transition: transform .18s ease;
}

/* left arm */
.hero-tab::before{
  left: calc(50.3% - 14px);      /* start left of center */
  transform-origin: right center;
  transform: rotate(45deg);
}

/* right arm */
.hero-tab::after{
  left: 49.7%;                   /* start at center */
  transform-origin: left center;
  transform: rotate(-45deg);
}
@media (hover: hover){
  .hero-tab:hover::before { transform: rotate(-45deg); }
  .hero-tab:hover::after  { transform: rotate(45deg); }
}

/* Flip to "^" when the tab is active (works for mobile tap) */
.hero-tab.is-active::before { transform: rotate(-45deg); }
.hero-tab.is-active::after  { transform: rotate(45deg); }



.hero-tab:hover,
.hero-tab:focus-visible{ 
  background-color: var(--overlay-bg-hover);
  color: #c71400;
  border-color: #c71400; /* highlight border in red */
  outline: none; 
} /* your red */
  

/* ===== Bottom overlay ===== */
.hero__overlay{
  position: absolute; left: 0; right: 0;
  top: var(--tabs-h);             /* start just below the tabs */
  bottom: auto;
  height: var(--overlay-height);  /* final open height */
  background: var(--overlay-bg);
  color: var(--overlay-fg);
  overflow: hidden;
  z-index: 2;
  pointer-events: none;           /* disabled while closed */

  /* animate from top using transform (smoother than height anim) */
  transform-origin: top;
  transform: scaleY(0);           /* collapsed */
  transition: transform .25s ease;
}

/* Open state (set via JS) */
.hero.is-open .hero__overlay{ height: var(--overlay-height); transform: scaleY(1);
  pointer-events: auto;}

/* Panels fill the overlay; only the active one is visible */
.overlay-panel{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  padding: 24px clamp(16px, 4vw, 48px);
  opacity: 0; transform: translateY(-6px); /* tiny nudge from top now */
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  color: white;
}
.overlay-panel h3{ color: white; margin: 0 0 .25rem; font-size: clamp(20px, 2.2vw, 28px); }
.overlay-panel p{ margin: 0; max-width: 900px; font-size: clamp(14px, 1.5vw, 18px); line-height: 1.5; color: white !important; }

.hero[data-active="mold"]  .overlay-panel[data-id="mold"],
.hero[data-active="fire"]  .overlay-panel[data-id="fire"],
.hero[data-active="water"] .overlay-panel[data-id="water"],
.hero[data-active="smoke"] .overlay-panel[data-id="smoke"]{
  opacity: 1; transform: translateY(0);
}
/* CTA inside the hero, in the area the overlay will cover */
.hero-cta{
  position:absolute;
  left:50%;
  top: calc(var(--tabs-h) + 250px); /* sits just below the tabs */
  transform: translate(-50%, 0);   /* same as before, explicit */
  z-index:2;
  display:inline-block;
  padding:30px 60px;
  border-radius:999px;
  font-weight:700;
  font-size: 24px;
  text-decoration:none;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  background-color: var(--accent, #c71400);
  color:#fff;
  transition:
    background-color .25s ease,
    color           .25s ease,
    filter          .15s ease,
    transform       .20s ease,
    opacity         .20s ease;   /* if you fade it when overlay opens */
}
.hero-cta-m{
  position:absolute;
  left:50%;
  top: calc(var(--tabs-h) + 250px); /* sits just below the tabs */
  transform: translate(-50%, 0);   /* same as before, explicit */
  z-index:2;
  display:inline-block;
  padding:10px 20px;
  border-radius:999px;
  font-weight:700;
  font-size: 14px;
  text-decoration:none;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  background-color: var(--accent, #c71400);
  color:#fff;
  transition:
    background-color .25s ease,
    color           .25s ease,
    filter          .15s ease,
    transform       .20s ease,
    opacity         .20s ease;   /* if you fade it when overlay opens */
}

.hero-cta:hover{
  background-color:#000;
  color:#fff;                    /* set explicitly if you want it to animate */
  filter:brightness(1.05);
  transform: translate(-50%, 0); /* keep same transform (no jump) */
}
.hero-cta-m:hover{
  background-color:#000;
  color:#fff;                    /* set explicitly if you want it to animate */
  filter:brightness(1.05);
  transform: translate(-50%, 0); /* keep same transform (no jump) */
}

/* still hide/slide when overlay opens (kept if you like the down nudge) */
.hero.is-open .hero-cta{
  opacity:0;
  transform: translate(-50%, 8px);
  pointer-events:none;
  /* If you DO want this to animate, give transform transition ONLY in open state: */
  transition: opacity .2s ease, transform .2s ease, filter .15s ease;
}
.company-division{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0px;                          /* set to 0 if you want no gap */
  width: 100%;
  margin: 0px;
  padding: 0px;
}

/* each panel fills its grid column */
.cd-panel{
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;                        /* fill the column */
  min-height: 400px;                  /* keep your height */
  text-decoration: none;
  color: #fff;
  background: center / cover no-repeat;
  border-radius: 0px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s ease;
}

.cd-panel::before{
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);         /* overlay */
  transition: background .2s ease;
  z-index: 0;
}

.cd-panel span{
  position: relative; z-index: 1;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: clamp(22px, 4vw, 40px);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* subtle hover */
.cd-panel:hover::before{ background: rgba(0,0,0,.6); }
.cd-panel:hover{ transform: translateY(-2px); }

/* set the background images */
.cd-panel[data-id="commercial"]{
  background-image: url('/assets/ACR_Commercial.png');   /* change to your image */
}
.cd-panel[data-id="residential"]{
  background-image: url('/assets/ACR_Residential.png');  /* change to your image */
}

/* responsive stack */
@media (max-width: 820px){
  .company-division{ grid-template-columns: 1fr; }
  .cd-panel{ min-height: 260px; }
}

/* container for the About section (keeps to your site width) */
.about{
  width: min(100%, 1200px);
  margin: 2rem auto;          /* you already have .section margin; keep if you like */
  padding: 20px;
  color: var(--text-1);
}

.about h2 {
  border-bottom: 2px solid var(--hdr-fg);
}
.about h3 {
  color: var(--text-1);
  font-weight: 400;
}

/* top horizontal band under the H2 */
.about__top{
  margin-top: .75rem; /* subtle strip; uses your var if defined */
  padding: 16px 18px;
  color: var(--text-1);
}

/* two-column row */
.about__cols{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.about__col{
  padding: 18px;
  color: var(--text-1);
}
.about__col a{
  font-weight: 700;
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.about__col a:hover,
.about__col a:focus-visible{
  color: var(--link-hover-color);
  text-decoration-color: currentColor;
}
/* mobile: stack left then right */
@media (max-width: 800px){
  .about__cols{
    grid-template-columns: 1fr;
  }
}
/* A11y helper for hidden label */
.visually-hidden {
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* Form layout */
.sa-form{
  display:flex; flex-wrap:wrap; gap:10px;
  align-items:center; justify-content:center;
  margin-top:10px;
  border: none;
  box-shadow: none;
}
.sa-form input{
  min-width:260px; max-width:460px; width:100%;
  padding:10px 12px; border-radius:8px;
  border:1px solid var(--hdr-row-divider, rgba(0,0,0,.15));
  background: var(--hdr-bg, #fff); color: var(--hdr-fg, #111);
  outline: none;
  margin: 0px;
}
.sa-form input:focus{
  border-color: var(--accent, #c71400);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #c71400) 20%, transparent);
}
.sa-form .btn{
  padding:10px 14px; border-radius:8px; border:none; cursor:pointer;
  background: var(--accent, #c71400); color:#fff; font-weight:700;
}
.sa-form .btn:hover{ filter:brightness(1.05); }

.sa-result{
  margin-top:10px; text-align:center; font-weight:600;
}
.sa-result.ok{ color:#1a7f37; }    /* green */
.sa-result.no{ color:#c71400; }    /* your red */




#gallery, #testimonials, #contact {
  min-height: 400px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px;
}

h1, h2, h3 { color: var(--primary); margin-bottom: 1rem; }

a {
  color: var(--primary); text-decoration: none; font-weight: 500;
  transition: transform 0.2s ease, color 0.2s ease;
}
a:hover { transform: scale(1.05); }

.form-btn, input[type="submit"] {
  background: var(--primary); color: var(--primary-contrast);
  border: none; padding: 10px 16px; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
}
.form-btn:hover, input[type="submit"]:hover {
  background: var(--accent); transform: scale(1.05);
}

input, select, textarea {
  width: 100%; padding: 10px; margin: 0.5rem 0 1rem;
  border: 1px solid var(--line-1); border-radius: var(--radius);
  background: var(--surface-1); color: var(--text-1);
}

form {
  background: var(--surface-1);
  color: var(--text-1);
  padding: 1.5rem; border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
form p { margin-top: 15px; margin-bottom: 15px; }

/* =========================
   TABLE
   ========================= */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { padding: 12px; border: 1px solid var(--line-1); text-align: left; }
th { background: var(--primary); color: var(--primary-contrast); }

@media (max-width: 768px) {
  body { padding: 0.5rem; }
  form, .container { padding: 1rem; }
  table, thead, tbody, th, td, tr { display: block; }
  td {
    position: relative; padding-left: 50%;
    border: none; border-bottom: 1px solid var(--line-1);
  }
  td::before {
    content: attr(data-label); position: absolute; left: 0; width: 45%;
    padding-left: 10px; font-weight: bold; white-space: nowrap;
  }
  th { display: none; }
}

/* =========================
   FEEDBACK / STATUS
   ========================= */
.success { color: var(--success); margin-top: 1rem; }
.error   { color: var(--danger);  margin-top: 1rem; }

.g-recaptcha { margin: 1rem 0; transform: scale(1); transform-origin: 0 0; }



/* =========================
   THEME SWITCH
   ========================= */
[id] { scroll-margin-top: 80px; }

.theme-switch { position: relative; display: inline-block; width: 50px; height: 26px; margin-left: 1rem; vertical-align: middle; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #e5e7eb; transition: 0.4s; border-radius: 30px;
  transition: background-color .4s; overflow: hidden;
}
.theme-switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 4px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform .4s;
}
.theme-switch input:checked + .slider { background-color: #e5e7eb; }
.theme-switch input:checked + .slider::before { transform: translateX(24px); }

/* Floating container for the theme switch (bottom-right) */
.theme-fab { position: fixed; right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px); z-index: 1000; display: grid; place-items: center; }
.theme-fab .theme-switch { margin: 0; }


/* =========================
   PASSWORD HINTS
   ========================= */
#password-requirements {
  list-style: none; padding-left: 0; margin-top: 5px; font-size: 0.9em;
  display: flex; flex-direction: row; gap: 15px; margin: 0 auto; align-items: center; justify-content: center;
}
#password-requirements li { margin: 3px 0; }
#password-requirements .invalid { color: var(--danger); }
#password-requirements .valid   { color: var(--success); }

/* =========================
   MODALS
   ========================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal {
  background: var(--surface-1); color: var(--text-1);
  padding: 20px; border-radius: 10px; max-width: 400px; text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
#modal-close {
  margin-top: 15px; padding: 8px 20px; background: var(--accent); color: var(--accent-contrast);
  border: none; border-radius: 5px; cursor: pointer;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background-color: var(--primary);
  color: var(--primary-contrast);
  padding: 30px 15px 15px; text-align: center; font-size: 14px; margin-top: auto;
}
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.footer-logo a { font-size: 20px; color: var(--primary-contrast); text-decoration: none; font-weight: bold; }
.footer-links a { margin: 0 10px; color: var(--primary-contrast); text-decoration: none; }
.footer-links a:hover { transform: scale(1.05); }
.footer-social a { margin: 0 8px; color: var(--primary-contrast); font-size: 18px; }
.footer-bottom { margin-top: 20px; font-size: 12px; opacity: 0.7; }
.header-nav a, .footer-links a, .footer-logo a, .footer-social a { transition: transform 0.2s ease; }

/* =========================
   FORMS (PAGES)
   ========================= */
.signup-form, #signup-form, #login-form, .reset-form, .generic-form {
  max-width: 800px; width: 100%; margin-top: 150px; padding: 30px;
  background-color: white !important;
  border-radius: 12px; box-shadow: 0 2px 10px var(--u-shadow);
  display: flex; flex-direction: column; gap: 0px;
}
.signup-form .form-group, #signup-form .form-group, #login-form .form-group, .reset-form .form-group, .generic-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.signup-form label, #signup-form label, #login-form label, .reset-form label, .form-group label{ font-weight: 600; font-size: 14px; color: black !important; }

.signup-form input, #signup-form input, #login-form input, .reset-form input {
  padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-1);
  border-radius: 6px; transition: border-color 0.2s ease; background: whitesmoke; color: black;
}
.signup-form input:focus, #signup-form input:focus, #login-form input:focus, .reset-form input:focus {
  border-color: var(--accent); outline: none;
}


/* =========================
   SECTIONS
   ========================= */
.section { max-width: 95vw; margin: 0 auto; text-align: center; }
.section h2 { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.section p, .section li, .section blockquote { font-size: 1rem; line-height: 1.6; margin-bottom: 15px; color: var(--text-1); }

/* --- Services Section --- */
.services{
  width: min(100%, 1200px);
  margin: 0px;
  padding: 20px;
}

.svc-controls{
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  margin: .5rem 0 1rem;
  flex-wrap: wrap;
}

/* Segmented filter */
.segmented{
  display:inline-flex; border:1px solid var(--hdr-row-divider, rgba(0,0,0,.15));
  border-radius: 999px; overflow:hidden; background: var(--hdr-bg, #fff);
}
.seg-btn{
  appearance:none; border:0; background:transparent; color:var(--hdr-fg, #111);
  padding:8px 14px; font-weight:700; cursor:pointer;
}
.seg-btn.is-active{
  background: var(--accent, #c71400); color:#fff;
}
.seg-btn:not(.is-active):hover{ background: var(--hdr-hover, rgba(0,0,0,.06)); }

.svc-search input{
  width: min(360px, 100%); padding:10px 12px; border-radius: 8px;
  border:1px solid var(--hdr-row-divider, rgba(0,0,0,.15));
  background: var(--hdr-bg, #fff); color: var(--hdr-fg, #111);
}

/* Grid of cards */
.svc-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 980px){ .svc-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px){ .svc-grid{ grid-template-columns: 1fr; } }
/* Mobile: make category tabs a 2-column grid */
@media (max-width: 768px){
  /* stack controls (tabs over search) if they were side-by-side */
  .svc-controls{
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  /* turn the segmented tabs into a grid */
  .segmented.cat-tabs{
    display: grid !important;                 /* override any inline-flex */
    grid-template-columns: repeat(2, 1fr);    /* 2 columns */
    gap: 8px;                                 /* space between pills */
    background: transparent;                  /* remove group background */
    border: 0px !important;                                /* remove group border if any */
    padding: 0;
  }
  .segmented{
    border-radius: 0px;
  }

  /* make each tab look like a pill card that fills its grid cell */
  .segmented.cat-tabs .seg-btn{
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--hdr-tab-divider, rgba(255,255,255,.25));
    background: var(--hdr-hover, rgba(0,0,0,.06));
    padding: 10px 12px;
    line-height: 1.2;
    white-space: normal;                      /* allow wrapping */
  }

  .segmented.cat-tabs .seg-btn.is-active{
    background: var(--accent, #c71400);
    border-color: var(--accent, #c71400);
    color: #fff;
  }
}

.svc-card{
  position:relative; overflow:hidden; border-radius:14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hdr-bg,#fff) 90%, transparent), var(--hdr-bg,#fff));
  border:1px solid var(--hdr-row-divider, rgba(0,0,0,.12));
  padding:18px 16px 64px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  color: var(--text-1);
}
.svc-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  border-color: color-mix(in srgb, var(--accent,#c71400) 40%, var(--hdr-row-divider, rgba(0,0,0,.12)));
}

/* Clickable overlay link */
.svc-link{ position:absolute; inset:0; z-index:1; }

/* Icon + title */
.svc-icon{
  width:48px; height:48px; display:grid; place-items:center;
  border-radius:12px; background: color-mix(in srgb, var(--accent,#c71400) 12%, transparent);
  margin-bottom:10px; font-size:22px; color: var(--accent, #c71400);
}
.svc-title{
  margin:0 0 6px; font-size: clamp(18px, 1.9vw, 22px);
  color: var(--text-1);
}
.svc-desc{
  margin:0; opacity:.85; font-size: 0.95rem;
}

/* Tag pill */
.svc-tag{
  position:absolute; right:12px; top:12px; z-index:2;
  font-size:.75rem; font-weight:700; letter-spacing:.3px; text-transform:uppercase;
  padding:6px 10px; border-radius:999px;
  background: var(--hdr-hover, rgba(0,0,0,.06)); color: var(--hdr-fg,#111); border:1px solid var(--hdr-row-divider, rgba(0,0,0,.12));
}
.svc-tag.residential{ background: rgba(46, 184, 46, .12); color:#1a7f37; border-color: rgba(26,127,55,.25); }
.svc-tag.commercial { background: rgba(17, 127, 223, .12); color:#0b6ecf; border-color: rgba(11,110,207,.25); }

/* Hide desc on very small cards if needed */
@media (max-width: 420px){
  .svc-card{ padding-bottom: 56px; }
}

/* Gallery Placeholder */
.gallery-placeholder {
  padding: 30px; background: var(--surface-2); border: 2px dashed var(--line-1);
  border-radius: 10px; color: var(--text-2);
}

/* Testimonials (static style for non-slider fallbacks) */
#testimonials blockquote {
  font-style: italic; background: var(--surface-1); border-left: 4px solid var(--accent);
  padding: 15px 25px; margin: 20px auto; max-width: 800px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); color: var(--text-1);
}

/* Portfolio */
#portfolio ul { list-style-type: disc; text-align: left; max-width: 800px; margin: 0 auto; padding-left: 20px; }

/* Contact */
#contact p {color: black !important;}
html[data-theme="dark"] #contact p {color: white !important;}
#contact form { max-width: 600px; width: 100%; padding: 1rem; box-sizing: border-box; background: var(--surface-1); }
#contact input, #contact textarea {
  padding: 12px; border: 1px solid var(--line-1); border-radius: 6px; font-size: 1rem;
  background: var(--surface-1); color: var(--text-1);
}
#contact button {
  background: var(--primary); color: var(--primary-contrast);
  border: none; padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: 600; transition: background 0.3s ease;
}
#contact button:hover { background: var(--accent); }

/* =========================
   HEADER
   =========================
*/
.site-logo { font-size: 1.5rem; font-weight: bold; color: var(--accent); text-decoration: none; }

.site-header{
  background:var(--hdr-bg); color:var(--hdr-fg);
  border-bottom: 3px solid currentColor;
  position:relative; z-index:10;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
}

.hdr-grid{
  display:grid;
  grid-template-columns: 1fr auto 1fr;  /* left | badge | right */
  /* FIX: set explicit row heights so nothing jiggles */
  grid-template-rows: 40px 40px;        /* top row | bottom row */
  grid-template-areas:
    "leftTop  badge  rightTop"
    "leftBot  badge  rightBot";
  column-gap: 18px;
  row-gap: 0px;
  padding: 14px 20px 14px;
  align-items: center;                  /* center items within rows */
}


/* Place items into grid areas */
.left-top    { grid-area:leftTop; }
.right-top   { grid-area:rightTop; }
.left-bottom { grid-area:leftBot; }
.right-bottom{ grid-area:rightBot; }

.left-bottom,
.right-bottom{
  display: block;                 /* let the UL control layout */
  padding-top: 6px;
}

/* Use the same tab style, but center the list and don't stretch full width */
.bottom-tabs{
  justify-content: center;        /* centered under each side */
  gap: 0;                         /* separators provide rhythm */
  width: auto;                    /* don't force 100% width */
  margin-inline: auto;            /* keep it centered in its grid cell */
}

/* Don't force equal fill across the whole side—just size to content */
.bottom-tabs li{
  flex: initial;
  min-width: 0;
}

/* Same tab aesthetic as top row */
.bottom-tabs a{
  display: block;
  text-align: center;
  padding: 10px 12px;
  line-height: 1;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  letter-spacing: .2px;
  border-left: 1px solid var(--hdr-tab-divider);
}
.bottom-tabs li:first-child a{ border-left: none; }


/* Mobile: match what you do for the top lists */
@media (max-width: 800px){
  .left-bottom, .right-bottom{
    border-top: none;
    padding-top: 0;
  }
  .bottom-tabs{
    gap: 12px;
  }
  .bottom-tabs a{
    border: none;                 /* remove vertical separators on tight screens */
    padding: 8px 10px;
  }
}

.left-top,
.right-top{
  border-bottom: 1px solid var(--hdr-row-divider);
}


.nav-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;                                       /* gaps handled by borders now */
  width: 100%;                                  /* let it fill its grid area */
}

/* Make each tab take equal width; center text */
.nav-list li{
  flex: 1 1 0;
  min-width: 0;                                 /* prevent overflow pushing */
}
.nav-list a{
  display: block;
  text-align: center;
  padding: 10px 12px;
  line-height: 1;                               /* stable height */
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  letter-spacing: .2px;
  border-left: 1px solid var(--hdr-tab-divider);/* vertical separators */
}
.nav-list li:first-child a{
  border-left: none;                             /* no separator before the first tab */
}
.nav-list a,
.bottom-tabs a{
  color: inherit;
  transition: color .18s ease-in-out, background-color .18s ease-in-out;
}
.nav-list a:visited,
.bottom-tabs a:visited{ color: inherit; } /* keep visited same as normal */

/* Turn text red on hover/focus */
.nav-list a:hover,
.nav-list a:focus-visible,
.bottom-tabs a:hover,
.bottom-tabs a:focus-visible{
  color: var(--tab-hover-red);   /* #c71400 */
  /* keep background/padding the same to avoid jiggle */
}

.logo-badge{
  grid-area:badge;
  position:relative;
  width:260px;
  height:350px;
  margin:0 auto;
  pointer-events:none;
  align-self:center;
}

/* Main U stroke (on top) */
.logo-badge::before{
  content:"";
  position:absolute;
  inset:0;                           /* exact size */
  border:3px solid currentColor;
  border-top:none;
  border-radius:0 0 180px 180px;
  background:var(--hdr-fg);
  z-index:1;
}

/* Shadow just outside the U (behind the stroke) */
.logo-badge::after{
  content:"";
  position:absolute;
  inset:-2px;                        /* grow outward */
  border:2px solid var(--u-shadow);   /* dark “shadow” color */
  border-top:none;
  border-radius:0 0 182px 182px;     /* 180 + (outset) to match curve */
  background:transparent;
  filter: blur(2.5px);               /* soften so it reads as shadow */
  z-index:0;                         /* sits behind ::before */
  pointer-events:none;

  

}

.logo-inner{
  z-index: 2;
  position:absolute; left:50%; top:70%;
  transform:translate(-50%,-50%) translateZ(0); /* pin to its layer */
  width:170px; height:170px; display:grid; place-items:center;
  background:var(--hdr-fg); border-radius:50%;
  pointer-events:auto;
  transition:none; will-change:transform;
}


/* Keep transform identical on hover/focus */
.logo-inner:hover,
.logo-inner:focus{ transform:translate(-50%,-50%) translateZ(0); }

.logo-inner img{
  max-width:170px; height:auto; display:block;
  transition:none; transform:none;
}
/* Also nullify any global img hover transforms */
.logo-inner img:hover{ transform:none; }
/* Buttons under each side */
.hdr-action a{
  text-decoration:none; font-weight:700;
  padding:8px 14px; border-radius:999px;
  background:var(--accent); color:var(--hdr-bg);
}
.hdr-action a.secondary{
  background:transparent; color:var(--hdr-fg);
  border:2px solid var(--hdr-fg);
}

/* Responsive */
@media (max-width: 980px){
  .logo-badge{ width:220px; height:350px; }
}
/* --- Responsive: simplify separators/lines on mobile if you stack the navs --- */
@media (max-width: 800px){
  .left-top, .right-top{
    border-bottom: none;                         /* optional: remove row line on mobile */
    padding-bottom: 0;
  }
  .nav-list{
    gap: 12px;
    width: auto;
    justify-content: center;
  }
  .nav-list li{ flex: initial; }
  .nav-list a{
    border: none;                                /* no vertical separators on tight screens */
    padding: 8px 10px;
  }
}
/* Mobile menu */
@media (max-width: 768px) {
  .logo-inner{
    z-index: 2;
    position:absolute; left:50%; top:50%;
    transform:translate(-50%,-50%) translateZ(0); /* pin to its layer */
    width:170px; height:170px; display:grid; place-items:center;
    background:var(--hdr-fg); border-radius:50%;
    pointer-events:auto;
    transition:none; will-change:transform;
  }
  .logo-badge::after{
      inset:-2px;                        /* grow outward */
      border:2px solid var(--u-shadow);   /* dark “shadow” color */
      border-radius:180px;     /* 180 + (outset) to match curve */
      background:transparent;
      filter: blur(2.5px);               /* soften so it reads as shadow */
    }
    .logo-badge{
      height:200px;
      width: 200px;
      margin:0 auto;
      pointer-events:none;
      align-self:center;
    }

/* Main U stroke (on top) */
  .logo-badge::before{
    border-radius: 180px;
  }
  .theme-toggle-wrapper {
    display: flex; justify-content: center; align-items: center;
    padding: 10px 0; width: 100%; box-sizing: border-box;
  }
  .theme-switch { width: 50px; height: 26px; margin: 0 auto; }
  .theme-switch .slider { border-radius: 24px; }
  .theme-switch .slider::before { height: 18px; width: 18px; left: 3px; bottom: 3px; }
  .theme-switch input:checked + .slider { background-color: #e5e7eb }
  .theme-switch input:checked + .slider::before { transform: translateX(26px); }

  @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
}

/* --- Case studies slider --- */
/* Grid of 4 cards (responsive) */
#cases {
  margin-bottom: 50px;
}
.cs-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 16px;
  width: 60vw;
}

@media (max-width: 1100px){
  .cs-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px){
  .cs-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .cs-grid{ grid-template-columns: 1fr; width: 80vw;}
}

/* Card look (reuse your theme vars) */
.cs-card{
  background: var(--hdr-bg, rgb(255, 255, 255));
  border: 1px solid var(--hdr-row-divider, rgba(255,255,255,.15));
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cs-card:hover{
  transform: translateY(-2px);
  border-color: var(--accent, #c71400);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.cs-thumb{
  aspect-ratio: 16/9;
  background: center / cover no-repeat;
  border-bottom: 1px solid var(--hdr-row-divider, rgba(255,255,255,.15));
}

.cs-meta{ padding: 14px 16px; color: var(--hdr-fg, #fff); }
.cs-title{ margin: 0 0 6px; font-size: clamp(18px, 2.2vw, 22px); color: var(--hdr-fg, #fff); }
.cs-loc{ font-size: .95rem; opacity: .85; margin-bottom: 8px; }
.cs-excerpt{ margin: 0 0 10px; opacity: .9; }

.cs-read{
  appearance: none;
  border: 1px solid var(--hdr-row-divider, rgba(255,255,255,.35));
  background: transparent;
  color: inherit;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.cs-read:hover{ background: var(--hdr-hover, rgba(255,255,255,.06)); }

/* Modal (reuse your existing styles if already present) */
.cs-modal{ position:fixed; inset:0; z-index:60; display:none; }
.cs-modal[aria-hidden="false"]{ display:block; }
.cs-modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
.cs-modal__panel{
  position:absolute; inset: 6% 50% auto 50%;
  transform: translateX(-50%);
  width:min(900px, 92vw); max-height:88vh; overflow:auto;
  background: var(--hdr-bg); color: var(--hdr-fg);
  border-radius:16px; border:1px solid var(--hdr-row-divider, rgba(255,255,255,.15));
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  padding: 18px 20px;
}
.cs-modal__panel h3{
  color: var(--hdr-fg);
}
.cs-modal__close{
  position:absolute; top:8px; right:10px;
  border:0; background:transparent; color:inherit; font-size:28px; cursor:pointer;
}
.cs-modal-header h3{ margin:.2rem 0 .4rem; }
.cs-modal-gallery{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px; margin-top:12px;
}
.cs-modal-gallery img{ width:100%; height:100%; object-fit:cover; border-radius:8px; }
.footer-contact {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgb(255, 255, 255) !important;
  display: flex;
  justify-content: center; /* centers content horizontally */
  align-items: center;
  gap: 20px; /* ← adds space between phone & email */
  flex-wrap: wrap; /* ← keeps it neat on mobile */
}
html[data-theme="light"] .footer-contact {
  border-top: 1px solid rgb(255, 255, 255) !important;
}
.footer-contact p,
.footer-contact a {
  color: white !important;
  margin: 0;
  font-size: 1rem;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 768px){
  .cs-modal__panel{ inset: 4% 4% auto 50%; width:92vw; }
  .cs-modal__close{
    position:absolute; max-width: fit-content; right:10px;
    border:0; background:transparent; color:inherit; font-size:28px; cursor:pointer;
  }
}

/* =========================
   RESPONSIVE TUNING
   ========================= */
@media (max-width: 768px) {
  body { padding: 0%; }
  .site-logo { font-size: 1.3rem; margin-bottom: 10px; }
  .section { padding: 40px 15px; padding-top: 50px; }
  .section h2 { font-size: 1.5rem; }

  .signup-form, .login-form, .reset-form, .generic-form {
    margin: 20px 10px; padding: 20px; box-shadow: none; border: 1px solid var(--line-1); max-width: 80vw;
  }
  #signup-form, #login-form, #reset-form, #generic-form {
    margin: 20px 10px; padding: 20px; box-shadow: none; border: 1px solid var(--line-1); max-width: 80vw;
  }
  #password-requirements {
    list-style: none; padding-left: 0; margin-top: 5px; font-size: 0.9em;
    display: flex; flex-direction: column; gap: 5px; margin: 0 auto; align-items: center; justify-content: center;
  }
  form input, form textarea, form select, button, input[type="submit"] {
    font-size: 1rem; padding: 10px;
  }

  #services ul { flex-direction: column; align-items: stretch; }
  #portfolio ul { padding-left: 15px; }

    .footer-content {
    padding: 20px 10px;
    gap: 10px;
  }

  /* Create a two-column layout for footer links */
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px; /* row-gap, column-gap */
    justify-items: center;
    width: 100%;
    max-width: 300px; /* optional, keeps columns from stretching too wide */
  }

  .footer-links a {
    margin: 0;
    display: block;
  }

  .footer-social {
    margin-top: 10px;
  }

  .gallery-placeholder { font-size: 0.95rem; padding: 20px; }

  #testimonials blockquote { margin: 10px; padding: 15px; }

  #contact form { padding: 10px; }
  #contact button { font-size: 1rem; padding: 10px; }

  .modal { width: 90%; max-width: none; padding: 15px; }
  .theme-switch { margin-top: 10px; }

  table, thead, tbody, th, td, tr { display: block; }
  td { padding-left: 45%; }
  td::before { width: 40%; font-size: 0.9rem; }
  th { display: none; }

  .btn, button, input[type="submit"] { width: 100%; font-size: 1rem; margin-top: 10px; }
}

/* =========================
   GALLERY SLIDER
   ========================= */
.gallery-slider { position: relative; max-width: 100%; margin: 0 auto; user-select: none; }
.gallery-slider .viewport {
  overflow: hidden; width: 80%; border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,.12); margin: 0 auto;
}
.gallery-slider .track { display: flex; transition: transform 320ms ease; will-change: transform; }
.gallery-slider .slide { min-width: 100%; position: relative; background: #111; }
.gallery-slider .slide img { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
.gallery-slider figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; font-size: .95rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.gallery-slider .arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45);
  color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s ease, opacity .2s ease;
}
.gallery-slider .arrow:hover { background: rgba(0,0,0,.65); }
.gallery-slider .arrow.prev { left: 100px; }
.gallery-slider .arrow.next { right: 100px; }
.gallery-slider .arrow[disabled] { opacity: .35; cursor: default; }

.dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35);
  cursor: pointer; padding: 0; transition: transform .15s ease, background .15s ease;
}
.dots button.active { background: #fff; transform: scale(1.2); }
html[data-theme="light"] .dots button { background: rgba(0,0,0,.35); }
html[data-theme="light"] .dots button.active { background: #000; }
.dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 769px) { .dots { display: none; } }
@media (min-width: 769px) { .gallery-slider .slide img { aspect-ratio: 16/9; } }
@media (max-width: 768px) {
  .gallery-slider .slide img { aspect-ratio: 4/3; }
  .gallery-slider .arrow { width: 36px; height: 36px; display: none; }
}

/* =========================
   TESTIMONIALS SLIDER
   ========================= */
.t-slider { position: relative; max-width: 100%; margin: 0 auto; }
.t-viewport { overflow: hidden; width: 100%; display: block; }
.t-track { display: flex; gap: 16px; transition: transform .4s ease; }

/* Base card */
.t-slide {
  background: var(--surface-1);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  padding: 16px 18px; min-height: 140px;
}
.t-slide p {
  color: black !important;
}
html[data-theme="dark"] .t-slide p{
  color: white !important;
}
.cs-meta p{
  color: black !important;
}
html[data-theme="dark"] .cs-meta p{
  color: white !important;
}
/* Map original blockquote look */
#testimonials .t-slide {
  font-style: italic; background: var(--surface-1); border-left: 4px solid var(--accent);
  padding: 15px 25px; margin: 20px auto; max-width: 800px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); color: var(--text-1);
}

.t-slide .stars { color: #f5c518; font-size: 1rem; margin-bottom: 6px; }
.t-slide .star { opacity: .35; } .t-slide .star.filled { opacity: 1; }

.t-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.t-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: rgba(0,0,0,.35); transition: transform .15s ease, background .15s ease;
}
.t-dots button.active { background: #000; transform: scale(1.2); }
html[data-theme="dark"] .t-dots button { background: rgba(255,255,255,.35); }
html[data-theme="dark"] .t-dots button.active { background: #fff; }
html[data-theme="dark"] .btn-commercial { color: #fff; }
html[data-theme="dark"] .svc-cat-title { color: #fff; }
/* ==== My Services Modal (public) ==== */
.ms-overlay{position:fixed;inset:0;display:none;background:rgba(0,0,0,.5);z-index:9999}
.ms-overlay[aria-hidden="false"]{display:block}
.ms-dialog{position:relative;margin:6vh auto;max-width:900px;width:92%;
  background:var(--bg,#fff);color:var(--text,#000);
  border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.25);padding:16px 16px 20px}
.ms-title{margin:0 0 8px;font-size:1.25rem}
.ms-close{position:absolute;top:8px;right:12px;border:0;background:transparent;
  font-size:1.75rem;line-height:1;cursor:pointer}
.ms-body{max-height:70vh;overflow:auto}
.ms-loading{padding:24px;text-align:center}
body.ms-noscroll{overflow:hidden}

/* Optional: reuse your table styles; if not present, minimal fallbacks: */
.services-wrapper .table{width:100%;border-collapse:collapse}
.services-wrapper .table th,.services-wrapper .table td{padding:8px;border-bottom:1px solid #eee;text-align:left}
.services-wrapper .section-title{margin:8px 0 6px;font-size:1.05rem}
.services-wrapper .muted{opacity:.8;font-size:.9rem}



/* Mobile: one-at-a-time (fade) */
@media (max-width: 768px) {
  #testimonials { min-width: 100%; }
  .t-slider { width: 100%; }
  .t-viewport { position: relative; width: 100%; }
  .t-track { position: relative; display: block; width: 100%; min-height: 1px; }

  #testimonials .t-slide { margin: 0; padding: 15px; }

  .t-slide {
    position: absolute; top: 0; left: 50%;
    width: clamp(280px, 92vw, 720px); max-width: 92vw;
    opacity: 0; transform: translate(-50%, 8px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .t-slide.is-active { opacity: 1; transform: translate(-50%, 0); }

  .t-slider .t-viewport { min-height: 180px; }
}

/* Desktop: 3 across, infinite */
@media (min-width: 769px) {
  .t-dots { display: none; }
  .t-track { display: flex; }
  .t-slide { flex: 0 0 calc((100% - 32px) / 3); }
}

/* =========================
   DARK MODE CONTENT OVERRIDES (minimal—tokens handle most)
   ========================= */
html[data-theme="dark"] .section h2,
html[data-theme="dark"] .section p,
html[data-theme="dark"] .section li,
html[data-theme="dark"] .section blockquote { color: var(--text-1); }

html[data-theme="dark"] #services li {
  background: var(--surface-2); color: var(--text-1); border: 1px solid var(--line-1);
}
html[data-theme="dark"] .gallery-placeholder {
  background: var(--surface-2); border-color: var(--line-1); color: var(--text-2);
}
html[data-theme="dark"] #portfolio ul { color: var(--text-2); }
html[data-theme="dark"] #contact input,
html[data-theme="dark"] #contact textarea {
  background: var(--surface-2); border-color: var(--line-1); color: var(--text-1);
}
html[data-theme="dark"] #contact button { background: var(--accent); color: var(--accent-contrast); }
html[data-theme="dark"] #contact label {
  color: white !important;
}
html[data-theme="light"] .testimonials-section p {
  color: black !important;
}
html[data-theme="light"] .modal p {
  color: black !important;
}
html[data-theme="dark"] .testimonials-section p {
  color: white !important;
}
