/* =====================================================================
   VR Estudio Jurídico Contable — Sistema de diseño
   Brief: corporativo, elegante, sobrio. Azul marino predominante,
   amarillo suave como acento. Referencias: Marval, Beccar Varela.
   ===================================================================== */

:root {
  /* Paleta */
  --navy:      #0F2A44;   /* azul marino institucional */
  --navy-deep: #081B2E;   /* fondos de bloque oscuro */
  --gold:      #E4C061;   /* amarillo suave (acento / CTA) */
  --gold-pale: #F5E7C2;   /* variante clara del acento */
  --paper:     #FAFAF8;   /* fondo general cálido neutro */
  --white:     #FFFFFF;
  --ink:       #1B2733;   /* texto principal */
  --muted:     #5C6B7A;   /* texto secundario */
  --line:      #E4E2DA;   /* divisores */

  /* Tipografía */
  --font-display: "Libre Caslon Text", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;

  --maxw: 1140px;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(8, 27, 46, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

/* Firma visual: regla dorada corta que abre cada sección */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 74px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 40px; width: auto; }
.site-footer .logo img { height: 48px; }
.main-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.main-nav a:not(.btn) { text-decoration: none; font-size: .92rem; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--gold); color: var(--navy); }
.nav-toggle { display: none; }

/* ---------- Botones ---------- */
.btn { display: inline-block; padding: 13px 26px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; }
.btn[hidden] { display: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d9b452; }
.btn-outline { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(rgba(8,27,46,.78), rgba(8,27,46,.78)) center/cover no-repeat var(--navy-deep); color: var(--white); }
.hero .container { padding: 110px 24px; max-width: 880px; text-align: center; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero p { font-size: 1.06rem; color: rgba(255,255,255,.85); margin-bottom: 34px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Secciones genéricas ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 42px; }

/* Cabecera interior de página */
.page-head { background: var(--navy); background-size: cover; background-position: center; background-repeat: no-repeat; color: var(--white); padding: 64px 0; }
.page-head h1 { color: var(--white); }
.page-head p { color: rgba(255,255,255,.8); max-width: 640px; margin-top: 12px; }

/* ---------- Grillas de tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card a { font-weight: 600; font-size: .9rem; text-decoration: none; }
.card a:hover { color: var(--gold); }

/* Bloques de especialidad (páginas de área) */
.spec-list { display: grid; gap: 26px; max-width: 820px; }
.spec { border-left: 3px solid var(--gold); padding-left: 22px; }
.spec h3 { margin-bottom: 6px; }
.spec p { color: var(--muted); }

/* ---------- Banner navy ---------- */
.banner { background: var(--navy); color: var(--white); }
.banner .container { padding: 70px 24px; max-width: 860px; text-align: center; }
.banner h2 { color: var(--gold-pale); margin-bottom: 16px; }
.banner p { color: rgba(255,255,255,.85); }

/* ---------- Blog ---------- */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; height: 100%; min-height: 545px; }
.post-card[hidden] { display: none; }
.post-card .thumb { aspect-ratio: 16/9; background: var(--navy-deep) center/cover; }
.post-card .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .body h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; line-height: 1.25; min-height: 2.5em; }
.post-card .body p { flex: 1; }
.post-card .body > a:last-child { margin-top: auto; }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }

/* Grilla de noticias: siempre 3 columnas, "Ver más" revela de a 3 */
.news-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.news-more { display: flex; justify-content: center; margin-top: 34px; }
@media (max-width: 920px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }
.chip { background: var(--gold-pale); color: var(--navy); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filters a { text-decoration: none; padding: 8px 18px; border: 1px solid var(--line); border-radius: 24px; font-size: .88rem; background: var(--white); }
.filters a.active, .filters a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.article-body { max-width: 760px; }
.article-body p { margin-bottom: 1.1em; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info dt { font-weight: 700; color: var(--navy); margin-top: 18px; }
.contact-info dd { color: var(--muted); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; background: var(--white);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: #1c7c43; }
.form-status.err { color: #b3261e; }
.map-embed { width: 100%; aspect-ratio: 21/8; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.78); font-size: .92rem; }
.site-footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 36px; padding: 60px 24px; }
.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px; text-align: center; font-size: .8rem; }
.ssl-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.25);
  padding: 8px 14px; border-radius: var(--radius); font-size: .8rem; }

/* ---------- WhatsApp flotante (3 áreas) ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.wa-toggle { width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; border: 0;    rotate: -90deg;
  font-size: 1.6rem; cursor: pointer; box-shadow: var(--shadow); }
.wa-menu { position: absolute; right: 0; bottom: 70px; background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); min-width: 260px; display: none; overflow: hidden; }
.wa-menu.open { display: block; }
.wa-menu a { display: block; padding: 13px 18px; text-decoration: none; font-size: .92rem; border-bottom: 1px solid var(--line); }
.wa-menu a:last-child { border-bottom: 0; }
.wa-menu a:hover { background: var(--paper); }
.wa-menu small { display: block; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .main-nav { position: fixed; inset: 74px 0 auto 0; background: var(--white); flex-direction: column;
    padding: 20px 24px 28px; border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; background: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }
  .contact-grid { grid-template-columns: 1fr; }
}
