/* Chrome portal compartido (header sticky + footer). Los tokens los define cada theme. */

html,
body {
  margin: 0;
  padding: 0;
}

.ac-root,
.ac-root *,
.ac-root *::before,
.ac-root *::after {
  box-sizing: border-box;
}

.ac-root {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  min-height: 100dvh;
  --ac-column: min(calc(100% - 3rem), 1200px);
}

.ac-container {
  width: var(--ac-column);
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.ac-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: hsl(var(--background) / 0.72);
  border-bottom: 1px solid hsl(var(--border));
  backdrop-filter: blur(12px);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.ac-header.is-scrolled {
  background: hsl(var(--background) / 0.92);
  border-bottom-color: hsl(var(--border));
}

.ac-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md, 1.5rem);
  min-height: 3.75rem;
}

.ac-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}

.ac-mark {
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  line-height: 0;
}

.ac-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  clip-path: circle(50%);
}

.ac-mark--nav {
  width: 1.9rem;
  height: 1.9rem;
}

.ac-mark--footer {
  width: 5.25rem;
  height: 5.25rem;
}

.ac-footer-brand-block {
  display: flex;
  align-items: flex-start;
  gap: 1.05rem;
}

.ac-logo:hover {
  color: hsl(var(--primary));
}

.ac-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.ac-nav-toggle span {
  width: 22px;
  height: 2px;
  background: hsl(var(--foreground));
  display: block;
}

.ac-nav-list {
  --ac-nav-gap: var(--spacing-md, 1.5rem);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--ac-nav-gap);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.ac-nav-list > li:has(> a.ac-nav-link) + li:has(> a.ac-nav-link) {
  position: relative;
}

.ac-nav-list > li:has(> a.ac-nav-link) + li:has(> a.ac-nav-link)::before {
  content: "";
  position: absolute;
  left: calc(var(--ac-nav-gap) / -2);
  top: 50%;
  width: 1px;
  height: 0.85em;
  background: hsl(var(--border));
  transform: translateY(-50%);
  pointer-events: none;
}

.ac-nav-link {
  color: hsl(var(--foreground));
  font-weight: 500;
  font-size: var(--text-sm, 0.875rem);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.ac-nav-link:hover,
.ac-nav-link.is-active {
  color: hsl(var(--primary));
}

.avx-brand,
.avx-ultra {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--primary));
}

.ac-logo .avx-brand,
.ac-footer-brand .avx-brand,
.ac-nav-link .avx-brand,
.ac-footer a .avx-brand,
.ac-footer-tagline .avx-brand,
.ac-footer-bottom .avx-brand {
  color: hsl(var(--primary));
}

.ac-logo .avx-ultra,
.ac-footer-brand .avx-ultra,
.ac-nav-link .avx-ultra,
.ac-footer a .avx-ultra,
.ac-footer-tagline .avx-ultra,
.ac-footer-bottom .avx-ultra {
  color: hsl(var(--primary));
}

.ac-btn-primary .avx-brand {
  color: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.ac-nav-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  padding-left: 0.5rem;
  border-left: 1px solid hsl(var(--border));
  margin-left: 0.15rem;
}

.ac-locale,
.ac-scheme {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.ac-nav-tools .ac-scheme {
  padding-left: 0.5rem;
  border-left: 1px solid hsl(var(--border));
}

.ac-scheme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  background: hsl(var(--card) / 0.6);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ac-scheme-toggle:hover {
  border-color: hsl(var(--primary) / 0.55);
  color: hsl(var(--primary));
}

.ac-scheme-toggle:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.ac-scheme-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
  font-family: inherit;
}

.ac-btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
}

.ac-btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
}

.ac-nav-cta {
  padding: 0.45rem 0.9rem;
}
.ac-nav-cta.avx-btn--locale,
.ac-nav-link.avx-btn--locale,
.ac-btn.avx-btn--locale,
.ws-portal-btn.avx-btn--locale {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}
.avx-btn--locale .avx-btn-sizer {
  display: grid;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  font: inherit;
  font-weight: inherit;
}
.avx-btn--locale .avx-btn-sizer > span {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.avx-btn--locale .avx-btn-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
}

.ac-header a:focus-visible,
.ac-header button:focus-visible,
.ac-footer a:focus-visible,
.ac-footer button:focus-visible,
.ac-float-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}

.ac-nav-backdrop {
  display: none;
}

.ac-footer {
  border-top: 1px solid hsl(var(--border) / 0.7);
  padding: 1.15rem 0 1rem;
  background: hsl(var(--background));
}

.ac-footer-tagline,
.ac-footer p,
.ac-footer li {
  color: hsl(var(--muted-foreground));
  font-size: var(--text-sm, 0.875rem);
}

.ac-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 2.25rem;
}

.ac-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
}

.ac-footer-legal span {
  color: hsl(var(--muted-foreground));
  font-size: var(--text-sm, 0.875rem);
  font-weight: 400;
}

.ac-footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 1.15rem;
  margin: 0;
  min-width: 0;
}

.ac-footer-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.05rem;
  margin: 0 0 0 auto;
  flex-shrink: 0;
}

.ac-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 40px;
  min-height: 40px;
  color: hsl(var(--muted-foreground) / 0.9);
  border-radius: 999px;
}

.ac-contact svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.ac-footer h4 {
  color: hsl(var(--foreground));
  font-size: var(--text-sm, 0.875rem);
  margin: 0 0 var(--spacing-sm, 1rem);
}

.ac-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ac-footer a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-weight: 400;
}

.ac-footer a:hover {
  color: hsl(var(--foreground));
}

.ac-footer a.ac-contact {
  color: hsl(var(--muted-foreground));
}

.ac-footer a.ac-contact:hover {
  color: hsl(var(--primary));
}

.ac-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.75rem;
  border-top: 1px solid hsl(var(--border) / 0.55);
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  text-align: center;
}

.ac-footer-bottom p {
  grid-column: 2;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
}

.ws-build {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  font-size: 0.625rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  color: color-mix(in srgb, currentColor 38%, transparent);
  user-select: all;
}

@media (max-width: 640px) {
  .ac-footer-bottom {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
    justify-items: center;
  }

  .ac-footer-bottom p,
  .ac-footer-bottom .ws-build {
    grid-column: 1;
  }
}

.ac-float {
  position: fixed;
  right: max(1.15rem, env(safe-area-inset-right));
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.ac-float-btn {
  width: 3.15rem;
  height: 3.15rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 28px hsl(220 30% 4% / 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  cursor: pointer;
}

.ac-float-btn:hover {
  transform: translateY(-2px);
}

.ac-float-top {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: transparent;
  box-shadow:
    0 6px 16px hsl(220 30% 4% / 0.18),
    0 8px 22px hsl(var(--primary) / 0.34);
}

.ac-float-top:hover {
  background: hsl(var(--primary));
  box-shadow:
    0 8px 20px hsl(220 30% 4% / 0.22),
    0 10px 26px hsl(var(--primary) / 0.42);
}

html[data-ws-color-scheme="light"] .ac-float-top {
  box-shadow:
    0 6px 16px hsl(220 20% 18% / 0.12),
    0 8px 20px hsl(var(--primary) / 0.28);
}

html[data-ws-color-scheme="light"] .ac-float-top:hover {
  box-shadow:
    0 8px 18px hsl(220 20% 18% / 0.14),
    0 10px 24px hsl(var(--primary) / 0.36);
}

.ac-float-top:focus-visible {
  outline: 2px solid hsl(var(--primary-foreground));
  outline-offset: 3px;
}

.ac-float-wa {
  background: #25d366;
  color: #fff;
  border-color: transparent;
}

.ac-float-wa:hover {
  background: #1ebe5a;
}

body.ac-nav-open {
  overflow: hidden;
}

/* Tier T + M: hamburger through 1023px (guía 28) */
@media (max-width: 1023px) {
  .ac-nav-toggle {
    display: flex;
  }

  .ac-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 198;
    background: hsl(220 30% 4% / 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .ac-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .ac-nav {
    position: fixed;
    inset: 3.75rem 0 auto 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: var(--spacing-md, 1.5rem);
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0.25s ease;
    z-index: 199;
    max-height: calc(100dvh - 3.75rem);
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
  }

  .ac-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .ac-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm, 1rem);
  }

  .ac-nav-list > li:has(> a.ac-nav-link) + li:has(> a.ac-nav-link)::before {
    content: none;
  }

  .ac-nav-list > li:has(> a.ac-nav-link) + li:has(> a.ac-nav-link) {
    padding-top: 0.75rem;
    margin-top: 0.15rem;
    border-top: 1px solid hsl(var(--border));
  }

  .ac-nav-tools {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 0 0;
    margin: 0.15rem 0 0;
    border-left: none;
    border-top: 1px solid hsl(var(--border));
  }

  .ac-nav-cta {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

@media (min-width: 1024px) {
  .ac-nav {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
  }

  .ac-nav-list {
    --ac-nav-gap: 0.85rem;
    gap: var(--ac-nav-gap);
  }

  .ac-nav-cta {
    padding: 0.4rem 0.85rem;
    flex-shrink: 0;
  }

  .ac-header-inner {
    gap: 1rem;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .ac-nav-list {
    --ac-nav-gap: 0.65rem;
    gap: var(--ac-nav-gap);
  }

  .ac-nav-link {
    font-size: 0.8rem;
  }

  .ac-nav-cta {
    padding: 0.35rem 0.7rem;
  }

  .ac-scheme-toggle {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
  }
}

@media (max-width: 767px) {
  .ac-root {
    --ac-column: min(calc(100% - 2rem), 1200px);
  }

  .ac-footer-bar {
    flex-wrap: wrap;
  }

  .ac-footer-contact {
    margin-left: auto;
  }

  .ac-mark--footer {
    width: 4.25rem;
    height: 4.25rem;
  }

  .ac-float {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    gap: 0.55rem;
  }

  .ac-float-btn {
    width: 2.85rem;
    height: 2.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-btn,
  .ac-nav,
  .ac-nav-backdrop,
  .ac-float-btn {
    transition: none;
  }

  .ac-float-btn:hover {
    transform: none;
  }
}
