/* =========================================================
   HVG Administraciones — hoja de estilos principal
   ========================================================= */

:root {
  --red: #d61f2a;
  --red-dark: #b0161f;
  --red-soft: #fdeeee;
  --ink: #1a2130;
  --ink-2: #3f4757;
  --muted: #6b7280;
  --bg: #faf8f5;
  --sand: #f3eee7;
  --surface: #ffffff;
  --line: #e9e3db;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(26, 33, 48, .06), 0 2px 8px rgba(26, 33, 48, .04);
  --shadow: 0 10px 30px -12px rgba(26, 33, 48, .18);
  --shadow-lg: 0 30px 60px -25px rgba(26, 33, 48, .35);
  --container: 1180px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.icon { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }

:focus-visible { outline: 3px solid rgba(214, 31, 42, .45); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(214, 31, 42, .6); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sand); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--red); }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Barra superior ---------- */
.topbar { background: var(--ink); color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 42px; }
.topbar-contact { display: flex; gap: 24px; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar-job strong { color: #fff; font-weight: 600; }
.topbar-job .icon { color: #ff6b73; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, .85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(26, 33, 48, .35); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) {
  padding: 8px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--sand); }
.nav a.is-active { color: var(--red); }
.nav .btn { margin-left: 10px; }
.nav-job { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -180px; top: -140px; width: 620px; height: 620px;
  background: radial-gradient(closest-side, rgba(214, 31, 42, .10), transparent);
  pointer-events: none;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.hero h1 { font-size: clamp(38px, 5.2vw, 62px); font-weight: 800; margin: 22px 0 20px; }
.hero h1 span { color: var(--red); }
.hero-lead { font-size: 19px; max-width: 520px; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.hero-actions .link-arrow { margin-left: 8px; }

.hero-areas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-areas li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 6px 12px; border-radius: 10px; background: var(--sand);
}
.hero-areas .icon { color: var(--red); }

.hero-visual { position: relative; }
.hero-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 4.2; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero-photo-small {
  position: absolute; left: -44px; bottom: -40px; width: 46%;
  border-radius: 20px; overflow: hidden; border: 6px solid var(--bg); box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.hero-photo-small img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; right: -20px; top: 36px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
  max-width: 250px;
}
.hero-badge .badge-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.hero-badge strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 15px; line-height: 1.25; }
.hero-badge span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; }

/* ---------- Secciones ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: inline-block; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red);
}
.section-head h2, .about-text h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--muted); }

/* ---------- Sobre nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.video-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--ink); aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; display: block; cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .5s ease, opacity .3s; opacity: .9; }
.video-facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(26, 33, 48, .55), rgba(26, 33, 48, .05) 60%); }
.video-facade:hover img { transform: scale(1.08); opacity: 1; }
.video-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%);
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); box-shadow: 0 0 0 10px rgba(214, 31, 42, .25), 0 12px 30px -8px rgba(0, 0, 0, .5);
  transition: transform .25s, box-shadow .25s;
}
.video-play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.video-facade:hover .video-play { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 0 0 14px rgba(214, 31, 42, .22), 0 12px 30px -8px rgba(0, 0, 0, .5); }
.video-label { position: absolute; left: 24px; bottom: 20px; z-index: 1; color: #fff; font-weight: 600; font-size: 15px; }
.about-text h2 { margin-bottom: 12px; }
.about-text > p { font-size: 18px; color: var(--muted); }

.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.area {
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.area:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-2px); }
.area-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 14px; }
.area h3 { font-size: 17px; margin-bottom: 6px; }
.area p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service {
  position: relative; display: flex; gap: 22px;
  padding: 34px; border-radius: var(--radius-lg);
  background: var(--bg); border: 1px solid var(--line);
  transition: background .25s, box-shadow .25s, transform .25s;
}
.service:hover { background: var(--surface); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-icon {
  width: 56px; height: 56px; border-radius: 16px; flex: none;
  display: grid; place-items: center; background: var(--ink); color: #fff;
  transition: background .25s;
}
.service:hover .service-icon { background: var(--red); }
.service-icon .icon { width: 26px; height: 26px; }
.service h3 { font-size: 21px; margin-bottom: 10px; padding-right: 36px; }
.service p { color: var(--muted); }
.service-num { position: absolute; top: 28px; right: 32px; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: #c9c1b6; }

/* ---------- Referidos ---------- */
.referral {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
  padding: 64px; border-radius: 32px;
  background: var(--ink); color: rgba(255, 255, 255, .78);
}
.referral::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(214, 31, 42, .45), transparent);
  pointer-events: none;
}
.referral .kicker { color: #ff7a81; }
.referral h2 { color: #fff; font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; }
.referral-amount { margin-top: 26px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.referral-amount strong { font-family: var(--font-head); font-size: clamp(52px, 7vw, 80px); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; }
.referral-amount span { font-size: 16px; }
.referral-body { position: relative; z-index: 1; }
.referral-body p { font-size: 17px; }
.referral-body .note { margin-top: 18px; font-size: 13.5px; color: rgba(255, 255, 255, .55); padding-left: 14px; border-left: 2px solid rgba(255, 255, 255, .2); }
.referral-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Medios ---------- */
.press { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.press a {
  flex: 0 1 calc(25% - 12px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px;
  padding: 26px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.press a:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-2px); }
.press img { height: 46px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s; }
.press a:hover img { filter: none; opacity: 1; }
.press span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* ---------- Testimonios ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial {
  margin: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
  padding: 30px; border-radius: var(--radius-lg);
  background: var(--bg); border: 1px solid var(--line);
}
.testimonial blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); }
.testimonial blockquote::before {
  content: "\201C"; display: block; height: 36px;
  font-family: Georgia, serif; font-size: 64px; line-height: 1; color: var(--red);
}
.testimonial figcaption { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); font-size: 15px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); }
.avatar .icon { width: 20px; height: 20px; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { display: grid; gap: 14px; margin-top: 36px; }
.contact-item {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
a.contact-item:hover { border-color: transparent; box-shadow: var(--shadow); }
.contact-item .area-icon { margin: 0; flex: none; }
.contact-item small { display: block; font-size: 13px; color: var(--muted); }
.contact-item strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 17px; line-height: 1.35; }

.cta-card {
  padding: 44px; border-radius: 32px;
  background: var(--red); color: rgba(255, 255, 255, .88);
  box-shadow: 0 30px 60px -30px rgba(214, 31, 42, .7);
}
.cta-card h3 { color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.cta-card .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.job-card {
  display: flex; align-items: center; gap: 18px; margin-top: 16px;
  padding: 24px 26px; border-radius: 24px;
  background: var(--surface); border: 1px dashed #d4ccc1;
  transition: border-color .2s;
}
.job-card:hover { border-color: var(--red); }
.job-card .area-icon { margin: 0; flex: none; }
.job-card strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 17px; }
.job-card span { font-size: 14.5px; color: var(--muted); }
.job-card .go { margin-left: auto; color: var(--red); }

/* ---------- Equipo (sección opcional) ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member { padding: 26px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.member .initials {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red-soft); color: var(--red);
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
}
.member h3 { font-size: 16px; margin-bottom: 4px; }
.member p { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 48px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 340px; color: var(--muted); }
.footer h4 { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer li { color: var(--muted); }
.footer li + li { margin-top: 8px; }
.footer li a { color: var(--muted); transition: color .2s; }
.footer li a:hover { color: var(--red); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- Volver arriba ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--red); }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .hero .container, .about, .contact, .referral { grid-template-columns: 1fr; }
  .hero .container { gap: 72px; }
  .hero-visual { max-width: 620px; margin: 0 auto; width: 100%; }
  .hero-photo { aspect-ratio: 16 / 11; }
  .hero-photo-small { left: -16px; }
  .hero-badge { right: -8px; }
  .referral { gap: 32px; padding: 48px; }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(26, 33, 48, .3);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 13px 14px; border-radius: 12px; font-size: 16px; }
  .nav .btn { margin: 10px 0 0; }
  .nav-job { display: block; }
  .services { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .topbar-job { display: none !important; }
  .topbar .container { justify-content: center; }
  .header .container { height: 66px; }
  .brand img { height: 36px; }
  .hero { padding: 40px 0 72px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-actions .link-arrow { margin: 6px 0 0; }
  .hero-photo-small { display: none; }
  .hero-badge { position: relative; right: auto; top: auto; margin: -34px 16px 0; max-width: none; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 40px; }
  .areas { grid-template-columns: 1fr; }
  .service { flex-direction: column; padding: 28px 24px; gap: 18px; }
  .referral { padding: 36px 24px; border-radius: 24px; }
  .referral-actions .btn { flex: 1 1 100%; }
  .press { gap: 12px; }
  .press a { flex-basis: calc(50% - 6px); padding: 20px 14px 16px; }
  .press img { height: 34px; }
  .testimonials {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px;
  }
  .testimonial { scroll-snap-align: start; }
  .cta-card { padding: 32px 24px; border-radius: 24px; }
  .cta-card .actions .btn { flex: 1 1 100%; }
  .job-card { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
