/* =========================================================================
   styles.css — Tema personalizado Notaria 235
   Identidad: cian #1DB8E5 sobre blanco y azul casi-negro.
   Construido sobre Bootstrap 5.3. Mobile-first.
   Organizacion:
     1. Variables y base
     2. Tipografia y utilidades
     3. Navbar
     4. Botones
     5. Hero
     6. Secciones (about, servicios, stats, equipo, testimonios, etc.)
     7. Formulario de contacto
     8. Footer + WhatsApp flotante
     9. Animaciones (scroll reveal, microinteracciones)
    10. Responsive
   ========================================================================= */

/* ============================ 1. VARIABLES ============================== */
:root {
  --brand:        #1DB8E5;   /* cian principal (identidad) */
  --brand-600:    #169fc9;   /* cian hover */
  --brand-700:    #1183a8;   /* cian oscuro */
  --brand-soft:   #e8f7fc;   /* cian muy claro (fondos) */

  --ink:          #0e1a24;   /* azul casi-negro (navbar/footer/oscuros) */
  --ink-2:        #14222e;   /* variante un poco mas clara */
  --slate:        #2f3545;   /* titulos */
  --text:         #545d68;   /* texto de cuerpo */
  --muted:        #8a929c;   /* texto tenue */

  --bg-soft:      #f5f9fc;   /* fondo de seccion claro */
  --line:         #e5ecf2;   /* lineas/bordes */
  --white:        #ffffff;

  --shadow-sm:    0 2px 10px rgba(14, 26, 36, .06);
  --shadow-md:    0 12px 30px rgba(14, 26, 36, .10);
  --shadow-lg:    0 24px 60px rgba(14, 26, 36, .16);

  --radius:       16px;
  --radius-sm:    10px;

  --nav-h:        76px;

  /* Sobrescribe el color primario de Bootstrap con la identidad cian */
  --bs-primary:        #1DB8E5;
  --bs-primary-rgb:    29, 184, 229;
  --bs-link-color:     #169fc9;
  --bs-link-hover-color: #1183a8;
  --bs-body-color:     #545d68;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ============================ 2. BASE / TIPO =========================== */
html { scroll-behavior: smooth; }
/* Compensa la navbar fija al saltar a anclas con #id */
:target { scroll-margin-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--bs-body-font-family);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .display-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--slate);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}

p { line-height: 1.7; }

a { text-decoration: none; }

.text-brand   { color: var(--brand) !important; }
.bg-brand     { background-color: var(--brand) !important; }
.bg-ink       { background-color: var(--ink) !important; }
.bg-soft      { background-color: var(--bg-soft) !important; }

/* Pequeño rotulo sobre los titulos de seccion */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brand);
  display: inline-block;
}

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}
.section-lead {
  font-size: 1.075rem;
  color: var(--text);
  max-width: 60ch;
}
.lead-center { margin-left: auto; margin-right: auto; }

/* Linea decorativa bajo titulos centrados */
.title-rule { width: 64px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-700));
  margin: 1.1rem auto 0; }

/* ============================ 3. NAVBAR =============================== */
.navbar.site-nav {
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease, height .3s ease;
}
/* Estado "encogido" al hacer scroll (lo activa main.js) */
.navbar.site-nav.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
}
.navbar.site-nav .navbar-brand img { height: 46px; width: auto; display: block; }
.navbar.site-nav .brand-text {
  font-family: 'Poppins', sans-serif; font-weight: 700; line-height: 1;
  color: var(--slate); font-size: 1.05rem; letter-spacing: -.02em;
}
.navbar.site-nav .brand-text small {
  display: block; font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: .68rem; letter-spacing: .18em; color: var(--brand-600);
  text-transform: uppercase; margin-top: 2px;
}
.navbar.site-nav .nav-link {
  font-weight: 500; color: var(--slate); padding: .5rem .95rem;
  position: relative;
}
.navbar.site-nav .nav-link::after {
  content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .35rem;
  height: 2px; background: var(--brand); transform: scaleX(0);
  transform-origin: left; transition: transform .25s ease;
}
.navbar.site-nav .nav-link:hover,
.navbar.site-nav .nav-link.active { color: var(--brand-700); }
.navbar.site-nav .nav-link:hover::after,
.navbar.site-nav .nav-link.active::after { transform: scaleX(1); }

/* Boton hamburguesa personalizado */
.navbar-toggler { border: 0; padding: .35rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler .bar {
  display: block; width: 26px; height: 2px; background: var(--slate);
  margin: 5px 0; border-radius: 2px; transition: .3s;
}
.navbar-toggler[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-cta { margin-left: .5rem; }

/* ============================ 4. BOTONES ============================= */
.btn { font-weight: 600; border-radius: 999px; padding: .7rem 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:active { transform: translateY(1px); }

.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: #fff; border: none; box-shadow: 0 8px 20px rgba(29, 184, 229, .35);
}
.btn-brand:hover { color: #fff; transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(29, 184, 229, .45); }

.btn-outline-brand { border: 2px solid var(--brand); color: var(--brand-700);
  background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

.btn-ghost-light { border: 2px solid rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }

.btn-lg { padding: .85rem 1.9rem; font-size: 1.02rem; }

/* ============================ 5. HERO ================================ */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
  padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 3rem;
}
/* Capa de imagen con efecto parallax suave (fixed en desktop) */
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: var(--ink) url('../img/hero-recepcion.jpg') center/cover no-repeat;
  background-attachment: fixed;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(120deg, rgba(8,18,26,.92) 0%, rgba(8,18,26,.72) 45%, rgba(17,131,168,.45) 100%);
}
.hero h1 {
  color: #fff; font-size: clamp(2.3rem, 5.6vw, 4.1rem);
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero .hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: rgba(255,255,255,.9);
  max-width: 54ch; }
.hero .badge-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; padding: .45rem 1rem; border-radius: 999px; font-size: .85rem;
  font-weight: 500; backdrop-filter: blur(4px); margin-bottom: 1.5rem;
}
.hero .badge-pill i { color: var(--brand); }
/* Indicador de scroll */
.hero__scroll { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: 1.4rem; animation: bob 1.8s infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ====================== 6. SECCIONES / TARJETAS ====================== */

/* --- About --- */
.about-img-wrap { position: relative; }
/* Imagen recortada a un ratio horizontal constante para que no se estire
   en vertical cuando la foto original es de formato retrato. */
.about-img-wrap img { border-radius: var(--radius); box-shadow: var(--shadow-md);
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.about-img-wrap .accent-box {
  position: absolute; right: -14px; bottom: -14px; z-index: -1;
  width: 60%; height: 60%; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
}
.feature-row { display: flex; gap: 1rem; align-items: flex-start; }
.feature-row .ic {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.4rem; color: var(--brand-700);
  background: var(--brand-soft);
}

/* --- Tarjetas de servicio --- */
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem; height: 100%;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card .ic {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; color: #fff; margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: 0 10px 22px rgba(29,184,229,.3);
}
.service-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.service-card .svc-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.service-card .svc-list li { position: relative; padding-left: 1.5rem; margin-bottom: .45rem;
  color: var(--text); font-size: .95rem; }
.service-card .svc-list li::before {
  content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 1px;
  color: var(--brand); font-size: .85rem;
}

/* Icono cuadrado independiente (p.ej. valores en Nosotros) */
.ic--standalone {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto;
  display: grid; place-items: center; font-size: 1.7rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: 0 10px 22px rgba(29, 184, 229, .3);
}

/* Puntos de navegacion del carrusel de testimonios */
.testi-dot { width: 14px; height: 14px; padding: 0; }

/* --- Banda de estadisticas --- */
.stats-band { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.stats-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 85% -20%, rgba(29,184,229,.28), transparent 60%);
}
.stat { text-align: center; position: relative; }
.stat .num { font-family: 'Poppins', sans-serif; font-weight: 700; color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; }
.stat .num .plus { color: var(--brand); }
.stat .label { color: rgba(255,255,255,.7); margin-top: .5rem; font-size: .95rem; }

/* --- Banda CTA con imagen --- */
.cta-band { position: relative; color: #fff; overflow: hidden; }
.cta-band__bg { position: absolute; inset: 0; z-index: -2;
  background: var(--ink) url('../img/firma-documento.jpg') center/cover no-repeat; }
.cta-band__overlay { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, rgba(8,18,26,.92), rgba(17,131,168,.6)); }

/* --- Galeria de oficinas --- */
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; display: block; }
.gallery-item:hover img { transform: scale(1.06); }

/* --- Equipo --- */
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; height: 100%;
  transition: transform .3s ease, box-shadow .3s ease; }
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.avatar {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto .9rem;
  display: grid; place-items: center; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: 0 8px 18px rgba(29,184,229,.3);
}
.team-card.is-lead .avatar { width: 92px; height: 92px; font-size: 1.8rem; }
.team-card h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.team-card .cargo { color: var(--brand-700); font-weight: 600; font-size: .85rem; }
.team-card .mail { color: var(--muted); font-size: .82rem; word-break: break-all; }
.team-card .mail:hover { color: var(--brand-700); }

/* --- Testimonios --- */
.testi-band { background: var(--bg-soft); }
.testi-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 2.4rem; max-width: 760px; margin: 0 auto; text-align: center; }
.testi-card .quote-ic { font-size: 2.2rem; color: var(--brand); opacity: .9; }
.testi-card blockquote { font-size: 1.2rem; color: var(--slate); line-height: 1.6;
  margin: 1rem 0 1.5rem; font-weight: 500; }
.testi-card .who { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--slate); }
.testi-card .who small { display: block; color: var(--brand-700); font-weight: 500; }

/* --- Formatos descargables --- */
.formato-card { display: flex; align-items: center; gap: 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; height: 100%; }
.formato-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.formato-card .ic { font-size: 1.8rem; color: var(--brand-700); }
.formato-card .t { font-weight: 600; color: var(--slate); font-size: .98rem; }
.formato-card .s { font-size: .8rem; color: var(--muted); }

/* --- Aviso importante (anti-fraude) --- */
.aviso-box { border-left: 4px solid #e0a800; background: #fff8e6; border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem; color: #6b5300; }

/* Pagina interior: encabezado --- */
.page-head { position: relative; color: #fff; padding: calc(var(--nav-h) + 3rem) 0 3rem;
  background: var(--ink); overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 80% -30%, rgba(29,184,229,.35), transparent 60%); }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); position: relative; }
.page-head .crumbs { position: relative; color: rgba(255,255,255,.7); font-size: .9rem; }
.page-head .crumbs a { color: rgba(255,255,255,.85); }
.page-head .crumbs a:hover { color: var(--brand); }

/* ====================== 7. FORMULARIO ============================== */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.6rem); }
.form-control { border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  padding: .8rem 1rem; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(29,184,229,.18); }
.form-label { font-weight: 600; color: var(--slate); font-size: .92rem; }
/* Honeypot: campo trampa oculto para bots */
.hp-field { position: absolute !important; left: -5000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-feedback { display: none; border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-top: 1rem; font-weight: 500; }
.form-feedback.ok  { display: block; background: #e6f7ed; color: #146c43; border: 1px solid #a3e0bd; }
.form-feedback.err { display: block; background: #fdecec; color: #b02a37; border: 1px solid #f1aeb5; }

.contact-info-card { background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.4rem); height: 100%; }
.contact-info-card .ci-row { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1); }
.contact-info-card .ci-row:last-child { border-bottom: 0; }
.contact-info-card .ci-row i { color: var(--brand); font-size: 1.25rem; margin-top: 2px; }
.contact-info-card a { color: rgba(255,255,255,.85); }
.contact-info-card a:hover { color: var(--brand); }

.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); line-height: 0; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; }

/* ====================== 8. FOOTER + WHATSAPP ======================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 4rem 0 0; }
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; letter-spacing: .02em; }
.site-footer a { color: rgba(255,255,255,.72); transition: color .2s ease; }
.site-footer a:hover { color: var(--brand); }
.site-footer .foot-logo { height: 64px; width: auto; margin-bottom: 1rem; }
.site-footer .foot-list { list-style: none; padding: 0; margin: 0; }
.site-footer .foot-list li { margin-bottom: .55rem; display: flex; gap: .6rem; align-items: flex-start; }
.site-footer .foot-list i { color: var(--brand); margin-top: 3px; }
.site-footer .social a {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; margin-right: .5rem; transition: .25s;
}
.site-footer .social a:hover { background: var(--brand); transform: translateY(-3px); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding: 1.3rem 0;
  font-size: .85rem; }
/* Atribucion Webzi: logo negro invertido a blanco sobre fondo oscuro */
.webzi-credit { display: inline-flex; align-items: center; gap: .45rem; color: rgba(255,255,255,.7); }
.webzi-credit:hover { color: #fff; }
.webzi-credit img { height: 18px; width: auto; filter: brightness(0) invert(1); opacity: .9; }

/* Boton flotante de WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 1040;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; font-size: 1.9rem; box-shadow: 0 10px 26px rgba(37,211,102,.5);
  transition: transform .25s ease; animation: wa-pulse 2.4s infinite; }
.wa-float:hover { color: #fff; transform: scale(1.08); }
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5);} 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0);} }

/* Boton volver arriba */
.to-top { position: fixed; right: 20px; bottom: 88px; z-index: 1039;
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--slate); color: #fff; font-size: 1.2rem; opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; transform: translateY(10px); }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--brand-700); }

/* ====================== 9. ANIMACIONES ============================= */
/* Scroll reveal: elementos con [data-reveal] aparecen al entrar en viewport */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .1s; }
[data-reveal][data-delay="2"] { transition-delay: .2s; }
[data-reveal][data-delay="3"] { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ====================== 10. RESPONSIVE ============================= */
@media (max-width: 991.98px) {
  /* Menu colapsado: panel claro */
  .navbar.site-nav .navbar-collapse {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    margin-top: .6rem; padding: 1rem; box-shadow: var(--shadow-md);
  }
  .navbar.site-nav .nav-link::after { display: none; }
  .nav-cta { margin: .6rem 0 0; }
  /* El parallax fijo se desactiva en moviles (mejor rendimiento y evita saltos) */
  .hero__bg, .cta-band__bg { background-attachment: scroll; }
  .hero { min-height: 78vh; text-align: center; }
  .hero .badge-pill { margin-left: auto; margin-right: auto; }
  .hero .hero-sub { margin-left: auto; margin-right: auto; }
  .about-img-wrap { margin-bottom: 2.5rem; }
}
@media (max-width: 575.98px) {
  .testi-card { padding: 1.6rem; }
  .wa-float { width: 52px; height: 52px; font-size: 1.7rem; }
}
