/* =========================================================
   HGE Heres Gestión Empresarial — theme.css v1.0.0
   Complementa theme.json. Colores: var(--wp--preset--color--*)
   ========================================================= */
:root {
  --hge-navy: var(--wp--preset--color--navy);
  --hge-navy-2: var(--wp--preset--color--navy-2);
  --hge-azul: var(--wp--preset--color--azul);
  --hge-azul-2: var(--wp--preset--color--azul-2);
  --hge-celeste: var(--wp--preset--color--celeste);
  --hge-rojo: var(--wp--preset--color--rojo);
  --hge-muted: var(--wp--preset--color--muted);
  --hge-line: #DCE2F0;
  --hge-radius: 12px;
  --hge-shadow: 0 10px 30px rgba(12, 27, 77, .08);
  --hge-wa: #1FA855;
}
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:focus-visible { outline: 3px solid var(--hge-azul); outline-offset: 2px; }
.hge-muted { color: var(--hge-muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
img { height: auto; }

/* Sin espacios entre cabecera, contenido, pie ni entre secciones de portada */
.wp-site-blocks > * + * { margin-block-start: 0; }
.hge-main-front .wp-block-post-content > .alignfull { margin-block: 0 !important; }
.hge-page { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60); }
.hge-page-title { margin-bottom: 1.5rem; }

/* ---------- Cabecera ---------- */
.hge-site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--hge-line); }
.admin-bar .hge-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hge-site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .hge-site-header { top: 0; position: relative; } }
.hge-header-inner { min-height: 72px; gap: 16px; }
.hge-brand { display: inline-flex; align-items: center; text-decoration: none; }
.hge-brand img { height: 56px; width: auto; display: block; }
.hge-brand-text { font-weight: 600; color: var(--hge-navy); }
.hge-nav { gap: 22px; font-weight: 500; font-size: .93rem; }
.hge-nav a { text-decoration: none; color: var(--wp--preset--color--ink); }
.hge-nav a:hover, .hge-nav a:focus { color: var(--hge-azul); }
.hge-nav .wp-block-navigation__submenu-container { border: 1px solid var(--hge-line) !important; border-radius: 10px; box-shadow: var(--hge-shadow); padding: 8px 0; min-width: 260px !important; }
.hge-nav .wp-block-navigation__submenu-container a { padding: .5em 1.1em !important; }
.hge-nav .hge-nav-cta > a { background: var(--hge-azul); color: #fff !important; padding: .6em 1.1em; border-radius: 8px; font-weight: 600; }
.hge-nav .hge-nav-cta > a:hover { background: var(--hge-azul-2); }
.hge-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.hge-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 16px; font-size: 1.08rem; }
.hge-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; padding: 6px 0 0 12px; }
@media (max-width: 1100px) and (min-width: 600px) { .hge-nav { gap: 16px; font-size: .88rem; } }
@media (max-width: 600px) {
  .hge-header-inner { min-height: 62px; }
  .hge-brand img { height: 46px; }
}

/* ---------- Secciones ---------- */
.hge-section { padding-block: var(--wp--preset--spacing--60); }
.hge-tint { background: var(--hge-celeste); }
.hge-dark { background: var(--hge-navy); color: #CAD3EA; }
.hge-dark h2, .hge-dark h3 { color: #fff; }
.hge-section-head { max-width: 700px; margin-bottom: 2.5rem !important; }
.hge-section-head.hge-center { text-align: center; margin-inline: auto !important; }
.hge-section-head > * { margin-block: 0 .6rem; }
.hge-eyebrow { display: flex; align-items: center; gap: .6em; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--hge-azul); margin-bottom: .4em; }
.hge-eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--hge-rojo); }
.hge-center .hge-eyebrow { justify-content: center; }
.hge-dark .hge-eyebrow, .hge-hero .hge-eyebrow { color: #AFC2FF; }
.hge-note { font-size: .92rem; color: var(--hge-muted); border-left: 3px solid var(--hge-azul); padding-left: 12px; }
.hge-foto img, .hge-hero-foto img { border-radius: var(--hge-radius); box-shadow: var(--hge-shadow); width: 100%; }
.hge-split { gap: clamp(2rem, 5vw, 4rem); }
.hge-split-top { align-items: flex-start; }

/* ---------- Hero ---------- */
.hge-hero { background: radial-gradient(1100px 560px at 85% 0%, var(--hge-navy-2), var(--hge-navy) 62%); color: #DDE4F5; padding-bottom: var(--wp--preset--spacing--50); }
.hge-hero h1 { color: #fff; margin-block: .2em .5em; }
.hge-lead { font-size: 1.14rem; color: #C6D0EA; max-width: 36em; }
.hge-hero-foto img { box-shadow: 0 25px 60px rgba(0,0,0,.35); border: 4px solid rgba(255,255,255,.1); }
.hge-stats { margin-top: var(--wp--preset--spacing--50) !important; gap: 16px; }
.hge-stat { margin: 0; padding: 18px 20px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--hge-radius); background: rgba(255,255,255,.04); color: #C6D0EA; font-size: .92rem; line-height: 1.35; }
.hge-stat strong { display: block; font-size: 1.9rem; color: #fff; line-height: 1.1; margin-bottom: 4px; }

/* ---------- Botones ---------- */
.wp-block-button.is-style-hge-light .wp-block-button__link { background: #fff; color: var(--hge-navy); }
.wp-block-button.is-style-hge-light .wp-block-button__link:hover { background: #E4EAFB; color: var(--hge-navy); }
.wp-block-button.is-style-hge-outline .wp-block-button__link { background: transparent; color: var(--hge-azul); border: 2px solid var(--hge-azul); }
.wp-block-button.is-style-hge-outline .wp-block-button__link:hover { background: var(--hge-azul); color: #fff; }
.wp-block-button.is-style-hge-wa .wp-block-button__link { background: var(--hge-wa); color: #fff; }
.wp-block-button.is-style-hge-wa .wp-block-button__link:hover { background: #178A45; }
.wp-element-button { transition: background .2s, color .2s, transform .2s; }
.wp-element-button:hover { transform: translateY(-1px); }
.hge-btn-wa .hge-icon { width: 1.1em; height: 1.1em; margin-right: .45em; vertical-align: -0.15em; }

/* ---------- Tarjetas de servicios ---------- */
.hge-cards { gap: 22px; }
.hge-card { background: #fff; border: 1px solid var(--hge-line); border-radius: var(--hge-radius); padding: 28px 24px 22px; box-shadow: var(--hge-shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.hge-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(12,27,77,.12); }
.hge-card h3 { margin: 0 0 .5rem; }
.hge-card p { color: var(--hge-muted); margin: 0; font-size: .96rem; }
.hge-card .hge-card-link { margin-top: auto; padding-top: 1rem; }
.hge-card-link a { font-weight: 600; text-decoration: none; }
.hge-card-link a:hover { text-decoration: underline; }

/* Iconos de servicios (máscaras SVG) */
.hge-ico::before { content: ""; width: 46px; height: 46px; border-radius: 10px; margin-bottom: 16px; background: var(--hge-celeste) no-repeat center / 26px; flex: none; }
.hge-ico-contable::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h2M12 11h2M16 11h0M8 15h2M12 15h2M8 18h8'/%3E%3C/svg%3E"); }
.hge-ico-tributaria::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M15 3v4h4M9 17l6-6M9.5 11.5h.01M14.5 16.5h.01'/%3E%3C/svg%3E"); }
.hge-ico-nomina::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0M16 4.5a3.5 3.5 0 0 1 0 7M18 14a6 6 0 0 1 3 6'/%3E%3C/svg%3E"); }
.hge-ico-auditoria::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.5-4.5M8 10.5l2 2 3.5-4'/%3E%3C/svg%3E"); }
.hge-ico-societario::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V10l7-5 7 5v11M9 21v-6h6v6'/%3E%3C/svg%3E"); }
.hge-ico-gestion::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='5' rx='1'/%3E%3Crect x='3' y='16' width='6' height='5' rx='1'/%3E%3Crect x='15' y='16' width='6' height='5' rx='1'/%3E%3Cpath d='M12 8v4M6 16v-2h12v2'/%3E%3C/svg%3E"); }
.hge-ico-analisis::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 15 4-4 3 3 5-6'/%3E%3C/svg%3E"); }
.hge-ico-inventarios::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3FAE' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='m4 7.5 8 4.5 8-4.5M12 12v9'/%3E%3C/svg%3E"); }

/* ---------- Metodología ---------- */
.hge-steps { list-style: none; padding: 0; counter-reset: paso; display: grid; gap: 12px; margin: 1.5rem 0; }
.hge-steps li { counter-increment: paso; position: relative; padding: 14px 16px 14px 58px; background: var(--hge-celeste); border-radius: 10px; }
.hge-steps li::before { content: counter(paso, decimal-leading-zero); position: absolute; left: 16px; top: 13px; font-weight: 600; color: var(--hge-azul); }

/* ---------- Razones ---------- */
.hge-razones { gap: 22px; }
.hge-razon { border-top: 2px solid rgba(255,255,255,.18); padding-top: 18px; }
.hge-razon h3 { margin: .2rem 0 .5rem; font-size: 1.12rem; }
.hge-razon p { margin: 0; font-size: .95rem; }
.hge-razon-num { color: #AFC2FF; font-weight: 600; font-size: .9rem; margin: 0; }

/* ---------- Equipo ---------- */
.hge-equipo { gap: 24px; }
.hge-persona { text-align: center; }
.hge-persona figure { margin: 0 0 12px; }
.hge-persona img { border-radius: var(--hge-radius); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: #E7EAF0; }
.hge-persona h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.hge-persona p { margin: 0; font-size: .86rem; color: var(--hge-muted); line-height: 1.4; }

/* ---------- Killa ---------- */
.hge-killa-logo { background: #fff; border-radius: var(--hge-radius); padding: 32px; box-shadow: var(--hge-shadow); text-align: center; }
.hge-killa-logo img { max-width: 320px; margin: 0 auto; }
.hge-check { list-style: none; padding: 0; }
.hge-check li { position: relative; padding-left: 28px; margin-bottom: .45rem; }
.hge-check li::before { content: ""; position: absolute; left: 0; top: .4em; width: 16px; height: 16px; border-radius: 50%; background: var(--hge-azul) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") no-repeat center / 10px; }

/* ---------- Clientes ---------- */
.hge-logos { gap: 16px; align-items: center; }
.hge-logo-cliente { margin: 0; background: #fff; border: 1px solid var(--hge-line); border-radius: 10px; height: 96px; display: flex; align-items: center; justify-content: center; padding: 12px; }
.hge-logo-cliente img { max-height: 70px; max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s; }
.hge-logo-cliente:hover img { filter: none; opacity: 1; }

/* ---------- Calendario y descargas ---------- */
.hge-tabla-sri table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; font-size: .95rem; }
.hge-tabla-sri th, .hge-tabla-sri td { border: 1px solid var(--hge-line); padding: .55em .4em; text-align: center; }
.hge-tabla-sri thead th { background: var(--hge-navy); color: #fff; font-weight: 600; }
.hge-tabla-sri tbody td { font-weight: 600; color: var(--hge-navy); }
.hge-tabla-sri tbody td:first-child, .hge-tabla-sri thead th:first-child { text-align: left; white-space: nowrap; }
.hge-descargas { align-self: flex-start; background: #fff; border-radius: var(--hge-radius); padding: 28px; box-shadow: var(--hge-shadow); }
.hge-descargas h3 { margin-top: 0; }
.hge-files { list-style: none; padding: 0; margin: 0; }
.hge-files li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hge-line); }
.hge-files a { font-weight: 600; text-decoration: none; }
.hge-files span { color: var(--hge-muted); font-size: .85rem; white-space: nowrap; }
@media (max-width: 600px) { .hge-tabla-sri { overflow-x: auto; } .hge-tabla-sri table { min-width: 520px; } }

/* ---------- Contacto ---------- */
.hge-info-list { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 12px; }
.hge-info-list li { display: flex; gap: 12px; align-items: flex-start; }
.hge-info-list a { text-decoration: none; }
.hge-icon { width: 20px; height: 20px; flex: none; color: var(--hge-azul); margin-top: 3px; }
.hge-map iframe { width: 100%; height: 260px; border: 0; border-radius: var(--hge-radius); }
.hge-map-link { font-size: .9rem; }
.hge-form-card { background: #fff; border: 1px solid var(--hge-line); border-radius: var(--hge-radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--hge-shadow); }
.hge-form .ff-el-input--label label { font-weight: 500; color: var(--hge-navy); }
.hge-form .ff-el-form-control { border-radius: 8px !important; border-color: #C9D2E6 !important; padding: .7em .9em !important; }
.hge-form .ff-el-form-control:focus { border-color: var(--hge-azul) !important; box-shadow: 0 0 0 3px rgba(31,63,174,.15) !important; }
.hge-form .ff-btn-submit { background: var(--hge-azul) !important; border-radius: 8px !important; padding: .85em 1.6em !important; font-weight: 600 !important; }
.hge-form .ff-btn-submit:hover { background: var(--hge-azul-2) !important; }
.hge-form textarea.ff-el-form-control { min-height: 120px; }
.hge-admin-note { background: #FFF6E0; border-left: 4px solid #E0A800; padding: 10px 12px; font-size: .9rem; }

/* ---------- CTA páginas internas ---------- */
.hge-cta { background: var(--hge-navy); color: #CAD3EA; padding-block: var(--wp--preset--spacing--50); }
.hge-cta h2 { color: #fff; margin: 0 0 .3rem; font-size: 1.6rem; }
.hge-cta p { margin: 0; }
.hge-cta-inner { gap: 20px; }

/* ---------- Páginas internas (contenido existente) ---------- */
.hge-page .wp-block-post-content h2 { margin-top: 2.2rem; font-size: 1.5rem; }
.hge-page .wp-block-post-content ul li { margin-bottom: .35rem; }
.hge-page .wp-block-post-content table { border-collapse: collapse; width: 100%; }
.hge-page .wp-block-post-content th, .hge-page .wp-block-post-content td { border: 1px solid var(--hge-line); padding: .5em .7em; }
.hge-page .wp-block-post-content thead th { background: var(--hge-celeste); }
.hge-404 { text-align: left; min-height: 45vh; }

/* ---------- Pie ---------- */
.hge-site-footer { background: #0A1640; color: #AEB9D6; font-size: .94rem; }
.hge-footer { padding-block: var(--wp--preset--spacing--50) 24px; }
.hge-footer h3 { color: #fff; font-size: 1rem; margin: .4rem 0 .9rem; }
.hge-footer a { color: #DDE4F5; text-decoration: none; }
.hge-footer a:hover { color: #fff; text-decoration: underline; }
.hge-brand-footer { background: #fff; border-radius: 10px; padding: 8px 12px; }
.hge-brand-footer img { height: 60px; }
.hge-footer-links { list-style: none; padding: 0; margin: 0; }
.hge-footer-links li { margin-bottom: .45rem; }
.hge-footer .hge-icon { color: #AFC2FF; }
.hge-redes { display: flex; gap: 10px; }
.hge-redes a { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); align-items: center; justify-content: center; }
.hge-redes .hge-icon { margin: 0; color: #fff; }
.hge-legal { max-width: var(--wp--style--global--wide-size, 1180px); margin-inline: auto !important; border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 18px; font-size: .84rem; }
.hge-legal p { margin: 0; }

/* ---------- WhatsApp flotante ---------- */
.hge-wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; background: var(--hge-wa); color: #fff !important; text-decoration: none; padding: 12px 16px; border-radius: 999px; box-shadow: 0 10px 25px rgba(0,0,0,.2); font-weight: 600; font-size: .92rem; }
.hge-wa-float .hge-icon { color: #fff; width: 22px; height: 22px; margin: 0; }
.hge-wa-float:hover { background: #178A45; }
@media (max-width: 600px) { .hge-wa-float span { display: none; } .hge-wa-float { padding: 14px; } }

/* ---------- Aparición suave ---------- */
.hge-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.hge-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Ajustes móviles ---------- */
@media (max-width: 600px) {
  .hge-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hge-stat { padding: 14px; }
  .hge-stat strong { font-size: 1.5rem; }
  .hge-equipo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px; }
  .hge-persona p { font-size: .8rem; }
  .hge-logos { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
  .hge-logo-cliente { height: 76px; padding: 8px; }
  .hge-logo-cliente img { max-height: 54px; }
  .hge-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
  .hge-hero .wp-block-button__link { width: 100%; text-align: center; }
  .hge-section { padding-block: 3rem; }
}
