/* Technical layer only: approved page styles stay inline from source HTML files. */
.lang a {
  color: inherit;
  text-decoration: none;
}

.lang a:hover {
  color: #fff;
}

.header .container.header-inner {
  width: min(1440px, calc(100% - 32px));
}

.header-inner {
  min-width: 0;
  gap: clamp(14px, 1.2vw, 24px);
}

.header .brand {
  flex: 0 0 auto;
  min-width: 0;
}

.header .logo {
  width: clamp(142px, 10vw, 176px);
  height: auto;
  max-height: 62px;
  max-width: 176px;
  object-fit: contain;
  display: block;
}

.header .brand-copy {
  display: none;
}

.header-actions {
  flex: 0 0 auto;
}

.header .nav {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(10px, .75vw, 16px);
}

.header .nav > a,
.header .nav-course > a {
  font-size: .85rem;
}

.header-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 12px clamp(15px, 1vw, 20px);
  font-size: .86rem;
}

body[data-lang="es"] .header-inner {
  gap: clamp(8px, .75vw, 14px);
}

body[data-lang="es"] .header .nav {
  gap: clamp(8px, .55vw, 12px);
}

body[data-lang="es"] .header .nav > a,
body[data-lang="es"] .header .nav-course > a {
  font-size: .8rem;
}

body[data-lang="es"] .header-actions .btn {
  padding: 12px;
  font-size: .8rem;
}

body[data-lang="es"] .lang {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: .8rem;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
}

.footer .brand {
  min-width: 0;
}

.footer .logo {
  width: 122px;
  height: auto;
  max-height: 52px;
  max-width: 122px;
  object-fit: contain;
  display: block;
}

.form-field select,
.newsletter select {
  background: #fff;
  color: #111;
}

.form-field select option,
.newsletter select option {
  background: #fff;
  color: #111;
}

a[aria-disabled="true"] {
  cursor: default;
  opacity: .58;
}

.nav-course {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.course-toggle {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: .84;
  padding: 0;
}

.course-toggle::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin: auto;
}

.course-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  display: grid;
  min-width: 300px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(13, 13, 13, .96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.nav-course:hover .course-dropdown,
.nav-course:focus-within .course-dropdown,
.nav-course.is-open .course-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.course-dropdown a {
  padding: 10px 12px;
  border-radius: 10px;
  white-space: normal;
}

.course-dropdown a:hover {
  background: rgba(255, 255, 255, .07);
}

.burger {
  cursor: pointer;
}

@media (max-width: 1260px) {
  .header .logo {
    width: 118px;
    height: auto;
    max-height: 50px;
    max-width: 118px;
  }

  .header-inner {
    gap: 10px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    max-width: 142px;
    padding: 0 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.08;
    font-size: .78rem;
  }

  .header .nav {
    display: none;
  }

  .burger {
    display: grid;
  }

  .header.is-open .nav {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    z-index: 30;
    display: grid;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(13, 13, 13, .97);
    box-shadow: var(--shadow);
  }

  .header.is-open .nav > a,
  .header.is-open .nav-course > a {
    padding: 12px;
  }

  .header.is-open .nav-course {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .header.is-open .course-dropdown {
    position: static;
    grid-column: 1 / -1;
    display: none;
    min-width: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .header.is-open .nav-course.is-open .course-dropdown {
    display: grid;
  }
}

@media (max-width: 520px) {
  .header .container.header-inner {
    width: min(1440px, calc(100% - 20px));
  }

  .header .logo {
    width: 86px;
    height: auto;
    max-height: 42px;
    max-width: 86px;
  }

  .lang {
    font-size: .74rem;
  }

  .header-actions .btn {
    min-height: 40px;
    max-width: 116px;
    padding: 0 8px;
    font-size: .7rem;
  }
}
