/*
 * Legends Spots – CSS Página Mapa
 * Fuente: legends-spots.css del proyecto estático.
 * La tipografía BMWMotorrad la carga el tema; este plugin no la duplica.
 *
 * Desarrollado por Legger SAS (https://legger.co)
 */

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --anthracite: #262626;
  --white: #FFFFFF;
  --grey-1: #4D4D4D;
  --grey-3: #8E8E8E;
  --grey-5: #E6E6E6;
  --grey-6: #F2F2F2;
  --page-bg: #f5f6f8;
  --map-bg: #E6E6E6;
  --map-fill: #ABABAB;
  --map-hover: #6D6D6D;
  --map-selected: #0062FF;
  --motorrad-blue: #0062FF;
  --header-h: 84px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.legends-spots-page {
  font-family: "BMWMotorrad", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--anthracite);
  -webkit-font-smoothing: antialiased;
}

/* ── Hero (siempre visible; padding-top absorbe el header fijo) ─────────────── */
.hero {
  background: var(--anthracite);
  padding: calc(var(--header-h) + 48px) 32px 42px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 0.55;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--anthracite) 0%, rgba(38, 38, 38, 0.85) 35%, rgba(38, 38, 38, 0.2) 70%, rgba(38, 38, 38, 0) 100%);
}

.hero-pin {
  position: absolute;
  color: var(--white);
  width: 24px;
  height: 24px;
}

.hero-pin.pin-1 {
  right: 360px;
  top: 42px;
}

.hero-pin.pin-2 {
  right: 230px;
  top: 148px;
  opacity: 0.7;
}

.breadcrumb {
  position: absolute;
  top: calc(var(--header-h) + 12px);
  left: 32px;
  font-size: 10px;
  line-height: 1;
  display: flex;
  gap: 2px;
  align-items: center;
  font-family: 'bmwmotorrad-regular';
}

.breadcrumb .crumb-grey {
  color: var(--grey-3);
}

.breadcrumb .crumb-white {
  color: var(--white);
}

.breadcrumb .crumb-grey.active,
.breadcrumb .crumb-white.active {
  text-decoration: underline;
}

.breadcrumb a {
  color: var(--white);
  text-decoration: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 555px;
}

.hero-eyebrow {
  font-size: 16px;
  line-height: 1;
  color: var(--white) !important;
  margin-bottom: 16px;
}

.hero-logo {
  display: block;
  width: 193px;
  height: auto;
  margin-bottom: 12px;
}

.hero-desc p {
  font-size: 16px;
  line-height: 1.4;
  color: var(--white) !important;
  margin: 0;
}

/* ── Contenido principal ────────────────────────────────────────────────────── */
.main-content {
  background: var(--grey-6);
  padding: 42px 32px 120px;
  scroll-margin-top: var(--header-h);
}

.map-row {
  display: flex;
  gap: 40px;
  align-items: stretch;
  max-width: 1376px;
  margin: 0 auto;
}

/* Mapa — sticky mientras el usuario hace scroll por las cards */
.map-panel {
  width: 672px;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;
}

.map-wrapper {
  background: var(--map-bg);
  height: 680px;
  position: relative;
  overflow: hidden;
}

.map-wrapper svg.colombia-map {
  position: absolute;
  left: 109px;
  top: 39px;
  width: 436px;
  height: 600px;
}

.map-wrapper .dept-path {
  fill: var(--map-fill);
  stroke: #E6E6E6;
  stroke-width: 0.5;
  cursor: default;
  transition: fill 0.18s;
}

.map-wrapper .dept-path.clickable {
  cursor: pointer;
}

.map-wrapper .dept-path.clickable:hover,
.map-wrapper .dept-path.hovered:not(.selected) {
  fill: var(--map-hover);
}

.map-wrapper .dept-path.selected {
  fill: var(--motorrad-blue);
}

/* Pines */
.map-pin {
  position: absolute;
  width: 15px;
  height: 19px;
  background: url('../svg/pointer-mapa-marca.svg') center/contain no-repeat;
  cursor: pointer;
  z-index: 2;
  pointer-events: all;
  transform: translate(-50%, -50%);
}

.map-pin.selected {
  filter: brightness(0) invert(1);
}

.map-tooltip {
  position: absolute;
  background: var(--motorrad-blue);
  color: var(--white);
  font-size: 10px;
  padding: 2px 8px;
  z-index: 4;
  white-space: nowrap;
  pointer-events: none;
}

.map-tooltip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--motorrad-blue);
}

/* ── Panel de resultados (columna derecha) ──────────────────────────────────── */
.results-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Loader */
.map-loader {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 420px;
}

.map-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--grey-5);
  border-top-color: var(--motorrad-blue);
  border-radius: 50%;
  animation: ls-spin 0.75s linear infinite;
}

@keyframes ls-spin {
  to {
    transform: rotate(360deg);
  }
}

.map-loader p {
  font-size: 14px;
  color: var(--grey-3);
}

/* Estado vacío */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 420px;
  text-align: center;
}

.empty-state .pin-icon {
  width: 49px;
  height: 66px;
  flex-shrink: 0;
}

.empty-state h2 {
  font-weight: 900;
  font-size: 50px;
  line-height: 50px;
  color: var(--anthracite);
  max-width: 500px;
}

.empty-state .helper {
  font-size: 16px;
  color: var(--anthracite);
  line-height: 1.4;
}

/* Resultados del departamento */
#deptResults {
  scroll-margin-top: var(--header-h);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 664px;
  padding-bottom: 40px;
}

.s2-dept-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--grey-1);
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  background: var(--grey-6);
}

.s2-dept-name {
  font-weight: 900;
  font-size: 50px;
  line-height: 50px;
  color: var(--anthracite);
}

.s2-hotel-count {
  background: var(--anthracite);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 120px;
  font-size: 16px;
  line-height: 1;
}

/* Tarjetas */
.hotel-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.hotel-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
}

.hotel-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.hotel-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hotel-card-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hotel-card-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hotel-card-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.hotel-card-name-loc {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hotel-card-name {
  font-weight: 900;
  font-size: 25px;
  line-height: 25px;
  color: var(--anthracite);
}

.hotel-card-loc {
  display: flex;
  gap: 2px;
  align-items: center;
  font-size: 16px;
  line-height: 1;
  color: #666;
  font-family: 'bmwmotorrad-regular';
}

.hotel-card-loc svg {
  width: 16px;
  height: 16px;
  color: #666;
  flex-shrink: 0;
}

.hotel-stars {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.hotel-stars .star {
  color: #FFB400;
  font-size: 22px;
  line-height: 1;
}

.hotel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hotel-tag {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 15px;
  line-height: 1;
  border: 1px solid var(--grey-5);
  background: var(--grey-6);
  color: var(--grey-1);
  white-space: nowrap;
  font-family: 'bmwmotorrad-regular';
  display: flex;
  gap: 6px;
  align-items: center;
}

.hotel-tag.exclusive {
  background: rgba(6, 83, 182, 0.05);
  border-color: rgba(6, 83, 182, 0.25);
  color: #0653B6;
}

.hotel-tag.exclusive svg {
  max-height: 20px;
  animation: exclusiveFloat 2.5s ease-in-out infinite;
}

.hotel-card-cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.hotel-card-cta .btns {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ls-btn-outline,
.ls-btn-primary {
  height: 48px;
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--motorrad-blue) !important;
  background: var(--white) !important;
  color: var(--motorrad-blue) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-decoration: none !important;
  transition: background 0.18s, color 0.18s;
  font-family: 'bmwmotorrad-heavy';
}

.ls-btn-outline:hover {
  background: var(--motorrad-blue) !important;
  color: var(--white) !important;
}

.ls-btn-primary {
  background: var(--motorrad-blue) !important;
  color: var(--white) !important;
}

.ls-btn-primary:hover {
  background: var(--blue-1, #0653B6) !important;
}

.ls-btn-primary svg {
  width: 24px;
  height: 24px;
}

.hotel-card-footnote {
  font-size: 12px;
  line-height: 1.2;
  color: var(--grey-3);
  text-align: right;
  margin: 0;
}

.hotel-card-footnote a {
  color: var(--motorrad-blue);
  text-decoration: underline;
}

.s2-back-btn {
  align-self: flex-start;
  width: 160px;
  height: 48px;
  padding: 12px 18px 12px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--motorrad-blue) !important;
  background: var(--white) !important;
  color: var(--motorrad-blue) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-decoration: none !important;
  transition: background 0.18s, color 0.18s;
  font-family: 'bmwmotorrad-heavy';
}

.s2-back-btn:hover {
  background: var(--motorrad-blue) !important;
  color: var(--white) !important;
}

.s2-back-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ── Mobile toggle ──────────────────────────────────────────────────────────── */
.mobile-toggle {
  display: none;
}

.mobile-only {
  display: none;
}

#screenMobileList {
  display: none;
  scroll-margin-top: var(--header-h);
}

@media (min-width: 768px) {
  #screenMobileList {
    display: none !important;
  }
}

/* ── Mobile breakpoint ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .hero {
    padding: calc(var(--header-h) + 32px) 16px 24px;
  }

  .hero-bg {
    background-image: none;
  }

  .hero-bg::after {
    background: linear-gradient(180deg, rgba(38, 38, 38, 0.85) 0%, rgba(38, 38, 38, 0.7) 60%, rgba(38, 38, 38, 0.55) 100%);
  }

  .hero-pin {
    display: none;
  }

  .breadcrumb {
    top: calc(var(--header-h) + 6px);
    left: 16px;
    font-size: 10px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-eyebrow {
    font-size: 16px;
    line-height: 1;
    margin-bottom: 4px;
  }

  .hero-logo {
    width: 160px;
  }

  .hero-desc p {
    font-size: 12px;
    line-height: 1.2;
  }

  .mobile-toggle {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: var(--white);
  }

  .mobile-toggle-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 12px;
    font-family: inherit;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border: 1px solid var(--motorrad-blue) !important;
    background: var(--white) !important;
    color: var(--motorrad-blue) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    outline: none !important;
    font-family: 'bmwmotorrad-heavy';
  }

  .mobile-toggle-btn.active {
    background: var(--motorrad-blue) !important;
    color: var(--white) !important;
    border-color: var(--motorrad-blue) !important;
  }

  .main-content {
    background: var(--white);
    padding: 0;
  }

  .map-row {
    flex-direction: column;
    gap: 0;
    align-items: center;
    max-width: 100%;
  }

  .map-panel {
    position: static;
    width: 343px;
    flex-shrink: 0;
    margin: 0 auto;
  }

  .map-wrapper {
    width: 343px;
    height: 415px;
    border-left-width: 6px;
  }

  .map-wrapper svg.colombia-map {
    left: 23px;
    top: 12px;
    width: 284.435px;
    height: 391px;
  }

  .map-pin {
    width: 10px;
    height: 13px;
  }

  .results-panel {
    width: 100%;
  }

  .map-loader {
    min-height: 120px;
    padding: 24px 16px;
  }

  .empty-state {
    width: 375px;
    max-width: 100%;
    min-height: auto;
    padding: 8px 12px 24px;
    gap: 4px 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin: 0 auto;
  }

  .empty-state .pin-icon {
    width: 31px;
    height: 42px;
    flex-shrink: 0;
  }

  .empty-state h2 {
    font-weight: 900;
    font-size: 25px;
    line-height: 25px;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    text-align: left;
  }

  .empty-state .helper {
    flex: 1 0 100%;
    font-size: 16px;
    line-height: 1;
    text-align: left;
  }

  #deptResults {
    max-width: 100%;
    padding-bottom: 0;
    margin-block: 20px;
  }

  .s2-dept-header {
    align-items: center;
    padding: 12px 16px 8px;
    border-bottom: none;
    top: var(--header-h);
  }

  .s2-dept-name {
    font-size: 20px;
    line-height: 22px;
  }

  .s2-back-btn {
    margin-left: 20px;
  }

  .hotel-cards {
    padding: 0 16px;
  }

  .hotel-card-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hotel-card-cta .btns {
    width: 100%;
  }

  .hotel-card-cta .btns .ls-btn-outline,
  .hotel-card-cta .btns .ls-btn-primary {
    flex: 1;
  }

  .hotel-card-footnote {
    text-align: left;
  }

  #screenMobileList {
    background: var(--white);
    min-height: 100vh;
    flex-direction: column;
  }

  #screenMobileList.active {
    display: flex;
  }

  .ml-back-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 2;
    background: #F4F4F4;
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }

  .ml-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--anthracite);
    padding: 0;
  }

  .ml-back-btn svg {
    flex-shrink: 0;
  }

  .ml-dept-header {
    background: var(--white);
    padding: 20px 16px 12px;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .ml-dept-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--anthracite);
  }

  .ml-hotel-badge {
    background: var(--motorrad-blue);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
  }

  .ml-cards {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .ml-volver-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 16px;
  }
}

@keyframes exclusiveFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}