:root {
  --theme-bg: #f7f9fb;
  --theme-surface: #fff;
  --theme-surface-alt: #f0f3f5;
  --theme-text: #0b1824;
  --theme-muted: #5c6f7b;
  --theme-border: #d9e1e6;
  --theme-header: rgb(247 249 251 / 95%);
  --theme-shadow: 0 18px 48px rgb(5 22 37 / 11%);
  --theme-nav-active: rgb(241 90 36 / 12%);
  --theme-nav-active-border: rgb(241 90 36 / 38%);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #07111a;
  --theme-surface: #102130;
  --theme-surface-alt: #162b3b;
  --theme-text: #f5f8fa;
  --theme-muted: #b4c1c9;
  --theme-border: #2b4353;
  --theme-header: rgb(7 17 26 / 94%);
  --theme-shadow: 0 20px 55px rgb(0 0 0 / 30%);
  --theme-nav-active: rgb(241 90 36 / 18%);
  --theme-nav-active-border: rgb(255 123 67 / 52%);
}

body,
.services,
.about,
.service-area,
.faq,
.legal-page {
  background: var(--theme-bg);
  color: var(--theme-text);
}

.service-detail-page,
.service-detail,
.service-process {
  background: var(--theme-bg);
  color: var(--theme-text);
}

.service-topics {
  background: var(--theme-surface-alt);
}

.service-topic-card,
.service-process__steps article {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

.site-header {
  border-bottom-color: var(--theme-border);
  background: var(--theme-header);
  color: var(--theme-text);
}

.brand {
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.main-nav {
  margin-left: auto;
}

.header-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--theme-border);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--theme-text);
  cursor: pointer;
  box-shadow: 0 8px 22px rgb(5 22 37 / 8%);
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.theme-toggle:focus-visible,
.floating-contact__button:focus-visible {
  outline: 3px solid rgb(241 90 36 / 35%);
  outline-offset: 3px;
}

.theme-toggle__icon {
  font-size: 22px;
}

.main-nav > a:not(.button) {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--theme-text);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.main-nav > a:not(.button):hover,
.main-nav > a:not(.button):focus-visible,
.main-nav > a.is-active:not(.button) {
  color: var(--orange-dark);
}

.main-nav > a.is-active:not(.button) {
  border-color: var(--theme-nav-active-border);
  background: var(--theme-nav-active);
}

html[data-theme="dark"] .main-nav > a.is-active:not(.button) {
  color: var(--orange-light);
}

.main-nav > a:not(.button)::after {
  display: none;
}

.emergency-bar__location {
  font-weight: 800;
}

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

.quick-actions__grid > a,
.service-card,
.location-card,
.accordion details,
.request-form {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

.quick-actions__grid > a + a,
.quick-actions__grid > a:nth-child(3),
.quick-actions__grid > a:nth-child(4) {
  border-color: var(--theme-border);
}

.quick-actions__grid > a:hover,
.accordion details:hover {
  background: var(--theme-surface-alt);
}

.section-heading h2,
.service-card h3,
.about__content h2,
.location-card h3,
.faq h2,
.legal-page h1,
.legal-page h2,
.field label,
.file-drop strong {
  color: var(--theme-text);
}

.section-heading > p,
.service-card p,
.about__content > p:not(.eyebrow),
.benefits small,
.quick-actions__grid small,
.location-card p,
.accordion details p,
.legal-page p,
.legal-page li,
.field label span,
.file-drop small,
.consent,
.form-disclaimer {
  color: var(--theme-muted);
}

.about__lead {
  color: var(--theme-text) !important;
}

.field input,
.field select,
.field textarea,
.file-drop {
  border-color: var(--theme-border);
  background: var(--theme-surface-alt);
  color: var(--theme-text);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.file-drop:hover {
  background: var(--theme-surface);
}

.photo-previews {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 13px;
}

.photo-preview {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface-alt);
}

.photo-preview img,
.photo-preview__fallback {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.photo-preview img {
  object-fit: cover;
}

.photo-preview__fallback {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  color: var(--theme-muted);
  font-size: .68rem;
  text-align: center;
}

.photo-preview__fallback .material-symbols-outlined {
  color: var(--orange);
  font-size: 28px;
}

.photo-preview figcaption {
  overflow: hidden;
  padding: 8px 10px;
  color: var(--theme-text);
  font-size: .68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-status {
  min-height: 1.45em;
  margin: 12px 0 0;
  color: var(--green-dark);
  font-size: .73rem;
  font-weight: 700;
  text-align: center;
}

html[data-theme="dark"] .form-status,
html[data-theme="dark"] .selected-files {
  color: #65d69e;
}

html[data-theme="dark"] .header-controls .button--dark {
  background: var(--orange);
  color: #fff;
}

.floating-contact {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 11px;
}

.floating-contact__button {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
  transition: transform .2s ease, box-shadow .2s ease;
}

.floating-contact__button::after {
  position: absolute;
  right: calc(100% + 12px);
  width: max-content;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--navy-950);
  color: #fff;
  content: attr(data-label);
  font-size: .7rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity .2s ease, transform .2s ease;
}

.floating-contact__button:hover,
.floating-contact__button:focus-visible {
  box-shadow: 0 16px 38px rgb(0 0 0 / 32%);
  transform: translateY(-3px);
}

.floating-contact__button:hover::after,
.floating-contact__button:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.floating-contact__button--call {
  background: var(--orange);
}

.floating-contact__button--whatsapp {
  background: var(--green);
}

.floating-contact .material-symbols-outlined {
  font-size: 27px;
  font-variation-settings: "FILL" 1;
}

.whatsapp-icon {
  display: block;
  width: 28px;
  height: 28px;
}

.whatsapp-icon--button {
  width: 20px;
  height: 20px;
}

@media (max-width: 860px) {
  .main-nav {
    margin-left: 0;
    border-top: 1px solid var(--theme-border);
    background: var(--theme-surface);
  }

  .main-nav > a:not(.button) {
    border-bottom-color: var(--theme-border);
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 0;
  }

  .emergency-bar__inner > span:first-child {
    display: inline-flex;
  }

  .emergency-bar__location {
    display: none;
  }

  .brand__logo {
    width: 154px;
  }

  .header-controls {
    gap: 7px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 42px;
    height: 42px;
  }

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

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

  .floating-contact {
    right: 14px;
    bottom: 14px;
    flex-direction: row;
  }

  .floating-contact__button {
    width: 54px;
    height: 54px;
  }

  .floating-contact__button::after {
    display: none;
  }

  .site-footer {
    padding-bottom: 84px;
  }
}
