.ic-header {
  /* COLORES */
  --ih-ink: #202720;
  --ih-paper: #F7F8F3;
  --ih-stone: #DADBCF;
  --ih-lime: #D3FE52;
  --ih-link-hover: #47632B;
  --ih-muted: #535C4E;
  --ih-border: #D5D9CE;

  /* Contorno del botón Menú: modificar la opacidad final. */
  --ih-menu-outline: rgba(32, 39, 32, .22);

  /* MEDIDAS DE LA CÁPSULA */
  --ih-width: 720px;
  --ih-top: 20px;
  --ih-side: 20px;

  position: fixed;
  top: calc(var(--ih-top) + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 99990;

  width: min(
    var(--ih-width),
    calc(100% - var(--ih-side) - var(--ih-side))
  );

  margin: 0;
  padding: 0;
  transform: translateX(-50%);

  color: var(--ih-ink);
  font-family: "Inter", Arial, sans-serif;
}

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

/* ==========================================================
   CÁPSULA
========================================================== */

.ic-header .ih-capsule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;

  width: 100%;
  padding: 8px;

  border: 1px solid rgba(32, 39, 32, .12);
  border-radius: 999px;
  background: rgba(247, 248, 243, .94);

  box-shadow: 0 6px 24px rgba(32, 39, 32, .06);

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

@supports (backdrop-filter: blur(12px)) {
  .ic-header .ih-capsule {
    background: rgba(247, 248, 243, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* Se oculta al llegar al footer. */
.ic-header.is-at-footer .ih-capsule {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================
   BOTONES SIMÉTRICOS

   Ambos reservan un borde de 1 px para mantener
   las mismas dimensiones exteriores.
========================================================== */

.ic-header .ih-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 18px;

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

  background: transparent;
  color: var(--ih-ink);

  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;

  box-shadow: none;
  cursor: pointer;

  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease;
}

/* NUEVO: contorno fino del botón Menú. */
.ic-header .ih-menu-button {
  justify-self: stretch;
  border-color: var(--ih-menu-outline);
}

.ic-language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font: 600 .8125rem/1 "Inter", Arial, sans-serif;
  text-decoration: none;
}

.ic-header .ic-language {
  border-color: var(--ih-menu-outline);
}

.ic-header .ic-language:hover {
  border-color: var(--ih-ink);
  background: var(--ih-stone);
}

.ic-header .ih-budget {
  justify-self: stretch;

  border-color: var(--ih-ink);
  background: var(--ih-ink);
  color: var(--ih-lime);
}

.ic-header .ih-menu-button:hover {
  border-color: var(--ih-ink);
  background: var(--ih-stone);
  color: var(--ih-ink);
}

.ic-header .ih-budget:hover {
  border-color: var(--ih-lime);
  background: var(--ih-lime);
  color: var(--ih-ink);
}

/* MARCA CENTRAL */
.ic-header .ih-brand {
  padding: 10px 5px;

  color: var(--ih-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.055em;
  text-decoration: none;
}

/* ICONO DE TRES LÍNEAS */
.ic-header .ih-menu-icon {
  display: grid;
  gap: 4px;
  width: 17px;
}

.ic-header .ih-menu-icon span {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.ic-header :is(a, button, summary):focus-visible {
  outline: 2px solid var(--ih-ink);
  outline-offset: 3px;
}

/* ==========================================================
   CONTENIDO DEL MENÚ
========================================================== */

.ic-header .ih-dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.ic-header .ih-menu-label {
  margin: 0;
  color: var(--ih-muted);
  font-size: 14px;
}

.ic-header .ih-links {
  display: grid;
  gap: 0;
}

.ic-header .ih-links :is(a, summary) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 16px 0;
  border-bottom: 1px solid var(--ih-border);

  color: var(--ih-ink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(25px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.04em;
  text-decoration: none;
}

.ic-header .ih-links :is(a, summary):hover {
  color: var(--ih-muted);
}

.ic-header .ih-services summary {
  list-style: none;
  cursor: pointer;
}

.ic-header .ih-services summary::-webkit-details-marker {
  display: none;
}

.ic-header .ih-services-chevron {
  flex: none;
  width: .38em;
  height: .38em;
  margin-inline-end: .12em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-20%) rotate(45deg);
  transition: transform .22s ease;
}

.ic-header .ih-services[open] .ih-services-chevron {
  transform: translateY(20%) rotate(225deg);
}

.ic-header .ih-services ul {
  margin: 0;
  padding: 0 0 0 clamp(16px, 3vw, 28px);
  list-style: none;
}

.ic-header .ih-services li a {
  min-height: 44px;
  padding-block: 12px;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: -.025em;
}

.ic-header .ih-arrow {
  display: inline-block;
  flex: none;
  transition: transform .22s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .ic-header :is(.ih-links a, .ih-budget):focus-visible .ih-arrow {
    transform: translate(3px, -3px);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ic-header :is(.ih-links a, .ih-budget):hover .ih-arrow {
    transform: translate(3px, -3px);
  }
}

.ic-header .ih-dialog-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;

  margin-top: 32px;
  font-size: 14px;
}

.ic-header .ih-dialog-bottom a {
  color: var(--ih-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: color .22s ease;
}

.ic-header .ih-dialog-bottom .ih-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.ic-header .ih-dialog-bottom a:is(:hover, :focus-visible) {
  color: var(--ih-link-hover);
}

/* ==========================================================
   BARRA DE ADMINISTRACIÓN WORDPRESS
========================================================== */

body.admin-bar .ic-header {
  top: calc(
    var(--ih-top) + 32px + env(safe-area-inset-top, 0px)
  );
}

@media (max-width: 782px) {
  body.admin-bar .ic-header {
    top: calc(
      var(--ih-top) + 46px + env(safe-area-inset-top, 0px)
    );
  }
}

/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 600px) {
  .ic-header {
    --ih-top: 12px;
    --ih-side: 12px;
  }

  .ic-header .ih-capsule {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 5px;
    padding: 6px;
  }

  .ic-header .ih-action {
    gap: 7px;
    min-height: 44px;
    padding: 10px;
    font-size: 14px;
  }

  .ic-header .ih-brand {
    justify-self: center;
    padding-right: 2px;
    padding-left: 2px;
    font-size: clamp(18px, 5vw, 23px);
  }

  .ic-header .ih-budget-arrow {
    display: none;
  }
}

@media (max-width: 385px) {
  .ic-header {
    --ih-side: 8px;
  }

  .ic-header .ih-capsule {
    gap: 3px;
    padding-inline: 4px;
  }

  .ic-header .ih-menu-button {
    min-width: 44px;
  }

  .ic-header .ih-menu-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ic-header .ih-budget {
    padding-inline: 8px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ic-header .ih-capsule,
  .ic-header .ih-action,
  .ic-header .ih-arrow,
  .ic-header .ih-services-chevron,
  .ic-header .ih-dialog-bottom a {
    transition: none;
  }
}
