/* =============================================================
   JURÍDICO VIRTUAL — REDISEÑO V3
   Alto contraste, composición editorial y movimiento sobrio.
   ============================================================= */

:root {
  --azul: #16384a;
  --azul-light: #24566a;
  --azul-dark: #0b222f;
  --dorado: #a86f45;
  --dorado-light: #d9b99e;
  --crema: #f2f3ef;
  --blanco: #ffffff;
  --gris: #55646b;
  --gris-claro: #d9e0df;
  --surface: #f7f8f5;
  --line: #d6dfdd;
  --ink: #0d2531;
  --muted: #596970;
  --accent: #a86f45;
  --accent-dark: #895735;
  --accent-soft: #f2e8e0;
  --sea: #2f706e;
  --sea-soft: #e2efed;
  --shadow-sm: 0 10px 28px rgba(10,34,45,.07);
  --shadow-md: 0 28px 75px rgba(10,34,45,.13);
}

body { background: var(--surface); color: var(--ink); }
.container { width: min(1200px, calc(100% - 52px)); }

/* Navegación: plana, nítida y sin sombreado */
#main-header,
#main-header.scrolled {
  background: rgba(250,251,249,.97);
  border-bottom: 1px solid #d8dfdd;
  box-shadow: none !important;
}
.navbar { min-height: 84px; padding-block: 13px; }
.logo::before { background: var(--azul-dark); border-radius: 10px; }
.logo::after { color: var(--azul-dark); }
.nav-links li { position: relative; }
.nav-links li a,
.nav-links li a:hover,
.nav-links li a.active {
  position: relative;
  background: transparent !important;
  box-shadow: none !important;
  color: #3e525b;
}
.nav-links li a:hover { color: var(--azul-dark); }
.nav-links li a.active { color: var(--azul-dark); }
.nav-links li a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .28s ease;
}
.nav-links li a:hover::after,
.nav-links li a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links li a.nav-cta,
.nav-links li a.nav-cta:hover {
  background: var(--azul-dark) !important;
  color: white;
  border: 1px solid var(--azul-dark);
}
.nav-links li a.nav-cta:hover { background: var(--accent-dark) !important; border-color: var(--accent-dark); }

/* Tipografía y acciones */
.section-title, .hero-title, .page-hero h1 { color: var(--azul-dark); }
.section-title em, .hero-title em, .login-info h2 em { color: var(--accent); }
.section-eyebrow { color: var(--accent-dark); }
.btn-primary { background: var(--azul-dark); border-color: var(--azul-dark); color: white; box-shadow: none; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 12px 30px rgba(137,87,53,.19); }
.btn-outline { border-color: #9eafb1; background: transparent; color: var(--azul-dark); }
.btn-outline:hover { border-color: var(--azul-dark); background: white; }

/* Hero: reemplaza por completo el cuadro azul */
.hero {
  min-height: 790px;
  padding: 148px 0 82px;
  background: #f6f7f3;
}
.hero-overlay {
  background:
    radial-gradient(circle at 83% 28%, rgba(168,111,69,.13), transparent 25%),
    radial-gradient(circle at 74% 68%, rgba(47,112,110,.13), transparent 28%),
    linear-gradient(rgba(11,34,47,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,34,47,.03) 1px, transparent 1px);
  background-size: auto, auto, 58px 58px, 58px 58px;
}
.hero-inner { grid-template-columns: minmax(0,1.05fr) minmax(390px,.8fr); gap: clamp(60px,8vw,112px); }
.hero-eyebrow { border-color: #c8d2cf; background: rgba(255,255,255,.72); color: var(--sea); }
.hero-eyebrow::before { background: var(--accent); }
.hero-title { font-size: clamp(3.65rem,6.25vw,6rem); }
.hero-subtitle { color: #4f626a; }
.hero-stats { border-top-color: #cfd8d6; }
.stat-number, .stat-plus { color: var(--azul-dark); }
.hero-img-frame {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.hero-img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid #cbd7d4;
  border-radius: 32px 8px 32px 8px;
  background: linear-gradient(145deg,#eef2ef,#dfe9e6);
  box-shadow: none;
}
.hero-img-wrap::before {
  content: '';
  position: absolute;
  width: 310px;
  height: 310px;
  right: -110px;
  top: -100px;
  border-radius: 50%;
  background: rgba(168,111,69,.16);
}
.hero-img-wrap::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  left: -100px;
  bottom: -85px;
  border-radius: 50%;
  background: rgba(47,112,110,.13);
}
.hero-identity-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(32px,5vw,58px);
}
.hero-art-kicker {
  color: var(--accent-dark);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-art-mark {
  margin: auto 0 0;
  color: var(--azul-dark);
  font-size: clamp(6.5rem,13vw,10rem);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.09em;
}
.hero-art-line {
  width: 100%;
  height: 1px;
  margin: 33px 0 22px;
  background: linear-gradient(90deg,var(--accent),rgba(168,111,69,0));
}
.hero-art-caption { color: var(--azul-dark); font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.hero-art-location { margin-top: 7px; color: #66777d; font-size: .58rem; font-weight: 800; letter-spacing: .14em; }
.hero-badge {
  left: -26px;
  bottom: 28px;
  border: 1px solid #cbd7d4;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(10,34,45,.09);
}
.hero-badge i { color: var(--sea); }

/* Secciones y tarjetas con contraste reforzado */
.noticias-section { background: #edf1ef; }
.servicios-section, .about-section { background: #fbfcfa; }
.servicio-card, .news-card, .sitio-card {
  border-color: #d1dcda;
  background: #fff;
}
.servicio-card:hover, .news-card:hover, .sitio-card:hover {
  border-color: #93aaa8;
  box-shadow: 0 18px 44px rgba(10,34,45,.1);
}
.servicio-icon, .pillar > i, .contact-detail-icon, .login-feature > i {
  border-color: #c8dbd8;
  background: var(--sea-soft);
  color: var(--sea);
}
.servicio-card h3, .news-card-body h3, .sitio-body h3 { color: var(--azul-dark) !important; }
.servicio-link, .news-link { color: var(--accent-dark); }
.news-img-placeholder { background: linear-gradient(145deg,#e3e9e7,#d3dfdc); }
.news-img-placeholder::before {
  border-color: #bbc9c7;
  background: rgba(255,255,255,.72);
  color: var(--azul-dark);
  box-shadow: none;
}
.news-tag { background: var(--azul-dark); }
.news-fb-cta { border-color: #d1dcda; }

/* Visual institucional claro, sin imágenes de relleno */
.about-img-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid #cbd7d4;
  border-radius: 8px 30px 8px 30px;
  background: linear-gradient(145deg,#e9efec,#dbe6e3);
  box-shadow: none;
}
.about-img-wrap::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  right: -105px;
  top: -95px;
  border-radius: 50%;
  background: rgba(168,111,69,.15);
}
.about-img-wrap::after {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  left: -95px;
  bottom: -90px;
  border-radius: 50%;
  background: rgba(47,112,110,.14);
}
.about-identity-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px,5vw,58px);
}
.about-art-label { color: var(--accent-dark); font-size: .62rem; font-weight: 800; letter-spacing: .16em; }
.about-art-mark { color: var(--azul-dark); font-size: clamp(7rem,15vw,11rem); font-weight: 800; line-height: .9; letter-spacing: -.08em; }
.about-art-copy { max-width: 210px; margin-top: 14px; color: var(--azul-dark); font-size: 1.1rem; font-weight: 800; line-height: 1.35; }
.about-art-rule { width: 82px; height: 3px; margin-top: 25px; background: var(--accent); }
.about-stats-card { border-color: #cbd7d4; box-shadow: 0 12px 28px rgba(10,34,45,.08); }

/* Clientes: carrusel continuo y tarjetas más vivas */
.clientes-section { overflow: hidden; background: var(--azul-dark); border: 0; }
.clientes-title { color: rgba(255,255,255,.63); }
.clientes-track-wrap { overflow: hidden; mask-image: linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent); }
.clientes-track {
  width: max-content;
  animation: v3LogoMarquee 26s linear infinite !important;
  will-change: transform;
}
.clientes-track-wrap:hover .clientes-track { animation-play-state: paused !important; }
.cliente-logo {
  min-width: 180px;
  height: 86px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.cliente-logo:hover { transform: translateY(-5px) scale(1.02); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.logo-placeholder::before { color: white; }
.logo-placeholder::after { color: rgba(255,255,255,.48); }
@keyframes v3LogoMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Contacto, acceso y sitios */
.contact-section, .login-section { background: #f1f3ef; }
.contact-form-wrap, .login-card { border-color: #ccd8d5; box-shadow: 0 24px 60px rgba(10,34,45,.1); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .login-form input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(47,112,110,.12);
}
.filtro-btn.active, .filtro-btn:hover { background: var(--azul-dark); border-color: var(--azul-dark); }
.grupo-icon { background: var(--azul-dark); color: #b9d8d4; }
.sitio-img-icon { background: linear-gradient(145deg,#edf1ef,#dce6e3); }
.sitio-img-icon::before { color: var(--azul-dark); }
.sitio-tag { background: var(--accent-soft); color: var(--accent-dark); }
.sitios-cta-mid { background: var(--azul-dark); }
.lock-icon { background: var(--azul-dark); }

/* CTA y pie */
.cta-section { background: var(--accent-dark); }
.cta-bg-overlay {
  background:
    radial-gradient(circle at 15% 50%,rgba(255,255,255,.11),transparent 29%),
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size: auto,46px 46px,46px 46px;
}
.cta-section .btn-wa { box-shadow: none; }
#footer { background: #071923; }
.footer-brand::before { background: #fff; color: var(--azul-dark); }

/* Animación general: suave, con jerarquía */
.servicio-card, .news-card, .sitio-card, .contact-detail, .pillar {
  transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .32s ease, background .32s ease;
}
.contact-detail:hover, .pillar:hover { transform: translateX(5px); }
.servicio-card:hover .servicio-icon, .contact-detail:hover .contact-detail-icon, .pillar:hover > i {
  transform: rotate(-4deg) scale(1.06);
}
.servicio-icon, .contact-detail-icon, .pillar > i { transition: transform .32s cubic-bezier(.2,.75,.25,1); }
.news-card:hover .news-img-placeholder::before, .sitio-card:hover .sitio-img-icon::before {
  transform: scale(1.08) rotate(-3deg);
}
.news-img-placeholder::before, .sitio-img-icon::before { transition: transform .4s cubic-bezier(.2,.75,.25,1); }

@media (prefers-reduced-motion: no-preference) {
  .hero-img-wrap::before { animation: v3Drift 8s ease-in-out infinite; }
  .about-img-wrap::before { animation: v3Drift 9s ease-in-out infinite reverse; }
  .hero-art-mark { animation: v3MarkIn .8s .25s both; }
}
@keyframes v3Drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px,12px); } }
@keyframes v3MarkIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (max-width: 920px) {
  .container { width: min(100% - 36px,760px); }
  .navbar { min-height: 76px; }
  .nav-links li a:not(.nav-cta)::after { display: none; }
  .nav-links li a:hover, .nav-links li a.active { color: white; }
  .hero-inner { display: grid; grid-template-columns: 1fr; }
  .hero-img-col { display: block; width: min(100%,540px); margin: 18px auto 0; }
  .hero-img-wrap { aspect-ratio: 16 / 10; }
  .hero-badge { left: 18px; bottom: 18px; }
  .hero-art-mark { font-size: clamp(5.5rem,20vw,8rem); }
  .hero-art-line { margin-block: 18px 14px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px,560px); }
  .hero { padding-top: 122px; }
  .hero-img-wrap { aspect-ratio: 4 / 5; border-radius: 24px 6px 24px 6px; }
  .hero-identity-art { padding: 28px; }
  .hero-art-mark { font-size: 6.2rem; }
  .hero-badge { left: 12px; right: 12px; bottom: 12px; justify-content: center; }
  .about-img-wrap { min-height: 520px; }
  .clientes-track-wrap { mask-image: none; }
  .cliente-logo { min-width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .clientes-track { animation: none !important; transform: none !important; }
}
