/* =========================================================
   BICIPARK — STYLES CLEAN
   Versió netejada: home + mapa amb sidebar d'informació
   i barra inferior compacta de filtres.
   ========================================================= */

/* ---------- BASE ---------- */

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

:root {
  --navy: #071427;
  --navy-2: #101b33;
  --green: #35b44a;
  --green-dark: #22943b;
  --blue: #2f80ed;
  --orange: #d8891f;
  --bg: #f3f6fa;
  --text: #142033;
  --muted: #667085;
  --line: #e5e9f1;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(10, 20, 40, 0.10);
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
select,
input {
  font-family: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.hidden-view {
  display: none !important;
}

/* ---------- GLOBAL HEADER ---------- */

#siteHeader {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 14px 40px;
  min-height: 76px;
}

.brandButton {
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandMark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(53, 180, 74, 0.13);
  font-size: 24px;
}

.brandText {
  display: flex;
  align-items: baseline;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.brandText strong {
  color: var(--navy);
}

.brandText span {
  color: var(--green);
  margin-left: 2px;
}

#mainNav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.navLink {
  background: transparent;
  color: var(--text);
  padding: 10px 4px;
  border-radius: 0;
  font-weight: 800;
  font-size: 15px;
  position: relative;
}

.navLink:hover,
.navLink.active {
  color: var(--green-dark);
  background: transparent;
}

.navLink.active::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
}

.navLink.disabled {
  opacity: 0.45;
  cursor: default;
}

.primaryHeaderBtn {
  background: var(--navy);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
}

/* ---------- HOME ---------- */

#homeView {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 24px 28px;
}

#heroSection {
  width: 100%;
  min-height: 360px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #071427;
  box-shadow: 0 14px 36px rgba(10, 20, 40, 0.14);
}

.heroContent {
  padding: 42px 46px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  background: linear-gradient(
    90deg,
    rgba(7, 20, 39, 1) 0%,
    rgba(7, 20, 39, 0.96) 70%,
    rgba(7, 20, 39, 0.82) 100%
  );
}

.heroBadge {
  display: inline-block;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}

.heroContent h1 {
  font-size: 56px;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.heroContent h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 12px;
  max-width: 560px;
}

.heroContent p {
  font-size: 16px;
  line-height: 1.4;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 20px;
}

.heroButtons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.heroPrimaryBtn {
  background: var(--green);
  color: #fff;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  min-width: 245px;
  box-shadow: 0 12px 24px rgba(53, 180, 74, 0.25);
}

.heroPrimaryBtn:hover {
  background: var(--green-dark);
}

.heroSecondaryBtn {
  background: #fff;
  color: var(--navy);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}

.heroFeatures {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.heroFeature {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 145px;
}

.heroFeature span {
  font-size: 22px;
}

.heroFeature strong {
  display: block;
  font-size: 13px;
}

.heroFeature small {
  color: rgba(255,255,255,0.78);
  font-size: 11px;
}

.heroVisual {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: stretch;
}

.heroPhotoCard {
  width: 100%;
  height: 100%;
  min-height: 360px;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background-image:
    linear-gradient(
      90deg,
      rgba(7, 20, 39, 0.45) 0%,
      rgba(7, 20, 39, 0.12) 45%,
      rgba(7, 20, 39, 0.08) 100%
    ),
    url("./assets/hero-girona-bike.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.heroPhotoOverlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 54%, rgba(0,0,0,0.36), transparent 170px),
    linear-gradient(to left, transparent 0%, rgba(7,20,39,0.35) 100%);
}

.heroBikeSilhouette {
  display: none;
}

.heroCityTag {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.94);
  color: var(--navy);
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* ---------- HOME: PROMO / CARDS / LOWER ---------- */

.adSlot,
#homeCategories,
#homeLowerGrid {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.adSlot {
  background: #fff;
  border: 2px dashed #d7dde8;
  border-radius: 16px;
  margin-top: 16px;
  position: relative;
  z-index: 4;
  box-shadow: var(--shadow);
}

.largeAd {
  padding: 10px;
}

.smallAd {
  margin-top: 16px;
  padding: 10px;
}

.adInner {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-direction: column;
  color: #586174;
  text-align: center;
}

.adInner strong {
  color: var(--navy);
  font-size: 14px;
}

.adInner span {
  font-size: 12px;
}

.promoAd.largeAd {
  border: none;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 20, 39, 0.92), rgba(22, 57, 84, 0.82)),
    linear-gradient(135deg, #d8f1df 0%, #eaf3ff 45%, #f3efe4 100%);
  box-shadow: 0 12px 28px rgba(10, 20, 40, 0.10);
}

.promoAdLink {
  min-height: 58px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  text-decoration: none;
  color: white;
}

.promoAdText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promoAdLabel {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(53, 180, 74, 0.18);
  color: #b8ffc4;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.promoAdText strong {
  color: white;
  font-size: 18px;
  line-height: 1.15;
}

.promoAdText small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.35;
}

.promoAdButton {
  background: white;
  color: #071427;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.promoAdLink:hover .promoAdButton {
  background: #35b44a;
  color: white;
}

#homeCategories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.categoryCard {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 250px;
  overflow: hidden;
  position: relative;
}

.categoryTop {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.categoryIcon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 23px;
  color: #fff;
  flex-shrink: 0;
}

.categoryParking .categoryIcon {
  background: linear-gradient(135deg, #1f8a41, #39c765);
}

.categoryRoad .categoryIcon {
  background: linear-gradient(135deg, #2959a8, #4a91ff);
}

.categoryMtb .categoryIcon {
  background: linear-gradient(135deg, #c87514, #ebb146);
}

.categoryTop h3 {
  font-size: 19px;
  margin-bottom: 6px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: -0.3px;
}

.categoryTop p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.categoryArt {
  flex: 1;
  min-height: 95px;
  border-radius: 14px;
  margin: 14px 0;
  overflow: hidden;
  position: relative;
}

.parkingArt {
  background:
    radial-gradient(circle at 20% 80%, rgba(53,180,74,0.22), transparent 90px),
    linear-gradient(180deg, #f5fbf7 0%, #e7f4eb 100%);
}

.parkingArt::before {
  content: "🚲 🚲 🚲";
  position: absolute;
  left: 36px;
  bottom: 18px;
  font-size: 42px;
  opacity: 0.75;
}

.parkingArt::after {
  content: "∩ ∩ ∩";
  position: absolute;
  left: 38px;
  bottom: 60px;
  font-size: 34px;
  color: #7a9c83;
  letter-spacing: 14px;
}

.roadArt {
  background: linear-gradient(180deg, #eef4ff 0%, #d9e6ff 100%);
}

.roadArt::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, transparent 0%, transparent 55%, #a6c0f5 55%, #7ea6ef 75%, transparent 75%),
    linear-gradient(135deg, transparent 0%, transparent 65%, #658ed8 65%, #8caee6 100%);
  opacity: 0.9;
}

.roadArt::after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: 8px;
  width: 150px;
  height: 180px;
  background: #6e8bba;
  clip-path: polygon(48% 0%, 100% 100%, 0% 100%);
  opacity: 0.6;
}

.mtbArt {
  background: linear-gradient(180deg, #faf5ec 0%, #f4ecdf 100%);
}

.mtbArt::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, #b88e5b 55%, #9e764b 100%);
  clip-path: polygon(0 100%, 0 55%, 22% 70%, 40% 58%, 58% 75%, 73% 64%, 100% 84%, 100% 100%);
  opacity: 0.62;
}

.mtbArt::after {
  content: "⛰️  🚵";
  position: absolute;
  right: 32px;
  bottom: 18px;
  font-size: 42px;
  opacity: 0.75;
}

.categoryBtn {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
  position: relative;
  z-index: 2;
}

.parkingBtn {
  background: rgba(53,180,74,0.12);
  color: #207f35;
  border: 1px solid rgba(53,180,74,0.28);
}

.roadBtn {
  background: rgba(47,128,237,0.12);
  color: #235eb2;
  border: 1px solid rgba(47,128,237,0.28);
}

.mtbBtn {
  background: rgba(216,137,31,0.12);
  color: #b8650d;
  border: 1px solid rgba(216,137,31,0.28);
}

#homeLowerGrid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.citiesPanel,
.partnerPanel {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panelTitle h3 {
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 4px;
}

.panelTitle p {
  color: var(--muted);
  font-size: 14px;
}

.cityCardsGrid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cityCardHome {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 170px;
}

.cityCardHome:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(18,24,50,0.08);
}

.cityThumb {
  height: 86px;
}

.cityThumbBarcelona {
  background: linear-gradient(135deg, #8fc1ff, #e9f2ff 45%, #b68849 46%, #c9a06a 70%, #e7d2b0);
}

.cityThumbGirona {
  background: linear-gradient(135deg, #8eb0db, #cde1f8 38%, #cfa06b 39%, #d68245 70%, #efc18f);
}

.cityThumbAmsterdam {
  background: linear-gradient(135deg, #8fd3ff 0%, #dff5ff 42%, #6fbf73 43%, #3f8f51 100%);
}

.cityThumbAmsterdam::after {
  content: "🚲";
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 42px;
}

.cityThumbNewYork {
  background: linear-gradient(135deg, #9fb6d8 0%, #d8e4f7 42%, #233047 43%, #0d1424 100%);
}

.cityThumbNewYork::after {
  content: "NYC";
  display: grid;
  place-items: center;
  height: 100%;
  color: white;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
}

.cityThumbParis {
  background: linear-gradient(135deg, #b8cdf3 0%, #eef3ff 42%, #d8b073 43%, #8b5d33 100%);
}

.cityThumbParis::after {
  content: "Paris";
  display: grid;
  place-items: center;
  height: 100%;
  color: #071427;
  font-size: 28px;
  font-weight: 900;
}

.cityThumbSoon {
  background: linear-gradient(135deg, #eef1f7, #dfe6f2);
}

.cityInfo {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cityInfo strong {
  font-size: 18px;
  color: var(--navy);
}

.cityInfo span {
  font-size: 14px;
  color: var(--muted);
}

.cityInfo small {
  font-size: 14px;
  color: #23903c;
  font-weight: 800;
}

.cityComingSoon {
  opacity: 0.92;
}

.partnerBox {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  margin-top: 18px;
  background: linear-gradient(135deg, #f7fbf8, #eef5f0);
  border: 1px solid #e5ece8;
  border-radius: 16px;
  padding: 18px;
}

.partnerLogoPlaceholder {
  min-height: 120px;
  border: 2px dashed #c7d4cb;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #76867b;
  font-weight: 800;
  padding: 12px;
}

.partnerText strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--navy);
}

.partnerText p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.partnerBtn {
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 900;
}

#homeFooterStrip {
  margin-top: 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  font-size: 13px;
}

/* ---------- APP VIEW: MAPA ---------- */

#appView.appViewReference,
.appViewReference {
  position: relative;
  height: calc(100vh - 76px);
  min-height: 0;
  overflow: hidden;
  background: #eef3f7;
}

#appTopbar,
.appTopbarReferenceHidden {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: none !important;
  background: transparent !important;
  visibility: hidden !important;
}

#layout.layoutReference,
.layoutReference {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #dfe6ef;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #dfe6ef;
}

/* ---------- SIDEBAR APP ---------- */

#sidebar.sidebarReference,
.sidebarReference {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 700;
  width: 360px;
  max-width: 360px;
  height: calc(100% - 36px);
  background: rgba(255,255,255,0.96);
  border: 1px solid #e4e8ef;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(10,20,40,0.15);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#sidebarHeader.sidebarReferenceHeader,
.sidebarReferenceHeader {
  padding: 16px 18px 10px;
  border-bottom: 1px solid #edf0f5;
  background: transparent;
}

.sidebarReferenceHeader h2 {
  font-size: 20px;
  line-height: 1.15;
  margin: 0 0 5px;
  color: #071427;
}

.sidebarReferenceHeader p {
  font-size: 13px;
  color: #667085;
  margin: 0;
}

.referenceSearchBlock {
  padding: 14px 18px 14px;
  border-bottom: 1px solid #edf0f5;
}

.referenceSelect {
  width: 100%;
  height: 42px;
  border-radius: 13px;
  border: 1px solid #dbe2ec;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: #071427;
  background: #fff;
  margin-bottom: 10px;
}

.referenceSearchRow {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.referenceSearchRow input,
#searchInput {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 13px;
  border: 1px solid #dbe2ec;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
}

.referenceSearchRow button,
#searchBtn {
  height: 42px;
  padding: 0 15px;
  border-radius: 13px;
  background: #35b44a;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.referenceNearBtn,
#nearBtn {
  width: 100%;
  height: 40px;
  border-radius: 13px;
  border: 1px solid #dbe2ec;
  background: #fff;
  color: #071427;
  font-size: 13px;
  font-weight: 800;
}

.referenceHiddenModes {
  display: none !important;
}

.referenceStatusCard,
#statusBar.referenceStatusCard {
  margin: 14px 18px 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e1e7f0;
}

#parkingCounter {
  font-size: 14px;
  font-weight: 900;
  color: #071427;
  line-height: 1.35;
  margin-bottom: 6px;
}

#nearestInfo {
  font-size: 13px;
  color: #667085;
  line-height: 1.4;
}

.referenceListHeader {
  padding: 6px 18px 10px;
  font-size: 16px;
  font-weight: 900;
  color: #071427;
}

#parkingList.referenceParkingList,
.referenceParkingList {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 10px 18px;
}

.referenceParkingList::-webkit-scrollbar {
  width: 8px;
}

.referenceParkingList::-webkit-scrollbar-thumb {
  background: #c6cfdd;
  border-radius: 999px;
}

.emptySidebar {
  color: #667085;
  font-size: 13px;
  padding: 14px;
}

.parkingCard {
  width: 100%;
  padding: 13px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid #e4e8ef;
  background: #fff;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: 0 3px 10px rgba(10,20,40,0.04);
}

.parkingCard:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10,20,40,0.08);
  border-color: #d5dde8;
}

.parkingCard.recommended {
  border: 2px solid #35b44a;
  background: #f7fff8;
}

.cardTop {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.cardTitle {
  font-weight: 900;
  color: #071427;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cardDistance {
  font-size: 12px;
  font-weight: 900;
  color: #35b44a;
  white-space: nowrap;
}

.cardAddress {
  font-size: 12px;
  color: #667085;
  margin: 6px 0 10px;
  line-height: 1.35;
}

.cardFooter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.badge-green {
  background: #1D9E75;
  color: white;
}

.badge-yellow {
  background: #F2C94C;
  color: #1a1a2e;
}

.badge-red {
  background: #EB5757;
  color: white;
}

.badge-dark {
  background: #1a1a2e;
  color: white;
}

.favoriteIcon {
  cursor: pointer;
  margin-left: 6px;
  font-size: 14px;
}

.favoriteIcon:hover {
  transform: scale(1.15);
}

.referenceListFooter {
  padding: 12px 18px 16px;
  border-top: 1px solid #edf0f5;
  background: rgba(255,255,255,0.96);
}

.referenceViewAllBtn {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid #dbe2ec;
  background: #fff;
  color: #071427;
  font-size: 13px;
  font-weight: 900;
}

/* ---------- BOTTOM FILTER BAR ---------- */

#parkingControls.referenceBottomBar,
.referenceBottomBar {
  position: absolute;
  left: 395px;
  right: 40px;
  bottom: 24px;
  transform: none;
  z-index: 900;

  width: auto;
  max-width: none;
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;

  padding: 12px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(219,226,236,0.95);
  box-shadow: 0 16px 34px rgba(10,20,40,0.14);
  backdrop-filter: blur(12px);

  overflow: visible;
  box-sizing: border-box;
}

.referenceFilterGroup {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}

.referenceFilterLabel {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #667085;
  line-height: 1;
  text-align: center;
  padding-left: 0;
}

.referenceSegmented {
  display: flex;
  align-items: center;
  height: 38px;
  overflow: hidden;
  border: 1px solid #dbe2ec;
  border-radius: 16px;
  background: #fff;
}

.referenceChip {
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-right: 1px solid #e6ebf2;
  border-radius: 0;
  background: #fff;
  color: #0c1730;
  font-size: 11px;
  font-weight: 900;
  line-height: 38px;
  white-space: nowrap;
  box-shadow: none;
}

.referenceChip:last-child {
  border-right: none;
}

.referenceChip:hover {
  background: #f7f9fc;
}

.referenceChip.active {
  background: #071427;
  color: #fff;
}

.chipAlta:not(.active) {
  background: rgba(29,158,117,0.10);
  color: #1D9E75;
}

.chipMitjana:not(.active) {
  background: rgba(242,201,76,0.18);
  color: #9e7600;
}

.chipBaixa:not(.active) {
  background: rgba(235,87,87,0.14);
  color: #d24a4a;
}

.referenceActionsGroup {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid #e3e8ef;
}

.referenceToggleBtn {
  width: 70px;
  min-width: 70px;
  height: 52px;
  padding: 5px 6px;
  border-radius: 16px;
  border: 1px solid #dbe2ec;
  background: #fff;
  color: #0c1730;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 900;
  text-align: center;
  white-space: normal;
  box-shadow: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.referenceToggleBtn:hover {
  background: #f7f9fc;
}

.referenceToggleBtn.active {
  background: #071427;
  color: #fff;
  border-color: #071427;
}

#bikeLaneBtn.referenceToggleBtn {
  width: 76px;
  min-width: 76px;
}

/* ---------- MAP MARKERS / CLUSTERS / LEAFLET ---------- */

.pin {
  border: 3px solid white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.pin-alta {
  background: #1D9E75;
}

.pin-mitjana {
  background: #F2C94C;
}

.pin-baixa {
  background: #EB5757;
}

.pin-nearest {
  border: 2px solid #111;
  box-shadow:
    0 0 0 3px #2196f3,
    0 0 0 4px #111,
    0 0 10px rgba(33, 150, 243, 0.35);
}

.search-pin {
  background: #2F80ED;
  border: 3px solid white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.route-pin {
  background: #1a1a2e;
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.stop-pin {
  background: white;
  color: #1a1a2e;
  border: 3px solid #1a1a2e;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.bicipark-cluster {
  background: #1D9E75;
  color: white;
  border: 4px solid white;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
}

.bicipark-cluster-content {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cluster-bike {
  font-size: 16px;
}

.cluster-number {
  font-size: 14px;
}

.legend {
  display: none !important;
}

.legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot-alta {
  background: #1D9E75;
}

.dot-mitjana {
  background: #F2C94C;
}

.dot-baixa {
  background: #EB5757;
}

.leaflet-top.leaflet-left {
  left: auto !important;
  right: 18px !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 10px 22px rgba(10,20,40,0.12) !important;
  border-radius: 14px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 20px !important;
  border: none !important;
  color: #071427 !important;
}

.leaflet-control-attribution {
  margin-bottom: 0 !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  box-shadow: 0 14px 32px rgba(10,20,40,0.18) !important;
}

.leaflet-popup-content {
  font-size: 13px;
  line-height: 1.5;
  margin: 14px 16px !important;
}

.leaflet-popup-content a {
  display: inline-block;
  margin-top: 6px;
  background: #35b44a;
  color: white !important;
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 999px;
  font-weight: 900;
}

/* ---------- ROUTES / MODES ---------- */

.mode-placeholder {
  padding: 18px;
  color: #1a1a2e;
}

.mode-placeholder h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.mode-placeholder p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 10px;
}

.mode-placeholder ul {
  padding-left: 18px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.mode-card {
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  background: #f9fafb;
}

.route-detail {
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #f9fafb;
  margin-bottom: 12px;
  border-radius: 14px;
}

.route-detail h3 {
  font-size: 16px;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.route-detail p {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.route-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.route-section {
  margin-top: 12px;
}

.route-section strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
  color: #1a1a2e;
}

.route-section ul {
  padding-left: 18px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.route-warning {
  margin-top: 10px;
  padding: 10px;
  background: #fff3cd;
  border-radius: 10px;
  font-size: 12px;
  color: #664d03;
}

/* ---------- LOADING ---------- */

#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.82);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loadingOverlay.hidden {
  display: none;
}

.loader {
  width: 34px;
  height: 34px;
  border: 4px solid #d7d7d7;
  border-top: 4px solid #1D9E75;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1250px) {
  #sidebar.sidebarReference,
  .sidebarReference {
    width: 340px;
    max-width: 340px;
  }

  #parkingControls.referenceBottomBar,
  .referenceBottomBar {
    left: 365px;
    right: 28px;
    gap: 10px;
    padding: 10px 14px;
  }

  .referenceChip {
    padding: 0 11px;
  }

  .referenceToggleBtn {
    width: 62px;
    min-width: 62px;
    font-size: 9px;
  }

  #bikeLaneBtn.referenceToggleBtn {
    width: 68px;
    min-width: 68px;
  }
}

@media (max-width: 980px) {
  #siteHeader {
    padding: 14px 22px;
  }

  .brandText {
    font-size: 27px;
  }

  #sidebar.sidebarReference,
  .sidebarReference {
    width: calc(100vw - 32px);
    max-width: none;
    left: 16px;
    top: 16px;
    height: auto;
    max-height: 48vh;
  }

  #parkingControls.referenceBottomBar,
  .referenceBottomBar {
    left: 16px;
    right: 16px;
    bottom: 14px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (max-width: 760px) {
  #siteHeader {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  #mainNav {
    width: 100%;
  }

  #homeView {
    padding: 12px;
  }

  #heroSection {
    grid-template-columns: 1fr;
    border-radius: 18px;
    min-height: auto;
  }

  .heroContent {
    padding: 30px 22px;
  }

  .heroContent h1 {
    font-size: 42px;
  }

  .heroContent h2 {
    font-size: 20px;
  }

  .heroContent p {
    font-size: 15px;
  }

  .heroVisual,
  .heroPhotoCard {
    min-height: 190px;
  }

  .heroPrimaryBtn,
  .heroSecondaryBtn {
    width: 100%;
    min-width: 0;
  }

  #homeCategories,
  #homeLowerGrid,
  .cityCardsGrid {
    grid-template-columns: 1fr;
  }

  .partnerBox {
    grid-template-columns: 1fr;
  }

  .promoAdLink {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .promoAdButton {
    width: 100%;
    text-align: center;
  }

  #appView.appViewReference,
  .appViewReference {
    height: auto;
    min-height: calc(100vh - 76px);
    overflow: auto;
  }

  #layout.layoutReference,
  .layoutReference {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  #map {
    position: relative;
    height: 56vh;
    min-height: 380px;
  }

  #sidebar.sidebarReference,
  .sidebarReference {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
  }

  #parkingControls.referenceBottomBar,
  .referenceBottomBar {
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 18px 18px 0 0;
    overflow-x: auto;
  }

  .leaflet-top.leaflet-left {
    right: 10px !important;
  }
}
