/* Metproff Offices Page — Modern Ultra-thin UI Styles */

.offices-page {
  padding-bottom: var(--mp-section-y, 6.4rem);
  background: var(--mp-background, #ffffff);
  color: var(--mp-foreground, #000000);
}

/* Hero Section */
.offices-hero {
  padding: 4.8rem 0 3.2rem;
  background: #f8f9fa;
  border-bottom: 1px solid var(--mp-border-light, #e0e0e0);
}

.offices-hero__container {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

.offices-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.offices-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 1.3rem;
  font-weight: 700;
}

.offices-badge--red {
  background: var(--mp-primary, #E30613);
  color: #ffffff;
}

.offices-hero__brand-tag {
  color: var(--mp-muted, #747474);
}

.offices-hero__title {
  margin: 0 0 1.6rem;
  font-size: clamp(2.8rem, 4.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.offices-hero__lead {
  max-width: 80rem;
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.55;
  color: #333333;
}

/* Appointment Alert Notice Box */
.offices-notice-card {
  display: flex;
  gap: 2rem;
  padding: 2.4rem;
  background: #ffffff;
  border: 1px solid var(--mp-border-light, #e0e0e0);
  border-left: 5px solid var(--mp-primary, #E30613);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.offices-notice-card__icon {
  font-size: 2.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.offices-notice-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.offices-notice-card__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--mp-primary, #E30613);
}

.offices-notice-card__text {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #444444;
}

.offices-notice-card__highlight {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #111111;
  background: rgba(227, 6, 19, 0.05);
  padding: 1rem 1.2rem;
  border-radius: 4px;
}

/* Map Section */
.offices-map-section {
  padding: 4rem 0 2rem;
}

.offices-map-card {
  background: #ffffff;
  border: 1px solid var(--mp-border-light, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--mp-header-shadow, 0 0 15px rgba(0, 0, 0, 0.08));
}

.offices-map-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: 2rem 2.4rem;
  background: #fafafa;
  border-bottom: 1px solid var(--mp-border-light, #e0e0e0);
}

.offices-map-card__title {
  margin: 0 0 0.4rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.offices-map-card__sub {
  margin: 0;
  font-size: 1.4rem;
  color: var(--mp-muted, #747474);
}

.offices-map-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.2rem;
  background: #ffffff;
  border: 1px solid var(--mp-border-light, #e0e0e0);
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;

}

.status-dot--locked {
  background: #ff9800;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

.status-dot--unlocked {
  background: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.offices-map-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  background: #e5e5e5;
}

.offices-map-canvas {
  width: 100%;
  height: 100%;
}

.offices-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(8px);
  padding: 2rem;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.offices-map-overlay.is-unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.offices-map-overlay__content {
  max-width: 480px;
  padding: 3.2rem 2.4rem;
  background: #ffffff;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.offices-map-overlay__lock-icon {
  font-size: 3.6rem;
  margin-bottom: 1.2rem;
}

.offices-map-overlay__title {
  margin: 0 0 0.8rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.offices-map-overlay__desc {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  color: #555555;
  line-height: 1.5;
}

/* Controls: Region Tabs & Search */
.offices-directory-section {
  padding: 4rem 0;
}

.offices-directory__controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3.2rem;
}

.offices-region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.offices-region-tab {
  padding: 1rem 1.6rem;
  background: #f1f3f5;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: all 180ms ease;
}

.offices-region-tab:hover {
  background: #e9ecef;
}

.offices-region-tab.is-active {
  background: var(--mp-primary, #E30613);
  color: #ffffff;
}

.offices-search-box {
  width: 100%;
}

.offices-search-input {
  width: 100%;
  min-height: 5rem;
  padding: 1.2rem 2rem;
  background: #ffffff;
  border: 2px solid var(--mp-border-light, #e0e0e0);
  border-radius: 6px;
  font-size: 1.6rem;
  transition: border-color 180ms ease;
}

.offices-search-input:focus {
  outline: none;
  border-color: var(--mp-primary, #E30613);
}

/* City & Office Cards Grid */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.office-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--mp-border-light, #e0e0e0);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.office-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.office-card--hub {
  border-color: var(--mp-primary, #E30613);
  background: linear-gradient(180deg, #ffffff 0%, rgba(227, 6, 19, 0.02) 100%);
}

.office-card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.office-card__region {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mp-muted, #747474);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.office-card__hub-tag {
  padding: 0.2rem 0.6rem;
  background: rgba(227, 6, 19, 0.1);
  color: var(--mp-primary, #E30613);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 3px;
}

.office-card__hub-tag--open {
  background: #27ae60;
  color: #ffffff;
}

.office-card__city {
  margin: 0 0 1.6rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.office-card__offices-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 2rem;
}

.office-item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.office-item__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222222;
}

.office-item__hours {
  font-size: 1.3rem;
  color: #666666;
}

/* Address Box Lock States */
.office-item__address-box {
  padding: 1.2rem;
  border-radius: 4px;
  transition: all 200ms ease;
}

.office-item__address-box.is-locked {
  background: #edf2f7;
  border: 1px dashed #cbd5e0;
}

.office-item__address-box.is-locked .address-unlocked-content {
  display: none;
}

.office-item__address-box.is-locked .address-locked-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #718096;
}

.office-item__address-box.is-unlocked {
  background: #e6fffa;
  border: 1px solid #38b2ac;
}

.office-item__address-box.is-unlocked .address-locked-content {
  display: none;
}

.office-item__address-box.is-unlocked .address-unlocked-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.unlocked-address {
  font-size: 1.5rem;
  color: #2d3748;
}

.unlocked-note {
  margin: 0;
  font-size: 1.3rem;
  color: #4a5568;
}

/* Footer & Buttons */
.office-card__book-btn .btn-text-unlocked {
  display: none;
}

.office-card.is-unlocked .office-card__book-btn .btn-text-locked {
  display: none;
}

.office-card.is-unlocked .office-card__book-btn .btn-text-unlocked {
  display: inline;
}

/* Modal Popup */
.office-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.office-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.office-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.office-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 3.2rem 2.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.office-modal__close {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  width: 3.6rem;
  height: 3.6rem;
  background: #f1f3f5;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.office-modal__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mp-primary, #E30613);
  text-transform: uppercase;
}

.office-modal__title {
  margin: 0 0 0.8rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.office-modal__desc {
  margin: 0 0 2rem;
  font-size: 1.4rem;
  color: #666666;
  line-height: 1.45;
}

.office-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.office-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.office-modal__label {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222222;
}

.office-modal__radios {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.office-radio {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.4rem;
  cursor: pointer;
}

.office-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.office-modal__privacy {
  margin: 1rem 0 0;
  font-size: 1.2rem;
  color: var(--mp-muted, #747474);
  text-align: center;
}

/* Responsive Breakpoints */
@media (max-width: 1023px) {
  .offices-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .offices-grid {
    grid-template-columns: 1fr;
  }
  .offices-notice-card {
    flex-direction: column;
  }
  .office-modal__grid {
    grid-template-columns: 1fr;
  }
  .offices-map-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
