.home-locations {
  padding: 2.5rem 0 2rem;
  background: linear-gradient(
    165deg,
    #7a2808 0%,
    var(--bharat-primary-dark) 38%,
    var(--bharat-primary) 100%
  );
}

.home-locations__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .home-locations__inner {
    padding: 0 1.5rem;
  }
}

.home-locations__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-locations__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

@media (min-width: 640px) {
  .home-locations__title {
    font-size: 1.75rem;
  }
}

.home-locations__subtitle {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: rgb(255 255 255 / 0.85);
}

.home-locations__stats {
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bharat-primary);
  white-space: nowrap;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 0.9);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.home-locations__carousel {
  position: relative;
}

.home-locations__viewport {
  overflow: visible;
}

.home-locations__carousel--scroll .home-locations__viewport {
  overflow: hidden;
  padding-block: 0.5rem 0.75rem;
  margin-block: -0.5rem -0.75rem;
}

.home-locations__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 640px) {
  .home-locations__grid:not(.home-locations__grid--scroll) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-locations__grid:not(.home-locations__grid--scroll) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-locations__grid--scroll {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.home-locations__grid--scroll .home-locations__card {
  flex: 0 0 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .home-locations__grid--scroll .home-locations__card {
    flex: 0 0 calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }
}

@media (min-width: 1024px) {
  .home-locations__grid--scroll .home-locations__card {
    flex: 0 0 calc((100% - 2rem) / 3);
    min-width: calc((100% - 2rem) / 3);
  }
}

.home-locations__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin-top: -1.125rem;
  color: #374151;
  cursor: pointer;
  background: rgb(255 255 255 / 0.95);
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.12);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.home-locations__carousel--scroll .home-locations__arrow {
  display: inline-flex;
}

.home-locations__arrow--prev:hover:not(:disabled) {
  color: var(--bharat-primary);
  border-color: var(--bharat-primary-muted);
  transform: translateX(-50%) scale(1.05);
}

.home-locations__arrow--next:hover:not(:disabled) {
  color: var(--bharat-primary);
  border-color: var(--bharat-primary-muted);
  transform: translateX(50%) scale(1.05);
}

.home-locations__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.home-locations__arrow svg {
  width: 1rem;
  height: 1rem;
}

.home-locations__arrow--prev {
  left: 0;
  transform: translateX(-50%);
}

.home-locations__arrow--next {
  right: 0;
  transform: translateX(50%);
}

.home-locations__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgb(80 20 0 / 0.18);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-locations__card:hover {
  box-shadow: 0 14px 32px rgb(80 20 0 / 0.22);
  transform: translateY(-2px);
}

.home-locations__banner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2.5 / 1;
  overflow: hidden;
  text-decoration: none;
}

.home-locations__banner-img,
.home-locations__banner-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-locations__banner-fallback {
  background: linear-gradient(135deg, var(--bharat-primary-dark) 0%, var(--bharat-primary) 100%);
}

.home-locations__banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(0 0 0 / 0.82) 0%,
    rgb(0 0 0 / 0.45) 42%,
    rgb(0 0 0 / 0.08) 72%,
    transparent 100%
  );
  pointer-events: none;
}

.home-locations__card-title {
  position: absolute;
  right: auto;
  bottom: 0.75rem;
  left: 0.875rem;
  z-index: 1;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.45);
}

.home-locations__card-count {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 1;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  background: rgb(0 0 0 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.home-locations__card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
}

.home-locations__cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-locations__city--extra:not([hidden]) {
  animation: home-locations-city-in 0.25s ease;
}

.home-locations__city--extra.is-hiding {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes home-locations-city-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-locations__city {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: #374151;
  text-decoration: none;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.home-locations__city-icon {
  flex-shrink: 0;
  width: 0.875rem;
  height: 0.875rem;
  color: var(--bharat-primary);
  transition: color 0.2s ease;
}

.home-locations__city:hover .home-locations__city-icon,
.home-locations__city:focus-visible .home-locations__city-icon {
  color: #fff;
}

.home-locations__city[hidden] {
  display: none !important;
}

.home-locations__city:hover,
.home-locations__city:focus-visible {
  color: #fff;
  background: var(--bharat-primary);
  border-color: var(--bharat-primary);
}

.home-locations__more {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  cursor: pointer;
  background: #f9fafb;
  border: 1px solid #f0f1f3;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.home-locations__more svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.35s ease;
}

.home-locations__more:hover {
  color: #1f2937;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.home-locations__more.is-open svg {
  transform: rotate(180deg);
}

.home-locations__more--link {
  text-decoration: none;
}

.home-locations__more--spacer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 639px) {
  .home-locations {
    padding-bottom: 1.25rem;
  }

  .home-locations__carousel--scroll .home-locations__viewport {
    padding-block: 0.375rem 0.5rem;
    margin-block: -0.375rem -0.5rem;
  }

  .home-locations__header {
    align-items: flex-start;
  }

  .home-locations__banner {
    aspect-ratio: 2.2 / 1;
  }

  .home-locations__card-title {
    font-size: 1rem;
  }

  .home-locations__arrow {
    width: 1.75rem;
    height: 1.75rem;
    margin-top: -0.875rem;
  }

  .home-locations__arrow svg {
    width: 0.8125rem;
    height: 0.8125rem;
  }
}
