/* ==========================================================================
   Anuncios Arequipa — cyberpunk design system
   ========================================================================== */

:root {
  --bg-void: #07070d;
  --bg-panel: #0d0f1c;
  --bg-panel-raised: #12142590;
  --border-soft: #2a2d45;

  --neon-cyan: #33bfff;
  --neon-magenta: #f0b429;
  --neon-yellow: #ffd88a;
  --neon-violet: #2f6fed;

  --text-primary: #eef0ff;
  --text-muted: #9aa0c3;
  --text-faint: #5c6089;

  --success: #35e08a;
  --danger: #ff5f6d;

  --radius-md: 14px;
  --radius-lg: 22px;

  --font-display: "Orbitron", "Rajdhani", sans-serif;
  --font-body: "Rajdhani", "Inter", system-ui, sans-serif;

  --shadow-cyan: 0 0 18px rgba(51, 191, 255, 0.35), 0 0 2px rgba(51, 191, 255, 0.6);
  --shadow-magenta: 0 0 18px rgba(240, 180, 41, 0.35), 0 0 2px rgba(240, 180, 41, 0.6);
}

* {
  box-sizing: border-box;
}

[x-cloak] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Animated cyber-grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(51, 191, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 191, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
  animation: grid-drift 40s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 15% 10%, rgba(47, 111, 237, 0.18), transparent 45%),
              radial-gradient(circle at 85% 20%, rgba(240, 180, 41, 0.14), transparent 40%),
              radial-gradient(circle at 50% 100%, rgba(51, 191, 255, 0.1), transparent 45%);
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 84px 84px, 84px 84px; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Honeypot (hidden from real users) --- */
.hp-field-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 13, 0.75);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  position: relative;
}

.logo__icon {
  height: 32px;
  width: 32px;
  filter: drop-shadow(0 0 6px rgba(51, 191, 255, 0.5));
}

.logo span {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(51, 191, 255, 0.7);
}

.logo:hover span {
  animation: glitch 0.4s steps(2, end) 2;
}

@keyframes glitch {
  0% { transform: translate(0); }
  25% { transform: translate(-2px, 1px); text-shadow: 2px 0 var(--neon-magenta); }
  50% { transform: translate(2px, -1px); text-shadow: -2px 0 var(--neon-violet); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--neon-cyan);
  border-color: rgba(51, 191, 255, 0.35);
  box-shadow: var(--shadow-cyan);
}

.nav-link.active {
  color: var(--bg-void);
  background: var(--neon-cyan);
  box-shadow: var(--shadow-cyan);
}

.nav-cta {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  color: #05060a !important;
  box-shadow: var(--shadow-cyan);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 1.2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  color: #05060a;
  box-shadow: var(--shadow-cyan);
}

.btn-secondary {
  background: transparent;
  color: var(--neon-magenta);
  border-color: rgba(240, 180, 41, 0.5);
}

.btn-secondary:hover { box-shadow: var(--shadow-magenta); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.btn-xs { padding: 7px 12px; font-size: 0.72rem; gap: 4px; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* --- Cards / glass panels --- */
.glass-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.listing-card {
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.listing-card:hover {
  border-color: rgba(51, 191, 255, 0.45);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-4px);
}

.listing-card__category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
}

.listing-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-primary);
}

.listing-card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.listing-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-premium {
  background: rgba(51, 191, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(51, 191, 255, 0.35);
  animation: premium-pulse 2.4s ease-in-out infinite;
}

@keyframes premium-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(51, 191, 255, 0.3); }
  50% { box-shadow: 0 0 18px rgba(51, 191, 255, 0.75); }
}

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

/* --- Suggestion status badges --- */
.badge-status-new {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.badge-status-reviewing {
  background: rgba(51, 191, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
}

.badge-status-planned {
  background: rgba(47, 111, 237, 0.12);
  border: 1px solid var(--neon-violet);
  color: #9db4ff;
}

.badge-status-done {
  background: rgba(53, 224, 138, 0.12);
  border: 1px solid var(--success);
  color: var(--success);
}

.badge-status-declined {
  background: rgba(255, 95, 109, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* --- Hero --- */
.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
}

.hero-copy {
  text-align: left;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-violet) 60%, var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Periodic cyberpunk glitch flicker on the hero title */
.hero-title {
  position: relative;
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  opacity: 0;
  pointer-events: none;
}

.hero-title::before {
  color: var(--neon-magenta);
  animation: hero-glitch-1 2s infinite;
}

.hero-title::after {
  color: var(--neon-cyan);
  animation: hero-glitch-2 2s infinite;
}

@keyframes hero-glitch-1 {
  0%, 93%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
  93.5% { opacity: 0.85; transform: translate(-4px, 1px); clip-path: inset(10% 0 65% 0); }
  94.5% { opacity: 0.85; transform: translate(3px, -1px); clip-path: inset(55% 0 15% 0); }
  95.5% { opacity: 0.7; transform: translate(-2px, 0); clip-path: inset(30% 0 45% 0); }
  96.5% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
}

@keyframes hero-glitch-2 {
  0%, 93%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(100% 0 0 0); }
  93.5% { opacity: 0.85; transform: translate(4px, -1px); clip-path: inset(60% 0 20% 0); }
  94.5% { opacity: 0.85; transform: translate(-3px, 1px); clip-path: inset(15% 0 60% 0); }
  95.5% { opacity: 0.7; transform: translate(2px, 0); clip-path: inset(40% 0 35% 0); }
  96.5% { opacity: 0; transform: translate(0, 0); clip-path: inset(100% 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title::before,
  .hero-title::after {
    animation: none;
    display: none;
  }
}

.hero p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 0 28px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-mascot {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-mascot::before {
  content: "";
  position: absolute;
  inset: 10% 10% 0;
  background: radial-gradient(circle, rgba(51, 191, 255, 0.28), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.hero-mascot img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
  animation: mascot-float 5s ease-in-out infinite;
}

@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mascot img { animation: none; }
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    text-align: center;
  }
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-mascot {
    order: -1;
  }
  .hero-mascot img {
    max-width: 220px;
  }
}

/* --- Category quick grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.category-tile {
  padding: 18px 14px;
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.category-tile .icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.category-tile:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-cyan);
}

/* --- Section headers --- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 20px;
}

.section-title h2 {
  font-size: 1.5rem;
}

.section-title .see-all {
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Swiper (today's listings carousel) --- */
.today-swiper {
  padding: 10px 4px 46px;
}

.today-swiper .swiper-slide {
  height: auto;
}

.swiper-pagination-bullet {
  background: var(--text-faint) !important;
  opacity: 1 !important;
}

.swiper-pagination-bullet-active {
  background: var(--neon-cyan) !important;
  box-shadow: var(--shadow-cyan);
}

.swiper-button-next, .swiper-button-prev {
  color: var(--neon-cyan) !important;
}

/* --- Vehículos featured promo card (mixed into the listings grid) --- */
.listing-card--promo {
  grid-row: span 2;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.listing-card--promo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 7, 13, 0.35) 0%, rgba(7, 7, 13, 0.55) 55%, rgba(7, 7, 13, 0.94) 100%);
}

.listing-card--promo > * {
  position: relative;
  z-index: 1;
}

.listing-card--promo .listing-card__category {
  display: inline-block;
  align-self: flex-start;
  color: var(--neon-cyan);
  background: rgba(7, 7, 13, 0.8);
  border: 1px solid rgba(51, 191, 255, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}

.listing-card--promo .listing-card__title,
.listing-card--promo .listing-card__desc {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.listing-card--promo__cta {
  align-self: flex-start;
  margin-top: auto;
}

@media (max-width: 640px) {
  .listing-card--promo {
    grid-row: span 1;
    min-height: 420px;
  }
}

/* --- Grid layout for listing pages --- */
.listings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: flex-start;
  padding: 32px 0 64px;
}

.filters-panel {
  padding: 20px;
  position: sticky;
  top: 88px;
}

.filters-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-top: 20px;
}

.filters-panel h3:first-child { margin-top: 0; }

.filter-chip-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-chip {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filter-chip:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.filter-chip.active { color: var(--neon-cyan); background: rgba(51,191,255,0.08); font-weight: 700; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* --- District info popup (Cercado) --- */
.info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  position: relative;
}

.info-tooltip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid var(--neon-cyan);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow-cyan);
  z-index: 10;
}

/* --- Forms --- */
.form-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--neon-cyan);
  flex-shrink: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-cyan);
}

.form-help { color: var(--text-faint); font-size: 0.82rem; margin-top: 6px; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 6px; }

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  color: var(--text-faint);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-divider::before, .form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.contact-hint {
  font-size: 0.85rem;
  color: var(--neon-cyan);
  background: rgba(51, 191, 255, 0.06);
  border: 1px solid rgba(51, 191, 255, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.policy-notice {
  font-size: 0.9rem;
  color: #ffb3ba;
  background: rgba(255, 95, 109, 0.08);
  border: 1px solid rgba(255, 95, 109, 0.4);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.policy-notice strong {
  display: block;
  color: var(--danger);
  margin-bottom: 4px;
}

/* --- Messages --- */
.messages { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  border: 1px solid var(--border-soft);
}

.message.success { border-color: var(--success); color: var(--success); }
.message.error { border-color: var(--danger); color: var(--danger); }
.message.info { border-color: var(--neon-cyan); color: var(--neon-cyan); }

/* --- Premium page --- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.plan-card {
  padding: 24px;
  text-align: center;
}

.plan-card .price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--neon-yellow);
  margin: 10px 0;
}

.yape-box {
  text-align: center;
  padding: 28px;
}

.yape-box__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.yape-box__illustration {
  max-width: 200px;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}

.yape-box__qr {
  margin: 0 auto 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  max-width: 190px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 80px;
  padding: 40px 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 { color: var(--text-muted); font-size: 0.85rem; }
.footer-grid a { display: block; padding: 3px 0; }
.footer-grid a:hover { color: var(--neon-cyan); }

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body::before { animation: none; }
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .listings-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .nav-link { text-align: center; }
}
