/* Header y footer de todo el sitio (estetica de la home nueva).
 * No depende de global.css ni de styles.css: define sus propios valores y
 * usa prefijos vh- / vf- para no chocar con los estilos viejos.
 * Cortes: 810px y 1200px. */

.vh, .vf {
  --vc-ink: #1C2B1E;
  --vc-dark: #16281E;
  --vc-sage: #457553;
  --vc-sage-l: #8BAF6E;
  --vc-cream: #F7F5EF;
  --vc-line: #E4E1D7;
  --vc-muted: #56645A;
  --vc-on-dark-2: rgba(247, 245, 239, .74);
  --vc-ease: cubic-bezier(.2, .8, .2, 1);
  --vc-display: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --vc-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ================= HEADER ================= */
.vh-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 10px; }
.vh { position: sticky; top: 0; z-index: 40; padding: 12px 16px; font-family: var(--vc-body); }
.vh-bar {
  position: relative; max-width: 1200px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 16px;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(22, 40, 30, .06); border-radius: 12px;
  transition: box-shadow .3s var(--vc-ease);
}
.vh.is-scrolled .vh-bar, .vh.is-open .vh-bar { box-shadow: 0 8px 30px rgba(22, 40, 30, .08); }
.vh-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--vc-ink); text-decoration: none; font-family: var(--vc-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.vh-logo svg { width: 26px; height: 28px; flex: none; }
.vh a:focus-visible, .vh button:focus-visible, .vh summary:focus-visible { outline: 2px solid var(--vc-sage); outline-offset: 3px; border-radius: 6px; }

.vh-nav { display: none; }
.vh-actions { display: flex; align-items: center; gap: 8px; }

.vh-cta {
  display: none; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; background: var(--vc-ink); color: var(--vc-cream);
  font-family: var(--vc-body); font-weight: 500; font-size: 14px; line-height: 1.4; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--vc-ease), background-color 200ms ease;
}
.vh-cta:active { transform: scale(.97); }
.vh-roll { display: inline-block; overflow: hidden; height: 1.4em; vertical-align: top; }
.vh-roll-in { display: block; position: relative; transition: transform .35s var(--vc-ease); }
.vh-roll-in::after { content: attr(data-t); content: attr(data-t) / ""; position: absolute; left: 0; top: 100%; width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .vh-cta:hover { background-color: #2a3f2d; }
  .vh-cta:hover .vh-roll-in { transform: translateY(-100%); }
}

.vh-toggle {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  border: 1px solid rgba(22, 40, 30, .14); border-radius: 10px; background: transparent;
  color: var(--vc-ink); font: 500 14px var(--vc-body); cursor: pointer;
}
.vh-burger { position: relative; width: 16px; height: 10px; }
/* Dos lineas que se cruzan en una X: solo transform. */
.vh-burger i { position: absolute; left: 0; top: 4px; width: 16px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .4s var(--vc-ease); }
.vh-burger i:first-child { transform: translateY(-3px); }
.vh-burger i:last-child { transform: translateY(3px); }
.vh.is-open .vh-burger i:first-child { transform: rotate(45deg); }
.vh.is-open .vh-burger i:last-child { transform: rotate(-45deg); }
.vh-toggle { transition: border-color .2s ease, background-color .2s ease, transform 160ms var(--vc-ease); }
.vh-toggle:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .vh-toggle:hover { border-color: rgba(22, 40, 30, .3); } }
.vh.is-open .vh-toggle { background: rgba(22, 40, 30, .05); }

/* Panel del menu (movil y tablet).
   Se superpone al contenido (no lo empuja). Abre con recorte de arriba hacia
   abajo y los enlaces entran escalonados; cierra mas rapido de lo que abre. */
.vh-panel {
  position: absolute; left: 16px; right: 16px; top: calc(100% - 4px);
  max-width: 1200px; margin: 0 auto; padding: 8px 16px 18px;
  background: #fff; border: 1px solid rgba(22, 40, 30, .06); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(22, 40, 30, .10);
  max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain;
  interpolate-size: allow-keywords;
  visibility: hidden; opacity: 0;
  transform: translateY(-6px);
  clip-path: inset(0 0 100% 0 round 12px);
  /* Cierre: el recorte sube con una curva pareja y el fundido acompana;
     visibility espera a que termine para no cortar la animacion. */
  transition: opacity .28s ease .06s, transform .34s cubic-bezier(.4, 0, .2, 1), clip-path .34s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .34s;
}
.vh.is-open .vh-panel {
  visibility: visible; opacity: 1; transform: none;
  clip-path: inset(0 0 0 0 round 12px);
  transition: opacity .2s ease, transform .5s var(--vc-ease), clip-path .5s var(--vc-ease), visibility 0s;
}
.vh-panel > ul, .vh-sub { list-style: none; margin: 0; padding: 0; }
.vh-panel > ul > li { border-bottom: 1px solid var(--vc-line); }
.vh-panel > ul > li, .vh-cta-block { opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .25s ease; }
.vh.is-open .vh-panel > ul > li, .vh.is-open .vh-cta-block {
  opacity: 1; transform: none;
  transition: opacity .35s ease, transform .45s var(--vc-ease);
  transition-delay: calc(var(--k, 0) * 35ms + 90ms);
}
.vh-panel a, .vh-panel summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 4px;
  color: var(--vc-ink); text-decoration: none; font-family: var(--vc-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em;
  transition: color .2s ease;
}
.vh-panel a:active, .vh-panel summary:active { color: var(--vc-sage); }
.vh-panel summary { cursor: pointer; list-style: none; }
.vh-panel summary::-webkit-details-marker { display: none; }
/* Mas que gira a menos: la barra vertical se achica al abrir. */
.vh-panel summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 12px no-repeat;
  color: var(--vc-muted);
  transition: transform .35s var(--vc-ease), background-size .35s var(--vc-ease);
}
.vh-panel details[open] summary::after { transform: rotate(180deg); background-size: 12px 1.6px, 1.6px 0; }
/* Sectores se despliega con altura animada donde el navegador lo permite. */
.vh-panel details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .4s var(--vc-ease), content-visibility .4s allow-discrete;
}
.vh-panel details[open]::details-content { block-size: auto; }
.vh-sub { padding: 0 0 10px 12px; }
.vh-sub a { min-height: 42px; font-family: var(--vc-body); font-weight: 400; font-size: 15px; color: var(--vc-muted); }
.vh-panel [aria-current="page"] { color: var(--vc-sage); }
.vh-panel .vh-cta-block {
  display: flex; justify-content: center; min-height: 0; margin-top: 16px; padding: 14px 18px;
  color: var(--vc-cream); font-family: var(--vc-body); font-weight: 500; font-size: 15px; letter-spacing: 0;
}
.vh-panel .vh-cta-block:active { color: var(--vc-cream); transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .vh-panel, .vh.is-open .vh-panel { transform: none; clip-path: none; transition: opacity .15s ease, visibility 0s linear .15s; }
  .vh.is-open .vh-panel { transition: opacity .15s ease, visibility 0s; }
  .vh-panel > ul > li, .vh-cta-block, .vh.is-open .vh-panel > ul > li, .vh.is-open .vh-cta-block { opacity: 1; transform: none; transition: none; }
  .vh-panel details::details-content { transition: none; }
}

/* ================= FOOTER ================= */
footer.vf { padding: 24px 12px 12px; background: transparent; border: 0; font-family: var(--vc-body); }
.vf-card { max-width: 1376px; margin: 0 auto; background: var(--vc-dark); color: var(--vc-cream); border-radius: 28px; padding: 44px 22px 24px; }
.vf-grid { display: grid; gap: 32px; max-width: 1200px; margin: 0 auto; }
.vf-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--vc-cream); text-decoration: none; font-family: var(--vc-display); font-weight: 600; font-size: 18px; }
.vf-logo svg { width: 26px; height: 28px; }
.vf-brand p { margin: 14px 0 0; font-size: 14px; line-height: 1.7; color: var(--vc-on-dark-2); max-width: 34ch; }
.vf-social { display: flex; gap: 18px; }
.vf-col h2 { margin: 0 0 12px; font-family: var(--vc-body); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--vc-sage-l); }
.vf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.vf a { color: var(--vc-cream); text-decoration: none; font-size: 14px; }
.vf-col a { color: var(--vc-on-dark-2); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: color .2s ease, background-size .3s var(--vc-ease); }
@media (hover: hover) and (pointer: fine) {
  .vf a:hover { color: var(--vc-cream); }
  .vf-col a:hover { background-size: 100% 1px; }
  .vf-brand a:hover, .vf-bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }
}
.vf a:focus-visible { outline: 2px solid var(--vc-sage-l); outline-offset: 3px; border-radius: 4px; }
.vf-bottom { max-width: 1200px; margin: 36px auto 0; padding-top: 20px; border-top: 1px solid rgba(247, 245, 239, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--vc-on-dark-2); }
.vf-bottom p { margin: 0; display: flex; gap: 18px; }

/* ================= 810px ================= */
@media (min-width: 810px) {
  .vh { padding: 14px 24px; }
  .vh-bar { padding: 0 10px 0 20px; }
  .vh-cta { display: inline-flex; }
  footer.vf { padding: 32px 24px 24px; }
  .vf-card { padding: 56px 40px 28px; }
  .vf-grid { grid-template-columns: 1fr 1fr; gap: 36px 40px; }
}

/* ================= 1200px ================= */
@media (min-width: 1200px) {
  .vh-toggle, .vh-panel { display: none !important; }
  .vh-nav { display: block; flex: 1; }
  .vh-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 4px; }
  .vh-nav > ul > li { position: relative; }
  .vh-nav > ul > li > a {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px;
    color: var(--vc-ink); text-decoration: none; font-size: 14.5px; font-weight: 500;
    transition: background-color .2s ease;
  }
  .vh-nav > ul > li > a:hover, .vh-has-menu:focus-within > a { background: rgba(22, 40, 30, .05); }
  .vh-nav a[aria-current="page"] { color: var(--vc-sage); }
  .vh-caret { width: 10px; height: 6px; transition: transform .25s var(--vc-ease); }
  .vh-has-menu:hover .vh-caret, .vh-has-menu:focus-within .vh-caret { transform: rotate(180deg); }

  .vh-menu {
    position: absolute; left: 50%; top: calc(100% + 10px); width: 560px; padding: 10px;
    background: #fff; border: 1px solid rgba(22, 40, 30, .06); border-radius: 12px;
    box-shadow: 0 8px 30px rgba(22, 40, 30, .1);
    opacity: 0; visibility: hidden; transform: translate(-50%, -6px) scale(.98); transform-origin: top center;
    transition: opacity .16s ease, transform .2s var(--vc-ease), visibility 0s linear .2s;
  }
  .vh-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* puente para el hover */
  .vh-has-menu:hover .vh-menu, .vh-has-menu:focus-within .vh-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition: opacity .22s ease, transform .3s var(--vc-ease), visibility 0s; }
  .vh-menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  .vh-menu a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--vc-ink); }
  .vh-menu a:hover, .vh-menu a:focus-visible { background: rgba(22, 40, 30, .05); }
  .vh-menu b { font-family: var(--vc-display); font-weight: 600; font-size: 15px; }
  .vh-menu span { font-size: 12.5px; color: var(--vc-muted); }
  .vh-menu a[aria-current="page"] b { color: var(--vc-sage); }

  .vf-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .vh-bar, .vh-cta, .vh-roll-in, .vh-burger i, .vh-menu, .vh-caret { transition: none; }
}
@media print { .vh, .vf { display: none; } }
