/* Homepage national delivery map */
.delivery-map-section {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 104px;
  background:
    radial-gradient(circle at 72% 36%, rgba(184, 148, 58, .16), transparent 28%),
    linear-gradient(180deg, var(--dark) 0, var(--black) 100%);
}

.delivery-map-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
  pointer-events: none;
}

.delivery-map-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr);
  gap: 54px;
  align-items: center;
}

.delivery-copy h2 {
  max-width: 650px;
  margin-bottom: 20px;
  color: var(--white);
  font-size: clamp(2.35rem, 4.2vw, 4.7rem);
  line-height: 1.02;
}

.delivery-copy > p {
  max-width: 650px;
  margin-bottom: 32px;
  font-size: 1.03rem;
}

.delivery-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.delivery-step {
  min-height: 154px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.delivery-step span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.delivery-step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--white);
  font-size: .96rem;
}

.delivery-step p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.delivery-map-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(184, 148, 58, .24);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.delivery-map-card::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle, rgba(184, 148, 58, .18), transparent 38%);
  opacity: .8;
  pointer-events: none;
}

.delivery-map-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.delivery-map-top > div {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .24);
}

.delivery-map-top span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.delivery-map-top strong {
  display: block;
  color: var(--white);
  font-size: 1rem;
}

.romania-map {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 1.3 / 1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 66% 39%, rgba(184, 148, 58, .22), transparent 15%),
    linear-gradient(145deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .42));
  contain: layout paint;
}

.romania-counties-img {
  position: absolute;
  inset: 5% 3%;
  width: 94%;
  height: 90%;
  object-fit: contain;
  opacity: .62;
  filter: grayscale(1) sepia(.28) saturate(1.65) contrast(.95) brightness(.72) drop-shadow(0 28px 45px rgba(0, 0, 0, .42));
  transform: translateZ(0);
}

.delivery-origin,
.delivery-pin,
.delivery-finish {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
}

.delivery-origin {
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-9px, -50%);
  color: var(--gold-l);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.delivery-origin span {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 7px rgba(184, 148, 58, .16), 0 0 20px rgba(184, 148, 58, .5);
}

.delivery-origin span::before,
.delivery-origin span::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(184, 148, 58, .4);
  border-radius: 999px;
  animation: deliveryPulse 2.8s ease-out infinite;
  will-change: transform, opacity;
}

.delivery-origin span::after {
  animation-delay: .7s;
}

.delivery-origin b {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  white-space: nowrap;
}

.delivery-finish {
  z-index: 6;
  width: 16px;
  height: 16px;
  border: 2px solid #1a1407;
  border-radius: 999px;
  background: var(--gold-l);
  box-shadow: 0 0 0 5px rgba(214, 175, 87, .16), 0 8px 18px rgba(0, 0, 0, .38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.55);
  transition: opacity .18s ease, transform .22s ease, left .2s ease, top .2s ease;
}

.delivery-finish::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 12px;
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: var(--gold-l);
  box-shadow: 0 0 8px rgba(214, 175, 87, .35);
}

.delivery-finish::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 20px;
  width: 13px;
  height: 9px;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%);
}

.delivery-finish.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.delivery-pin {
  display: none !important;
  z-index: 4;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold-l);
  box-shadow: 0 0 0 2px rgba(184, 148, 58, .11), 0 4px 8px rgba(0, 0, 0, .32);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2);
  transform-origin: center;
  backface-visibility: hidden;
  cursor: pointer;
  will-change: transform, opacity;
}

.delivery-pin::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: #17130a;
}

.delivery-pin::before {
  content: attr(data-county);
  position: absolute;
  left: 13px;
  top: -12px;
  min-width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(184, 148, 58, .32);
  border-radius: 999px;
  background: rgba(8, 8, 8, .78);
  color: var(--white);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .4px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}

.delivery-pin:hover {
  z-index: 8;
  background: var(--gold);
}

.delivery-pin:hover::before,
.delivery-pin:focus::before,
.delivery-pin.is-active::before {
  opacity: 1;
  transform: translateY(0);
}

.delivery-map-section.is-visible .delivery-pin {
  animation: deliveryPinIn .46s cubic-bezier(.2, .85, .2, 1) forwards;
  animation-delay: var(--delay);
}

.delivery-map-note {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  margin-top: 16px;
  padding: 16px 34px 16px 20px;
  border: 1px solid rgba(184, 148, 58, .22);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .26);
}

.delivery-map-note strong {
  flex: 0 0 145px;
  color: var(--gold-l);
  font-size: .95rem;
}

.delivery-map-note span {
  flex: 1;
  max-width: 405px;
  margin-left: auto;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  text-align: left;
}

.delivery-distance-card {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .22);
}

.delivery-distance-card label {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-l);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.delivery-distance-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.delivery-distance-controls select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-sm);
  background: rgba(8, 8, 8, .78);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.delivery-distance-controls select:focus {
  border-color: rgba(214, 175, 87, .65);
  box-shadow: 0 0 0 3px rgba(214, 175, 87, .12);
}

.delivery-distance-controls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: #090909;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.delivery-distance-card p {
  margin: 12px 0 0;
  color: var(--white);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.5;
}

.delivery-distance-card p strong {
  color: var(--gold-l);
  font-weight: 900;
}

@keyframes deliveryPinIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(18px) scale(.35);
  }

  70% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-3px) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

@keyframes deliveryPulse {
  0% {
    opacity: .75;
    transform: scale(.5);
  }

  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@media (max-width: 1100px) {
  .delivery-map-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .delivery-copy h2,
  .delivery-copy > p {
    max-width: 860px;
  }

  .delivery-map-card {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .delivery-map-section {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .delivery-steps {
    grid-template-columns: 1fr;
  }

  .delivery-step {
    min-height: auto;
  }

  .delivery-actions .btn {
    width: 100%;
  }

  .delivery-map-card {
    padding: 14px;
    border-radius: var(--radius-lg);
  }

  .delivery-map-top {
    grid-template-columns: 1fr;
  }

  .romania-map {
    min-height: 280px;
    aspect-ratio: 1 / 1.03;
  }

  .delivery-origin {
    font-size: .66rem;
  }

  .delivery-pin::before {
    display: none;
  }

  .delivery-origin b {
    display: inline-block;
    padding: 3px 6px;
    font-size: .58rem;
    letter-spacing: .8px;
  }

  .delivery-pin {
    display: none;
    width: 5px;
    height: 5px;
    background: rgba(214, 175, 87, .82);
    box-shadow: 0 0 0 1px rgba(214, 175, 87, .14), 0 2px 4px rgba(0, 0, 0, .24);
  }

  .delivery-pin::after {
    inset: 1.8px;
  }

  .delivery-pin[data-county="Satu Mare"],
  .delivery-pin[data-county="Maramureș"],
  .delivery-pin[data-county="Suceava"],
  .delivery-pin[data-county="Botoșani"],
  .delivery-pin[data-county="Iași"],
  .delivery-pin[data-county="Vaslui"],
  .delivery-pin[data-county="Galați"],
  .delivery-pin[data-county="Timiș"],
  .delivery-pin[data-county="Arad"],
  .delivery-pin[data-county="Bihor"],
  .delivery-pin[data-county="Cluj"],
  .delivery-pin[data-county="Brașov"] {
    display: block;
  }

  .delivery-pin[data-county="Satu Mare"] { --x: 27%; --y: 25%; }
  .delivery-pin[data-county="Maramureș"] { --x: 36%; --y: 24%; }
  .delivery-pin[data-county="Suceava"] { --x: 55%; --y: 28%; }
  .delivery-pin[data-county="Botoșani"] { --x: 64%; --y: 24%; }
  .delivery-pin[data-county="Iași"] { --x: 68%; --y: 34%; }
  .delivery-pin[data-county="Vaslui"] { --x: 72%; --y: 45%; }
  .delivery-pin[data-county="Galați"] { --x: 72%; --y: 56%; }
  .delivery-pin[data-county="Tulcea"] { --x: 82%; --y: 67%; }
  .delivery-pin[data-county="Constanța"] { --x: 78%; --y: 80%; }
  .delivery-pin[data-county="Timiș"] { --x: 15%; --y: 55%; }
  .delivery-pin[data-county="Arad"] { --x: 17%; --y: 47%; }
  .delivery-pin[data-county="Bihor"] { --x: 22%; --y: 37%; }
  .delivery-pin[data-county="Cluj"] { --x: 32%; --y: 40%; }
  .delivery-pin[data-county="Brașov"] { --x: 48%; --y: 56%; }

  .delivery-pin[data-county="Sălaj"],
  .delivery-pin[data-county="Mureș"],
  .delivery-pin[data-county="Covasna"],
  .delivery-pin[data-county="Dâmbovița"],
  .delivery-pin[data-county="Ilfov / București"],
  .delivery-pin[data-county="Giurgiu"],
  .delivery-pin[data-county="Ialomița"] {
    display: none;
  }

  .delivery-map-note {
    display: block;
    text-align: left;
  }

  .delivery-map-note strong,
  .delivery-map-note span {
    display: block;
    text-align: left;
  }

  .delivery-map-note strong {
    margin-bottom: 5px;
  }

  .delivery-map-note span {
    font-size: .78rem;
  }

  .delivery-distance-card {
    padding: 14px;
  }

  .delivery-distance-controls {
    grid-template-columns: 1fr;
  }

  .delivery-distance-controls a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .delivery-origin span::before,
  .delivery-origin span::after {
    animation: none;
  }

  .delivery-map-section.is-visible .delivery-pin {
    animation: none;
    opacity: 1;
  }

  .delivery-pin {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
