/* ============================================
   HAMFEST ARGENTINA — Estilos globales
   Paleta: Azul corporativo
   ============================================ */

/* --- Variables --- */
:root {
  --blue-900: #0f2744;
  --blue-800: #1a3a5c;
  --blue-700: #1e4d7a;
  --blue-600: #1d6aa5;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --accent:   #f59e0b;
  --accent-hover: #d97706;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white:    #ffffff;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.14);
}

/* --- Reset mínimo --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
/* Cursor estable: SVGs nunca interceptan eventos, todos los hijos heredan cursor del padre */
svg { pointer-events: none; display: block; }
a *, button *, [onclick] *, [role="button"] * { cursor: inherit; }

/* --- Contenedor --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}
.btn-primary:hover {
  background: var(--blue-700);
  border-color: var(--blue-700);
}
.btn-outline {
  background: transparent;
  color: var(--blue-500);
  border-color: var(--blue-500);
}
.btn-outline:hover {
  background: var(--blue-50);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
}
.btn-accent {
  background: var(--accent);
  color: var(--gray-900);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: var(--radius);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-top {
  background: var(--blue-800);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { flex-shrink: 0; }
.header-actions { flex-shrink: 0; margin-left: auto; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 56px;
  width: auto;
  display: block;
}

/* Buscador */
.search-form {
  flex: 1;
  display: flex;
  min-width: 0;
}
.search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--white);
  color: var(--gray-900);
}
.search-input::placeholder { color: var(--gray-500); }
.search-btn {
  padding: 10px 18px;
  background: var(--accent);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.search-btn:hover { background: var(--accent-hover); }

/* Acciones */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-actions .btn-outline {
  color: var(--blue-200, #bfdbfe);
  border-color: rgba(255,255,255,0.35);
}
.header-actions .btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* ── Íconos de notificación en el header ─────────────────── */
.header-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.header-icon-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

.notif-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #dc2626;
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #1e3a8a;
  pointer-events: none;
  box-sizing: border-box;
}

/* ── Menú de usuario ─────────────────────────────────────── */
.header-user-menu { position: relative; flex-shrink: 0; }

.header-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.header-user-btn:hover { background: rgba(255,255,255,0.1); }
.header-user-btn .hnu-chevron { transition: transform 0.2s; }
.header-user-btn[aria-expanded="true"] .hnu-chevron { transform: rotate(180deg); }

.header-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 185px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  z-index: 500;
  overflow: hidden;
}
.header-user-dropdown a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s;
  cursor: pointer;
}
.header-user-dropdown a:hover { background: #f3f4f6; color: #1d4ed8; }
.header-user-dropdown hr { border: none; border-top: 1px solid #e5e7eb; margin: 0; cursor: default; }
.header-user-dropdown .hnu-logout { color: #dc2626; }
.header-user-dropdown .hnu-logout:hover { background: #fef2f2; color: #b91c1c; }

/* Nav secundaria */
.header-nav {
  background: var(--blue-900);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative; /* para el dropdown mobile */
}
.header-nav .container {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden; /* garantiza una sola línea */
  height: 42px;
}
.nav-hamburger {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 0;
  cursor: pointer;
  width: 100%;
}
.nav-hamburger span { pointer-events: none; }
.nav-list {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-arrow {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 22px;
  width: 22px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: color 0.15s, opacity 0.15s;
}
.nav-arrow:hover { color: rgba(255,255,255,0.9); }
.nav-list li {
  display: flex;      /* para que el <a> pueda llenarlo en altura */
  cursor: pointer;    /* safety net: todo el <li> muestra pointer */
}
.nav-list li a {
  display: flex;
  align-items: center;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.nav-list li a:hover {
  color: var(--white);
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.06);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-600) 100%);
  padding: 18px 0 36px;
  text-align: center;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.hero-logo {
  height: auto;
  width: auto;
  max-height: 260px;
  max-width: 85%;
  margin-bottom: 4px;
}
.hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  max-width: 720px;
}
.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 20px;
  line-height: 1.65;
}

/* ── Mini calendario HamFests (hero) ── */
.hero-mini-cal {
  width: 100%;
  max-width: 304px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 14px 18px 16px;
  margin-bottom: 28px;
  color: rgba(255,255,255,.9);
}
.hmc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hmc-nav {
  background: none;
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 7px;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .14s;
  font-family: var(--font);
}
.hmc-nav:hover { background: rgba(255,255,255,.15); }
.hmc-mes-link { text-decoration: none; }
.hmc-mes-link span {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .03em;
}
.hmc-mes-link:hover span { text-decoration: underline; }
.hmc-dias-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 3px;
}
.hmc-dias-header span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 0;
}
.hmc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hmc-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  color: rgba(255,255,255,.65);
}
.hmc-cell.hmc-empty { visibility: hidden; }
.hmc-today > span {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hmc-event {
  background: rgba(59,130,246,.38);
  border: 1.5px solid rgba(147,197,253,.65);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(59,130,246,.35);
  transition: background .13s, box-shadow .13s;
}
.hmc-event:hover {
  background: rgba(59,130,246,.6);
  box-shadow: 0 0 16px rgba(59,130,246,.65);
}
.hmc-proximo {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
  text-align: center;
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hmc-proximo-label {
  font-weight: 700;
  color: rgba(255,255,255,.75);
}
.hero-gratis {
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  text-shadow:
    0 0 8px rgba(147,210,255,.9),
    0 0 20px rgba(99,179,255,.6),
    0 0 40px rgba(59,130,246,.4);
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50px;
  padding: 14px 36px;
  gap: 32px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hero-stat strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.hero-stat span {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.hero-stat-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.18);
}

/* ============================================
   SECCIONES GENÉRICAS
   ============================================ */
.section {
  padding: 52px 0;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 28px;
}
.section-title.text-center { text-align: center; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-500);
  transition: color 0.15s;
}
.section-link:hover { color: var(--blue-700); }

/* ============================================
   CATEGORÍAS
   ============================================ */
.categories-section { background: var(--white); padding: 16px 0; }

/* ── Kp Solar Weather Bar (en header-nav, fondo oscuro) ── */
.kp-bar {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: default;
  user-select: none;
  width: 230px;
}
.kp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: background 0.4s, box-shadow 0.4s;
}
.kp-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 42px;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.kp-svg {
  flex: 1;
  height: 22px;
  min-width: 40px;
  display: block;
  overflow: visible;
}
.kp-status {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: rgba(255,255,255,0.45);
  transition: color 0.4s;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px 7px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  transition: all 0.18s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.cat-card:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-card:hover .cat-icon svg { color: var(--blue-600); }
.cat-card--more { border-style: dashed; background: var(--gray-100); }
.cat-card--active { border-color: var(--blue-500); background: var(--blue-50); }
.cat-card--active .cat-icon svg { color: var(--blue-600); }
/* Card especial HamFests → calendario */
.cat-card--hamfest {
  border-color: var(--blue-400);
  background: linear-gradient(135deg, var(--blue-50) 0%, #fff 100%);
}
.cat-card--hamfest .cat-icon svg { color: var(--blue-600); }
.cat-card--hamfest .cat-name { color: var(--blue-700); font-weight: 700; }
.cat-card--hamfest:hover { background: var(--blue-100); border-color: var(--blue-500); }
.cat-icon {
  width: 26px;
  height: 26px;
  margin-bottom: 5px;
  color: var(--blue-500);
}
.cat-icon svg { width: 100%; height: 100%; }
.cat-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.2;
}
.cat-count {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}
.cat-count::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--gray-900);
}
.cat-card:hover .cat-count { opacity: 1; }

/* Mobile: chips scrolleables horizontalmente */
@media (max-width: 600px) {
  .categories-section .section-title { margin-bottom: 10px; }
  .nav-hamburger { width: auto; flex: 1; }
  .nav-arrow { display: none; }
  .kp-bar { margin-left: 0; width: auto; max-width: 140px; padding: 4px 8px; gap: 5px; }
  .kp-status { display: none; }
  .kp-svg { min-width: 50px; }
  .categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .categories-grid::-webkit-scrollbar { display: none; }
  .cat-card {
    flex-direction: row;
    flex-shrink: 0;
    padding: 8px 12px;
    gap: 8px;
    border-radius: 20px;
    min-width: unset;
    width: auto;
  }
  .cat-icon { width: 22px; height: 22px; margin-bottom: 0; flex-shrink: 0; }
  .cat-name { font-size: 13px; white-space: nowrap; margin-bottom: 0; }
  .cat-count { display: none; }
}

/* ============================================
   AVISOS / LISTINGS
   ============================================ */
.listings-section { background: var(--gray-100); }
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, transform 0.18s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.listing-card * { cursor: inherit; }
.listing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.listing-img-wrap {
  position: relative;
  background: var(--blue-50);
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--gray-100);
}
.listing-img-placeholder {
  width: 80px;
  height: 80px;
  opacity: 0.55;
}
.listing-img-placeholder svg { width: 100%; height: 100%; }
.listing-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--gray-700);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.listing-badge--new { background: var(--blue-500); }
.listing-badge--reciente { background: #059669; top: 36px; }
/* Overlays RESERVADO / VENDIDO en miniaturas */
.listing-venta-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 1.5px;
  padding: 5px 0;
  pointer-events: none;
}
.listing-venta-overlay.reservado { background: rgba(217,119,6,.88); color: #fff; }
.listing-venta-overlay.vendido   { background: rgba(21,128,61,.88);  color: #fff; }
.listing-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.listing-callsign {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-600);
  font-family: monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.listing-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.35;
  flex: 1;
  margin: 2px 0 4px;
}
.listing-location {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.listing-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 10px;
}

/* ============================================
   BANNER PROMOCIONAL (VHF / publicidad)
   ============================================ */
.promo-banner {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 60%, #fbbf24 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.promo-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  flex-wrap: wrap;
}
.promo-banner-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
}
.promo-banner-body {
  flex: 1;
  min-width: 200px;
}
.promo-banner-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(0,0,0,.45);
  margin-bottom: 4px;
}
.promo-banner-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.promo-banner-text {
  font-size: 13px;
  color: rgba(255,255,255,.9);
  line-height: 1.45;
  margin-bottom: 6px;
}
.promo-banner-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.promo-banner-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0,0,0,.55);
}
.promo-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.promo-btn:hover { opacity: .88; transform: translateY(-1px); }
.promo-btn--primary {
  background: rgba(0,0,0,.25);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.promo-btn--cal {
  background: #fff;
  color: #b45309;
  border: 1.5px solid rgba(255,255,255,.8);
}
.promo-banner-close {
  position: absolute;
  top: 8px;
  right: 0;
  background: none;
  border: none;
  color: rgba(0,0,0,.35);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  transition: color .15s;
}
.promo-banner-close:hover { color: rgba(0,0,0,.7); }

@media (max-width: 600px) {
  .promo-banner-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .promo-banner-icon { font-size: 28px; }
  .promo-banner-title { font-size: 16px; }
  .promo-banner-actions { width: 100%; }
  .promo-btn { flex: 1; justify-content: center; }
}

/* ============================================
   BANNER INTERMEDIO
   ============================================ */
/* ── Banner comunidad ── */
.community-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-top: 2px solid #bfdbfe;
  border-bottom: 2px solid #bfdbfe;
  padding: 32px 0;
  text-align: center;
}
.community-banner-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(30,58,138,0.08);
  padding: 28px 32px;
}
.community-banner-text {
  color: #374151;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 10px;
}
.community-banner-text a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.community-banner-text a:hover { text-decoration: underline; }
.community-banner-thanks {
  color: #1d4ed8;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.mid-banner {
  background: linear-gradient(90deg, var(--blue-900) 0%, var(--blue-700) 100%);
  padding: 44px 0;
}
.mid-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.mid-banner-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.mid-banner-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
}

/* ============================================
   CÓMO FUNCIONA
   ============================================ */
.how-section { background: var(--white); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 36px;
}
.how-step {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-300);
  background: var(--blue-50);
  transition: border-color 0.15s;
}
.how-step:hover { border-color: var(--blue-400); }
.how-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.how-step h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.how-step p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.55;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
}
.footer-inner {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 24px;
}
.footer-brand { max-width: 260px; }
.footer-logo-img {
  height: 52px;
  width: auto;
  display: block;
  opacity: 0.9;
  margin-bottom: 4px;
}
.footer-tagline {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin: 8px 0 14px;
  line-height: 1.5;
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.40);
}
.footer-copy a { color: rgba(255,255,255,0.55); }
.footer-copy a:hover { color: var(--white); }
.footer-links {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
}
.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}
.footer-links ul li {
  margin-bottom: 8px;
}
.footer-links ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.60);
  transition: color 0.15s;
}
.footer-links ul li a:hover { color: var(--white); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .search-form { order: 3; flex: 1 1 100%; }
  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 10px 0; padding: 12px 16px; border-radius: 16px; }
  .hero-stat-sep { display: block; width: 1px; height: 28px; background: rgba(255,255,255,0.18); flex-shrink: 0; margin: 0 14px; }
  .hero-stat { min-width: 0; flex: 1 1 auto; }
  .somos-label { display: none; }
  .mid-banner-inner { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; gap: 30px; }
  .footer-brand { max-width: 100%; }
}

@media (max-width: 600px) {
  /* Header mobile */
  .logo { order: 0; flex-shrink: 0; }
  .logo-img { height: 34px; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .header-actions { order: 1; flex: 1; gap: 8px; justify-content: flex-end; }
  .search-form { order: 2; flex: 1 1 100%; }
  .header-actions .btn-outline,
  .header-actions .btn-primary,
  .header-actions .btn-accent { flex: 1; justify-content: center; text-align: center; font-size: 13px; padding: 8px 10px; }
  /* User menu: compacto en mobile — solo muestra el avatar, sin texto */
  .user-menu { flex: 0; }
  .user-menu-btn { width: auto; }
  .user-callsign { display: none; }                /* app.js: ocultar indicativo */
  .header-user-btn span { display: none; }          /* _header_nav.php: ocultar indicativo */
  .user-dropdown { left: auto; right: 0; min-width: 200px; }
  /* Reducir gaps en header-actions para que quepan todos los íconos */
  .header-actions { gap: 4px !important; }

  .listings-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 24px; }
  .section { padding: 36px 0; }
  .hero-logo { height: auto; width: auto; max-height: 200px; max-width: 75%; margin-bottom: 0; }
  .hero { padding: 0 0 14px; }
  .hero-title { margin-bottom: 4px; font-size: 26px; }
  .hero-subtitle { margin-bottom: 12px; font-size: 15px; }
  .hero-mini-cal { max-width: 228px; padding: 10px 10px 12px; margin-bottom: 14px; border-radius: 8px; }
  .hmc-cell { font-size: 11px; }
  .hmc-dias-header span { font-size: 9px; }
  .hmc-mes-link span { font-size: 13px; }
  .hmc-nav { width: 26px; height: 26px; font-size: 16px; }
  .hero-cta { margin-bottom: 17px; }
  /* Stats en grid 2 columnas — sin separadores que rompen el flex wrap */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding: 12px 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hero-stat-sep { display: none; }
  .hero-stat { flex: none; text-align: center; }

  /* Hamburger mobile */
  .nav-hamburger { display: flex; }
  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-900);
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
  .nav-list.nav-open { display: flex; }
  .nav-list li a {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 15px;
    white-space: normal;
  }
  .nav-list li a:hover { border-bottom-color: rgba(255,255,255,0.06); }
}

@media (max-width: 400px) {
  .listings-grid { grid-template-columns: 1fr; }
}

/* Bloqueo orientación landscape en mobile */
@media (orientation: landscape) and (max-height: 500px) {
  .rotate-overlay {
    display: flex;
  }
}
.rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--blue-900);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 30px;
}
.rotate-overlay svg {
  width: 64px;
  height: 64px;
  color: var(--accent);
  animation: rotate-hint 2s ease-in-out infinite;
}
.rotate-overlay p {
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
}
.rotate-overlay span {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
}
@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  40%       { transform: rotate(-90deg); }
  60%       { transform: rotate(-90deg); }
}

/* ============================================
   MENÚ DE USUARIO (header)
   ============================================ */
.user-menu {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 7px 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.user-menu-btn:hover { background: rgba(255,255,255,0.22); }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-callsign { letter-spacing: 0.03em; }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 200;
  animation: dropdown-in 0.15s ease;
}
.user-dropdown.open { display: block; }
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-dropdown-header {
  padding: 12px 16px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--blue-100);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dropdown-header strong {
  font-size: 14px;
  color: var(--blue-800);
  letter-spacing: 0.04em;
}
.user-dropdown-header span {
  font-size: 12px;
  color: var(--gray-500);
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--gray-700);
  transition: background 0.15s;
  cursor: pointer;
}
.user-dropdown-item:hover { background: var(--gray-100); color: var(--blue-700); }
.user-dropdown-item--danger { color: #dc2626; }
.user-dropdown-item--danger:hover { background: #fef2f2; color: #b91c1c; }
.user-dropdown-divider { border: none; border-top: 1px solid var(--gray-300); margin: 4px 0; }

/* ============================================
   FLASH TOAST (mensajes de confirmación)
   ============================================ */
.flash-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue-800);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}
.flash-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
