/**
 * Estilos custom del desarrollador.
 *
 * @package ITA_Salud_Mental
 * @version 1.0.0
 */

/* ============================================================
   VARIABLES
   ============================================================ */

:root {
  --pre-header-height: 40px; /* 10px padding × 2 + ~20px line-height */
}

/* ============================================================
   LAYOUT
   ============================================================ */

/* ============================================================
   BLOCK SPACING — espacio entre bloques de contenido
   ============================================================ */

#main-content > * {
  margin-bottom: 112px;
  padding: var(--page-padding);
}
#main-content > .ita-hero,
#main-content > .ita-treatments {
  margin-bottom: calc(112px + 32px);
}

#main-content > .ita-hero {
  padding: var(--special-padding);
}

#main-content > .post-hero-wrap {
  margin-bottom: calc(48px + 32px);
  padding: var(--page-padding);
}

@media (max-width: 768px) {
  #main-content > *,
  #main-content > .ita-hero,
  #main-content > .post-hero-wrap {
    margin-bottom: 40px;
  }

  #main-content > .ita-treatments {
    margin-bottom: calc(64px + 32px);
  }

  #main-content > .ita-appointment {
    margin-bottom: calc(64px + 24px);
  }
}

/* ============================================================
   PRE-HEADER
   ============================================================ */

.pre-header {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, calc(100% - 16px));
  z-index: 1001;
  background: #37424a;
  text-align: center;
  height: 40px;
  border-radius: 16px;
  padding: 10px 24px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.is-scrolled .pre-header {
  opacity: 1;
  pointer-events: auto;
}

.pre-header__message {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.pre-header__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.pre-header__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: dot-ping 1.6s ease-out infinite;
  animation-play-state: paused;
}

body.is-scrolled .pre-header__dot::after {
  animation-play-state: running;
}

@keyframes dot-ping {
  0% {
    transform: scale(0.3);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

.pre-header__text--mobile {
  display: none;
}

@media (max-width: 768px) {
  .pre-header__text--desktop {
    display: none;
  }

  .pre-header__text--mobile {
    display: inline;
    font-size: 14px;
  }
  .pre-header {
    left: 8px;
    transform: none;
    width: calc(100% - 16px);
  }
}

.pre-header__phone {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.pre-header__phone:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* ============================================================
   SITE HEADER — pill flotante
   ============================================================ */

/* sticky (not relative) so transform-based show/hide never causes layout shift */
.site-header {
  position: sticky;
  top: 8px;
  z-index: 1000;
  background: transparent;
  margin: 8px 8px 0 8px;
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

.home .site-header {
  margin: 8px;
}

body.is-scrolled .site-header {
  transform: translateY(calc(-100% - 20px));
  opacity: 0;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--header-bg);
  border-radius: var(--header-radius);
  padding: 14px;
  box-shadow: var(--header-shadow);
  position: relative; /* referencia para el mega-menú */
  max-width: 1216px;
  margin: 0 auto;
}

/* ============================================================
   LOGO
   ============================================================ */

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo svg {
  display: block;
  height: 44px;
  width: auto;
}

/* ============================================================
   NAV PRINCIPAL (desktop)
   ============================================================ */

.nav-primary {
  flex: 1;
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

/* Todos los ítems de primer nivel: position static
   para que el mega-menú se posicione relativo a header-inner */
.primary-menu > li {
  position: static;
}

.primary-menu > li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: var(--menu-font-size);
  font-weight: 500;
  color: var(--menu-color);
  text-decoration: none;
  border-radius: 16px;
  white-space: nowrap;
  line-height: 1.4;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

/* Hover, foco y página activa → subrayado con color de acento */
.primary-menu > li > a:hover,
.primary-menu > li > a:focus,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a {
  background-color: var(--mega-media-bg);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 16px;
  color: white;
}

/* Flecha chevron para ítems con hijos */
.primary-menu > li.menu-item-has-children > a::after,
.primary-menu > li.menu-item-has-children > .link-wrap > a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: var(--transition);
  flex-shrink: 0;
}

.primary-menu > li.menu-item-has-children.is-open > a::after,
.primary-menu > li.menu-item-has-children.is-open > .link-wrap > a::after {
  transform: rotate(-135deg) translate(-1px, -2px);
}

/* ============================================================
   MEGA MENÚ — panel desplegable
   ============================================================ */

.mega-menu {
  display: none; /* JS/hover lo muestra */
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--color-bg-page);
  border-radius: var(--mega-radius);
  box-shadow: var(--mega-shadow);
  padding: 24px;
  z-index: 200;
  width: 100%;
  overflow: hidden; /* clip border-radius en columna media */
  /* Flex row: nivel-1 | nivel-2 | imagen */
  align-items: stretch;
  gap: 0;
  justify-content: space-between;
}

/* Apertura por hover (dispositivos con puntero preciso) */
@media (hover: hover) {
  .primary-menu > li.menu-item-has-children:hover > .mega-menu {
    display: flex;
  }
}

/* Apertura por clase JS (manejo de gap + teclado + mobile) */
.primary-menu > li.menu-item-has-children.is-open > .mega-menu {
  display: flex;
}

/* ── Columna 1: lista de nivel-1
   Override necesario: .nav-primary ul ul { display:none } del style.css base
   tiene especificidad (0,1,2) — usamos (0,3,0) para ganar. */
.nav-primary .mega-menu .mega-menu__list {
  display: flex;
  position: static;
  top: auto;
  left: auto;
  box-shadow: none;
  background: transparent;
  border: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
  border-right: 1px solid var(--color-border-default);
  padding-right: 24px;
}

/* ── Nivel-1: enlaces */
.mega-menu__list > li > a {
  display: block;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: var(--menu-color);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  border-radius: var(--border-radius);
  width: fit-content;
}

.mega-menu__list > li > a:hover,
.mega-menu__list > li.is-active a,
.mega-menu__list > li.current-menu-item a,
.mega-menu__list > li.current-menu-ancestor a,
.mega-menu__list > li.current-menu-parent a {
  background-color: var(--color-lime-muted);
  color: var(--color-text);
}

/* ── Columna 2: sub-menú nivel-2 — flex sin position absolute */
.nav-primary .mega-menu .mega-menu__sub {
  display: none;
  position: static;
  flex: 1;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0 28px;
  gap: 2px;
  box-shadow: none;
  background: transparent;
  border: none;
}

.nav-primary .mega-menu .mega-menu__sub.is-visible {
  display: flex;
}

/* ── Nivel-2: enlaces */
.mega-menu__sub > li > a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition);
}

.mega-menu__sub > li > a:hover,
.mega-menu__sub > li.current-menu-item > a,
.mega-menu__sub > li.current-menu-ancestor > a,
.mega-menu__sub > li.current-menu-parent > a {
  opacity: 0.5;
}

/* ── CTA "Ver todos" — class menu-cta en el editor de menús de WP */

.mega-menu__list > li.menu-cta > a {
  background-color: var(--color-text);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 12px 16px;
  font-size: 16px;
  transition: var(--transition);
  margin-top: 4px;
}

.mega-menu__list > li.menu-cta > a:hover {
  background-color: var(--menu-color);
}

.mega-menu__sub > li.menu-cta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-default);
}

.mega-menu__sub > li.menu-cta > a {
  background-color: var(--color-cta);
  color: #fff;
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 10px 16px;
  opacity: 1;
}

.mega-menu__sub > li.menu-cta > a:hover {
  background-color: var(--color-cta-hover);
  opacity: 1;
}

/* ── Columna 3: imagen/media */
.mega-menu__media {
  flex: 0 0 230px;
  min-height: 200px;
  background: var(--mega-media-bg);
  overflow: hidden;
  border-radius: var(--border-radius);
}

.mega-menu__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   ACCIONES DEL HEADER (iconos derecha)
   ============================================================ */

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding-left: 4px;
}

.header-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  color: #37424a;
  text-decoration: none;
  transition: var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.header-action:hover {
  background: var(--menu-hover-bg);
}

.header-action svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* ============================================================
   LANGUAGE SWITCHER (TranslatePress inline en header)
   ============================================================ */

/* Ocultar el switcher flotante del plugin — usamos el del header */
.trp-floating-switcher {
  display: none !important;
}

/* Wrapper que ponemos en el header */
.header-lang-switcher {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Centrar verticalmente el contenido del wrapper */
.header-lang-switcher .trp-shortcode-switcher__wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Eliminar padding vertical del switcher */
.header-lang-switcher .trp-shortcode-switcher {
  padding: 0;
}

/* Fondo blanco en el overlay (el plugin lo tiene transparente por defecto) */
.header-lang-switcher .trp-shortcode-overlay {
  background: #fff !important;
}

/* Border radius e items del dropdown */
.header-lang-switcher .trp-language-item {
  padding: 8px 4px 8px 16px;
  border-radius: 16px;
}

/* Arrow con transición al abrir/cerrar */
.header-lang-switcher .trp-shortcode-arrow {
  transition: transform 0.2s ease;
}

.header-lang-switcher
  .trp-language-item[aria-expanded="true"]
  ~ .trp-shortcode-arrow {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .header-lang-switcher
    .trp-current-language-item__wrapper:not(.trp-hide-arrow) {
    padding-right: 0;
  }
}

/* ============================================================
   HAMBURGER (mobile toggle)
   ============================================================ */

.menu-toggle {
  display: none; /* visible solo en mobile (ver abajo) */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--menu-hover-bg);
}

.menu-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--menu-color);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Botón de sub-menú (inyectado por JS, solo mobile) */
.submenu-toggle {
  display: none;
}

/* Toggle nivel-1 mega-menú: siempre oculto en desktop */
.submenu-toggle--lvl1 {
  display: none;
}

/* ============================================================
   RESPONSIVE — MOBILE ( ≤ 1024px )
   ============================================================ */

@media (max-width: 1024px) {
  .primary-menu {
    gap: 0;
  }
}
@media (max-width: 768px) {
  .header-inner {
    padding: 10px;
  }

  /* Mostrar hamburger */
  .menu-toggle {
    display: flex;
  }

  /* Nav se convierte en panel flotante */
  .nav-primary {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-radius: 20px;
    box-shadow: var(--header-shadow);
    padding: 8px;
    z-index: 100;
  }

  .nav-primary.nav-open {
    display: block;
  }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-menu > li {
    position: relative; /* para posicionar .submenu-toggle */
  }

  .primary-menu > li > a {
    border-radius: 12px;
    padding: 12px 14px;
  }

  /* Ocultar chevron en mobile (lo maneja el .submenu-toggle) */
  .primary-menu > li.menu-item-has-children > a::after {
    display: none;
  }

  /* Wrapper flex link + toggle en mobile */
  .link-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Botón toggle de sub-menú en mobile */
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
  }

  .submenu-toggle svg {
    transition: transform 0.3s ease-in-out;
  }

  .submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  /* Mega-menú inline en mobile: stack simple */
  .mega-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding: 4px 8px 8px;
    min-width: 0;
    width: 100%;
    overflow: visible;
    display: none !important;
    flex-direction: column;
  }

  .primary-menu > li.menu-item-has-children.is-open > .mega-menu {
    display: flex !important;
    flex-direction: column;
  }

  /* Sub-menú nivel-2: en mobile se apila bajo la lista */
  .nav-primary .mega-menu .mega-menu__sub {
    flex: none;
    padding: 0 0 4px 12px;
    gap: 0;
  }

  /* Level-1 items: position relative para anclar el toggle */
  /* Wrapper flex del link + toggle nivel-1 */
  .lvl1-link-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Mostrar el toggle de nivel-1 en mobile */
  .submenu-toggle--lvl1 {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
  }

  /* Ocultar área media en mobile */
  .mega-menu__media {
    display: none;
  }

  .mega-menu__list li a {
    padding: 8px 14px;
    border-radius: 8px;
  }
  .header-action {
    display: none;
  }
}

/* ============================================================
   MOBILE OVERLAY — menú fullscreen
   ============================================================ */

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg-page);
  z-index: 9990;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-overlay.is-open {
  display: flex;
}

/* Cabecera del overlay: logo + botón cerrar */
.mobile-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  flex-shrink: 0;
}

.mobile-overlay__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-overlay__close:hover {
  background: rgba(50, 62, 72, 0.07);
}

.mobile-overlay__close svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* Nav: empujada al fondo con margin-top: auto */
.mobile-overlay__nav {
  margin-top: auto;
  padding: 0 20px;
  flex-shrink: 0;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav__list li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 8px 0;
}

.mobile-nav__list > li a {
  padding: 8px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--menu-color);
  text-decoration: none;
  line-height: 1.3;
}

.mobile-nav__list > li:not(.menu-item-has-children) > a {
  padding-right: 4px;
}

/* Ocultar chevron de desktop (::after) en overlay */
.mobile-nav__list > li.menu-item-has-children > a::after {
  display: none;
}

/* Sub-menú expandible */
.mobile-nav__list .sub-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 12px 0;
  grid-column: 1 / -1; /* ocupa ambas columnas, fila 2 */
}

.mobile-nav__list li.is-open > .sub-menu {
  display: block;
}

.mobile-nav__list .sub-menu li.is-open.menu-item-has-children > a {
  background-color: var(--color-lime-muted);
  color: var(--color-text);
}

.mobile-nav__list .sub-menu a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--menu-color);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.mobile-nav__list .sub-menu .sub-menu a {
  font-weight: 400;
}

.mobile-nav__list .sub-menu a:hover {
  opacity: 1;
}

/* Mega-menú en overlay: lista plana, sin media */
.mobile-overlay .mega-menu {
  display: none;
  position: static;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 12px 0;
  min-width: 0;
  background: transparent;
  grid-column: 1 / -1;
}

.mobile-nav__list li.is-open > .mega-menu {
  display: block;
}

.mobile-overlay .mega-menu__media {
  display: none;
}

.mobile-overlay .mega-menu__list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-overlay .mega-menu__list li a {
  display: block;
  padding: 10px 4px 10px 16px;
  font-size: 0.9rem;
  color: var(--menu-color);
  text-decoration: none;
  border-radius: 0;
  white-space: normal;
  opacity: 0.8;
}

.mobile-overlay .mega-menu__list li a:hover {
  background: transparent;
  opacity: 1;
}

.mobile-overlay .mega-menu__sub {
  display: flex;
  flex-direction: column;
  position: static;
  padding: 0 0 8px 16px;
  gap: 0;
}

/* ── CTA "Ver todos" en mobile */
.mobile-overlay li.menu-cta {
  margin-top: 6px;
}

.mobile-overlay li.menu-cta a {
  background-color: var(--color-text);
  color: #fff;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 16px;
  padding: 12px 16px;
  opacity: 1;
  transition: var(--transition);
}

.mobile-overlay li.menu-cta a:hover {
  background-color: var(--menu-color);
  opacity: 1;
}

/* Wrapper flex link + toggle dentro del overlay */
.mobile-overlay .link-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Botón toggle submenú (inyectado por JS) dentro del overlay */
.mobile-overlay .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-overlay .submenu-toggle svg {
  transition: transform 0.3s ease-in-out;
}

.mobile-overlay .submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Botón CTA "Pide cita" */
.mobile-overlay__footer {
  padding: 20px 20px 36px;
  flex-shrink: 0;
}

.mobile-cta {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: var(--menu-color);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 100px;
  transition: var(--transition);
  box-sizing: border-box;
}

.mobile-cta:hover {
  background: #2e6235;
  color: #ffffff;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

/* Override del fondo base del tema */
.site-footer {
  background: white;
  padding: 0 8px 8px;
}

/* Tarjeta oscura */
.footer-card {
  background: var(--mega-media-bg);
  border-radius: 16px;
  padding: 24px;
}

/* ---------- Logo (top) ---------- */

.footer-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.9;
  transition: var(--transition);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-logo svg {
  display: block;
  height: 28px;
  width: auto;
}

/* ---------- Divisores ---------- */

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 24px 0;
}

/* ---------- Nav principal (depth 2 — cada columna es un li padre) ---------- */

/* Fila de columnas */
.footer-nav-main .footer-main-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Cada columna */
.footer-nav-main .footer-main-menu > li {
  flex: 1;
  min-width: 0;
}

/* Header de columna (el link del item padre) */
.footer-nav-main .footer-main-menu > li > a {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  cursor: default;
  margin-bottom: 12px;
  line-height: 1.2;
}

/* Sub-menú = links de la columna */
.footer-nav-main .footer-main-menu > li > .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav-main .footer-main-menu > li > .sub-menu a {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  line-height: 20px;
  transition: var(--transition);
}

.footer-nav-main .footer-main-menu > li > .sub-menu a:hover {
  opacity: 0.65;
}

/* Columnas sin título visible */
.footer-nav-main .footer-main-menu > li.no-heading > a {
  display: none;
}

/* ---------- Clariane ---------- */

.footer-clariane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-clariane__wordmark {
  display: block;
  width: 100px;
  height: 19px;
  flex-shrink: 0;
}

.footer-clariane__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-clariane__desc {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 70%;
  line-height: 1.4;
}

.footer-clariane__contacts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.footer-clariane__link {
  color: white;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.footer-clariane__link:hover {
  color: white;
  opacity: 0.5;
}

/* ---------- Fila inferior (redes + legal) ---------- */

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Redes sociales — pills ---------- */

.footer-nav-social .footer-social-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-nav-social .footer-social-menu li {
  display: flex;
}

.footer-nav-social .footer-social-menu a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 7px 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: var(--transition);
  white-space: nowrap;
}

.footer-nav-social .footer-social-menu a:hover {
  border-color: rgba(255, 255, 255, 0.7);
  opacity: 0.85;
}

/* Icons via ::before — matched by href */
.footer-nav-social .footer-social-menu a::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.footer-nav-social .footer-social-menu a[href*="facebook"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'/%3E%3C/svg%3E");
}

.footer-nav-social .footer-social-menu a[href*="x.com"]::before,
.footer-nav-social .footer-social-menu a[href*="twitter.com"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.737-8.835L1.254 2.25h7.12l4.256 5.636 5.614-5.636zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z'/%3E%3C/svg%3E");
}

.footer-nav-social .footer-social-menu a[href*="instagram"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5' ry='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Ccircle cx='17.5' cy='6.5' r='0.5' fill='white' stroke='none'/%3E%3C/svg%3E");
}

.footer-nav-social .footer-social-menu a[href*="linkedin"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z'/%3E%3Crect x='2' y='9' width='4' height='12'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
}

.footer-nav-social .footer-social-menu a[href*="youtube"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58a2.78 2.78 0 0 0 1.95 1.96C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 0 0 1.95-1.96A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58z'/%3E%3Cpolygon fill='%23333' points='9.75 15.02 15.5 12 9.75 8.98 9.75 15.02'/%3E%3C/svg%3E");
}

/* ---------- Legal ---------- */

.footer-legal__copyright {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}
.footer-nav-legal .footer-legal-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: flex-end;
}

.footer-legal-menu li {
  line-height: 1;
}

.footer-nav-legal .footer-legal-menu a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.footer-nav-legal .footer-legal-menu a:hover {
  color: #ffffff;
}

/* ---------- Desktop ---------- */

@media (min-width: 769px) {
  .site-footer {
    padding-bottom: 48px;
  }

  .footer-card {
    padding: 48px;
  }

  .footer-logo svg {
    height: 33px;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  .footer-nav-main .footer-main-menu {
    flex-direction: column;
    gap: 0;
  }

  .footer-nav-main .footer-main-menu > li {
    padding: 14px 0;
  }

  .footer-nav-main .footer-main-menu > li:last-child {
    border-bottom: none;
  }

  .footer-nav-main .footer-main-menu > li > a {
    margin-bottom: 8px;
  }

  .footer-nav-main .footer-main-menu > li.no-heading > .sub-menu {
    margin-top: 0;
  }

  .footer-nav-main li.no-heading.menu-item {
    padding-bottom: 4px;
    padding-top: 0;
  }
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-nav-legal .footer-legal-menu {
    justify-content: flex-start;
  }

  .footer-clariane__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-clariane__contacts {
    gap: 16px;
  }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

#main-content > .ita-breadcrumb {
  margin: 24px auto;
  padding: var(--page-padding);
}

.ita-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.ita-breadcrumb__item + .ita-breadcrumb__item::before {
  content: "/";
  opacity: 0.5;
  margin-right: 0.5rem;
  user-select: none;
}

.ita-breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.ita-breadcrumb__link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.ita-breadcrumb__item--current span {
  color: var(--color-text);
  font-weight: 500;
  max-width: 40ch;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}
@media (max-width: 767px) {
  #main-content > .ita-breadcrumb {
    margin: 16px auto;
  }
}
