/* HEADER (shared by all pages) */
header {
  background: var(--white, #ffffff);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent-color, #00A4E0);
  position: sticky;
  top: 0;
  z-index: 1000;
  line-height: 1.7;
}
header img { height: 60px; width: auto; display: block; }
nav a {
  position: relative;
  margin: 0 15px;
  text-decoration: none;
  color: var(--main-color, #2C2F88);
  font-weight: bold;
  transition: color 0.3s;
}
nav a:hover { color: var(--accent-color, #00A4E0); }
nav a[aria-current="page"] { color: var(--accent-color, #00A4E0); }
nav a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; border-radius: 3px; background: var(--accent-color, #00A4E0); }
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--main-color, #2C2F88); }
/* No blue tap/focus highlight on the ☰ after tapping; keyboard users still get the outline */
.menu-toggle { -webkit-tap-highlight-color: transparent; }
.menu-toggle:focus:not(:focus-visible) { outline: none; }
.menu { display: flex; gap: 20px; }
.menu-langs { display: none; }
.language-switcher-wrapper { position: relative; display: inline-block; }
#language-switcher {
  padding: 6px 36px 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--main-color, #2C2F88);
  background: var(--white, #ffffff);
  color: var(--main-color, #2C2F88);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-size: 0.95rem;
}
#language-switcher:hover { border-color: var(--accent-color, #00A4E0); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
#language-switcher:focus { outline: none; border-color: var(--accent-color, #00A4E0); box-shadow: 0 0 0 2px rgba(0,164,224,0.3); }
.language-switcher-wrapper::after {
  content: '▾';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: var(--accent-color, #00A4E0);
}

.menu-under { display: none; }

/* Móvil: menú a pantalla completa que se abre en onda desde ☰ (la onda la genera menu.js) */
@media (max-width: 768px) {
  .menu-toggle { display: block; margin-left: auto; margin-right: 10px; position: relative; z-index: 1002; }
  .menu-toggle.is-open { color: #fff; }
  .menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1001;
    flex-direction: column;
    gap: 4px;
    padding: 80px 28px 28px;
    background: var(--main-color, #2C2F88);
    clip-path: circle(0 at 100% 0);
  }
  /* Lighter wave that opens just ahead of the menu (created and animated by menu.js) */
  .menu-under { display: block; position: fixed; inset: 0; z-index: 1000; background: #2A55A8; clip-path: circle(0 at 100% 0); }
  .menu a {
    margin: 0;
    padding: 8px 0;
    font-size: 22px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
  }
  .menu a[aria-current="page"] { color: #fff; text-decoration: underline; }
  .menu a[aria-current="page"]::after { display: none; }
  .menu.show a, .menu.show .menu-langs { opacity: 1; }
  .menu-langs { display: flex; gap: 8px; margin-top: auto; opacity: 0; transition: opacity 0.4s ease-in-out; }
  .menu-langs a { flex: 1; text-align: center; padding: 10px 0; font-size: 16px; border: 1px solid #fff; border-radius: 50px; }
  .menu-langs a[aria-current="page"] { background: #fff; color: var(--main-color, #2C2F88); text-decoration: none; }
  .language-switcher-wrapper { display: none; }
}
