/*
    Partes de la web que el área de cliente replica (generadas por web/scripts/export-whmcs-menu.ts):
    iconos Phosphor en línea, pie completo, menú móvil y aviso de cookies.
    Va después de custom.css: aquí solo se ajustan las piezas nuevas.
*/

/* ---------- Mega menú: iconos Phosphor en línea ---------- */
.ah-mega__svg {
  flex-shrink: 0;
  color: currentColor;
}
.ah-mega__icon .ah-mega__svg {
  width: 22px;
  height: 22px;
}
.ah-mega__trigger .ah-mega__caret {
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 200ms var(--ease-out);
}
.ah-mega__trigger[aria-expanded="true"] .ah-mega__caret {
  transform: rotate(180deg);
}
.ah-mega__side-list a .ah-mega__svg {
  width: 16px;
  height: 16px;
  color: var(--accent-ink);
}
.ah-mega__more .ah-mega__svg {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .ah-mega__more:hover .ah-mega__svg {
    transform: translateX(3px);
  }
}

/* ---------- Menú móvil (dentro del menú plegable de la cabecera) ---------- */
@media (max-width: 1199px) {
  .ah-subnav .navbar-collapse {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 16px 40px -24px rgba(2, 6, 23, 0.35);
  }
}
.ah-mobile {
  padding: 0.25rem 0 1rem;
}
.ah-mobile__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ah-mobile__list > li {
  border-bottom: 1px solid var(--line);
}
.ah-mobile__link {
  display: block;
  padding: 0.875rem 0;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.ah-mobile__group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.ah-mobile__group > summary::-webkit-details-marker {
  display: none;
}
.ah-mobile__caret {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  transition: transform 200ms var(--ease-out);
}
.ah-mobile__group[open] .ah-mobile__caret {
  transform: rotate(180deg);
}
.ah-mobile__group ul {
  margin: 0;
  padding: 0 0 0.75rem;
  list-style: none;
}
.ah-mobile__group li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.5rem;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
}
.ah-mobile__group li a:active,
.ah-mobile__group li a:hover {
  background: var(--surface-2);
}
.ah-mobile__group li a .ah-mega__svg {
  width: 18px;
  height: 18px;
  color: var(--accent-ink);
}
.ah-mobile__group li a .ah-mega__logo {
  width: 18px;
  height: 18px;
}

/* ---------- Pie: mismo orden y bloques que la web ---------- */
.ah-footer__band {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding: 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #1d4ed8, #1b3fae 50%, #0f1d52);
  color: #fff;
}
@media (min-width: 768px) {
  .ah-footer__band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem;
  }
}
.ah-footer__band h2 {
  max-width: 24ch;
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .ah-footer__band h2 {
    font-size: 1.875rem;
  }
}
.ah-footer__band p {
  max-width: 52ch;
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.8);
}
.ah-footer__band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.ah-footer__band-primary,
.ah-footer__band-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 200ms ease;
}
.ah-footer__band-primary {
  background: #fff;
  color: #0c1424;
}
.ah-footer__band-primary:hover {
  background: #f1f5f9;
  color: #0c1424;
}
.ah-footer__band-ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 500;
}
.ah-footer__band-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ah-footer__nudge {
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .ah-footer__band-primary:hover .ah-footer__nudge {
    transform: translateX(3px);
  }
}

.ah-footer__main {
  display: grid;
  gap: 3rem;
  padding: 4rem 0 0;
}
@media (min-width: 1024px) {
  .ah-footer__main {
    grid-template-columns: 1fr 3fr;
    gap: 3rem;
  }
}
.ah-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 200ms ease;
}
.ah-footer__status:hover {
  border-color: var(--accent-ink);
  color: var(--ink);
}
.ah-footer__pulse {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #10b981;
}
.ah-footer__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(16, 185, 129, 0.6);
  animation: ah-pulse 2s ease-out infinite;
}
@keyframes ah-pulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ah-footer__pulse::after {
    animation: none;
  }
}
.ah-footer__payments {
  margin-top: 1.5rem;
}
.ah-footer__payments > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ah-footer__payments > div {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.ah-footer__pay {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.ah-footer__pay img {
  width: 22px;
  height: 22px;
}
.ah-footer__services h2 {
  margin: 0;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.ah-footer__service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.25rem;
}
@media (min-width: 768px) {
  .ah-footer__service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ah-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.ah-footer__links > div:last-child {
  grid-column: span 2;
}
@media (min-width: 768px) {
  .ah-footer__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ah-footer__links > div:last-child {
    grid-column: span 1;
  }
}
@media (min-width: 1024px) {
  .ah-footer__links {
    margin-left: 25%;
  }
}
.ah-footer__cookies {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: left;
  transition: color 200ms ease;
}
.ah-footer__cookies:hover {
  color: var(--ink);
}

.ah-footer__bottom-bar {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}
.ah-footer__bottom-bar .ah-footer__bottom {
  border-top: 0;
}
.ah-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.ah-footer__meta p {
  margin: 0;
}

/* ---------- Aviso de cookies (mismo texto y botones que la web) ---------- */
.ah-cookies {
  position: fixed;
  z-index: 1050;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 1.25rem;
  max-width: 34rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(2, 6, 23, 0.45);
}
@media (min-width: 640px) {
  .ah-cookies {
    left: 1.25rem;
    right: auto;
  }
}
.ah-cookies[hidden] {
  display: none;
}
.ah-cookies__title {
  margin: 0;
  font-weight: 600;
}
.ah-cookies__text {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.ah-cookies__text a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ah-cookies__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}
.ah-cookies__grid .ah-cookies__link {
  grid-column: span 2;
}
.ah-cookies__btn {
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.ah-cookies__btn:hover {
  border-color: var(--accent-ink);
}
.ah-cookies__btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.ah-cookies__link {
  height: 2.25rem;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-weight: 500;
}
.ah-cookies__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.ah-cookies__row-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.ah-cookies__row-body {
  margin: 0.125rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.ah-cookies__row input {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  accent-color: var(--accent);
}
