/*
  Adonde? Web - styles.css
  Version: 0.2.0

  INDEX
  01. Reset & Design Tokens
  02. Base Document Layout
  03. Device Frame
  04. App Shell
  05. Header & Logos
  06. Content Pages
  07. Footer & Subfooter
  08. Typography & Section Titles
  09. Service Cards
  10. News Ticker
  11. Image Slider
  12. Promo Banner
  13. Mobility / Buses
  14. Subpages & Panels
  15. Map / Iframes
  16. Responsive
*/

/* =========================================================
   01. Reset & Design Tokens
   ========================================================= */

* {
  box-sizing: border-box;
}

:root {
  --ticker-speed: 45s;
  --app-bg: #fff8f2;
  --surface: #ffffff;
  --brand-orange: #f08e14;
}

/* =========================================================
   02. Base Document Layout
   ========================================================= */

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f7ece6 0%, #f2ddd3 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* =========================================================
   03. Device Frame
   ========================================================= */

.phone {
  width: 390px;
  max-width: 100%;
  height: 800px;
  background: var(--surface);
  border: 10px solid #111;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .25);
}

.notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 28px;
  background: #111;
  border-radius: 0 0 18px 18px;
  z-index: 30;
}

/* =========================================================
   04. App Shell
   ========================================================= */

.app-shell {
  width: 100%;
  height: 100%;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================================================
   05. Header & Logos
   ========================================================= */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 0;
  padding: 0 10px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  text-align: center;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  backdrop-filter: blur(8px);
  transition: height .24s ease, padding .24s ease, opacity .2s ease, transform .24s ease;
}

.app-header.visible {
  height: 52px;
  padding: 8px 10px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.logo-small {
  width: 124px;
  max-width: 52vw;
  height: auto;
  object-fit: contain;
  display: inline-block;
  cursor: pointer;
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 96px;
  transition: height .28s ease, opacity .22s ease, transform .28s ease, margin .28s ease;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
}

.hero-logo img {
  width: clamp(82px, 24vw, 108px);
  max-height: 92px;
  height: auto;
  object-fit: contain;
}

.hero-logo.hidden {
  height: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-12px);
}

/* =========================================================
   06. Content Pages
   ========================================================= */

.app-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #fffdf9 0%, #fff7ea 100%);
}

.page {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 18px 18px 22px;
}

.page.active {
  display: block;
}

/* =========================================================
   07. Footer & Subfooter
   ========================================================= */

.app-subfooter {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(180deg, #fff7ea 0%, #fff1dc 100%);
  border-top: 1px solid rgba(0, 0, 0, .05);
  color: #8a5b14;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
}

.subfooter-brand {
  color: var(--brand-orange);
  font-weight: 900;
}

.subfooter-separator {
  opacity: .6;
}

.subfooter-text {
  color: #6d3d00;
}

.app-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 14px 14px;
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid rgba(0, 0, 0, .08);
  backdrop-filter: blur(10px);
}

.footer-tab {
  border: none;
  border-radius: 16px;
  background: transparent;
  color: #5f3f0d;
  font-weight: 800;
  font-size: 11px;
  padding: 8px 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 3px;
}

.footer-tab.active {
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
}

.footer-icon {
  font-size: 18px;
  line-height: 1;
}

/* =========================================================
   08. Typography & Section Titles
   ========================================================= */

.section-title {
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  color: #111;
  margin: 14px 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title--compact {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

.section-title small {
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
}

/* =========================================================
   09. Service Cards
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.card {
  border: none;
  border-radius: 16px;
  min-height: 132px;
  padding: 14px 10px;
  color: white;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 8px 18px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .16s ease, box-shadow .16s ease;
  text-align: center;
}

.card:hover,
.card:active {
  transform: translateY(-2px);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 12px 22px rgba(0, 0, 0, .18);
}

.orange { background: linear-gradient(135deg, #ff931d, #f25d16); }
.green { background: linear-gradient(135deg, #76df6a, #31b86b); }
.blue { background: linear-gradient(135deg, #4eb8ff, #2d67d6); }
.purple { background: linear-gradient(135deg, #c069ff, #8a4de0); }

.emoji {
  font-size: 50px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15));
}

.card-title {
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .32);
}

/* =========================================================
   10. News Ticker
   ========================================================= */

.news-ticker {
  margin: 0 0 14px;
  background: linear-gradient(180deg, #fff, #fff6e9);
  border: 1px solid rgba(240, 142, 20, .18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.news-ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  font-size: 13px;
  font-weight: 900;
  color: #6d3d00;
  text-transform: uppercase;
}

.news-status {
  font-size: 10px;
  font-weight: 800;
  color: #8a5b14;
  background: rgba(255, 217, 63, .45);
  border-radius: 999px;
  padding: 4px 8px;
}

.news-ticker-viewport {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(240, 142, 20, .14);
  background: rgba(255, 255, 255, .65);
}

.news-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 10px 0;
  min-width: max-content;
  animation: tickerScroll var(--ticker-speed) linear infinite;
  will-change: transform;
}

.news-ticker:hover .news-ticker-track {
  animation-play-state: paused;
}

.news-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.news-source,
.news-separator {
  color: var(--brand-orange);
  font-weight: 900;
}

@keyframes tickerScroll {
  from { transform: translateX(390px); }
  to { transform: translateX(-100%); }
}



/* =========================================================
   11. Image Slider
   ========================================================= */

.image-slider {
  display: none;
  position: relative;
  margin: 0 0 14px;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f7fb;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .10);
}

.image-slider.visible {
  display: block;
}

.image-slider-link {
  display: block;
  width: 100%;
  height: 150px;
  color: inherit;
  text-decoration: none;
}

.image-slider-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #f6f7fb;
}

.image-slider-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  backdrop-filter: blur(6px);
}

.image-slider-dot {
  width: 7px;
  height: 7px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
}

.image-slider-dot.active {
  background: #ffffff;
}

/* =========================================================
   12. Promo Banner
   ========================================================= */

.promo-banner {
  display: none;
  position: relative;
  margin: 0 0 14px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff6c7, #ffe26c);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .10);
}

.promo-banner.visible {
  display: block;
}

.promo-banner-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 108px;
  padding: 12px;
  color: #1d1d1d;
  text-decoration: none;
}

.promo-banner-image {
  width: 92px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, .45);
}

.promo-banner-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.promo-banner-kicker {
  color: #8a5b14;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.promo-banner-title {
  color: #111;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.promo-banner-description {
  color: #5f3f0d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.promo-banner-dots {
  position: absolute;
  right: 12px;
  bottom: 8px;
  display: flex;
  gap: 5px;
}

.promo-banner-dot {
  width: 7px;
  height: 7px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(95, 63, 13, .28);
  cursor: pointer;
}

.promo-banner-dot.active {
  background: var(--brand-orange);
}

/* =========================================================
   13. Mobility / Buses
   ========================================================= */

.mobility-box {
  background: linear-gradient(180deg, #ffd93f, #f8b91d);
  border-radius: 20px;
  padding: 14px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 10px 20px rgba(0, 0, 0, .14);
}

.cta {
  width: 100%;
  border: none;
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
  font-weight: 900;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1), 0 6px 12px rgba(0, 0, 0, .12);
  margin: 10px 0 12px;
}

.locations {
  text-align: center;
  font-size: 14px;
  color: #5f3f0d;
  font-weight: 700;
  margin-bottom: 14px;
}

.departments {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dept {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, #ffd771, #f0ac1f);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 6px 10px rgba(0, 0, 0, .15);
  font-weight: 900;
  font-size: 24px;
  color: #6d3d00;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* =========================================================
   14. Subpages & Panels
   ========================================================= */

.subpage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.back {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.subpage-title {
  font-size: 24px;
  font-weight: 900;
  color: #222;
  margin: 0;
}

.panel {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
  margin-bottom: 14px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 14px;
  border-radius: 14px;
  background: #f6f7fb;
  font-weight: 700;
  color: #2b2b2b;
}

/* =========================================================
   15. Map / Iframes
   ========================================================= */

.map-placeholder {
  height: 260px;
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .45) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .45) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .45) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .45) 75%),
    linear-gradient(180deg, #bfe2ff, #7db5f7);
  background-size: 30px 30px, 30px 30px, cover;
  background-position: 0 0, 15px 15px, center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: rgba(0, 0, 0, .55);
}

.bus-frame {
  width: 100%;
  height: 560px;
  border: 0;
  border-radius: 16px;
  background: #f5f5f5;
}

/* =========================================================
   16. Responsive
   ========================================================= */

@media (max-width: 768px) {
  body {
    padding: 0;
    background: #fff8f2;
  }

  .phone {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .notch {
    display: none;
  }

  .app-header {
    padding: 0 10px;
  }

  .app-header.visible {
    height: 50px;
    padding: 7px 10px;
  }

  .logo-small {
    width: 118px;
    max-width: 54vw;
  }

  .hero-logo {
    height: 86px;
  }

  .hero-logo img {
    width: clamp(76px, 24vw, 96px);
    max-height: 82px;
  }

  .page {
    padding-top: 16px;
  }

  .image-slider-link {
    height: 128px;
  }

  .promo-banner-link {
    grid-template-columns: 78px 1fr;
    min-height: 96px;
    gap: 10px;
    padding: 10px;
  }

  .promo-banner-image {
    width: 78px;
    height: 72px;
    border-radius: 12px;
  }

  .promo-banner-title {
    font-size: 14px;
  }

  .promo-banner-description {
    font-size: 11px;
  }

  .bus-frame {
    height: calc(100vh - 210px);
    min-height: 420px;
  }

  @keyframes tickerScroll {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
  }
}


/* =========================================================
   UX Enhancements v0.2.4
   ========================================================= */

.image-slider-image,
.promo-banner-link {
  transition:
    opacity var(--slider-transition, 350ms) ease,
    transform var(--slider-transition, 350ms) ease;
}

.image-slider.is-transitioning .image-slider-image,
.promo-banner.is-transitioning .promo-banner-link {
  opacity: .18;
  transform: translateX(-8px) scale(.985);
}

.image-slider-dot,
.promo-banner-dot {
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.image-slider-dot.active,
.promo-banner-dot.active {
  transform: scale(1.25);
}

.image-slider-link,
.promo-banner-link {
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.image-slider-link:active,
.promo-banner-link:active,
.card:active,
.cta:active,
.dept:active,
.footer-tab:active {
  transform: scale(.985);
}


/* =========================================================
   UX States v0.2.5
   ========================================================= */

.news-status-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(49, 184, 107, .14);
  color: #167044;
  font-size: 10px;
  font-weight: 900;
}

.connection-status.offline {
  background: rgba(242, 93, 22, .14);
  color: #9a3412;
}

.skeleton-pulse {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(255,255,255,.45), rgba(0,0,0,.06));
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s ease infinite;
}

@keyframes skeletonPulse {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.iframe-shell {
  position: relative;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f5;
}

.iframe-state {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,234,.96));
  color: #2b2b2b;
}

.iframe-state.visible {
  display: flex;
}

.iframe-state strong {
  font-size: 17px;
  font-weight: 900;
}

.iframe-state span {
  max-width: 260px;
  color: #6d3d00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.loader-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(240, 142, 20, .22);
  border-top-color: var(--brand-orange);
  border-radius: 50%;
  animation: spinnerRotate .8s linear infinite;
}

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

.retry-button {
  display: none;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08), 0 6px 12px rgba(0,0,0,.10);
}

.iframe-state--error .retry-button {
  display: inline-flex;
}

.iframe-state--error .loader-spinner {
  display: none;
}

@media (max-width: 768px) {
  .connection-status {
    display: none;
  }
}


/* =========================================================
   User-friendly Status v0.2.6
   ========================================================= */

.news-status {
  min-width: 92px;
  text-align: center;
}

.connection-status {
  display: none;
}

.connection-status.offline {
  display: inline-flex;
}

@media (max-width: 768px) {
  .news-status {
    min-width: auto;
  }

  .connection-status.offline {
    display: inline-flex;
  }
}


/* =========================================================
   Visual Polish v0.2.8
   ========================================================= */

:root {
  --shadow-soft: 0 8px 18px rgba(0, 0, 0, .08);
  --shadow-card: 0 10px 22px rgba(0, 0, 0, .11);
  --radius-lg: 18px;
  --motion-fast: 160ms;
  --motion-base: 240ms;
}

.page {
  scroll-behavior: smooth;
}

.app-content {
  background:
    radial-gradient(circle at top, rgba(255, 217, 63, .10), transparent 240px),
    linear-gradient(180deg, #fffdf9 0%, #fff7ea 100%);
}

.app-header.visible {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
}

.hero-logo {
  margin-bottom: 2px;
}

.news-ticker,
.image-slider,
.promo-banner,
.mobility-box,
.panel {
  box-shadow: var(--shadow-soft);
}

.image-slider-link {
  height: 140px;
}

.promo-banner-link {
  min-height: 102px;
}

.card {
  min-height: 124px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .10), var(--shadow-card);
  transition:
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}

.card:hover,
.card:active {
  transform: translateY(-1px);
  filter: saturate(1.02);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .10), 0 12px 24px rgba(0, 0, 0, .13);
}

.emoji {
  font-size: 46px;
}

.card-title {
  font-size: 13px;
  letter-spacing: .1px;
}

.mobility-box {
  padding: 13px;
}

.cta,
.dept,
.back,
.footer-tab,
.retry-button {
  transition:
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background var(--motion-base) ease;
}

.cta:active,
.dept:active,
.back:active,
.footer-tab:active,
.retry-button:active {
  transform: scale(.975);
}

.dept {
  width: 50px;
  height: 50px;
}

.app-footer {
  padding: 9px 14px 13px;
}

.footer-tab {
  min-height: 46px;
}

.footer-tab.active {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .07), 0 5px 12px rgba(240, 142, 20, .12);
}

.app-subfooter {
  padding: 6px 14px;
}

.subpage-header {
  margin-bottom: 14px;
}

.panel {
  border: 1px solid rgba(0, 0, 0, .03);
}

.list-item {
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease;
}

.list-item:active {
  transform: scale(.99);
  background: #eef0f6;
}

@media (max-width: 768px) {
  .page {
    padding: 14px 16px 20px;
  }

  .hero-logo {
    height: 78px;
  }

  .hero-logo img {
    width: clamp(72px, 22vw, 88px);
    max-height: 76px;
  }

  .image-slider-link {
    height: 122px;
  }

  .promo-banner-link {
    min-height: 92px;
  }

  .grid {
    gap: 10px;
  }

  .card {
    min-height: 116px;
    padding: 12px 9px;
  }

  .emoji {
    font-size: 42px;
  }

  .dept {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .mobility-box {
    padding: 12px;
  }
}


/* =========================================================
   Frontend Hardening v0.2.10
   ========================================================= */

/* Mantiene el header por encima, pero evita que tape controles internos */
.app-header.visible {
  z-index: 90;
}

/* Más aire visual para subpáginas cuando el header compacto aparece */
.subpage-header {
  position: relative;
  z-index: 20;
  padding-top: 4px;
}

/* Mejora el tap target y visibilidad del botón volver */
.back {
  flex: 0 0 auto;
  position: relative;
  z-index: 25;
}

/* Contenedor de iframe más estable */
.iframe-shell {
  width: 100%;
}

/* Footer como navegación principal siempre disponible */
.app-footer {
  position: relative;
  z-index: 70;
}

/* Mobile hardening */
@media (max-width: 768px) {
  .app-shell {
    position: relative;
  }

  .app-content {
    padding-bottom: 0;
  }

  .page {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 16px;
  }

  /* Cuando hay header visible, las subpáginas no quedan debajo */
  .subpage-header {
    min-height: 48px;
    padding-top: 8px;
    margin-bottom: 10px;
  }

  .subpage-title {
    font-size: 21px;
    line-height: 1.15;
  }

  .back {
    width: 44px;
    height: 44px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  }

  /* Los mapas ocupan casi todo el ancho disponible */
  #cityPage {
    padding-left: 8px;
    padding-right: 8px;
  }

  #cityPage .panel {
    padding: 8px;
    border-radius: 16px;
  }

  #cityPage .panel h3 {
    margin-left: 4px;
    margin-bottom: 8px;
  }

  .iframe-shell {
    min-height: calc(100vh - 190px);
    border-radius: 14px;
  }

  .bus-frame {
    width: 100%;
    height: calc(100vh - 190px);
    min-height: 480px;
    border-radius: 14px;
  }

  /* Footer se comporta como barra fija dentro de la app */
  .app-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 85;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .app-subfooter {
    position: relative;
    z-index: 60;
  }
}

/* Pantallas muy bajas */
@media (max-width: 768px) and (max-height: 700px) {
  .iframe-shell {
    min-height: calc(100vh - 170px);
  }

  .bus-frame {
    height: calc(100vh - 170px);
    min-height: 420px;
  }

  .subpage-header {
    min-height: 44px;
  }
}


/* =========================================================
   Header offset fix v0.2.10.1
   ========================================================= */

:root {
  --header-height: 52px;
}

/* Header como overlay controlado */
.app-header {
  position: fixed;
}

/* Mobile: compensación real del header visible */
@media (max-width: 768px) {
  .app-header.visible + .app-content .page {
    padding-top: calc(var(--header-height) + 16px);
  }

  .subpage-header {
    margin-top: 6px;
  }

  .back {
    margin-top: 4px;
    position: relative;
    z-index: 120;
  }

  #cityPage {
    padding-top: calc(var(--header-height) + 12px);
  }

  #cityPage .subpage-header {
    margin-top: 0;
    min-height: 52px;
    align-items: center;
  }

  #cityPage .back {
    margin-top: 0;
  }

  .iframe-shell {
    min-height: calc(100vh - 205px);
  }

  .bus-frame {
    height: calc(100vh - 205px);
  }
}

/* Pantallas bajas: mantener controles visibles */
@media (max-width: 768px) and (max-height: 700px) {
  #cityPage {
    padding-top: calc(var(--header-height) + 8px);
  }

  .iframe-shell {
    min-height: calc(100vh - 185px);
  }

  .bus-frame {
    height: calc(100vh - 185px);
    min-height: 400px;
  }
}


/* =========================================================
   App-like UX & Typography v0.2.11
   ========================================================= */

:root {
  --font-app: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease-app: cubic-bezier(.22, .61, .36, 1);
  --tap-scale: .975;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

body {
  font-family: var(--font-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  font-family: var(--font-app);
}

.page {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-header {
  padding-top: max(0px, var(--safe-top));
  transition:
    height .24s var(--ease-app),
    padding .24s var(--ease-app),
    opacity .18s var(--ease-app),
    transform .24s var(--ease-app),
    box-shadow .24s var(--ease-app);
}

.app-header.visible {
  transform: translate3d(0, 0, 0);
}

.logo-small {
  transition: transform .2s var(--ease-app), opacity .2s var(--ease-app);
}

.logo-small:active {
  transform: scale(.97);
}

.hero-logo,
.hero-logo img {
  will-change: transform, opacity, height;
}

.news-ticker,
.image-slider,
.promo-banner,
.mobility-box,
.panel,
.card,
.cta,
.dept,
.back,
.footer-tab {
  -webkit-tap-highlight-color: transparent;
}

.news-ticker,
.image-slider,
.promo-banner,
.mobility-box,
.panel {
  border-radius: 20px;
}

.section-title {
  letter-spacing: -.35px;
  line-height: 1.1;
}

.subpage-title {
  letter-spacing: -.55px;
}

.card-title,
.footer-tab,
.cta,
.dept,
.news-ticker-header,
.news-status,
.connection-status,
.promo-banner-kicker {
  letter-spacing: -.1px;
}

.card,
.cta,
.dept,
.back,
.footer-tab,
.retry-button {
  transition:
    transform .18s var(--ease-app),
    box-shadow .22s var(--ease-app),
    background .22s var(--ease-app),
    filter .18s var(--ease-app);
}

.card:active,
.cta:active,
.dept:active,
.back:active,
.footer-tab:active,
.retry-button:active {
  transform: scale(var(--tap-scale));
}

.footer-tab {
  min-height: 48px;
  border-radius: 18px;
}

.footer-icon {
  font-size: 19px;
}

.app-footer {
  padding-bottom: max(13px, calc(10px + var(--safe-bottom)));
}

.image-slider-image,
.promo-banner-link {
  will-change: transform, opacity;
  transition:
    opacity var(--slider-transition, 350ms) var(--ease-app),
    transform var(--slider-transition, 350ms) var(--ease-app);
}

.image-slider-dot,
.promo-banner-dot {
  transition:
    transform .18s var(--ease-app),
    background .18s var(--ease-app),
    opacity .18s var(--ease-app);
}

.iframe-state {
  backdrop-filter: blur(8px);
}

.loader-spinner {
  animation-timing-function: linear;
}

@media (max-width: 768px) {
  body {
    min-height: 100svh;
  }

  .phone {
    height: 100svh;
  }

  .app-shell {
    height: 100svh;
  }

  .app-content {
    min-height: 0;
  }

  .page {
    padding-left: 15px;
    padding-right: 15px;
  }

  .app-header.visible {
    height: calc(52px + var(--safe-top));
    padding-top: max(7px, var(--safe-top));
  }

  .app-header.visible + .app-content .page {
    padding-top: calc(var(--header-height) + var(--safe-top) + 16px);
  }

  #cityPage {
    padding-left: 8px;
    padding-right: 8px;
    padding-top: calc(var(--header-height) + var(--safe-top) + 12px);
  }

  .subpage-header {
    gap: 10px;
  }

  .back {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .subpage-title {
    font-size: 22px;
  }

  .news-status {
    font-size: 10.5px;
    padding: 5px 9px;
  }

  .image-slider,
  .promo-banner,
  .news-ticker,
  .mobility-box {
    border-radius: 19px;
  }

  .card {
    border-radius: 19px;
  }

  .footer-tab {
    min-height: 50px;
  }

  .app-footer {
    padding-top: 8px;
    padding-bottom: max(12px, calc(9px + var(--safe-bottom)));
  }

  .app-subfooter {
    padding-bottom: 6px;
  }

  .bus-frame,
  .iframe-shell {
    border-radius: 15px;
  }
}

/* Reduce flicker en micro-scroll */
.app-header:not(.visible) {
  box-shadow: none;
}


/* =========================================================
   City map header/back offset hotfix v0.2.11.1
   ========================================================= */

/*
  cityPage necesita un offset más fuerte porque el header compacto
  es fixed y queda por encima del contenido. Este bloque debe estar
  al final del CSS para ganar especificidad.
*/

@media (max-width: 768px) {
  .app-header.visible + .app-content #cityPage.page.active {
    padding-top: calc(var(--header-height) + var(--safe-top) + 28px) !important;
  }

  #cityPage.page.active .subpage-header {
    position: relative;
    z-index: 130;
    margin-top: 0 !important;
    margin-bottom: 12px;
    padding-top: 0 !important;
    min-height: 54px;
    display: flex;
    align-items: center;
  }

  #cityPage.page.active .back {
    position: relative;
    z-index: 140;
    margin-top: 0 !important;
    transform: none;
  }

  #cityPage.page.active .subpage-title {
    position: relative;
    z-index: 130;
  }

  #cityPage.page.active .panel {
    margin-top: 0;
  }

  #cityPage.page.active .iframe-shell {
    min-height: calc(100vh - 220px);
  }

  #cityPage.page.active .bus-frame {
    height: calc(100vh - 220px);
    min-height: 450px;
  }
}

@media (max-width: 768px) and (max-height: 700px) {
  .app-header.visible + .app-content #cityPage.page.active {
    padding-top: calc(var(--header-height) + var(--safe-top) + 22px) !important;
  }

  #cityPage.page.active .iframe-shell {
    min-height: calc(100vh - 200px);
  }

  #cityPage.page.active .bus-frame {
    height: calc(100vh - 200px);
    min-height: 390px;
  }
}


/* =========================================================
   Mobility geolocation integration v0.3.6
   ========================================================= */

.mobility-selected {
  margin: -2px 0 12px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .46);
  color: #5f3f0d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.location-options {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}

.location-options.visible {
  display: grid;
}

.location-option {
  border: none;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  color: #5f3f0d;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05), 0 4px 10px rgba(0, 0, 0, .06);
}

.location-option.active {
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
}

#mobilityMapButton.is-ready {
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
}

#mobilityMapButton.is-pending {
  opacity: .96;
}


/* =========================================================
   Buses smart routing + styled dropdown v0.3.7
   ========================================================= */

.bus-select-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.bus-select-label {
  color: #6d3d00;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bus-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(240, 142, 20, .28);
  border-radius: 16px;
  padding: 0 14px;
  background: linear-gradient(180deg, #ffffff, #fff6e9);
  color: #2b2b2b;
  font-weight: 900;
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.05), 0 6px 14px rgba(0,0,0,.07);
}

.bus-select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(240,142,20,.16);
}

.bus-select-status {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,246,199,.7);
  color: #6d3d00;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.bus-select-button {
  min-height: 46px;
  border: none;
  border-radius: 16px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.10);
}

.bus-select-button:active {
  transform: scale(.975);
}


/* =========================================================
   Mobile footer compact fix v0.3.8
   ========================================================= */

@media (max-width: 768px) {
  .app-footer {
    min-height: auto;
    padding-top: 7px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    gap: 6px;
    line-height: 1;
  }

  .footer-tab {
    min-height: 42px;
    padding: 5px 4px;
    gap: 2px;
    line-height: 1;
  }

  .footer-tab span {
    line-height: 1;
  }

  .footer-icon {
    line-height: 1;
    display: block;
  }

  .app-subfooter {
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1;
  }
}


/* =========================================================
   Fullscreen map layout + footer edge fix v0.3.9
   ========================================================= */

/* Footer realmente pegado al borde inferior */
.app-shell {
  position: relative;
}

.app-footer {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 768px) {
  .app-footer {
    padding-top: 5px !important;
    padding-bottom: max(4px, env(safe-area-inset-bottom, 0px)) !important;
    min-height: 48px !important;
  }

  .footer-tab {
    min-height: 38px !important;
    padding: 3px 4px !important;
  }

  .footer-icon {
    font-size: 17px !important;
  }

  .app-subfooter {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
  }
}

/*
  Vista mapa:
  - evita scroll de página compitiendo con el iframe
  - el iframe usa el alto disponible
  - título no pisa el header
*/
#cityPage.page.active {
  overflow: hidden;
}

@media (max-width: 768px) {
  #cityPage.page.active {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-top: calc(var(--header-height) + var(--safe-top) + 10px) !important;
    display: flex;
    flex-direction: column;
  }

  #cityPage.page.active .subpage-header {
    flex: 0 0 auto;
    min-height: 42px !important;
    height: 42px;
    margin: 0 8px 6px !important;
    padding: 0 !important;
    z-index: 40 !important;
    align-items: center;
  }

  #cityPage.page.active .back {
    width: 40px !important;
    height: 40px !important;
    font-size: 19px !important;
    z-index: 45 !important;
  }

  #cityPage.page.active .subpage-title {
    font-size: 17px !important;
    line-height: 1.05 !important;
    max-width: 245px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 30 !important;
  }

  #cityPage.page.active #citySubtitle {
    display: none;
  }

  #cityPage.page.active .panel {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden;
  }

  #cityPage.page.active .panel > h3 {
    display: none;
  }

  #cityPage.page.active .iframe-shell {
    width: 100vw !important;
    height: calc(100svh - var(--header-height) - 42px - 6px - 48px - 22px - var(--safe-top) - var(--safe-bottom)) !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  #cityPage.page.active .bus-frame {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    display: block;
  }

  #cityPage.page.active .iframe-state {
    border-radius: 0 !important;
  }
}

@media (max-width: 768px) and (max-height: 700px) {
  #cityPage.page.active .iframe-shell {
    height: calc(100svh - var(--header-height) - 40px - 4px - 46px - 18px - var(--safe-top) - var(--safe-bottom)) !important;
  }

  #cityPage.page.active .subpage-header {
    height: 40px;
    min-height: 40px !important;
    margin-bottom: 4px !important;
  }
}

/* Desktop mantiene layout tradicional */
@media (min-width: 769px) {
  #cityPage.page.active {
    overflow-y: auto;
  }
}


/* =========================================================
   In-map department selector v0.3.10
   ========================================================= */

.map-title-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(70px, .8fr) minmax(120px, 1.2fr);
  align-items: center;
  gap: 8px;
  width: 100%;
}

.map-department-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(240, 142, 20, .28);
  border-radius: 14px;
  padding: 0 10px;
  background: linear-gradient(180deg, #ffffff, #fff6e9);
  color: #2b2b2b;
  font-size: 13px;
  font-weight: 900;
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.05), 0 4px 10px rgba(0,0,0,.07);
}

.map-department-select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(240,142,20,.16);
}

@media (max-width: 768px) {
  #cityPage.page.active .map-title-row {
    grid-template-columns: minmax(58px, .75fr) minmax(108px, 1.25fr);
    gap: 6px;
  }

  #cityPage.page.active .subpage-title {
    max-width: none !important;
    font-size: 16px !important;
  }

  #cityPage.page.active .map-department-select {
    height: 36px;
    font-size: 12px;
    border-radius: 13px;
    padding: 0 8px;
  }

  #cityPage.page.active .subpage-header {
    gap: 8px;
  }
}


/* =========================================================
   Footer no-gap + external map fallback v0.3.11
   ========================================================= */

@media (max-width: 768px) {
  .app-footer {
    min-height: 44px !important;
    height: 44px !important;
    padding: 2px 10px 0 10px !important;
    margin: 0 !important;
    gap: 6px !important;
    align-items: stretch !important;
    line-height: 1 !important;
  }

  .footer-tab {
    min-height: 40px !important;
    height: 40px !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    gap: 1px !important;
    align-content: center !important;
    line-height: 1 !important;
  }

  .footer-tab span {
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .footer-icon {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-subfooter {
    min-height: 18px !important;
    height: 18px !important;
    padding: 2px 10px !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  #cityPage.page.active .iframe-shell {
    height: calc(100svh - var(--header-height) - 42px - 6px - 44px - 18px - var(--safe-top) - var(--safe-bottom)) !important;
  }
}

.external-map-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.external-map-button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fff6c7, #ffe26c);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.10);
}


/* =========================================================
   News ticker recovery + internal external-map modal v0.3.12
   ========================================================= */

.news-ticker-track:empty::before {
  content: "Cargando noticias...";
  display: inline-flex;
  align-items: center;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  padding-left: 12px;
}

.external-map-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.external-map-modal.visible {
  display: block;
}

.external-map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
}

.external-map-modal-panel {
  position: absolute;
  inset: max(12px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}

.external-map-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fff7ea, #fff);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.external-map-modal-header strong {
  font-size: 16px;
  font-weight: 900;
  color: #111;
}

.external-map-modal-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.external-map-modal-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f6f6f6;
}

.external-map-modal-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 8px 10px 10px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
}

@media (max-width: 768px) {
  .external-map-modal-panel {
    inset: max(8px, env(safe-area-inset-top, 0px)) 6px max(6px, env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
  }
}


/* =========================================================
   External viewer webapp/android ready v0.3.15
   ========================================================= */

.external-map-note {
  max-width: 280px;
  margin: 4px auto 0;
  color: #6d3d00;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.external-map-actions {
  align-items: center;
}


/* =========================================================
   External viewer clean fallback v0.3.16
   ========================================================= */

.external-map-note {
  max-width: 285px;
  margin: 6px auto 0;
  color: #6d3d00;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.external-map-actions {
  align-items: center;
  justify-content: center;
}


/* =========================================================
   v0.4.1 – Runtime config support
   ========================================================= */

.runtime-hidden,
[hidden] {
  display: none !important;
}

body.is-wrapper {
  background: #fff8f2;
}

body.is-wrapper .phone {
  border: none !important;
  border-radius: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100svh !important;
  box-shadow: none !important;
}

body.is-wrapper .notch {
  display: none !important;
}

body.hide-web-header .app-header,
body.hide-hero-logo .hero-logo,
body.hide-app-footer .app-footer,
body.hide-app-subfooter .app-subfooter {
  display: none !important;
}

body.hide-web-header .app-header.visible + .app-content .page,
body.is-wrapper .app-header.visible + .app-content .page {
  padding-top: 14px !important;
}

body.hide-hero-logo #homePage {
  padding-top: 14px !important;
}

body.is-wrapper .app-shell {
  height: 100svh !important;
}

body.is-wrapper .app-content {
  min-height: 0;
  height: 100%;
}

body.is-wrapper.safe-area-wrapper .page {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

body.feature-news-disabled .news-ticker,
body.feature-image-slider-disabled .image-slider,
body.feature-promo-banner-disabled .promo-banner {
  display: none !important;
}

body.runtime-android.is-wrapper #homePage {
  padding-top: 12px !important;
}

body.runtime-android.is-wrapper #cityPage.page.active {
  padding-top: 12px !important;
  height: 100% !important;
}

body.runtime-android.is-wrapper .app-footer {
  position: sticky;
  bottom: 0;
}


/* =========================================================
   v0.4.4 – Runtime visibility hard override
   ========================================================= */

body.hide-web-header .app-header,
body.hide-hero-logo .hero-logo,
body.hide-app-footer .app-footer,
body.hide-app-subfooter .app-subfooter,
.runtime-hidden,
[data-runtime-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.hide-web-header .app-header.visible,
body.hide-web-header .app-header[class*="visible"],
body.hide-hero-logo .hero-logo.visible,
body.hide-hero-logo .hero-logo[class*="visible"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.hide-web-header .app-content .page,
body.hide-web-header .app-header.visible + .app-content .page,
body.runtime-android.is-wrapper .app-content .page {
  padding-top: 14px !important;
}

body.hide-hero-logo #homePage,
body.runtime-android.is-wrapper #homePage {
  padding-top: 12px !important;
}


/* =========================================================
   v0.4.7 – Version metadata
   ========================================================= */

.version-meta {
  margin-left: 6px;
  color: rgba(138, 91, 20, .72);
  font-size: 10px;
  font-weight: 900;
}



/* =========================================================
   v0.5.5 – Runtime Android visibility safety net
   ========================================================= */

body.runtime-android.is-wrapper:not(.hide-app-subfooter) .app-subfooter {
  display: flex !important;
}

body.runtime-android.is-wrapper #servicesGrid button.card {
  background: linear-gradient(180deg, #fff7ea, #ffffff) !important;
}



/* =========================================================
   v0.5.6 – Dynamic top banners
   ========================================================= */

.top-banners {
  width: 100%;
  margin: 8px 0 14px;
  position: relative;
  overflow: hidden;
}

.top-banners[hidden] {
  display: none !important;
}

.top-banners-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff7ea;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.top-banners-track {
  display: flex;
  width: 100%;
  transition: transform .38s ease;
  will-change: transform;
}

.top-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.top-banner-slide img {
  width: 100%;
  aspect-ratio: 1920 / 713;
  object-fit: cover;
  display: block;
}

.top-banners-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
}

.top-banner-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255,255,255,.52);
}

.top-banner-dot.active {
  width: 18px;
  background: #fff;
}

body.runtime-android.is-wrapper .top-banners {
  margin: 6px 0 12px;
}

body.runtime-android.is-wrapper .top-banners-viewport {
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(0,0,0,.08);
}

body.runtime-ios.is-wrapper .top-banners-viewport {
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  backdrop-filter: blur(18px);
}



/* =========================================================
   v0.5.7 – Android services color safety net
   ========================================================= */

body.runtime-android.is-wrapper #servicesGrid > button.card:nth-child(1) { background: linear-gradient(135deg, #ff8a14, #ff5f12) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-child(2) { background: linear-gradient(135deg, #65d85f, #29bd6c) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-child(3) { background: linear-gradient(135deg, #4bb8f2, #2f73db) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-child(4) { background: linear-gradient(135deg, #bd63f2, #8e44df) !important; }

body.runtime-android.is-wrapper #servicesGrid > button.card .card-title {
  color: #fff !important;
}



/* =========================================================
   v0.5.8 – Android services color safety net
   ========================================================= */

body.runtime-android.is-wrapper #servicesGrid > button.card {
  color: #fff !important;
}

body.runtime-android.is-wrapper #servicesGrid > button.card:nth-of-type(1) { background: linear-gradient(135deg, #ff8a14, #ff5f12) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-of-type(2) { background: linear-gradient(135deg, #65d85f, #29bd6c) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-of-type(3) { background: linear-gradient(135deg, #4bb8f2, #2f73db) !important; }
body.runtime-android.is-wrapper #servicesGrid > button.card:nth-of-type(4) { background: linear-gradient(135deg, #bd63f2, #8e44df) !important; }



/* =========================================================
   v0.5.9 – Configurable subfooter single source
   ========================================================= */

.app-subfooter .subfooter-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-subfooter .subfooter-brand,
.app-subfooter .subfooter-separator,
.app-subfooter .version-meta.runtime-hidden {
  display: none !important;
}



/* =========================================================
   v0.6.0 – Service card background variable safety
   ========================================================= */

body.runtime-android.is-wrapper .card.service-card {
  background: var(--service-card-bg, var(--android-card-bg, inherit)) !important;
  background-image: var(--service-card-bg, var(--android-card-bg, inherit)) !important;
}

/* ============================================================================
   v0.8.6 Home UX Expansion - category internal pages
   Incremental hotfix: keeps frontend-v062 base and LiveSearch untouched.
============================================================================ */
.adonde-category-page .category-hero-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  margin: 12px 0 16px;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, .16);
}

.category-hero-card--comer { background: linear-gradient(135deg, #ff8a14 0%, #ff5f12 100%); }
.category-hero-card--comprar { background: linear-gradient(135deg, #65d85f 0%, #29bd6c 100%); }
.category-hero-card--dormir { background: linear-gradient(135deg, #4bb8f2 0%, #2f73db 100%); }
.category-hero-card--salir { background: linear-gradient(135deg, #bd63f2 0%, #8e44df 100%); }

.category-hero-icon {
  display: grid;
  place-items: center;
  min-width: 48px;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .22);
  font-size: 26px;
}

.category-hero-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.category-hero-card p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
  opacity: .94;
}

.category-results-panel {
  margin-top: 0;
}

.category-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.category-panel-head h3 {
  margin: 0 0 4px;
}

.category-panel-head span {
  display: block;
  color: #6b7280;
  font-size: .82rem;
}

.category-refresh {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 800;
  font-size: .78rem;
}

.category-results {
  display: grid;
  gap: 10px;
}

.category-result-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  border: 1px solid rgba(15, 23, 42, .06);
}

.category-result-thumb {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  background-size: cover;
  background-position: center;
}

.category-result-body {
  min-width: 0;
}

.category-result-body strong,
.category-result-body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-result-body strong {
  font-size: .95rem;
}

.category-result-body small {
  color: #6b7280;
  font-size: .78rem;
  margin-top: 3px;
}

.category-result-cta {
  color: #ef5b2a;
  font-weight: 900;
  font-size: .78rem;
}

.category-state {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: .9rem;
  text-align: center;
}

.category-cta-card {
  margin: 16px 0 8px;
  padding: 16px;
  border-radius: 22px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, .18);
}

.category-cta-card strong,
.category-cta-card span {
  display: block;
}

.category-cta-card span {
  margin: 6px 0 14px;
  color: rgba(255, 255, 255, .78);
  font-size: .88rem;
  line-height: 1.4;
}

.category-cta-card .cta {
  width: 100%;
}

/* ============================================================================
   v0.8.6.1 Home UX hotfix - category pages visual safety net
   Scope: WebApp subpages only. LiveSearch premium CSS remains untouched.
============================================================================ */
.adonde-category-page.page.active {
  display: block;
  padding-bottom: 96px;
  background: #f7f8fb;
}

.adonde-category-page .subpage-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 10px;
  background: linear-gradient(180deg, #f7f8fb 72%, rgba(247, 248, 251, 0));
}

.adonde-category-page .back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
  font-weight: 900;
}

.adonde-category-page .subpage-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.1;
  color: #111827;
}

.adonde-category-page .panel.category-results-panel {
  border-radius: 24px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.adonde-category-page .category-result-card:active {
  transform: scale(.99);
}

.adonde-category-page .adls-detail {
  margin-top: 14px;
}

/* v0.8.6.1 - detail actions: keep Cerrar beside Visitar Lugar */
.adls-place-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.adls-place-actions .adls-place-full,
.adls-place-actions .adls-detail-close {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 !important;
  border-radius: 999px;
  white-space: nowrap;
}

.adls-place-actions .adls-detail-close {
  border: 0;
  padding: 0 16px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 900;
  box-shadow: none;
}

@media (max-width: 380px) {
  .adls-place-actions {
    grid-template-columns: 1fr;
  }

  .adls-place-actions .adls-detail-close {
    width: 100%;
  }
}

/* =========================================================
   v0.8.6.2 – App visual refresh: services, typography, footer icons
   Scope: visual-only; keeps LiveSearch, CI3 endpoints and SPA behavior intact.
   ========================================================= */

:root {
  --font-app: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --text-strong: #141414;
  --text-soft: #6f6a66;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--text-strong);
}

.section-title {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.025em;
  text-transform: none;
}

#servicesGrid.grid {
  gap: 14px;
  margin: 0 0 18px;
}

#servicesGrid .card.service-card,
#servicesGrid > button.card {
  position: relative;
  isolation: isolate;
  min-height: 126px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 26px;
  padding: 18px 14px 15px;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 16px 30px rgba(31, 24, 18, .18), inset 0 1px 0 rgba(255,255,255,.35);
  transform: translateZ(0);
}

#servicesGrid .card.service-card::before,
#servicesGrid > button.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--service-card-bg, inherit);
}

#servicesGrid .card.service-card::after,
#servicesGrid > button.card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 98px;
  height: 98px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  z-index: -1;
}

#servicesGrid .card.service-card:hover,
#servicesGrid .card.service-card:active,
#servicesGrid > button.card:hover,
#servicesGrid > button.card:active {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 38px rgba(31, 24, 18, .22), inset 0 1px 0 rgba(255,255,255,.4);
}

.service-card-glow {
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(circle at 22% 12%, rgba(255,255,255,.45), transparent 34%);
  pointer-events: none;
}

#servicesGrid .service-icon,
#servicesGrid .emoji {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px rgba(0,0,0,.12);
  filter: none;
  font-size: 0;
}

#servicesGrid .service-icon svg,
.footer-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#servicesGrid .emoji {
  font-size: 26px;
  line-height: 1;
}

#servicesGrid .card-title {
  display: block;
  max-width: 110px;
  font-size: 17px;
  line-height: 1.04;
  font-weight: 850;
  letter-spacing: -.035em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.22);
}

.app-footer {
  border-top: 1px solid rgba(17,17,17,.07);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 -10px 30px rgba(31,24,18,.08);
}

.footer-tab {
  gap: 5px;
  border-radius: 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #8a8178;
}

.footer-tab.active {
  color: #f08e14;
  background: rgba(240,142,20,.10);
}

.footer-icon {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: currentColor;
}

.footer-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

@media (max-width: 430px) {
  #servicesGrid .card.service-card,
  #servicesGrid > button.card {
    min-height: 118px;
    border-radius: 24px;
    padding: 16px 13px 14px;
  }

  #servicesGrid .service-icon,
  #servicesGrid .emoji {
    width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  #servicesGrid .card-title {
    font-size: 16px;
  }
}

/* v0.8.6.3 - Footer Explorar shortcut feedback */
.adonde-live-search-embed.adonde-explore-focus {
  animation: adondeExploreFocus 1.2s ease-out 1;
}

@keyframes adondeExploreFocus {
  0% { transform: translateY(0); filter: none; }
  25% { transform: translateY(-2px); filter: drop-shadow(0 18px 28px rgba(240,142,20,.20)); }
  100% { transform: translateY(0); filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .adonde-live-search-embed.adonde-explore-focus {
    animation: none;
  }
}

/* v0.8.6.4 - Buses dept labels + Explore functional shortcut */
.dept {
  min-width: 44px;
  padding-inline: 10px;
  letter-spacing: -0.02em;
}

.footer-tab[data-explore-shortcut="true"] .footer-icon {
  position: relative;
}

.footer-tab[data-explore-shortcut="true"] .footer-icon::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}


/* v0.8.6.5 - Home mobility selector + geo pulse status */
.mobility-selected--geo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, .58);
  color: #3f2b08;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.mobility-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  flex: 0 0 auto;
  animation: adondeMobilityPulse 1.55s ease-out infinite;
}

@keyframes adondeMobilityPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.mobility-help {
  margin: 0 0 14px;
  color: #6d3d00;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.mobility-select-label {
  display: block;
  margin: 0 0 7px;
  color: #6d3d00;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mobility-select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(109, 61, 0, .16);
  border-radius: 17px;
  padding: 0 42px 0 14px;
  background:
    linear-gradient(45deg, transparent 50%, #6d3d00 50%) calc(100% - 20px) 21px / 7px 7px no-repeat,
    linear-gradient(135deg, #6d3d00 50%, transparent 50%) calc(100% - 15px) 21px / 7px 7px no-repeat,
    linear-gradient(180deg, #ffffff, #fff8df);
  color: #1f2937;
  font-size: 15px;
  font-weight: 950;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05), 0 8px 18px rgba(109, 61, 0, .13);
}

.mobility-select:focus {
  border-color: rgba(34, 197, 94, .75);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16), inset 0 -2px 0 rgba(0, 0, 0, .05);
}

.location-options--mobility {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mobility-pulse {
    animation: none;
  }
}

/* v0.8.6.6 - Explore directory page */
.adonde-explore-page.page.active {
  display: block;
  padding-bottom: 22px;
}

.explore-hero-card {
  margin: 12px 16px 14px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(135deg, #071b2f 0%, #0f8f63 100%);
  color: #fff;
  box-shadow: 0 18px 34px rgba(6, 23, 39, .18);
}

.explore-geo-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.explore-geo-line strong {
  font-size: 17px;
  letter-spacing: -.02em;
}

.explore-hero-card > span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  opacity: .88;
  margin-bottom: 12px;
}

.explore-hero-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: .92;
}

.explore-control-panel {
  margin: 0 16px 14px;
  padding: 14px;
  border-radius: 22px;
}

.explore-select-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  color: #5d6b7a;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.explore-select-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.explore-select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(14, 35, 58, .10);
  border-radius: 18px;
  padding: 13px 42px 13px 14px;
  font-size: 15px;
  font-weight: 900;
  color: #102235;
  background:
    linear-gradient(45deg, transparent 50%, #16a36f 50%) calc(100% - 20px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, #f8fbff 0%, #eef7f3 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.explore-refresh {
  border: 0;
  border-radius: 17px;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #16a36f 0%, #0b7f58 100%);
  box-shadow: 0 10px 20px rgba(11, 127, 88, .18);
}

.explore-results {
  display: grid;
  gap: 14px;
  margin: 0 16px 18px;
}

.explore-state,
.explore-category-empty {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  color: #667484;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 35, 55, .08);
}

.explore-category-block {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 32px rgba(15, 35, 55, .10);
  border: 1px solid rgba(14, 35, 58, .07);
}

.explore-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(14, 35, 58, .07);
}

.explore-category-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: .02em;
  color: #12263a;
}

.explore-category-head span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #697789;
  font-weight: 700;
}

.explore-category-head strong {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0b7f58;
  background: rgba(22, 163, 111, .12);
  font-size: 13px;
  font-weight: 950;
}

.explore-place-list {
  display: grid;
  gap: 0;
}

.explore-place-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 35, 58, .06);
}

.explore-place-card:last-child {
  border-bottom: 0;
}

.explore-place-card:active {
  background: rgba(22, 163, 111, .08);
}

.explore-place-thumb {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: linear-gradient(135deg, #eaf3ff 0%, #dceee7 100%);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(14, 35, 58, .06);
}

.explore-place-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.explore-place-body strong,
.explore-place-body small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.explore-place-body strong {
  font-size: 14px;
  color: #12263a;
}

.explore-place-body small {
  font-size: 12px;
  font-weight: 700;
  color: #768394;
}

.explore-place-cta {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #0b7f58;
  background: rgba(22, 163, 111, .10);
}

.adonde-explore-page > .adls-detail {
  margin: 0 16px 18px;
}

@media (max-width: 380px) {
  .explore-select-row {
    grid-template-columns: 1fr;
  }

  .explore-refresh {
    width: 100%;
  }
}
