/* ============================================================
   layout.css — Lokal
   Header, Hero, Ubicación bar
   ============================================================ */


/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */

header {
  background: var(--verde);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  overflow: visible;
}

.header-montana {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.logo {
  position: relative;
  z-index: 1;
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--crema);
  letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.logo span {
  color: #74C69D;
}

.header-actions {
  position: relative;
  z-index: 150;
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-publicar {
  background: var(--tierra);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-publicar:hover {
  background: #40916C;
  transform: translateY(-1px);
}


/* ════════════════════════════════════════
   UBICACIÓN BAR
   ════════════════════════════════════════ */

.ubicacion-bar {
  background: var(--verde-claro);
  border-bottom: 1px solid rgba(0,0,0,0.12);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 44px;
  position: relative;
}

.ub-select-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 6px 14px 6px 10px;
  border-radius: 50px;
  background: rgba(255,255,255,0.13);
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: background 0.18s;
  user-select: none;
}

.ub-select-wrap:hover { background: rgba(255,255,255,0.22); }

.ub-icono { font-size: 15px; }

.ub-texto {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.ub-chevron {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  transition: transform 0.2s;
}

.ub-chevron.open { transform: rotate(180deg); }

/* Dropdown de ubicación */
.ub-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 24px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  z-index: 200;
  min-width: 210px;
  border: 1px solid var(--crema-oscura);
  animation: fadeDown 0.18s ease;
}

.ub-dropdown.open { display: block; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ub-option {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cafe);
  cursor: pointer;
  transition: background 0.13s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ub-option:hover { background: var(--crema); }

.ub-option.active {
  background: var(--crema);
  color: var(--verde);
  font-weight: 700;
}

/* Selector ubicación en modal (pills) */
.ubicacion-select-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ubicacion-select-pill {
  background: var(--crema);
  border: 2px solid var(--crema-oscura);
  color: var(--cafe);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.18s;
}

.ubicacion-select-pill:hover {
  border-color: var(--verde);
  color: var(--verde);
}

.ubicacion-select-pill.active,
.ubicacion-select-pill.active:hover {
  background: var(--verde);
  border-color: var(--verde);
  color: white;
  font-weight: 700;
}


/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */

.hero {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 60%, #40916C 100%);
  padding: 80px 24px 160px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.hero > *:not(.hero-bubbles) {
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -80px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 900;
  color: var(--crema);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: italic;
  color: #74C69D;
}

.hero p {
  color: rgba(255,253,245,0.85);
  font-size: 18px;
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Barra de búsqueda hero */
.hero-search {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--cafe);
  background: transparent;
}

.hero-search input::placeholder { color: #aaa; }

.hero-search button {
  background: var(--verde);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover { background: var(--verde-claro); }


/* ════════════════════════════════════════
   HERO — BUBBLES (animación flotante)
   ════════════════════════════════════════ */

.hero-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 0.85; }
  100% { transform: translateY(-105vh) translateX(var(--drift)); opacity: 0; }
}

.bubble:nth-child(1)  {
  width:160px;height:160px; left:4%;  bottom:-180px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.55), rgba(255,255,255,0.08) 60%, transparent);
  border: 1.5px solid rgba(255,255,255,0.35);
  filter: blur(4px);
  animation-duration:13s; animation-delay:0s; --drift:28px;
}
.bubble:nth-child(2)  {
  width:80px;height:80px; left:17%; bottom:-100px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0.1) 55%, transparent);
  border: 1.5px solid rgba(255,255,255,0.4);
  filter: blur(3px);
  animation-duration:16s; animation-delay:2s; --drift:-20px;
}
.bubble:nth-child(3)  {
  width:240px;height:240px; left:26%; bottom:-270px;
  background: radial-gradient(circle at 38% 32%, rgba(255,255,255,0.4), rgba(255,255,255,0.05) 58%, transparent);
  border: 2px solid rgba(255,255,255,0.25);
  filter: blur(6px);
  animation-duration:18s; animation-delay:4s; --drift:45px;
}
.bubble:nth-child(4)  {
  width:55px;height:55px; left:44%; bottom:-70px;
  background: radial-gradient(circle at 32% 32%, rgba(255,255,255,0.65), rgba(255,255,255,0.12) 50%, transparent);
  border: 1px solid rgba(255,255,255,0.45);
  filter: blur(2px);
  animation-duration:10s; animation-delay:1s; --drift:-16px;
}
.bubble:nth-child(5)  {
  width:120px;height:120px; left:55%; bottom:-140px;
  background: radial-gradient(circle at 36% 36%, rgba(255,255,255,0.5), rgba(255,255,255,0.08) 60%, transparent);
  border: 1.5px solid rgba(255,255,255,0.3);
  filter: blur(4px);
  animation-duration:15s; animation-delay:3s; --drift:35px;
}
.bubble:nth-child(6)  {
  width:200px;height:200px; left:65%; bottom:-230px;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,0.42), rgba(255,255,255,0.06) 56%, transparent);
  border: 2px solid rgba(255,255,255,0.22);
  filter: blur(6px);
  animation-duration:20s; animation-delay:0.5s; --drift:-38px;
}
.bubble:nth-child(7)  {
  width:90px;height:90px; left:78%; bottom:-110px;
  background: radial-gradient(circle at 33% 33%, rgba(255,255,255,0.58), rgba(255,255,255,0.1) 52%, transparent);
  border: 1.5px solid rgba(255,255,255,0.38);
  filter: blur(3px);
  animation-duration:12s; animation-delay:5s; --drift:22px;
}
.bubble:nth-child(8)  {
  width:280px;height:280px; left:82%; bottom:-310px;
  background: radial-gradient(circle at 37% 33%, rgba(255,255,255,0.35), rgba(255,255,255,0.04) 55%, transparent);
  border: 2px solid rgba(255,255,255,0.18);
  filter: blur(8px);
  animation-duration:22s; animation-delay:1.5s; --drift:-50px;
}
.bubble:nth-child(9)  {
  width:45px;height:45px; left:22%; bottom:-60px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7), rgba(255,255,255,0.15) 48%, transparent);
  border: 1px solid rgba(255,255,255,0.5);
  filter: blur(2px);
  animation-duration:9s; animation-delay:6.5s; --drift:14px;
}
.bubble:nth-child(10) {
  width:170px;height:170px; left:36%; bottom:-200px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.45), rgba(255,255,255,0.07) 58%, transparent);
  border: 1.5px solid rgba(255,255,255,0.28);
  filter: blur(5px);
  animation-duration:17s; animation-delay:3.5s; --drift:-28px;
}
.bubble:nth-child(11) {
  width:100px;height:100px; left:1%;  bottom:-120px;
  background: radial-gradient(circle at 33% 33%, rgba(255,255,255,0.55), rgba(255,255,255,0.09) 54%, transparent);
  border: 1.5px solid rgba(255,255,255,0.33);
  filter: blur(3px);
  animation-duration:14s; animation-delay:7s; --drift:30px;
}
.bubble:nth-child(12) {
  width:65px;height:65px; left:91%; bottom:-80px;
  background: radial-gradient(circle at 32% 32%, rgba(255,255,255,0.62), rgba(255,255,255,0.12) 50%, transparent);
  filter: blur(2px);
  animation-duration:11s; animation-delay:4.5s; --drift:-18px;
}

/* ════════════════════════════════════════
   CATEGORÍAS Y PILLS
   ════════════════════════════════════════ */

.categorias {
  padding: 20px 24px 8px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--cafe);
  margin-bottom: 16px;
}

.cats-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cat-pill {
  background: var(--crema);
  border: 2px solid var(--crema-oscura);
  color: var(--cafe);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--verde);
  border-color: var(--verde);
  color: white;
}

.btn-explorar {
  background: var(--verde);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-explorar:hover { background: var(--verde-claro); }

/* Footer Buttons */
.btn-footer-link {
  background: none;
  border: none;
  padding: 6px 12px;
  color: var(--crema);
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.85;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.btn-footer-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: underline;
  transform: translateY(-1px);
}

.btn-footer-link:active {
  transform: translateY(0);
}

/* ════════════════════════════════════════
   BANNER PROMO (SERVICIOS DIGITALES DEL DESARROLLADOR)
   ════════════════════════════════════════ */
.promo-banner-container {
  max-width: var(--max-width);
  margin: 32px auto 16px auto;
  padding: 0 16px;
}

.promo-banner {
  background: linear-gradient(135deg, var(--verde) 0%, var(--cafe) 100%);
  color: var(--crema);
  padding: 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.promo-banner-circle-1 {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.promo-banner-circle-2 {
  position: absolute;
  bottom: -30px;
  left: 10%;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.promo-banner-content {
  flex: 1;
  min-width: 280px;
  position: relative;
  z-index: 2;
}

.promo-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tierra);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-banner-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: #ffffff;
  margin: 0 0 6px 0;
  font-weight: 900;
  line-height: 1.2;
}

.promo-banner-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  opacity: 0.95;
  color: var(--crema);
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.promo-banner-text strong {
  color: var(--tierra);
  font-weight: 600;
}

.promo-banner-action {
  position: relative;
  z-index: 2;
  min-width: 180px;
}

.promo-banner-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--tierra);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.promo-banner-btn:hover {
  background: var(--crema);
  color: var(--verde);
  transform: translateY(-2px);
}

/* ── Clases CSP de Utilidad para Layout y Cabecera/Pie ── */
.header-montana svg {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-flex {
  display: flex;
  align-items: center;
}

.ub-select-container {
  position: relative;
}

.ub-dropdown-header {
  left: auto;
  right: 0;
  top: calc(100% + 8px);
}

.notif-wrap {
  position: relative;
  display: none;
}

.notif-badge-maint {
  display: none;
}

.main-footer {
  background: var(--verde);
  color: var(--crema);
  text-align: center;
  padding: 16px 24px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.footer-tagline {
  font-size: 12px;
  opacity: 0.85;
  margin-top: -6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-top: 2px;
}

.footer-copyright {
  font-size: 11px;
  opacity: 0.65;
  margin-top: 2px;
}

.det-emoji-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.btn-fav-layout {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  z-index: 10;
}

.maint-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #40916C 100%);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 32px;
}

/* Mostrar mantenimiento INMEDIATAMENTE si el caché lo indica (sin esperar JS de Firebase) */
html.en-mantenimiento #pantallaMantenimiento {
  display: flex !important;
}

.maint-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.maint-logo {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.maint-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.maint-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  max-width: 360px;
  line-height: 1.7;
}

.maint-admin-card {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.maint-admin-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin: 0;
}

.maint-admin-link {
  color: #95D5B2;
  cursor: pointer;
  text-decoration: underline;
}
