/*----------------------------------------------------------------
  BBC Industrial Services — Global Presence / Our Global Offices
  ----------------------------------------------------------------
  Styles for the interactive offices section on the contact page.
  Loaded AFTER main.css + theme.css + bbc-features.css. Additive
  only — follows the bbc- token system (light/dark aware) and the
  Industrie design language. The globe itself is styled by
  earth-globe.css; this file covers the list + section chrome.
-----------------------------------------------------------------*/

/*==================================================
  1. SECTION + fade-in on scroll
==================================================*/
.bbc-offices-area .bbc-offices-globe-wrap {
  display: flex;
  justify-content: center;
}

/* Elements start slightly shifted + transparent, animate in when the
   section enters the viewport (.bbc-in-view added by IO) */
.bbc-offices-area .bbc-office-card,
.bbc-offices-area .bbc-offices-globe-wrap {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease,
    border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.bbc-offices-area.bbc-in-view .bbc-office-card,
.bbc-offices-area.bbc-in-view .bbc-offices-globe-wrap {
  opacity: 1;
  transform: translateY(0);
}

/*==================================================
  2. OFFICE LIST
==================================================*/
.bbc-office-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding: 4px 10px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--bbc-border-strong, #D2D2D2) transparent;
}

.bbc-office-list::-webkit-scrollbar {
  width: 6px;
}

.bbc-office-list::-webkit-scrollbar-track {
  background: transparent;
}

.bbc-office-list::-webkit-scrollbar-thumb {
  background: var(--bbc-border-strong, #D2D2D2);
  border-radius: 6px;
}

/*==================================================
  3. OFFICE CARD
==================================================*/
.bbc-office-card {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: start;
  cursor: pointer;
  border: 1px solid var(--bbc-border, rgba(0, 0, 0, 0.05));
  border-inline-start: 3px solid transparent;
  border-radius: 14px;
  background: var(--bbc-bg-elevated, #FFFFFF);
  box-shadow: 0 2px 10px var(--bbc-shadow-color, rgba(0, 0, 0, 0.07));
}

.bbc-office-card:hover,
.bbc-office-card.is-map-hover {
  border-color: rgba(234, 95, 35, 0.45);
  border-inline-start-color: var(--rs-theme-orange, #EA5F23);
  box-shadow: 0 10px 26px rgba(234, 95, 35, 0.14);
  transform: translateY(0) translateX(4px);
}

.bbc-office-card.is-active {
  border-color: var(--rs-theme-orange, #EA5F23);
  border-inline-start-color: var(--rs-theme-orange, #EA5F23);
  background: rgba(234, 95, 35, 0.05);
  box-shadow: 0 12px 30px rgba(234, 95, 35, 0.16);
}

.bbc-office-card:focus-visible {
  outline: 2px solid var(--rs-theme-orange, #EA5F23);
  outline-offset: 2px;
}

/* Logo chip */
.bbc-office-logo {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--bbc-border-soft, #F1F1F1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bbc-office-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbc-office-logo-fallback {
  font: 700 15px/1 inherit;
  color: var(--bbc-text-body, #616161);
}

/* Text block */
.bbc-office-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.bbc-office-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--bbc-text-heading, #1F1F1F);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bbc-office-loc {
  font-size: 12.5px;
  color: var(--bbc-text-body, #616161);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bbc-office-loc .fa-location-dot {
  color: var(--rs-theme-orange, #EA5F23);
  font-size: 11px;
  margin-inline-end: 3px;
}

/* Right-hand side: HQ badge + country */
.bbc-office-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.bbc-office-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  color: #FFFFFF;
  background: var(--rs-theme-orange, #EA5F23);
}

.bbc-office-country {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bbc-text-muted, rgba(97, 97, 97, 0.54));
  white-space: nowrap;
}

.bbc-office-card.is-active .bbc-office-country {
  color: var(--rs-theme-orange, #EA5F23);
}

/* Flat reference globe: neutral soft shadow instead of the blue glow,
   so the white-ocean globe reads like the reference design */
#bbc-offices-globe.is-flat::before {
  inset: 4%;
  background: radial-gradient(circle at 50% 58%, rgba(20, 25, 40, 0.14), rgba(20, 25, 40, 0) 64%);
  filter: blur(10px);
}

/* Realistic 3D Earth: a soft brand-tinted glow behind the globe so it lifts
   off the page and feels premium (paired with the in-scene atmosphere rim). */
#bbc-offices-globe.is-realistic::before {
  inset: 3%;
  background: radial-gradient(circle at 42% 34%, rgba(236, 95, 36, 0.16), rgba(90, 150, 255, 0.10) 46%, rgba(90, 150, 255, 0) 70%);
  filter: blur(12px);
}

/*==================================================
  4. DARK MODE
==================================================*/
html[data-theme="dark"] .bbc-office-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .bbc-office-card.is-active {
  background: rgba(234, 95, 35, 0.1);
}

html[data-theme="dark"] .bbc-office-logo {
  background: #E9EDF2; /* keep full-color logos legible, like .rs-brand-item */
  border-color: transparent;
}

/*==================================================
  5. RESPONSIVE
==================================================*/
@media (max-width: 991px) {
  /* Tablet & below: list first, globe stacked underneath (natural DOM order) */
  .bbc-office-list {
    max-height: 420px;
  }
}

@media (max-width: 575px) {
  .bbc-office-list {
    max-height: 360px;
    gap: 10px;
  }

  .bbc-office-card {
    padding: 12px 12px;
    gap: 12px;
  }

  .bbc-office-logo {
    width: 40px;
    height: 40px;
  }

  .bbc-office-name {
    font-size: 14px;
  }
}

/*==================================================
  6. REDUCED MOTION
==================================================*/
@media (prefers-reduced-motion: reduce) {
  .bbc-offices-area .bbc-office-card,
  .bbc-offices-area .bbc-offices-globe-wrap {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


@media (min-width:3001px) and (max-width:6000px) {
.bbc-office-loc {
    font-size: 22px;
}
.bbc-office-name {
    font-size: 27px;
}
.bbc-office-country {
    font-size: 19px;
}
}