.sucursales-section {
  padding: 2rem;
}

.sucursales-header {
  max-width: none;
  margin-bottom: 1.9rem;
  text-align: left;
}

.sucursales-copy {
  margin-bottom: 2rem;
}

.sucursales-copy p {
  margin: 0 0 0.9rem;
  line-height: 1.75;
}

.sucursales-copy p:last-child {
  margin-bottom: 0;
}

.sucursales-copy-card__closing {
  color: var(--color-brand-primary);
  font-weight: 700;
}

.sucursales-selector-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sucursales-selector-shell {
  margin-top: 2rem;
}

.branches-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 24rem) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
}

.branches-left {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}

.carousel-mask {
  position: relative;
  width: 100%;
  max-width: 22rem;
  height: 33rem;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  isolation: isolate;
}

.carousel-mask::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 251, 1) 0%, rgba(255, 253, 251, 0) 13%, rgba(255, 253, 251, 0) 87%, rgba(255, 253, 251, 1) 100%);
  z-index: 2;
  pointer-events: none;
}

.wheel-layer {
  position: absolute;
  top: 50%;
  left: 36%;
  width: 28rem;
  height: 28rem;
  margin-top: -14rem;
  margin-left: -14rem;
  transition: transform 0.5s ease;
  z-index: 1;
}

.branch-preview {
  position: absolute;
  left: 50%;
  z-index: 3;
  width: 7.4rem;
  height: 7.4rem;
  margin-left: -3.7rem;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(63, 23, 45, 0.1);
  opacity: 0.7;
}

.branch-preview--top {
  top: -2.8rem;
}

.branch-preview--bottom {
  bottom: -2.8rem;
}

.branch-preview__photo {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(0.9) brightness(0.96);
}

.branch-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6.6rem;
  margin-top: -3.3rem;
  margin-left: -3.3rem;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--color-brand-secondary);
  transition: opacity 0.35s ease, filter 0.35s ease;
  opacity: 0;
  pointer-events: none;
}

.branch-node.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.branch-node.is-active {
  opacity: 0;
  pointer-events: none;
}

.branch-node.is-near {
  opacity: 0;
}

.branch-node.is-far {
  opacity: 0;
}

.branch-node__photo {
  width: 5.5rem;
  height: 5.5rem;
  border: 0;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 10px 22px rgba(63, 23, 45, 0.12);
}

.branch-node__label {
  max-width: 5.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.active-branch-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 16.5rem;
  height: 16.5rem;
  padding: 1.45rem 0 1.55rem;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(63, 23, 45, 0.14);
  transform: translate(-50%, -50%);
  overflow: hidden;
  text-align: center;
}

.active-branch-card__photo {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.active-branch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(63, 23, 45, 0.08) 0%, rgba(63, 23, 45, 0.18) 38%, rgba(63, 23, 45, 0.82) 100%);
  z-index: 1;
}

.active-branch-card__eyebrow,
.active-branch-card__name,
.active-branch-card__city {
  position: relative;
  z-index: 2;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.active-branch-card__eyebrow {
  display: none;
}

.active-branch-card__name {
  margin: 0 0 0.35rem;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1.05;
}

.active-branch-card__city {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  line-height: 1.35;
}

.carousel-mask.is-moving-next .branch-preview--top {
  animation: branchTopNext 0.45s ease;
}

.carousel-mask.is-moving-next .active-branch-card {
  animation: branchCenterNext 0.45s ease;
}

.carousel-mask.is-moving-next .branch-preview--bottom {
  animation: branchBottomNext 0.45s ease;
}

.carousel-mask.is-moving-prev .branch-preview--top {
  animation: branchTopPrev 0.45s ease;
}

.carousel-mask.is-moving-prev .active-branch-card {
  animation: branchCenterPrev 0.45s ease;
}

.carousel-mask.is-moving-prev .branch-preview--bottom {
  animation: branchBottomPrev 0.45s ease;
}

@keyframes branchCenterNext {
  0% {
    transform: translate(-50%, calc(-50% + 1rem)) scale(0.96);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes branchCenterPrev {
  0% {
    transform: translate(-50%, calc(-50% - 1rem)) scale(0.96);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes branchTopNext {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-1rem);
    opacity: 0.55;
  }
}

@keyframes branchBottomNext {
  0% {
    transform: translateY(1rem);
    opacity: 0.45;
  }
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
}

@keyframes branchTopPrev {
  0% {
    transform: translateY(-1rem);
    opacity: 0.45;
  }
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
}

@keyframes branchBottomPrev {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }
  100% {
    transform: translateY(1rem);
    opacity: 0.55;
  }
}

.branches-nav {
  position: absolute;
  left: 50%;
  z-index: 4;
  width: 3rem;
  height: 3rem;
  margin-left: -1.5rem;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-brand-primary);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(63, 23, 45, 0.12);
}

.branches-nav--up {
  top: 0;
}

.branches-nav--down {
  bottom: 0;
}

.branch-list-mobile {
  display: none;
}

.branch-list-mobile__item {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(160, 37, 67, 0.12);
  border-radius: 1rem;
  background: #fff;
  color: var(--color-brand-secondary);
  font-weight: 700;
  text-align: left;
}

.branch-list-mobile__item.is-active {
  background: #a02543;
  color: #fff;
}

.branch-info-card {
  position: relative;
  z-index: 5;
  align-self: center;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.branch-info-card__kicker {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--color-brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.branch-info-card h2 {
  margin-bottom: 1rem;
  color: var(--color-brand-secondary);
  font-family: var(--font-heading);
  font-size: clamp(1.95rem, 4vw, 2.9rem);
}

.branch-info-card__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem);
  gap: 1.6rem;
  align-items: start;
}

.branch-info-card__content {
  display: grid;
  gap: 1rem;
}

.branch-info-card__map {
  display: flex;
  justify-content: flex-end;
  margin-right: -3.2rem;
}

.branch-info-card__row {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(160, 37, 67, 0.08);
}

.branch-info-card__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.branch-info-card__row p,
.branch-info-card__row a {
  margin: 0;
  color: var(--color-brand-secondary);
  font-size: 1rem;
  line-height: 1.55;
  text-decoration: none;
  white-space: pre-line;
}

.branch-info-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.branch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.branch-action--primary {
  background: var(--color-brand-primary);
  color: #fff;
}

.branch-action--secondary {
  border: 1px solid rgba(160, 37, 67, 0.2);
  color: var(--color-brand-primary);
  background: #fff;
}

.branch-map-placeholder {
  position: relative;
  width: 100%;
  height: 22rem;
  overflow: hidden;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #eef2f5, #ffffff);
  border: 1px solid rgba(160, 37, 67, 0.08);
}

.branch-map-embed {
  display: block;
  width: 100%;
  height: 22rem;
  overflow: hidden;
  border: 0;
  border-radius: 1.4rem;
  box-shadow: 0 14px 28px rgba(63, 23, 45, 0.12);
}

.branch-map-placeholder::before,
.branch-map-placeholder::after {
  content: "";
  position: absolute;
  background: rgba(111, 132, 153, 0.22);
}

.branch-map-placeholder::before {
  top: -8%;
  bottom: -8%;
  left: 54%;
  width: 0.7rem;
  transform: rotate(30deg);
}

.branch-map-placeholder::after {
  left: -8%;
  right: -8%;
  top: 48%;
  height: 0.7rem;
  transform: rotate(-35deg);
}

.branch-map-placeholder__pin {
  position: absolute;
  top: 42%;
  left: 56%;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50% 50% 50% 0;
  background: var(--color-brand-primary);
  transform: rotate(-45deg);
}

.branch-map-placeholder__pin::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 1199.98px) {
  .branches-layout {
    grid-template-columns: 1fr;
  }

  .branches-left {
    margin: 0 auto;
    max-width: 22rem;
  }
}

@media (max-width: 767.98px) {
  .sucursales-section {
    padding: 1.4rem;
  }

  .carousel-mask,
  .branches-nav {
    display: none;
  }

  .branch-list-mobile {
    display: grid;
    gap: 0.75rem;
    width: 100%;
  }

  .branch-info-card {
    padding: 1.35rem;
  }

  .branch-info-card__layout {
    grid-template-columns: 1fr;
  }

  .branch-info-card__map {
    margin-right: 0;
  }

  .branch-map-placeholder {
    height: 18rem;
  }

  .branch-info-card__actions {
    flex-direction: column;
  }
}
