/* ==========================================================================
   GIANDECO — AJUSTES DE MÓVIL (encabezado y pie)
   Se carga en todas las páginas, también en el home (que no usa giandeco.css),
   para que encabezado y pie se comporten igual en todo el sitio.
   ========================================================================== */

/* --------------------------------------------------------------------------
   ENCABEZADO (hasta 1179px, donde vive el menú hamburguesa)
   Tres piezas y nada más: menú a la izquierda, marca al centro, buscar y
   selección a la derecha. La cuenta pasa al menú. Sobre el hero no hay barra:
   solo trazos finos sobre el video; al bajar, cristal esmerilado.
   -------------------------------------------------------------------------- */
@media (max-width:1179px){
  :root{ --h-marca:62px; }

  .sh-marca-in{ padding-inline:8px 6px; gap:0; }
  .sh-left, .sh-right{ gap:0; }

  /* menú: dos trazos finos, el inferior más corto */
  .sh-burger{ width:46px; height:46px; }
  .sh-burger::after{ display:none; }
  .sh-burger span{ left:12px; right:12px; height:1.5px; border-radius:0; transition: transform .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1), right .45s cubic-bezier(.16,1,.3,1), opacity .2s ease; }
  .sh-burger span:nth-child(1){ top:19px; }
  .sh-burger span:nth-child(2){ opacity:0; top:22px; }
  .sh-burger span:nth-child(3){ top:26px; right:20px; }
  .sh-burger.is-open span:nth-child(1){ top:22px; transform:rotate(45deg); }
  .sh-burger.is-open span:nth-child(3){ top:22px; right:12px; transform:rotate(-45deg); }

  /* marca: algo más contenida, para que mande el video */
  .sh-brand{ min-height:var(--h-marca); }
  .sh-brand-big{ height:46px; }
  .sh-brand-mini{ height:40px; }

  /* iconos: misma caja táctil, trazo más fino, sin halo */
  .sh-icon-btn{ display:grid; place-items:center; width:42px; height:46px; padding:0; border-radius:0; }
  .sh-icon-btn:hover{ background:none; }
  .sh-icon-btn svg{ width:20px; height:20px; stroke-width:1.25; }
  .sh-buscar-ico{ display:grid; }
  .sh-tema{ width:42px; height:46px; }

  /* la cuenta vive en el menú, no en la barra */
  .site-header .gdt-cuenta{ display:none; }

  /* al bajar: cristal en vez de bloque opaco */
  .site-header.is-solid{
    background: var(--bg-raised);
    background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: rgba(222,216,203,.07); box-shadow:none;
  }
}

/* --------------------------------------------------------------------------
   PIE DE PÁGINA EN MÓVIL: desplegables
   Solo se pliega si el script marcó el pie con .gd-acc (sin JS queda abierto).
   -------------------------------------------------------------------------- */
@media (max-width:859px){
  .gd-footer.gd-acc .gd-footer-grid{ grid-template-columns:1fr; gap:0; }
  .gd-footer.gd-acc .gd-footer-brand{ padding-bottom:30px; }
  .gd-footer.gd-acc .gd-footer-brand img{ height:64px; }
  .gd-footer.gd-acc .gd-footer-brand p{ max-width:40ch; }

  .gd-footer.gd-acc .gd-footer-col{ border-top:1px solid var(--line); }
  .gd-footer.gd-acc .gd-footer-col:last-child{ border-bottom:1px solid var(--line); }
  .gd-footer.gd-acc .gd-footer-col h4{
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    margin:0; padding:19px 2px; cursor:pointer; -webkit-tap-highlight-color:transparent;
    transition: color .3s ease;
  }
  .gd-footer.gd-acc .gd-footer-col h4:focus-visible{ outline:1px solid var(--accent); outline-offset:-1px; }
  /* indicador: un "+" que gira a "×" */
  .gd-footer.gd-acc .gd-footer-col h4::after{
    content:''; flex:none; width:11px; height:11px;
    background:
      linear-gradient(currentColor,currentColor) center/100% 1px no-repeat,
      linear-gradient(currentColor,currentColor) center/1px 100% no-repeat;
    opacity:.75; transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .3s ease;
  }
  .gd-footer.gd-acc .gd-footer-col.is-open h4::after{ transform:rotate(135deg); opacity:1; }

  .gd-footer.gd-acc .gd-footer-panel{
    display:grid; grid-template-rows:0fr;
    transition: grid-template-rows .5s cubic-bezier(.16,1,.3,1);
  }
  .gd-footer.gd-acc .gd-footer-col.is-open .gd-footer-panel{ grid-template-rows:1fr; }
  .gd-footer.gd-acc .gd-footer-panel > div{ overflow:hidden; min-height:0; visibility:hidden; transition: visibility 0s linear .5s; }
  .gd-footer.gd-acc .gd-footer-col.is-open .gd-footer-panel > div{ visibility:visible; transition: visibility 0s; }
  .gd-footer.gd-acc .gd-footer-panel > div > :last-child{ margin-bottom:22px; }
  .gd-footer.gd-acc .gd-footer-col ul{ gap:0; }
  .gd-footer.gd-acc .gd-footer-col li a{ display:flex; padding:9px 2px; font-size:.94rem; }
  .gd-footer.gd-acc .gd-footer-social{ margin-top:14px; }

  .gd-footer.gd-acc .gd-footer-bar{ flex-direction:column; align-items:flex-start; gap:8px; margin-top:28px; }
}
@media (prefers-reduced-motion:reduce){
  .sh-burger span, .gd-footer-panel, .gd-footer-col h4::after{ transition:none !important; }
}
