/* ============================================================
   IVAN PRIETO SEGUROS — SISTEMA DE DISEÑO
   ============================================================ */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700&f[]=cabinet-grotesk@400,500,700,800&display=swap');

:root {
  --font-display: 'Cabinet Grotesk', 'Montserrat', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  --rojo: #c92032;
  --rojo-hover: #a31a28;
  --rojo-dark: #8b1520;
  --rojo-subtle: rgba(201,32,50,0.06);
  --rojo-border: rgba(201,32,50,0.15);

  --bg: #fafaf9;
  --bg-white: #ffffff;
  --bg-warm: #f7f5f2;
  --bg-dark: #0f0e0d;
  --bg-dark-surface: #1a1917;

  --text-1: #1a1917;
  --text-2: #4a4845;
  --text-3: #8a8785;
  --text-inv: #f5f4f2;

  --border-soft: rgba(0,0,0,0.07);
  --border-med: rgba(0,0,0,0.12);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  --sh-sm: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --sh-md: 0 4px 16px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.03);
  --sh-lg: 0 16px 40px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);

  --max-w: 1140px;
  --nav-h: 68px;
}

/* ============================================================ BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; scroll-padding-top: var(--nav-h); }
body { font-family: var(--font-body); color: var(--text-1); line-height: 1.6; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
p { color: var(--text-2); }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; color: var(--text-1); text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -0.03em; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin-bottom: 0.65rem; font-weight: 600; }
ul { list-style: none; }

/* ============================================================ LAYOUT */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-warm); }
.section-white { background: var(--bg-white); }

/* ============================================================ HEADER */
.topbar {
  position: sticky; top: 0; height: var(--nav-h);
  background: rgba(250,250,249,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
  z-index: 200;
  display: flex; align-items: center;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
}
.logo {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--rojo);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  flex-shrink: 0; white-space: nowrap;
}
.logo-icon { width: 44px; height: 44px; object-fit: contain; }
.logo-text { line-height: 1.1; }
.logo-text small { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.menu { display: flex; align-items: center; gap: 0.25rem; }
.menu a {
  padding: 0.45rem 0.75rem; text-decoration: none; color: var(--text-2);
  font-size: 0.9rem; font-weight: 500; border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.menu a:hover { color: var(--rojo); background: var(--rojo-subtle); }
.menu a.active { color: var(--rojo); font-weight: 600; }
.menu-cta {
  background: var(--rojo) !important; color: white !important;
  font-weight: 600 !important; border-radius: var(--r-full) !important;
  padding: 0.5rem 1.25rem !important; margin-left: 0.5rem;
}
.menu-cta:hover { background: var(--rojo-hover) !important; transform: translateY(-1px); }

.nav-toggle { display: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--text-1); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================ BOTONES */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.5rem; border-radius: var(--r-full);
  background: var(--rojo); color: white; text-decoration: none;
  border: 2px solid var(--rojo); font-weight: 600; font-size: 0.9375rem;
  transition: all 0.22s cubic-bezier(0.16,1,0.3,1); cursor: pointer; font-family: var(--font-body);
}
.btn:hover { background: var(--rojo-hover); border-color: var(--rojo-hover); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,32,50,0.25); }
.btn-ghost { background: transparent; color: var(--rojo); }
.btn-ghost:hover { background: var(--rojo); color: white; }
.btn-white { background: white; color: var(--rojo); border-color: white; }
.btn-white:hover { background: transparent; color: white; border-color: white; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }

/* ============================================================ HERO */
.hero { background: var(--bg-warm); padding: 4.5rem 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: 4rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--rojo); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.25rem;
}
.hero-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--rojo); display: inline-block; }
.hero-lead { font-size: 1.1rem; color: var(--text-2); font-weight: 500; margin-bottom: 1rem; max-width: 560px; line-height: 1.55; }
.hero-desc { font-size: 1rem; color: var(--text-2); max-width: 540px; line-height: 1.7; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.trust-card {
  background: white; border: 1px solid var(--border-soft); border-radius: var(--r-xl);
  padding: 2rem 1.75rem; box-shadow: var(--sh-md);
}
.trust-list { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.5rem; }
.trust-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.9375rem; color: var(--text-1); font-weight: 500; line-height: 1.45;
}
.trust-list li::before {
  content: ""; flex-shrink: 0; margin-top: 0.45rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--rojo-subtle); border: 1.5px solid var(--rojo-border);
  display: flex; align-items: center; justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%23c92032' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.trust-divider { height: 1px; background: var(--border-soft); margin: 1.25rem 0; }
.trust-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.trust-chip {
  background: var(--bg-warm); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: 0.6rem 0.85rem;
  font-size: 0.84rem; font-weight: 500; color: var(--text-2); text-align: center;
}

/* ============================================================ FRANJA */
.franja {
  background: var(--rojo); color: white;
  padding: 3rem 1.5rem; text-align: center;
}
.franja p { color: white; font-size: 1.15rem; font-weight: 600; max-width: 720px; margin: 0 auto 1.5rem; line-height: 1.55; }

/* ============================================================ STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-top: 2.5rem; }
.step-card {
  background: white; border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  padding: 2rem 1.5rem; box-shadow: var(--sh-sm);
  display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--rojo); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 1.1rem; flex-shrink: 0;
}
.step-card h3 { margin-bottom: 0.5rem; }

/* ============================================================ SEGUROS */
.seguros-grid-main { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; margin-top: 2.5rem; }
.seguros-grid-sec { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; margin-top: 1.5rem; }
.seg-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin-top: 3rem; margin-bottom: 0.5rem; }
.seguro-card {
  background: white; border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  padding: 2rem; box-shadow: var(--sh-sm); display: flex; flex-direction: column;
  transition: all 0.28s cubic-bezier(0.16,1,0.3,1);
}
.seguro-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--rojo-border); }
.seg-icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--rojo-subtle); border: 1px solid var(--rojo-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--rojo); margin-bottom: 1.1rem;
  transition: all 0.28s cubic-bezier(0.16,1,0.3,1);
}
.seguro-card:hover .seg-icon { transform: scale(1.07); background: rgba(201,32,50,0.1); }
.seg-icon svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.seguro-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.seguro-card p { font-size: 0.93rem; line-height: 1.65; flex-grow: 1; margin-bottom: 1.25rem; }

/* ============================================================ FINANZAS HIGHLIGHT */
.finanzas-hero {
  background: var(--bg-dark);
  border-radius: var(--r-xl); padding: 3.5rem;
  color: white; margin-top: 2.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.finanzas-hero h3 { color: white; font-size: 1.75rem; margin-bottom: 0.75rem; }
.finanzas-hero p { color: rgba(255,255,255,0.7); line-height: 1.65; margin-bottom: 1.5rem; }
.fin-features { display: flex; flex-direction: column; gap: 0.75rem; }
.fin-feature {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9rem; color: rgba(255,255,255,0.85); font-weight: 500;
}
.fin-feature::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: rgba(201,32,50,0.25); border: 1px solid rgba(201,32,50,0.4);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%23f87171' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.fin-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fin-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg); padding: 1.5rem;
}
.fin-card .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.45); font-weight: 600; margin-bottom: 0.5rem; }
.fin-card h4 { color: white; font-size: 1rem; margin-bottom: 0.4rem; }
.fin-card p { color: rgba(255,255,255,0.6); font-size: 0.85rem; line-height: 1.5; margin: 0; }

/* ============================================================ SOBRE MI */
.sobre-grid { display: grid; grid-template-columns: 240px 1fr; gap: 4rem; align-items: start; margin-top: 2.5rem; }
.sobre-foto-wrap { position: relative; }
.sobre-foto-img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; object-position: center 35%; box-shadow: var(--sh-lg); border: 3px solid white; }
.sobre-badge {
  position: absolute; bottom: 0; right: -10px;
  background: var(--rojo); color: white;
  border-radius: var(--r-full); padding: 0.4rem 0.85rem;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  box-shadow: var(--sh-sm); border: 2px solid white;
}
.sobre-texto p { margin-bottom: 1rem; line-height: 1.75; }
.sobre-lista { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.sobre-lista li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; font-weight: 500; color: var(--text-1);
}
.sobre-lista li::before { content: "✓"; color: var(--rojo); font-weight: 700; }

/* ============================================================ VALORES */
.valores-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 2.5rem; }
.valor-card {
  background: white; border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  padding: 2rem; box-shadow: var(--sh-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}
.valor-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.valor-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--rojo); opacity: 0.15; line-height: 1; margin-bottom: 0.75rem; }
.valor-card h3 { margin-bottom: 0.5rem; }

/* ============================================================ FAQ */
.faq-list { margin-top: 2.5rem; }
.faq-item {
  border-bottom: 1px solid var(--border-soft); padding: 1.5rem 0;
  cursor: pointer;
}
.faq-item:first-child { border-top: 1px solid var(--border-soft); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--text-1); gap: 1rem;
}
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--rojo); transition: transform 0.3s; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { font-size: 0.9375rem; color: var(--text-2); line-height: 1.7; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; }
.faq-item.open .faq-a { max-height: 300px; padding-top: 0.85rem; }

/* ============================================================ CONTACTO */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: stretch; margin-top: 2.5rem; }
.contact-info { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem;
    height: 100%;
}
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--rojo-subtle); border: 1px solid var(--rojo-border); display: flex; align-items: center; justify-content: center; color: var(--rojo); flex-shrink: 0; }
.contact-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contact-item strong { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.contact-item a { color: var(--text-2); text-decoration: none; font-size: 0.9rem; }
.contact-item a:hover { color: var(--rojo); }
.contact-divider { height: 1px; background: var(--border-soft); }
.trust-mini { display: flex; flex-direction: column; gap: 0.75rem; }
.trust-mini-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.trust-mini-item strong { font-size: 0.875rem; font-weight: 600; display: block; }
.trust-mini-item span { font-size: 0.825rem; color: var(--text-3); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-med); border-radius: var(--r-md);
  font-size: 0.9375rem; font-family: var(--font-body); background: white;
  color: var(--text-1); transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(201,32,50,0.08);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form select { cursor: pointer; }

/* ============================================================ FOOTER */
.footer { background: var(--bg-dark); color: #aaa; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .logo { color: white; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.65; max-width: 260px; }
.footer-col h4 { color: white; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.875rem; color: #888; text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.8rem; color: #666; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 0.8rem; color: #555; text-decoration: none; }
.footer-legal a:hover { color: #aaa; }

/* ============================================================ WHATSAPP FLOAT */
.wa-float {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.5); }
.wa-float img { width: 32px; height: 32px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .finanzas-hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps-grid { grid-template-columns: repeat(2,1fr); }
  .seguros-grid-main { grid-template-columns: 1fr; }
  .seguros-grid-sec { grid-template-columns: repeat(2,1fr); }
  .sobre-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sobre-foto-wrap { display: flex; justify-content: center; }
  .valores-grid { grid-template-columns: 1fr; }
  .contacto-grid { grid-template-columns: 1fr; }
  .nav-burger { display: flex; }
  @media (max-width: 900px) {
  .menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(250,250,249,0.97); backdrop-filter: blur(16px);
    flex-direction: column; padding: 1.5rem; gap: 0.25rem;
    border-bottom: 1px solid var(--border-soft); box-shadow: var(--sh-md);
    transform: translateY(-110%); transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
    z-index: 199;
    /* ✅ AÑADIR ESTAS DOS LÍNEAS: */
    visibility: hidden;
    pointer-events: none;
  }
  .nav-toggle:checked ~ .menu {
    transform: translateY(0);
    /* ✅ AÑADIR ESTAS DOS LÍNEAS: */
    visibility: visible;
    pointer-events: auto;
  }
}
  .menu a { font-size: 1rem; padding: 0.75rem 1rem; }
  .menu-cta { text-align: center; margin-left: 0 !important; margin-top: 0.5rem; }
  @media (max-width: 900px) {
  body::before {
    content: "";
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 198;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-toggle:checked ~ * body::before,
  /* alternativa: usar JS para añadir clase al body */
}
}
@media (max-width: 600px) {
  .hero { padding: 3rem 0 3.5rem; }
  h1 { font-size: 2.2rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .seguros-grid-sec { grid-template-columns: 1fr; }
  .fin-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-chips { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .sobre-lista { grid-template-columns: 1fr; }
}
.btn-wa-contact {
    margin-top: auto;
}