/* ==========================================================================
   RMF ASESOR DE SEGUROS — HOJA DE ESTILOS
   Sistema de diseño: confianza, seguridad y profesionalismo (azules/blancos/grises)
   ========================================================================== */

/* ---------- 1. RESET BÁSICO ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 2. TOKENS DE DISEÑO (variables CSS) ---------- */
:root {
  /* Paleta: navy profundo (autoridad) + azul confianza + acento celeste */
  --navy: #0A2A43;
  --navy-800: #0E3555;
  --blue: #14588A;
  --blue-light: #2D9CDB;
  --sky-50: #EAF3FA;
  --white: #FFFFFF;
  --gray-100: #F4F6F8;
  --gray-300: #DCE3E8;
  --gray-600: #5B6670;
  --gray-900: #1E252B;

  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;

  /* Tipografía */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --container-w: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(10, 42, 67, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 42, 67, 0.12);
  --transition: 0.25s ease;
}

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 3. UTILIDADES / TEXTO ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 12px;
}
.eyebrow--light { color: #8FD1F0; }

.section { padding: 100px 0; }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head.light { max-width: 700px; }
.section__title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}
.section__title--light { color: var(--white); }
.section__subtitle { color: var(--gray-600); font-size: 1.05rem; }

/* ---------- 4. BARRA DE COBERTURA (scroll progress) ---------- */
.coverage-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-light), var(--navy));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ---------- 5. BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--lg { padding: 16px 32px; font-size: 1rem; }

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}
.btn--whatsapp:hover { background: var(--whatsapp-dark); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-300);
}
.btn--ghost:hover { border-color: var(--blue-light); background: var(--sky-50); }

.btn--primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--blue); box-shadow: var(--shadow-md); }
.btn--block { width: 100%; justify-content: center; }

.btn--nav { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- 6. HEADER / NAV ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-300);
  transition: box-shadow var(--transition);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
}
.nav__logo span { font-weight: 400; color: var(--gray-600); }
.nav__logo-icon {
  display: inline-flex;
  color: var(--blue-light);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-900);
  position: relative;
  padding: 6px 0;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--blue-light);
  transition: width var(--transition);
}
.nav__link:hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1200;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- 7. HERO ---------- */
.hero {
  position: relative;
  padding: 160px 0 100px;
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 100%);
  overflow: hidden;
}

/* Patrón hexagonal de fondo — motivo visual de "cobertura/escudo" */
.hero__hexgrid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(45, 156, 219, 0.10) 0, transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(10, 42, 67, 0.08) 0, transparent 40%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero__title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
}
.hero__title span { color: var(--blue-light); }

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.hero__badges li {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding-left: 20px;
}
.hero__badges li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-light);
}

.hero__illustration { width: 100%; height: auto; animation: float 6s ease-in-out infinite; }

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

/* ---------- 8. SOBRE MÍ ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: center;
}

.about__media { position: relative; }
.about__photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 6px solid var(--white);
}
.about__photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}
.about__stat {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--navy);
  color: var(--white);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.about__stat strong { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.about__stat span { font-size: 0.75rem; color: var(--sky-50); }

.about__text { color: var(--gray-600); margin-bottom: 16px; max-width: 560px; }

.about__values { margin-top: 24px; display: grid; gap: 12px; }
.about__values li {
  padding-left: 18px;
  border-left: 3px solid var(--blue-light);
  color: var(--gray-600);
}
.about__values strong { color: var(--navy); }

/* ---------- 9. SERVICIOS ---------- */
.services { background: var(--gray-100); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* La 5ta tarjeta ocupa proporción especial en pantallas grandes para evitar hueco impar */
.services__grid .service-card:nth-child(4) { grid-column: span 1; }

.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--gray-300);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* Icono con marco en forma de escudo/hexágono — elemento de identidad visual */
.service-card__icon {
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  background: var(--sky-50);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  margin-bottom: 20px;
  transition: background var(--transition), color var(--transition);
}
.service-card:hover .service-card__icon { background: var(--navy); color: var(--white); }

.service-card h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; }
.service-card p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 18px; }
.service-card__link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue);
  display: inline-block;
  transition: gap var(--transition), color var(--transition);
}
.service-card__link:hover { color: var(--navy); }

/* ---------- 10. POR QUÉ ELEGIRME ---------- */
.why {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 100%);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.why__item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: background var(--transition), transform var(--transition);
}
.why__item:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-6px); }

.why__icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(45, 156, 219, 0.18);
  color: var(--blue-light);
  margin-bottom: 18px;
}

.why__item h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 8px; }
.why__item p { color: #B9CBDA; font-size: 0.92rem; }

/* ---------- 11. CONTACTO ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.contact__info { margin-top: 28px; display: grid; gap: 16px; }
.contact__info li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-600);
  font-weight: 500;
}
.contact__info svg { color: var(--blue); flex-shrink: 0; }

.contact__form {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  gap: 20px;
}

.form__row { display: grid; gap: 8px; }
.form__row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form__row--split > div { display: grid; gap: 8px; }

label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }

input, select, textarea {
  padding: 13px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(45, 156, 219, 0.15);
}
textarea { resize: vertical; min-height: 100px; }

input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: #E24C4B;
}
.form__error {
  font-size: 0.8rem;
  color: #E24C4B;
  min-height: 1em;
}

.form__success {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--whatsapp-dark);
  text-align: center;
}

/* ---------- 12. FOOTER ---------- */
.footer { background: var(--navy); color: var(--sky-50); padding-top: 72px; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav__logo--footer { color: var(--white); margin-bottom: 14px; }
.nav__logo--footer span { color: #9FC0D8; }

.footer__brand p { color: #9FC0D8; font-size: 0.92rem; max-width: 320px; margin-bottom: 20px; }

.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: background var(--transition), transform var(--transition);
}
.footer__social a:hover { background: var(--blue-light); transform: translateY(-3px); }

.footer__col h4 { font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 18px; color: var(--white); }
.footer__col ul { display: grid; gap: 12px; }
.footer__col li, .footer__col a { color: #9FC0D8; font-size: 0.92rem; }
.footer__col a:hover { color: var(--white); }

.footer__legal { padding: 24px; text-align: center; }
.footer__legal p { font-size: 0.85rem; color: #7FA0BC; margin-bottom: 8px; }
.footer__legal-text { max-width: 760px; margin: 0 auto; line-height: 1.5; }

/* ---------- 13. BOTÓN FLOTANTE DE WHATSAPP ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 60px; height: 60px;
  background: var(--whatsapp);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 900;
  animation: pulse 2.4s infinite;
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- 14. ANIMACIONES AL HACER SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 992px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 340px; margin: 0 auto 20px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 340px; margin: 0 auto; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }

  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78%, 320px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; }
  .btn--nav { width: 100%; justify-content: center; }

  .services__grid { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .form__row--split { grid-template-columns: 1fr; }
  .contact__form { padding: 28px; }
  .about__stat { position: static; margin-top: 16px; display: inline-block; }
}
