/* ============================================================
   Tema Vecindeo — paleta Luna (Bootstrap 5)
   ============================================================ */

:root {
  --luna-purple: #a46fbf;
  --luna-purple-dark: #4a3b57;
  --luna-purple-deep: #3e3049;
  --luna-purple-strong: #42354a; /* hover/activo de categorías */
  --luna-green: #8fb249;
  --luna-dark: #1a161e;
}

body {
  background-color: #f5f5f5;
}

/* ── Navbar ──────────────────────────────────────────────── */
.bg-vecindeo {
  background-color: var(--luna-purple-deep);
}
.navbar .btn-publicar {
  background-color: var(--luna-purple);
  border-color: var(--luna-purple);
  color: #fff;
  font-weight: 600;
}
.navbar .btn-publicar:hover {
  background-color: #8f5aab;
  color: #fff;
}

/* ── Hero con banner ─────────────────────────────────────── */
.hero-vecindeo {
  background:
    linear-gradient(rgba(20, 15, 25, 0.55), rgba(20, 15, 25, 0.55)),
    url("/static/vendor/maida/img/banner.jpg") center / cover no-repeat;
  padding: 48px 0;
  color: #fff;
  min-height: 280px;
  display: flex;
  align-items: center;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero-logo-wrap {
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}
.hero-logo {
  display: block;
  width: min(280px, 42vw);
  height: auto;
}
.hero-copy {
  text-align: left;
  min-width: 0;
  flex: 1;
}
@media (max-width: 767.98px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
.hero-vecindeo h1 {
  font-size: 2.6rem;
  font-weight: 400;
}
.hero-vecindeo h2 {
  font-size: 1.25rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 1.8rem;
}
.hero-vecindeo .search-hero .form-control,
.hero-vecindeo .search-hero .form-select {
  border-radius: 2px;
  border: none;
  height: 46px;
}
.hero-vecindeo .btn-luna {
  background-color: var(--luna-purple);
  border: none;
  color: #fff;
  height: 46px;
  border-radius: 2px;
  font-weight: 600;
  width: 100%;
}
.hero-vecindeo .btn-luna:hover {
  background-color: var(--luna-green);
}

/* ── Títulos de sección ──────────────────────────────────── */
.titulo-seccion {
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--luna-green);
  font-size: 1.6rem;
  margin: 2rem 0 1.5rem;
}

/* ── Fila de íconos de categorías ────────────────────────── */
.cat-icons {
  text-align: center;
  padding-bottom: 1rem;
}
.cat-icons a {
  display: inline-block;
  width: 105px;
  color: var(--luna-purple);
  text-align: center;
  text-decoration: none;
  vertical-align: top;
  margin-bottom: 14px;
}
.cat-icons .mainicon i {
  font-size: 34px;
  display: block;
  margin-bottom: 6px;
  /* Efecto hover/tap: crece 20% y regresa suave al salir */
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Hover solo en dispositivos con cursor real (mouse/trackpad).
   En touch, el hover de CSS es inconsistente entre navegadores;
   el efecto en celular se dispara por JS (ver clase .tap-grow abajo). */
@media (hover: hover) {
  .cat-icons a:hover .mainicon i {
    transform: scale(1.2);
    color: var(--luna-purple-strong);
  }
  .cat-icons a:hover .text-icon {
    color: var(--luna-purple-strong);
  }
}

/* Celular/tablet: mismo crecimiento, disparado por touchstart vía JS */
.cat-icons a.tap-grow .mainicon i {
  transform: scale(1.2);
  color: var(--luna-purple-strong);
}
.cat-icons a.tap-grow .text-icon {
  color: var(--luna-purple-strong);
}

.cat-icons a.activa .mainicon i,
.cat-icons a.activa .text-icon {
  color: var(--luna-purple-strong);
}
/* Hover/activo de categorías */
.cat-icons a div:hover {
  color: var(--luna-purple-strong);
}
.cat-icons .text-icon {
  font-size: 0.9rem;
  display: block;
  transition: color 0.2s ease;
}

/* ── Cards de anuncios (post-box) ────────────────────────── */
.post-box {
  background-color: #fff;
  border: 1px solid #e4e4e4;
  height: 100%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.13);
}
.post-box .thumbnail-holder img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain; /* imagen completa dentro del cuadro (como en detalle) */
  background-color: #f1f3f5;
}
.post-box-content {
  padding: 12px 14px;
}
.post-box-content h3 {
  font-size: 1rem;
  text-transform: none;
  margin-bottom: 8px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-box .post-category,
.post-box .post-precio {
  font-size: 0.85rem;
  color: #777;
}
.post-box .post-category i {
  color: var(--luna-purple);
  margin-right: 4px;
}
.post-box .post-precio {
  float: right;
  font-weight: 700;
  color: #333;
}

/* Niveles destacados sobre post-box */
.post-box.nivel-oro    { border: 2px solid #d4af37; }
.post-box.nivel-plata  { border: 2px solid #a8a9ad; }
.post-box.nivel-plata h3 { font-weight: 800; }
.post-box.nivel-bronce { border: 2px solid #cd7f32; }

/* ── Footer oscuro ───────────────────────────────────────── */
.footer-vecindeo {
  background-color: var(--luna-purple-deep);
  color: #cfc7d8;
  padding: 40px 0 15px;
  margin-top: 3rem;
}
.footer-vecindeo h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.footer-vecindeo a {
  color: #cfc7d8;
  text-decoration: none;
}
.footer-vecindeo a:hover {
  color: var(--luna-green);
}
.footer-vecindeo .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 25px;
  padding-top: 14px;
  font-size: 0.85rem;
}
