/* ==========================================================================
   REMATES CASTILLO — ESTILOS BASE
   Reset, tipografía global, utilidades y layout compartido.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-base);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  margin: 0;
  color: var(--text-primary);
}

/* Visible keyboard focus — accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-gold-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

main { display: block; }

section {
  padding: var(--space-12) 0;
}

/* ---- Eyebrow / kicker ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-600);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-gold-500);
  display: inline-block;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-8);
}
.section-heading h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--space-3);
}
.section-heading p {
  color: var(--text-secondary);
  margin-top: var(--space-3);
  font-size: var(--fs-md);
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease-elegant),
              box-shadow var(--dur-fast) var(--ease-elegant),
              background var(--dur-fast) var(--ease-elegant);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold-500), var(--color-gold-600));
  color: var(--color-navy-900);
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { box-shadow: var(--shadow-md); }

.btn-outline-light {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline-light:hover { border-color: var(--color-white); background: rgba(255,255,255,0.08); }

.btn-navy {
  background: var(--color-navy-900);
  color: var(--color-white);
}
.btn-navy:hover { background: var(--color-navy-700); box-shadow: var(--shadow-md); }

.btn-outline-navy {
  background: transparent;
  color: var(--color-navy-900);
  border-color: var(--color-navy-900);
}
.btn-outline-navy:hover { background: var(--color-navy-900); color: var(--color-white); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.1rem; font-size: var(--fs-xs); }

/* ---- Badges de estado ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}
.badge-proximo   { background: rgba(212,175,55,0.15); color: var(--color-gold-600); }
.badge-abierto   { background: rgba(30,122,76,0.12); color: var(--color-success); }
.badge-cerrado   { background: rgba(133,146,166,0.15); color: var(--text-muted); }
.badge-adjudicado{ background: rgba(178,58,58,0.1); color: var(--color-danger); }

/* ---- Utilidades ---- */
.text-gold { color: var(--color-gold-500); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--color-navy-900); color: var(--color-white);
  padding: var(--space-3) var(--space-5); border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---- Loading state genérico ---- */
.skeleton {
  background: linear-gradient(90deg, #ECEFF4 25%, #F6F8FA 37%, #ECEFF4 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-secondary);
}
.empty-state h3 { margin-bottom: var(--space-2); }

.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  transition: transform var(--dur-fast) var(--ease-elegant);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: var(--color-white); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, var(--color-navy-900) 0%, var(--color-navy-700) 60%, var(--color-navy-500) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,36,71,0.60) 0%, rgba(11,36,71,0.50) 50%, rgba(11,36,71,0.70) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-10) 0;
  text-align: center;
}
.hero-content .eyebrow { color: var(--color-gold-500); }
.hero-content .eyebrow::before { background: var(--color-gold-500); }
.hero-content h1 {
  font-size: var(--fs-4xl);
  color: var(--color-white);
  margin-top: var(--space-4);
  letter-spacing: 0.01em;
}
.hero-content p {
  font-size: var(--fs-lg);
  color: var(--text-on-dark-soft);
  margin-top: var(--space-4);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-weight: var(--fw-regular);
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
  justify-content: center;
}
.hero-scroll-cue {
  position: absolute;
  bottom: var(--space-6); left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-on-dark-soft);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-scroll-cue .line { width: 1px; height: 30px; background: rgba(255,255,255,0.4); position: relative; overflow: hidden; }
.hero-scroll-cue .line::after {
  content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--color-gold-500);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* ==========================================================================
   CARRUSEL / BANNER DESLIZANTE
   ========================================================================== */
.banner-section {
  position: relative;
  z-index: 3;
  margin-top: -64px;
}
.banner-track-wrap {
  position: relative;
  background: var(--color-navy-900);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-lg);
}
.banner-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }

.banner-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 4;
  transition: transform var(--dur-fast);
}
.banner-nav:hover { transform: translateY(-50%) scale(1.08); }
.banner-nav svg { width: 18px; height: 18px; stroke: var(--color-navy-900); fill: none; stroke-width: 2; }
.banner-nav.prev { left: -18px; }
.banner-nav.next { right: -18px; }
@media (max-width: 640px) { .banner-nav { display: none; } }

/* ==========================================================================
   BUSCADOR
   ========================================================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-base);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  box-shadow: var(--shadow-sm);
  max-width: 640px;
  margin: 0 auto;
}
.search-bar svg { width: 20px; height: 20px; stroke: var(--text-muted); fill: none; flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button { border-radius: var(--radius-full); }

/* ==========================================================================
   TRUST BAR (Transparencia / Seguridad / Experiencia / Respaldo)
   ========================================================================== */
.trust-bar {
  background: linear-gradient(90deg, var(--color-navy-900) 0%, var(--color-navy-700) 100%);
  padding: var(--space-8) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.trust-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  color: var(--text-on-dark-soft);
}
.trust-item .icon-wrap {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trust-item svg { width: 20px; height: 20px; stroke: var(--color-white); fill: none; stroke-width: 1.6; }
.trust-item strong { display: block; color: var(--color-white); font-size: var(--fs-sm); margin-bottom: 2px; }
.trust-item span { font-size: var(--fs-xs); line-height: var(--lh-normal); }

@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trust-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   ¿CÓMO PARTICIPAR? — Pasos
   ========================================================================== */
.steps-section { background: var(--surface-alt); }
.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  flex: 1;
}
.step-item .step-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-navy-900);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  border: 3px solid var(--color-navy-700);
}
.step-item strong { font-size: var(--fs-base); }
.step-item p { font-size: var(--fs-sm); color: var(--text-secondary); max-width: 190px; }
.step-connector {
  flex: 0 0 auto;
  width: 60px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-subtle) 0 8px, transparent 8px 14px);
  margin-top: 26px;
}
@media (max-width: 860px) {
  .steps-row { flex-direction: column; align-items: stretch; }
  .step-connector { display: none; }
  .step-item { flex-direction: row; text-align: left; }
  .step-item p { max-width: none; }
}

/* ==========================================================================
   CONTADOR REGRESIVO
   ========================================================================== */
.countdown-card {
  background: var(--surface-base);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
  border-top: 4px solid var(--color-gold-500);
}
.countdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.countdown-header .icon-wrap {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
}
.countdown-header svg { width: 22px; height: 22px; stroke: var(--color-navy-900); fill: none; stroke-width: 1.6; }
.countdown-header strong { display: block; font-size: var(--fs-md); }
.countdown-header span { font-size: var(--fs-sm); color: var(--text-secondary); }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.countdown-unit {
  background: var(--color-navy-900);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-2);
  text-align: center;
}
.countdown-unit .value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  display: block;
}
.countdown-unit .label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-soft);
}

/* ==========================================================================
   FAQ ACORDEÓN
   ========================================================================== */
.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  color: var(--text-primary);
}
.accordion-trigger svg {
  width: 20px; height: 20px; stroke: var(--color-gold-600); fill: none; stroke-width: 2;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-elegant);
}
.accordion-item.is-open .accordion-trigger svg { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-elegant);
}
.accordion-panel p { padding-bottom: var(--space-5); color: var(--text-secondary); line-height: var(--lh-relaxed); }

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.form-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-primary); }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-primary);
  background: var(--surface-base);
  transition: border-color var(--dur-fast);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--color-gold-500); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: var(--fs-xs); color: var(--text-muted); }
.form-file {
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.form-file:hover { border-color: var(--color-gold-500); background: var(--surface-alt); }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

