/* Optional Residential service-menu skin.
   Undo: remove this stylesheet's link in real-estate.html.
   Existing markup and tab behavior are retained. */

:is(.page-real-estate, .page-commercial-template) #services [data-service-tab="website"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='16' rx='2'/%3E%3Cpath d='M2 8h20 M5 5.5h.1 M8 5.5h.1 M8 22h8 M12 19v3'/%3E%3C/svg%3E");
}

@media (max-width: 1100px) {
  :is(.page-real-estate, .page-commercial-template) #services .service-switcher .service-switcher__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

:is(.page-real-estate, .page-commercial-template) #services :is(#home-res-panel-website, #home-com-panel-website) .service-switcher__stat--cta-card strong {
  max-width: none;
  font-size: clamp(1.65rem, 2.55vw, 2.35rem);
  line-height: 1;
}

:is(.page-real-estate, .page-commercial-template) :is(#home-res-panel-website, #home-com-panel-website) .listing-demo-link {
  position: relative;
  z-index: 4;
  margin: -28px auto 24px;
  text-align: center;
}

:is(.page-real-estate, .page-commercial-template) #services :is(#home-res-panel-website, #home-com-panel-website) .service-switcher__tour-live iframe {
  width: 200%;
  height: 200%;
  transform: scale(.5);
  transform-origin: top left;
}

/* Offset the transparent device artwork while leaving a small visible gap. */
:is(.page-real-estate, .page-industry-template) #services .service-switcher__tour {
  margin-top: calc(8px - var(--res-service-dock-overlap));
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tabs {
  display: grid;
  grid-template-columns: repeat(var(--service-tab-count, 8), minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  width: min(100%, 69rem);
  margin-inline: auto;
  padding: 9px;
  border: 1px solid rgba(196, 141, 38, 0.4);
  border-radius: 22px;
  background: linear-gradient(125deg, #263e20, #12270f 65%, #10210d);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 248, 0.12),
    0 12px 28px rgba(16, 33, 13, 0.16);
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab {
  display: grid;
  grid-template-rows: 25px 2.5em;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 100px;
  padding: 13px 9px 17px;
  border: 1px solid rgba(255, 253, 248, 0.08);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.025);
  color: #e9eddf;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.25;
  text-transform: none;
  text-wrap: balance;
  white-space: normal;
  box-shadow: none;
  transform: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab::before {
  content: "";
  display: block;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  background: #cfa85b;
  -webkit-mask: var(--service-menu-icon) center / contain no-repeat;
  mask: var(--service-menu-icon) center / contain no-repeat;
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab:hover {
  border-color: rgba(207, 168, 91, 0.4);
  background: rgba(255, 253, 248, 0.09);
  color: #fffdf8;
  transform: none;
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab.is-active {
  border-color: #fffdf8;
  background: linear-gradient(145deg, #fffdf8, #eee9db);
  color: #183711;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(3, 12, 5, 0.2);
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab.is-active::before {
  background: #296216;
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab.is-active::after {
  bottom: 7px;
  width: 18px;
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: #b58022;
  filter: none;
}

:is(.page-real-estate, .page-industry-template) #services .service-switcher__tab:focus-visible {
  outline: 2px solid #e7be69;
  outline-offset: 2px;
  box-shadow: none;
}

/* Decorative, resolution-independent service icons. Labels remain accessible text. */
:is(.page-real-estate, .page-industry-template) #services [data-service-tab="matterport"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 9 5v10l-9 5-9-5V7Z M3 7l9 5 9-5 M12 12v10 M7.5 4.5l9 5v5'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="zillow"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7 M5 9v11h14V9 M9 20v-7h6v7'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="hdr"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6l1.5-3h5L16 6h4a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="drone"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='6' height='6' rx='2'/%3E%3Cpath d='m9 9-4-4 M15 9l4-4 M9 15l-4 4 M15 15l4 4 M2 5h6 M16 5h6 M2 19h6 M16 19h6 M5 2v6 M19 2v6 M5 16v6 M19 16v6'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="floorplan"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M9 21H3V3h18v18h-6 M3 10h7 M14 10h7 M12 3v7 M12 15v6'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="staging"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12V8a2 2 0 0 1 2-2h7 M5 17h14 M4 20v-3 M20 20v-3 M5 12a2 2 0 0 0-4 0v5h22v-5a2 2 0 0 0-4 0v2H5Z M19 2v6 M16 5h6'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="twilight"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14a7 7 0 0 1-9-10 7 7 0 1 0 9 10Z M18 2v4 M16 4h4 M3 21h18'/%3E%3C/svg%3E");
}

:is(.page-real-estate, .page-industry-template) #services [data-service-tab="flythrough"] {
  --service-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V3h14v18 M9 3v18 M2 21h10 M12 14h10 M19 11l3 3-3 3'/%3E%3C/svg%3E");
}

@media (max-width: 1100px) {
  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 46rem);
  }

  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tab {
    min-height: 86px;
    padding-block: 10px 15px;
    gap: 7px;
  }
}

@media (max-width: 640px) {
  /* Enlarge the device itself, keeping its screen and controls aligned.
     Clip only the transparent canvas edges that extend past the section. */
  :is(.page-real-estate, .page-industry-template) #services .service-switcher__views {
    overflow-x: clip;
  }

  :is(.page-real-estate, .page-industry-template) #services .service-switcher__hdr-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.page-real-estate, .page-industry-template) #services.home-service-hub--laptop :is(
    .service-switcher__tour-stage--embed,
    .service-switcher__hdr-gallery-shell
  ) {
    width: 114%;
    max-width: none;
    margin-inline: -7%;
  }
}

@media (max-width: 540px) {
  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tabs {
    gap: 4px;
    padding: 6px;
    border-radius: 17px;
  }

  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tab {
    min-height: 90px;
    grid-template-rows: 22px 2.5em;
    padding-inline: 4px;
    border-radius: 11px;
    font-size: 0.72rem;
    letter-spacing: 0;
  }

  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tab::before {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.page-real-estate, .page-industry-template) #services .service-switcher__tab {
    transition: none;
  }
}
