/* ================================================================
   El encabezado del sitio: el mismo en la portada, /portfolio y
   /renders/. Fijo arriba; transparente sobre la portada y oscuro
   apenas se baja. En el celular, logo y menú desplegable.
   ================================================================ */
/* Los enlaces a una sección no la dejan debajo del encabezado fijo */
html { scroll-padding-top: 80px; }

.encabezado {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 72px; display: flex; align-items: center; gap: 26px;
  padding: 0 clamp(16px, 3.6vw, 48px);
  font-family: 'DM Sans', system-ui, sans-serif;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.encabezado.solido, .encabezado.abierto {
  background: rgba(10,10,10,0.94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom-color: rgba(90,232,74,0.2);
}

/* El logo: la corona y la palabra, con la misma animación de la portada */
.encabezado .marca {
  position: relative; display: block; flex-shrink: 0;
  width: 168px; aspect-ratio: 1703 / 301; text-decoration: none;
}
.encabezado .marca .corona { position: absolute; left: 0.411%; top: 3.322%;
  width: 19.319%; height: 74.086%; overflow: visible; transform-origin: center center; }
.encabezado .marca .palabra { position: absolute; left: 21.903%; top: 0; width: 78.097%; height: 100%; }
.encabezado .marca .l { position: absolute; inset: 0;
  background: url(/img/logo-texto.png) 0 0 / 100% 100% no-repeat; }
.encabezado .marca .l0 { clip-path: inset(0 88.271% 0 0.000%); }
.encabezado .marca .l1 { clip-path: inset(0 69.098% 0 11.654%); }
.encabezado .marca .l2 { clip-path: inset(0 55.639% 0 30.827%); }
.encabezado .marca .l3 { clip-path: inset(0 50.150% 0 44.286%); }
.encabezado .marca .l4 { clip-path: inset(0 41.805% 0 49.774%); }
.encabezado .marca .l5 { clip-path: inset(0 29.774% 0 58.120%); }
.encabezado .marca .l6 { clip-path: inset(0 14.887% 0 70.150%); }
.encabezado .marca .l7 { clip-path: inset(0 10.451% 0 85.038%); }
.encabezado .marca .l8 { clip-path: inset(0 0.000% 0 89.474%); }
.encabezado .corona path { fill: #fff; fill-opacity: 1; stroke: #fff; stroke-width: 13; stroke-linejoin: round;
  transform-box: view-box; transform-origin: 520px 352.5px; }
.encabezado .corona .m1 { stroke-dasharray: 1348; animation: enc-c1 11s cubic-bezier(0.65,0,0.35,1) infinite, enc-s1 11s infinite; }
.encabezado .corona .m2 { stroke-dasharray: 2111; animation: enc-c2 11s cubic-bezier(0.65,0,0.35,1) 0.09s infinite, enc-s2 11s infinite; }
.encabezado .corona .m3 { stroke-dasharray: 1824; animation: enc-c3 11s cubic-bezier(0.65,0,0.35,1) 0.18s infinite, enc-s3 11s infinite; }
@keyframes enc-c1 { 0% { stroke-dashoffset: 1348; fill-opacity: 0; } 5.07% { stroke-dashoffset: 0; fill-opacity: 0; } 8.18%, 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes enc-c2 { 0% { stroke-dashoffset: 2111; fill-opacity: 0; } 5.07% { stroke-dashoffset: 0; fill-opacity: 0; } 8.18%, 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes enc-c3 { 0% { stroke-dashoffset: 1824; fill-opacity: 0; } 5.07% { stroke-dashoffset: 0; fill-opacity: 0; } 8.18%, 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes enc-s1 { 0%, 13% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.32,0.9,0.4,1); }
  19%, 55% { transform: rotate(90deg); animation-timing-function: cubic-bezier(0.5,0,0.2,1); } 64%, 100% { transform: rotate(0deg); } }
@keyframes enc-s2 { 0%, 16% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.32,0.9,0.4,1); }
  22%, 52% { transform: rotate(90deg); animation-timing-function: cubic-bezier(0.5,0,0.2,1); } 61%, 100% { transform: rotate(0deg); } }
@keyframes enc-s3 { 0%, 19% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.32,0.9,0.4,1); }
  25%, 49% { transform: rotate(90deg); animation-timing-function: cubic-bezier(0.5,0,0.2,1); } 58%, 100% { transform: rotate(0deg); } }
.encabezado .corona { animation: enc-e 11s infinite; }
@keyframes enc-e { 0%, 23% { transform: none; animation-timing-function: cubic-bezier(0.37,0,0.28,1); }
  34%, 52% { transform: translate(-12.16%, 2.47%) scale(0.6413); animation-timing-function: cubic-bezier(0.37,0,0.28,1); }
  63%, 100% { transform: none; } }
.encabezado .marca .l { animation: enc-corre 11s infinite; }
.encabezado .marca .l0 { animation: enc-seva 11s infinite; }
@keyframes enc-corre { 0%, 23% { transform: none; animation-timing-function: cubic-bezier(0.42,0,0.3,1); }
  36%, 52% { transform: translateX(-23.31%); animation-timing-function: cubic-bezier(0.42,0,0.3,1); } 65%, 100% { transform: none; } }
@keyframes enc-seva { 0%, 23% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.42,0,0.3,1); }
  36%, 52% { opacity: 0; transform: translateX(-23.31%); animation-timing-function: cubic-bezier(0.42,0,0.3,1); } 65%, 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .encabezado .corona .m1, .encabezado .corona .m2, .encabezado .corona .m3 { animation: none !important; stroke: none; fill-opacity: 1; }
  .encabezado .corona, .encabezado .marca .l { animation: none !important; }
}

/* Compu: los enlaces, el botón y los idiomas */
.enc-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.enc-nav a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.enc-nav a:hover { color: #5AE84A; }
.enc-nav a[aria-current="page"] { color: #fff; border-bottom-color: #5AE84A; }
.enc-pedir { flex-shrink: 0; background: #5AE84A; color: #000; text-decoration: none;
  padding: 10px 22px; border-radius: 100px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.5px; white-space: nowrap; transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
.enc-pedir:hover { background: #7df270; transform: translateY(-1px); box-shadow: 0 8px 25px rgba(90,232,74,0.35); }
.enc-idi { display: flex; gap: 2px; flex-shrink: 0; }
.enc-idi .lang { background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.7rem;
  font-weight: 600; letter-spacing: 0.5px; color: rgba(255,255,255,0.45);
  padding: 8px 5px; transition: color .2s ease; }
.enc-idi .lang:hover { color: rgba(255,255,255,0.85); }
.enc-idi .lang.viva { color: #fff; }
.encabezado a:focus-visible, .encabezado button:focus-visible, .enc-panel a:focus-visible, .enc-panel button:focus-visible {
  outline: 2px solid #5AE84A; outline-offset: 3px; border-radius: 4px; }

/* La hamburguesa y el panel, solo en el celular */
.enc-hamb { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; padding: 0;
  background: none; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.enc-hamb span { display: block; width: 24px; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .3s ease, opacity .2s ease; }
.enc-hamb[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.enc-hamb[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.enc-hamb[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.enc-panel { display: none; }

@media (max-width: 1020px) {
  .enc-nav { gap: 18px; }
  .enc-nav a { font-size: 0.74rem; letter-spacing: 0.2px; }
}
@media (max-width: 900px) {
  .encabezado { height: 64px; }
  .encabezado .marca { width: 140px; }
  .enc-nav, .enc-idi, .encabezado > .enc-pedir { display: none; }
  .enc-hamb { display: flex; }
  .enc-panel {
    position: fixed; top: 64px; left: 0; right: 0; z-index: 999;
    max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
    background: rgba(10,10,10,0.98); border-bottom: 1px solid rgba(90,232,74,0.2);
    padding: 6px 20px 22px; font-family: 'DM Sans', system-ui, sans-serif;
  }
  .enc-panel.abierto { display: block; }
  .enc-panel a.enlace { display: flex; align-items: center; min-height: 54px;
    color: #fff; text-decoration: none; font-size: 1.05rem; font-weight: 400;
    border-bottom: 1px solid rgba(255,255,255,0.08); }
  .enc-panel a.enlace[aria-current="page"] { color: #5AE84A; }
  .enc-panel .enc-idi { display: flex; gap: 6px; margin: 16px 0; }
  .enc-panel .enc-idi .lang { min-width: 48px; min-height: 44px; font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.14); border-radius: 100px; }
  .enc-panel .enc-idi .lang.viva { border-color: #5AE84A; color: #5AE84A; }
  .enc-panel .enc-pedir { display: flex; align-items: center; justify-content: center;
    min-height: 50px; font-size: 0.95rem; }
}

/* El logo mide 25 px de alto: el área que recibe el toque es más grande */
.encabezado .marca::after { content: ""; position: absolute; inset: -10px -8px; }

/* Servicios: desplegable en la compu, lista con título en el celular */
.enc-serv { position: relative; display: flex; align-items: center; }
.enc-serv-b { display: flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer;
  color: rgba(255,255,255,0.82); font: inherit; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s ease; }
.enc-serv-b:hover, .enc-serv.abierto .enc-serv-b { color: #5AE84A; }
.enc-serv-b[data-actual] { color: #fff; border-bottom-color: #5AE84A; }
.enc-serv-b svg { width: 9px; height: 9px; transition: transform .25s ease; }
.enc-serv.abierto .enc-serv-b svg { transform: rotate(180deg); }
.enc-serv-caja { position: absolute; top: calc(100% + 18px); left: 50%; width: 330px; margin-left: -165px; padding: 8px;
  border-radius: 16px; background: rgba(10,10,10,0.97); border: 1px solid rgba(90,232,74,0.2); box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }
.enc-serv-caja::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.enc-serv.abierto .enc-serv-caja { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }
.enc-nav .enc-serv-caja a { display: grid; gap: 3px; padding: 11px 14px; border-radius: 10px; border: 0; text-transform: none; letter-spacing: 0; white-space: normal; }
.enc-nav .enc-serv-caja a:hover, .enc-nav .enc-serv-caja a:focus-visible { background: rgba(255,255,255,0.06); color: inherit; }
.enc-serv-caja b { color: #fff; font-size: 0.95rem; font-weight: 600; }
.enc-serv-caja a:hover b, .enc-serv-caja a[aria-current="page"] b { color: #5AE84A; }
.enc-serv-caja i { font-style: normal; color: rgba(255,255,255,0.5); font-size: 0.8rem; font-weight: 400; }
.enc-rotulo { display: block; padding: 18px 0 4px; color: rgba(255,255,255,0.45); font-size: 0.72rem; letter-spacing: 1.6px; text-transform: uppercase; }
@media (max-width: 1020px) { .enc-serv-b { font-size: 0.74rem; letter-spacing: 0.2px; } }
@media (max-width: 900px) { .enc-panel a.enlace.enc-sub { padding-left: 16px; font-size: 0.98rem; min-height: 48px; } }
@media (prefers-reduced-motion: reduce) { .enc-serv-caja, .enc-serv-b svg { transition: none; } }

/* Programa de referidos: un enlace chico antes de "Pedir presupuesto" */
.enc-ref { flex-shrink: 0; color: #5AE84A; text-decoration: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.3px;
  white-space: nowrap; padding: 8px 2px; border-bottom: 1px solid rgba(90,232,74,0.35); transition: border-color .2s ease; }
.enc-ref:hover { border-color: #5AE84A; }
@media (max-width: 1140px) { .encabezado .enc-ref { display: none; } }
.enc-panel a.enlace.enc-ref-cel { color: #5AE84A; }

/* Que las imágenes no se arrastren ni muestren el menú de "guardar" al mantenerlas apretadas en el celular */
img, video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
