/* Cabecera compartida del canal público: inicio, buzón y formulario. */
.navbar-custom.channel-header {
  --header-logo-max-width: 186px;
  --header-logo-max-height: 96px;
  padding: 16px 0;
  background: #fff;
  border-bottom: 3px solid var(--primary-medium, #00a3da);
}

.channel-header *,
.channel-header *::before,
.channel-header *::after {
  box-sizing: border-box;
}

.channel-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.channel-header__company {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: var(--header-logo-max-height);
}

.channel-header__logo,
.channel-header__logo-placeholder {
  grid-column: 1;
  grid-row: 1;
  width: min(var(--header-logo-max-width), calc(var(--header-logo-max-height) * var(--header-logo-ratio, 1.9375)));
  height: var(--header-logo-max-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
}

.channel-header__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  transform: none;
}

.channel-header__logo[data-logo-state="pending"] img {
  visibility: hidden;
}

.channel-header__logo[data-logo-state="empty"] {
  display: none;
}

.channel-header__company-copy,
.channel-header__text-placeholder {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  text-align: left;
}

.channel-header__company--without-logo .channel-header__company-copy {
  grid-column: 1 / -1;
}

.channel-header__company-name {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-dark, #006a8e);
  overflow-wrap: anywhere;
}

.channel-header__company-subtitle {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: #526775;
}

.channel-header__provider {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channel-header__provider-logo {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.channel-header__provider-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #496b78;
}

.channel-header__provider-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: #627680;
}

.channel-header .lang-selector {
  position: relative;
  justify-self: end;
  margin: 0;
}

.channel-header .lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 8px 16px;
  border: 2px solid var(--border-light, #b3e5fc);
  border-radius: 50px;
  background: var(--primary-light, #e6f7ff);
  color: var(--primary-dark, #006a8e);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.channel-header .lang-btn:hover {
  background: #fff;
  border-color: var(--primary-medium, #00a3da);
  box-shadow: none;
  transform: none;
}

.channel-header .lang-btn::before,
.channel-header .lang-dropdown button::before {
  content: none;
}

.channel-header__language-chevron {
  font-size: 11px;
}

.channel-header .lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 1001;
}

.channel-header .lang-dropdown.show {
  display: block;
}

.channel-header .lang-dropdown button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #37474f;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.channel-header .lang-dropdown button:hover,
.channel-header .lang-dropdown button.active {
  background: var(--primary-light, #e6f7ff);
  color: var(--primary-dark, #006a8e);
  box-shadow: none;
  transform: none;
}

.channel-header .lang-dropdown button.active {
  font-weight: 600;
}

.channel-header button:focus-visible {
  outline: 2px solid var(--primary-dark, #006a8e);
  outline-offset: 3px;
}

.channel-header__logo-placeholder {
  border-radius: 8px;
}

.channel-header__text-placeholder {
  width: 220px;
  max-width: 100%;
}

.channel-header__text-placeholder .skeleton {
  max-width: 100%;
}

@media (max-width: 850px) {
  .channel-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 22px;
  }

  .channel-header__company {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .navbar-custom.channel-header {
    --header-logo-max-width: min(186px, 38vw);
    padding: 17px 0;
  }

  .channel-header__inner {
    gap: 14px 12px;
    padding: 0 17px;
  }

  .channel-header__company-name {
    font-size: clamp(20px, 6vw, 26px);
  }

  .channel-header__company-subtitle {
    font-size: 12px;
  }

  .channel-header__provider-logo {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .channel-header__provider-name {
    font-size: 15px;
  }

  .channel-header__provider-subtitle {
    font-size: 10px;
  }

  .channel-header .lang-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}
