/* ═══════════════════════════════════════════════════════════════
   styles.css — Ejemplo · Recuperación Financiera
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --navy:   #0f2744;
  --navy2:  #1a3a5c;
  --coral:  #e8402a;
  --coral2: #c93520;
  --sky:    #e8f1fb;
  --light:  #f7f9fc;
  --white:  #ffffff;
  --dark:   #111827;
  --muted:  #6b7280;
  --border: #e5e9f0;
}

/* ── Dark mode ──────────────────────────────────────────────────── */
[data-theme="dark"] {
  --sky:    #1e293b;
  --light:  #0f172a;
  --white:  #1e293b;
  --dark:   #e2e8f0;
  --muted:  #94a3b8;
  --border: #334155;
}
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] header,
[data-theme="dark"] #mobile-menu { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .bg-white { background: #1e293b !important; }
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400,
[data-theme="dark"] .text-gray-700 { color: #94a3b8 !important; }
[data-theme="dark"] .text-navy { color: #7db8f7 !important; }
[data-theme="dark"] .border-t,
[data-theme="dark"] .border-b,
[data-theme="dark"] .border-gray-100 { border-color: #334155 !important; }
[data-theme="dark"] .form-input { background: #0f172a !important; color: #e2e8f0 !important; border-color: #334155 !important; }
[data-theme="dark"] .form-input:focus { background: #1e293b !important; }
[data-theme="dark"] .form-label { color: #cbd5e1 !important; }
[data-theme="dark"] .hero-badge { background: #1e293b !important; color: #7db8f7 !important; border-color: #334155 !important; }
[data-theme="dark"] .btn-outline { border-color: #475569; color: #e2e8f0; }
[data-theme="dark"] .btn-outline:hover { border-color: #7db8f7; color: #7db8f7; }
[data-theme="dark"] #theme-toggle { border-color: #475569 !important; color: #e2e8f0 !important; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #1e293b; }

/* ── Reset & base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body  { -webkit-font-smoothing: antialiased; background: var(--white); color: var(--dark); overflow-x: hidden; max-width: 100%; }
section { scroll-margin-top: 76px; }

/* ── Logo ───────────────────────────────────────────────────────── */
.logo-mark { display: inline-flex; align-items: center; text-decoration: none; }
.logo-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--navy);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  box-shadow: 0 2px 12px rgba(15,39,68,0.18);
  max-width: 100%;
}
.logo-brand img {
  border-radius: 50%;
  width: 38px; height: 38px;
  flex-shrink: 0;
}
.logo-brand .logo-name {
  color: white;
  padding-left: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
}
.logo-brand .logo-name small {
  color: rgba(255,255,255,0.6);
  font-size: 0.52rem;
}
.logo-box  {
  width: 40px; height: 40px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; flex-shrink: 0;
}
.logo-box span       { color: white; font-weight: 900; font-size: 1rem; letter-spacing: -0.05em; }
.logo-box span em    { color: #7db8f7; font-style: normal; }
.logo-name           { font-weight: 700; font-size: 1rem; color: var(--navy); letter-spacing: 0.18em; text-transform: uppercase; font-family: 'Arial', sans-serif; }
.logo-name small     { display: block; font-size: 0.6rem; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--coral); color: white;
  font-weight: 700; font-size: 0.9rem;
  padding: 13px 28px; border-radius: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: 0.01em; border: none; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 14px rgba(232, 64, 42, 0.3);
}
.btn-primary:hover    { background: var(--coral2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232, 64, 42, 0.4); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  background: transparent; color: var(--navy);
  font-weight: 600; font-size: 0.9rem;
  padding: 12px 28px; border-radius: 8px;
  border: 2px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero-bg {
  position: relative;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,20,40,0.30) 0%, rgba(10,20,40,0.55) 100%);
  z-index: 0;
}
.hero-bg > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 0.75rem; font-weight: 600; color: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--coral);
  animation: blink 2s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Stats strip ────────────────────────────────────────────────── */
.stats-strip { background: var(--navy); }
.stat-item   { text-align: center; padding: 20px 24px; }
.stat-item .num { font-size: 1.8rem; font-weight: 900; color: white; line-height: 1; }
.stat-item .lbl { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Section tag ────────────────────────────────────────────────── */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--coral); margin-bottom: 12px;
}
.section-tag::before { content: ''; width: 20px; height: 2px; background: var(--coral); border-radius: 1px; }

/* ── Situation cards ────────────────────────────────────────────── */
.sit-card {
  background: white; border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.sit-card:hover { border-color: #b8cde8; box-shadow: 0 8px 32px rgba(15,39,68,0.08); transform: translateY(-3px); }

.sit-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--sky); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

/* ── Form panel ─────────────────────────────────────────────────── */
.form-panel {
  background: white; border-radius: 20px; padding: 36px;
  box-shadow: 0 20px 60px rgba(15,39,68,0.1); border: 1px solid var(--border);
}

.form-label {
  display: block; font-size: 0.75rem; font-weight: 600; color: #374151;
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-label span { color: var(--coral); }

.form-input {
  width: 100%; background: var(--light); border: 1.5px solid var(--border);
  color: var(--dark); border-radius: 8px; padding: 11px 14px;
  font-size: 0.875rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none; -webkit-appearance: none;
}
.form-input::placeholder { color: #b0b8c4; }
.form-input:focus        { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15,39,68,0.1); background: white; }
.form-input.field-error  { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,64,42,0.12); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 36px; cursor: pointer;
}

.phone-wrap   { position: relative; }
.phone-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: #888; pointer-events: none; white-space: nowrap; z-index: 1; }
.phone-input  { padding-left: 70px !important; }

/* ── Trust items ────────────────────────────────────────────────── */
.trust-item { display: flex; align-items: flex-start; gap: 12px; }
.trust-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--sky); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }

/* ── Process timeline ───────────────────────────────────────────── */
.timeline-dot  {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: white; font-weight: 900; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 8px var(--sky);
}
.timeline-card {
  background: white; border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 28px; flex: 1; margin-left: 20px;
}

/* ── FAQ ────────────────────────────────────────────────────────── */
.faq-item  { border-bottom: 1px solid var(--border); }
.faq-btn   { cursor: pointer; background: none; border: none; padding: 0; width: 100%; }
.faq-arrow { transition: transform 0.25s ease; color: var(--muted); }
.faq-arrow.open { transform: rotate(180deg); color: var(--coral); }

/* ── CTA Banner ─────────────────────────────────────────────────── */
.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); }

/* ── Scroll reveal animations ───────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0; transform: translateX(-50px);
  transition: opacity 0.75s cubic-bezier(.22,1,.36,1), transform 0.75s cubic-bezier(.22,1,.36,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0; transform: translateX(50px);
  transition: opacity 0.75s cubic-bezier(.22,1,.36,1), transform 0.75s cubic-bezier(.22,1,.36,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.d1 { transition-delay: 0.1s;  }
.d2 { transition-delay: 0.15s; }
.d3 { transition-delay: 0.2s;  }
.d4 { transition-delay: 0.25s; }
.d5 { transition-delay: 0.3s;  }
.d6 { transition-delay: 0.35s; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
}

/* ── Back to top ────────────────────────────────────────────────── */
#back-to-top { transition: opacity 0.3s, visibility 0.3s; }
#back-to-top.show { opacity: 1 !important; visibility: visible !important; }

/* ── WhatsApp floating button ───────────────────────────────────── */
#whatsapp-float {
  position: fixed; bottom: 24px; right: 80px;
  width: 52px; height: 52px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  z-index: 40; text-decoration: none;
  transition: transform 0.2s;
  animation: wapulse 2.5s infinite;
}
#whatsapp-float:hover { transform: scale(1.1); }
@keyframes wapulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.75); }
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 3px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-panel { padding: 20px; }
}
