/* San Francisco location page (/managed-it-services-san-francisco-usa).
   Layout, spacing and type come from Bootstrap utilities and the shared
   site classes; this file only holds what those cannot express. */

:root {
  --sf-blue: #0175b5;
  --sf-blue-dark: #0360a1;
  --sf-navy: #0d1424;
  --sf-light: #f4f9fd;
  --sf-grey: #eceff0;
}

.sf-light { background: var(--sf-light); }
.sf-grey { background: var(--sf-grey); }

.sf-h2 {
  font-size: 30px;
  line-height: 46px;
}

.sf-eyebrow {
  font-size: 16px;
  letter-spacing: 0.2px;
}

@media (max-width: 767.98px) {
  .sf-h2 {
    font-size: 24px;
    line-height: 36px;
  }
}

/* buttons */
.sf-btn {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sf-blue);
  --bs-btn-border-color: var(--sf-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sf-blue-dark);
  --bs-btn-hover-border-color: var(--sf-blue-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #024f85;
  --bs-btn-active-border-color: #024f85;
  --bs-btn-border-radius: 6px;
  --bs-btn-font-size: 17px;
  --bs-btn-font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sf-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.sf-btn-hero {
  --bs-btn-border-color: rgba(255, 255, 255, 0.7);
  --bs-btn-hover-border-color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .sf-btn:hover { transform: translateY(-2px); }
}

@media (max-width: 575.98px) {
  .sf-btn {
    --bs-btn-font-size: 16px;
    width: 100%;
    min-height: 48px;
  }
}

/* 1. hero */
.sf-hero.page-header { min-height: 0; }

@media (min-width: 992px) {
  .sf-hero.page-header {
    min-height: 700px;
    display: flex;
    align-items: center;
  }
}

.sf-hero .page-header-image { object-position: center 60%; }

.sf-hero .overlay {
  background: linear-gradient(90deg, rgba(5, 8, 16, 0.85) 0%, rgba(5, 8, 16, 0.55) 50%, rgba(5, 8, 16, 0.1) 100%);
}

.sf-hero-title {
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.4;
}

.sf-hero .text-brand { color: #0a8fdb !important; }

.sf-checks {
  max-width: 560px;
  font-weight: 500;
}

.sf-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-checks li::before {
  content: "\F26B"; /* bootstrap-icons check-circle */
  font-family: "bootstrap-icons";
  font-size: 20px;
  line-height: 1;
  color: #0a8fdb;
}

/* 2. credentials */
.sf-badge-icon {
  display: flex;
  flex: 0 0 50px;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  background: var(--sf-blue);
}

.sf-badge-icon img { filter: brightness(0) invert(1); }

.sf-badge-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--sf-blue);
}

/* 3. numbers: dark band, white card overlapping its lower edge */
.sf-stats-section { padding-bottom: 48px; }

.sf-stats-band {
  position: relative;
  padding: 56px 0 170px;
  background-color: #0e1a3a;
  background-size: cover;
  background-position: center;
}

.sf-stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 24, 58, 0.9);
}

.sf-stats-band > .container { position: relative; }

.sf-stats-card {
  max-width: 1140px;
  margin-top: -130px;
  padding: 56px 24px 40px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.sf-stats-tab {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 10px 28px;
  font-size: 18px;
  white-space: nowrap;
  border-radius: 6px;
  background: var(--sf-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
}

.sf-stat { padding: 16px 8px; }

.sf-stat-num {
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--sf-blue);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 992px) {
  .sf-stat + .sf-stat { border-left: 1.5px solid var(--sf-blue); }
}

/* 4. service cards: coloured header, round grey icon at the foot */
.sf-service-card {
  overflow: hidden;
  transition: transform 0.3s ease;
}

.sf-service-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 16px;
  font-size: 17px !important;
}

.sf-service-head a {
  color: #fff;
  text-decoration: none;
}

.sf-service-card.is-blue .sf-service-head { background: #1f86c4; }
.sf-service-card.is-dark .sf-service-head { background: #0f1520; }

.sf-service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #d9d9d9;
}

@media (hover: hover) and (pointer: fine) {
  .sf-service-card:hover { transform: translateY(-6px); }
  .sf-service-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* 5. nearby locations */
/* scrollable list card with the map overlapping it (same pattern as the Los Angeles page) */
.sf-cities {
  max-height: 588px;
  overflow-y: auto;
  border-radius: 10px;
  background: #f2f2f2;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.34) !important;
}

/* city rows: selectable; the active one lifts onto a white card with a blue accent bar */
.sf-city {
  position: relative;
  gap: 12px !important;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sf-city::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--sf-blue);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sf-city:hover { background: rgba(255, 255, 255, 0.6); }

.sf-city.is-active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sf-city.is-active::before { opacity: 1; }

.sf-city p { color: #4a4a4a; }

.sf-city-pin {
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}

/* round map-pin button; filled when its city is on the map */
.sf-city-btn {
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: 0;
  --bs-btn-color: var(--sf-blue);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #cfe0ee;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sf-blue);
  --bs-btn-hover-border-color: var(--sf-blue);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--sf-blue);
  --bs-btn-active-border-color: var(--sf-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  font-size: 15px;
}

/* cities with their own page get one blue, descriptive link under the text;
   cities without a page show no link at all */
/* inline-block so a wrapped link keeps its arrow right after the last word */
.sf-city-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sf-blue);
  text-decoration: none;
}

.sf-city-more i {
  display: inline-block;
  margin-left: 2px;
  vertical-align: -1px;
  transition: transform 0.2s ease;
}

.sf-city-more:hover {
  color: var(--sf-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sf-city-more:hover i { transform: translateX(3px); }

.sf-map {
  height: 420px;
  z-index: 0;
}

.sf-pin {
  display: flex;
  justify-content: center;
}

.sf-pin img {
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sf-pin::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  border: 6px solid transparent;
  border-top: 9px solid #fff;
  border-bottom: 0;
  transform: translateX(-50%);
}

.sf-pin.is-active img {
  border-color: var(--sf-blue);
  transform: scale(1.2);
}

.sf-pin.is-active::after { border-top-color: var(--sf-blue); }

@media (min-width: 1200px) {
  /* keep the pin buttons clear of the overlapping map */
  .sf-cities { padding-right: 64px !important; }

  .sf-map {
    position: relative;
    z-index: 1;
    height: 440px;
    margin-left: -56px;
  }
}

@media (max-width: 1199.98px) {
  .sf-cities {
    max-height: none;
    overflow: visible;
  }
}

/* phones: map on top, cities become a swipeable row of cards right under it,
   so the map and the selected city are always on screen together */
@media (max-width: 767.98px) {
  .sf-map { height: 300px; }

  .sf-cities {
    position: relative;
    display: flex;
    gap: 12px;
    margin: 0 -12px;
    padding: 14px 12px 10px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 12px;
    overscroll-behavior-x: contain;
    border-radius: 0;
    background: none;
    box-shadow: none !important;
    scrollbar-width: none;
  }

  .sf-cities::-webkit-scrollbar { display: none; }

  .sf-city {
    flex: 0 0 84%;
    margin-bottom: 0 !important;
    padding: 14px 14px 14px 16px;
    border: 1px solid #e3e8ee;
    background: #fff;
    scroll-snap-align: center;
  }

  .sf-city:hover { background: #fff; }

  .sf-city.is-active {
    border-color: #bcd8ee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .sf-city::before {
    top: 14px;
    bottom: 14px;
  }

  /* the card itself selects the city; the pin button is only needed on larger screens */
  .sf-city-btn { display: none; }
}

/* 6. challenges: gradient background, arched photo, icon timeline */
.sf-challenges {
  background-color: #10082a;
  background-size: cover;
  background-position: center bottom;
}

.sf-arch {
  position: relative;
  max-width: 420px;
  aspect-ratio: 418 / 365;
  overflow: hidden;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}

.sf-arch img {
  position: absolute;
  bottom: 0;
  left: 14%;
  width: 72%;
  height: 88%;
  object-fit: cover;
  object-position: 30% center;
  border-radius: 999px 999px 0 0;
}

.sf-timeline-item {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
}

.sf-timeline-item + .sf-timeline-item { margin-top: 20px; }

.sf-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 29px;
  height: calc(100% + 20px);
  border-left: 1.5px dashed rgba(255, 255, 255, 0.7);
}

.sf-timeline-icon {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 58px;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
}

.sf-timeline-card {
  flex: 1;
  padding: 20px 20px 20px 18px;
  color: #000;
  border-left: 7px solid #1f86c4;
  border-radius: 4px;
  background: #fff;
}

.sf-timeline-card p { font-size: 14px; }

@media (max-width: 575.98px) {
  .sf-timeline-item { align-items: flex-start; }
  .sf-timeline-item:not(:last-child)::before { top: 29px; }
  .sf-timeline-icon { flex-basis: 44px; width: 44px; height: 44px; }
  .sf-timeline-icon img { width: 26px; height: 26px; }
  .sf-timeline-item:not(:last-child)::before { left: 22px; }
  .sf-timeline-item { gap: 12px; }
}

/* 7. quote CTA card */
.sf-quote-cta {
  position: relative;
  overflow: hidden;
  padding: 40px;
  border-radius: 6px;
  background-color: #0e1630;
  background-size: cover;
  background-position: right center;
}

.sf-quote-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 18, 40, 0.97) 40%, rgba(14, 18, 40, 0.55));
}

.sf-quote-cta > .row { position: relative; }

@media (max-width: 575.98px) {
  .sf-quote-cta { padding: 28px 20px; }
}

/* 8. case studies */
.sf-cases {
  background-color: #d5dadf;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 4px 4px;
}

.sf-case {
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #ececec);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

/* case images are 616x172 banners: keep their ratio so nothing is cropped */
.sf-case-image {
  position: relative;
  aspect-ratio: 616 / 172;
  overflow: hidden;
}

.sf-case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.sf-case-badge {
  position: absolute;
  top: 14px;
  left: 12px;
  padding: 4px 12px;
  font-size: 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.sf-case-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 12px 18px;
}

.sf-case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sf-blue);
  text-decoration: none;
}

.sf-case-link i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sf-case:hover { transform: translateY(-6px); }
  .sf-case:hover .sf-case-image img { transform: scale(1.06); }
  .sf-case:hover .sf-case-link i { transform: translateX(4px); }
}

/* 9. numbered advantages: number sits on a blue rule */
/* the number's white disc is drawn above a tapered blue rule */
.sf-step-num {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-bottom: 20px;
  font-size: 17px;
  font-weight: 600;
  color: #000;
}

.sf-step-num::before,
.sf-step-num::after {
  content: "";
  position: absolute;
  z-index: -1;
}

.sf-step-num::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sf-blue) 20%, var(--sf-blue) 80%, transparent);
  transform: translateY(-50%);
}

.sf-step-num::after {
  top: 0;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}

.sf-step p { font-size: 14px; }

/* 10. top MSP: photo with badge and detail card, selectable list */
.sf-adv-photo {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  /* Chromium/Safari cross-fade between tab photos; other browsers swap instantly */
  transition: background-image 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .sf-adv-photo { transition: none; }
}

.sf-adv-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 64, 105, 0.6);
}

.sf-adv-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 40px;
  align-items: center;
  padding: 14px 18px;
  color: #fff;
  border-radius: 6px;
  background: var(--sf-blue);
}

.sf-adv-badge i { font-size: 46px; line-height: 1; }

.sf-adv-detail {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 20px 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.sf-adv-detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--sf-blue);
}

.sf-adv-detail-icon img { filter: brightness(0) invert(1); }

.sf-adv-item { border-top: 1.5px solid #c9ced3; }
.sf-adv-item:last-child { border-bottom: 1.5px solid #c9ced3; }

.sf-adv-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 8px 14px 8px 0;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  color: #000;
  border: 0;
  background: none;
}

.sf-adv-btn img {
  display: none;
  width: 75px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
}

.sf-adv-item.is-active .sf-adv-btn { color: var(--sf-blue); }
.sf-adv-item.is-active .sf-adv-btn img { display: block; }

.sf-adv-btn:focus-visible {
  outline: 2px solid var(--sf-blue);
  outline-offset: 2px;
}

/* the open item's text shows inline on phones/tablets; on desktop it lives in the photo card */
.sf-adv-text {
  display: none;
  padding: 0 0 16px;
  font-size: 14px;
}

@media (max-width: 991.98px) {
  .sf-adv-item.is-active .sf-adv-text { display: block; }
}

/* 11. consultation CTA */
.sf-cta {
  position: relative;
  background-color: #12081f;
  background-size: cover;
  background-position: center;
}

.sf-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  /* light tint only: the artwork is already dark in the middle; this keeps text legible over the red network on the left */
  background: linear-gradient(90deg, rgba(10, 6, 25, 0.35), rgba(10, 6, 25, 0.15) 50%, transparent);
}

.sf-cta > .container { position: relative; }

.sf-points { gap: 6px 12px; }

.sf-points li:not(:last-child)::after {
  content: "|";
  margin-left: 12px;
}

/* 12. FAQ (page-scoped overrides of the shared .faq-accordion) */
.sf-faq h2 { margin-bottom: 12px; }

.sf-faq .accordion-item {
  margin-bottom: 28px;
  background: transparent;
}

.sf-faq .accordion-item:last-child { margin-bottom: 0; }

.sf-faq .accordion-button {
  position: relative;
  align-items: center;
  min-height: 0;
  padding: 0 0 0 63px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #000;
}

.sf-faq .accordion-button::after {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin-left: auto;
  padding-left: 16px;
  font-size: 20px;
  line-height: 1;
}

.sf-faq .faq-icon {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.sf-faq .faq-icon img {
  display: block;
  width: 46px;
  max-width: 46px;
}

.sf-faq .accordion-body {
  padding: 10px 16px 0 63px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: #000;
  background: linear-gradient(#d9d9d9, #d9d9d9) 22px 16px / 2px calc(100% - 20px) no-repeat;
}

.sf-faq .accordion-body a { color: var(--sf-blue); }

.sf-faq .accordion-item .line { display: none; }
.sf-faq .accordion-item:last-child .accordion-body { background: none; }

@media (max-width: 991.98px) {
  .sf-faq #faqRight { margin-top: 28px; }
}

@media (max-width: 767.98px) {
  .sf-faq .accordion-button {
    padding-left: 46px;
    font-size: 15px;
  }

  .sf-faq .faq-icon img {
    width: 34px;
    max-width: 34px;
  }

  .sf-faq .accordion-body {
    padding: 8px 4px 0 46px;
    background-position: 16px 12px;
    background-size: 2px calc(100% - 16px);
  }

  section.py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .sf-stats-band { padding-bottom: 150px; }
}

/* phones: calmer type scale and tighter rhythm */
@media (max-width: 575.98px) {
  .sf-hero-title {
    font-size: 24px;
    line-height: 1.35;
  }

  .sf-h2 {
    font-size: 21px;
    line-height: 1.4;
  }

  .sf-eyebrow { font-size: 14px; }
  .sf-badge-title { font-size: 17px; }

  .fs-30 { font-size: 24px; }
  .fs-18 { font-size: 16px; }
  .fs-16 { font-size: 15px; }
  .lh-26 {
    font-size: 15px;
    line-height: 24px;
  }

  section.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  section .mb-5 { margin-bottom: 1.75rem !important; }
  section .mb-4 { margin-bottom: 1.25rem !important; }
  section .p-4 { padding: 1.25rem !important; }

  .sf-stats-band { padding: 40px 0 140px; }
  .sf-stats-card {
    margin-top: -100px;
    padding: 40px 14px 20px;
  }
  .sf-stats-tab {
    padding: 8px 20px;
    font-size: 16px;
  }
  .sf-stat { padding: 10px 6px; }
  .sf-stat-num { font-size: 30px; }

  .sf-service-head {
    min-height: 80px;
    font-size: 16px !important;
  }

  .sf-faq .accordion-button { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-service-card,
  .sf-case,
  .sf-case *,
  .sf-btn {
    transition: none !important;
    transform: none !important;
  }
}
