header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 5000;
  pointer-events: none;
}

/* Contenedor interno */
.header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 122px;
}

.left-part,
.right-part {
  pointer-events: auto;
  display: flex;
  align-items: center;
  padding-top: 150px;
}

.logo a {
  margin: 0;
  color: var(--text);
  padding-left: 50px;
}

.logo-svg {
  width: 52px;
  height: auto;
  fill: none;
  stroke: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.95;
}

.logo a:hover .logo-svg {
  transform: scale(1.05);
  opacity: 1;
}

.logo-svg path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLogo 1.6s ease forwards;
}

.lenguaje-switch {
  position: relative;
}

/* BOTÓN */
.lang-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;

  text-decoration: none;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 38px;
  opacity: .9;

  display: inline-block;
  height: 54px;
  overflow: hidden;
  position: relative;

  transition: opacity .25s ease, transform .25s ease;
}

.lang-toggle:hover {
  opacity: 1;
}

/* Contenedor interno */
.lang-wrapper {
  position: relative;
  display: inline-block;
}

/* Textos */
.lang {
  display: block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lang.en {
  transform: translateY(0%);
}

.lang.es {
  position: absolute;
  top: 100%;
  left: 0;
}

/* ✅ CUANDO SE PRESIONA (como moon/sun) */
.lang-toggle[aria-pressed="true"] .lang.en {
  transform: translateY(-100%);
}

.lang-toggle[aria-pressed="true"] .lang.es {
  transform: translateY(-100%);
}


header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .header-content .right-part ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

/* icon button */
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn svg {
  width: 35px;
  height: 35px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* THEME */
.theme-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 999;
  stroke-dashoffset: 999;
  animation: drawMoon 1.1s ease forwards;
}

.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle .icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
}

.theme-toggle .moon {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle .sun {
  opacity: 0;
  transform: translateY(-120%);
}

.theme-toggle[aria-pressed="true"] .moon {
  opacity: 0;
  transform: translateY(120%);
}

.theme-toggle[aria-pressed="true"] .sun {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle[aria-pressed="true"] .sun-icon path {
  stroke-dasharray: 999;
  stroke-dashoffset: 999;
  animation: drawSun .9s ease forwards;
}

.sun-icon {
  width: 28px;
  height: 28px;
}

.sun-icon path {
  stroke: currentColor;
  stroke-width: 30;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

/* menu icon (líneas) */
.menu-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-icon path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawMenu .9s ease forwards;
}

/* hamburger grid */
.hamburger-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;

  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;

  color: var(--muted);
  cursor: pointer;

  box-shadow: none;
  outline: none;
  transition: color .18s ease, transform .18s ease;
}

.hamburger-btn:hover {
  color: var(--text);
}

.hamburger-btn:active {
  transform: scale(.96);
}

.hamburger-btn:focus,
.hamburger-btn:focus-visible {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.hamburger-icon {
  width: 34px;
  height: 34px;
  display: block;
}

.hamburger-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: drawGrid .7s ease forwards;
}

/* trigger hover */
.hamburger-btn:hover .hamburger-icon rect {
  animation: drawGrid .7s ease forwards;
}

/* stagger */
.hamburger-btn:hover .hamburger-icon rect:nth-child(1) {
  animation-delay: 0s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(2) {
  animation-delay: .05s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(3) {
  animation-delay: .10s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(4) {
  animation-delay: .15s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(5) {
  animation-delay: .20s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(6) {
  animation-delay: .25s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(7) {
  animation-delay: .30s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(8) {
  animation-delay: .35s;
}

.hamburger-btn:hover .hamburger-icon rect:nth-child(9) {
  animation-delay: .40s;
}

/* menu2 icon */
.menu2-icon {
  width: 34px;
  height: 34px;
  display: block;
  fill: none;
}

.menu2-icon path {
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 999;
  stroke-dashoffset: 999;
}

.menu3-icon {
  width: 34px;
  height: 34px;
  display: block;
  fill: none;
}

.menu3-icon path {
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 999;
  stroke-dashoffset: 999;
}

/* capas hover */
.hamburger-btn .icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity .25s ease, transform .25s ease;
}

.icon-close {
  opacity: 0;
  transform: scale(.85);
  transition: opacity .25s ease, transform .25s ease;
}

.icon-close path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
}

body.menu-open .icon-close {
  opacity: 1;
  transform: scale(1);
}

body.menu-open .icon-close path {
  animation: drawX .6s ease forwards;
}

body.menu-open .hamburger-btn .icon-close {
  opacity: 1 !important;
  transform: scale(1);
}

.hamburger-btn .icon-default {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn .icon-hover {
  opacity: 0;
  transform: scale(.92);
  pointer-events: none;
}

.hamburger-btn:hover .icon-default {
  opacity: 0;
  transform: scale(.92);
}

.hamburger-btn:hover .icon-hover {
  opacity: 1;
  transform: scale(1);
}

.hamburger-btn:hover .menu2-icon path {
  animation: drawMenu2 .8s ease forwards;
}

.hamburger-btn:hover .menu3-icon path {
  animation: drawMenu2 .0s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    padding: 0 18px;
  }

  .right-part ul {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hamburger-icon rect {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Keyframes (sin duplicados) */
@keyframes drawLogo {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawMoon {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawSun {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawMenu {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawGrid {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawMenu2 {
  to {
    stroke-dashoffset: 0;
  }
}