/* =========================
   HEADER / NAVBAR
========================= */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 9999;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 28px;

  background: var(--black);
  color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);

  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-hero {
  background: transparent;
  color: var(--black);
  box-shadow: none;
}

.site-header.is-scrolled {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* =========================
   LOGO — SVG inline
========================= */

.logo {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* Marca geométrica original — dos gradientes CSS */
.logo-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background:
    linear-gradient(45deg,  currentColor 0 45%, transparent 45%),
    linear-gradient(-45deg, var(--accent) 0 45%, transparent 45%);
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* =========================
   NAV
========================= */

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 38px;
}

.main-nav a {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  opacity: 1;
  color: var(--accent);
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: currentColor;
}

/* =========================
   LADO DERECHO
   Lang switcher + Theme toggle + Social
========================= */

.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   SOCIAL LINKS
========================= */

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-links a {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  font-size: 9px;
  font-weight: 700;
}

/* =========================
   SELECTOR DE IDIOMA
========================= */

.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 7px;

  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  padding: 5px 10px 5px 8px;
  cursor: pointer;
  color: inherit;

  transition: border-color 0.25s ease;
}

.site-header.is-hero .lang-current {
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--black);
}

.site-header.is-scrolled .lang-current {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.lang-current:hover {
  border-color: var(--accent);
}

.lang-flag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-flag svg {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.lang-flag span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.lang-caret {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: transform 0.25s ease;
}

.lang-switcher.is-open .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}

.lang-switcher.is-open .lang-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.18s ease;
  text-align: left;
}

.lang-option svg {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.lang-option:hover {
  background: var(--soft);
}

.lang-option.is-active {
  background: var(--soft);
  font-weight: 900;
}

.lang-option.is-active::after {
  content: '✓';
  margin-left: auto;
  color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .main-nav,
  .social-links {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 20px;
  }

  .logo {
    font-size: 20px;
  }

  .lang-flag span {
    display: none;
  }

  .lang-current {
    padding: 5px 8px;
  }
}

