/* Temas: modo (oscuro/claro) + acento de color */

:root,
html[data-mode='dark'] {
  color-scheme: dark;
  --amg-ink-950: 7 9 18;
  --amg-ink-900: 11 15 26;
  --amg-ink-800: 17 23 39;
  --amg-ink-700: 26 34 56;
  --amg-ink-600: 40 49 85;
  --amg-text: 241 245 249;
  --amg-muted: 148 163 184;
  --amg-border: 255 255 255;
  --amg-border-a: 0.1;
  --amg-overlay: 255 255 255;
  --amg-scroll-track: #0b0f1a;
  --amg-autofill: #0b0f1a;
  --amg-dropdown-bg: #111727;
  --amg-swatch-ring: #60a5fa;
  --amg-logo-color: #ffffff;
}

html[data-mode='light'] {
  color-scheme: light;
  --amg-ink-950: 248 250 252;
  --amg-ink-900: 255 255 255;
  --amg-ink-800: 241 245 249;
  --amg-ink-700: 226 232 240;
  --amg-ink-600: 203 213 225;
  --amg-text: 15 23 42;
  --amg-muted: 51 65 85;
  --amg-border: 15 23 42;
  --amg-border-a: 0.14;
  --amg-overlay: 15 23 42;
  --amg-scroll-track: #e2e8f0;
  --amg-autofill: #ffffff;
  --amg-dropdown-bg: #ffffff;
  --amg-swatch-ring: #2563eb;
  --amg-logo-color: #0f172a;
}

/* Acentos — oscuro */
html[data-mode='dark'][data-accent='violet'],
html[data-mode='dark']:not([data-accent]) {
  --amg-brand-300: 164 140 255;
  --amg-brand-400: 126 92 255;
  --amg-brand-500: 94 54 255;
  --amg-brand-600: 74 37 224;
  --amg-glow: 126 92 255;
  --amg-accent-400: 52 211 153;
  --amg-accent-500: 16 185 129;
}
html[data-mode='dark'][data-accent='cyan'] {
  --amg-brand-300: 103 232 249;
  --amg-brand-400: 34 211 238;
  --amg-brand-500: 6 182 212;
  --amg-brand-600: 8 145 178;
  --amg-glow: 34 211 238;
  --amg-accent-400: 56 189 248;
  --amg-accent-500: 14 165 233;
}
html[data-mode='dark'][data-accent='teal'] {
  --amg-brand-300: 94 234 212;
  --amg-brand-400: 45 212 191;
  --amg-brand-500: 20 184 166;
  --amg-brand-600: 13 148 136;
  --amg-glow: 45 212 191;
  --amg-accent-400: 52 211 153;
  --amg-accent-500: 16 185 129;
}
html[data-mode='dark'][data-accent='emerald'] {
  --amg-brand-300: 110 231 183;
  --amg-brand-400: 52 211 153;
  --amg-brand-500: 16 185 129;
  --amg-brand-600: 5 150 105;
  --amg-glow: 52 211 153;
  --amg-accent-400: 74 222 128;
  --amg-accent-500: 34 197 94;
}
html[data-mode='dark'][data-accent='blue'] {
  --amg-brand-300: 147 197 253;
  --amg-brand-400: 96 165 250;
  --amg-brand-500: 59 130 246;
  --amg-brand-600: 37 99 235;
  --amg-glow: 96 165 250;
  --amg-accent-400: 56 189 248;
  --amg-accent-500: 14 165 233;
}
html[data-mode='dark'][data-accent='rose'] {
  --amg-brand-300: 253 164 175;
  --amg-brand-400: 251 113 133;
  --amg-brand-500: 244 63 94;
  --amg-brand-600: 225 29 72;
  --amg-glow: 251 113 133;
  --amg-accent-400: 251 146 60;
  --amg-accent-500: 249 115 22;
}
html[data-mode='dark'][data-accent='amber'] {
  --amg-brand-300: 252 211 77;
  --amg-brand-400: 251 191 36;
  --amg-brand-500: 245 158 11;
  --amg-brand-600: 217 119 6;
  --amg-glow: 251 191 36;
  --amg-accent-400: 251 146 60;
  --amg-accent-500: 249 115 22;
}
html[data-mode='dark'][data-accent='slate'] {
  --amg-brand-300: 203 213 225;
  --amg-brand-400: 148 163 184;
  --amg-brand-500: 100 116 139;
  --amg-brand-600: 71 85 105;
  --amg-glow: 148 163 184;
  --amg-accent-400: 125 211 252;
  --amg-accent-500: 56 189 248;
}
html[data-mode='dark'][data-accent='indigo'] {
  --amg-brand-300: 165 180 252;
  --amg-brand-400: 129 140 248;
  --amg-brand-500: 99 102 241;
  --amg-brand-600: 79 70 229;
  --amg-glow: 129 140 248;
  --amg-accent-400: 192 132 252;
  --amg-accent-500: 168 85 247;
}

/* Acentos — claro */
html[data-mode='light'][data-accent='violet'],
html[data-mode='light']:not([data-accent]) {
  --amg-brand-300: 124 58 237;
  --amg-brand-400: 109 40 217;
  --amg-brand-500: 91 33 182;
  --amg-brand-600: 76 29 149;
  --amg-glow: 124 58 237;
  --amg-accent-400: 16 185 129;
  --amg-accent-500: 5 150 105;
}
html[data-mode='light'][data-accent='sky'] {
  --amg-brand-300: 14 165 233;
  --amg-brand-400: 2 132 199;
  --amg-brand-500: 3 105 161;
  --amg-brand-600: 7 89 133;
  --amg-glow: 14 165 233;
  --amg-accent-400: 6 182 212;
  --amg-accent-500: 8 145 178;
}
html[data-mode='light'][data-accent='mint'] {
  --amg-brand-300: 16 185 129;
  --amg-brand-400: 5 150 105;
  --amg-brand-500: 4 120 87;
  --amg-brand-600: 6 95 70;
  --amg-glow: 16 185 129;
  --amg-accent-400: 20 184 166;
  --amg-accent-500: 13 148 136;
}
html[data-mode='light'][data-accent='sand'] {
  --amg-brand-300: 217 119 6;
  --amg-brand-400: 180 83 9;
  --amg-brand-500: 146 64 14;
  --amg-brand-600: 120 53 15;
  --amg-glow: 217 119 6;
  --amg-accent-400: 245 158 11;
  --amg-accent-500: 217 119 6;
}
html[data-mode='light'][data-accent='rose'] {
  --amg-brand-300: 244 63 94;
  --amg-brand-400: 225 29 72;
  --amg-brand-500: 190 18 60;
  --amg-brand-600: 159 18 57;
  --amg-glow: 244 63 94;
  --amg-accent-400: 251 113 133;
  --amg-accent-500: 244 63 94;
}
html[data-mode='light'][data-accent='lavender'] {
  --amg-brand-300: 139 92 246;
  --amg-brand-400: 124 58 237;
  --amg-brand-500: 109 40 217;
  --amg-brand-600: 91 33 182;
  --amg-glow: 139 92 246;
  --amg-accent-400: 167 139 250;
  --amg-accent-500: 139 92 246;
}
html[data-mode='light'][data-accent='peach'] {
  --amg-brand-300: 249 115 22;
  --amg-brand-400: 234 88 12;
  --amg-brand-500: 194 65 12;
  --amg-brand-600: 154 52 18;
  --amg-glow: 249 115 22;
  --amg-accent-400: 251 146 60;
  --amg-accent-500: 249 115 22;
}
html[data-mode='light'][data-accent='slate'] {
  --amg-brand-300: 71 85 105;
  --amg-brand-400: 51 65 85;
  --amg-brand-500: 30 41 59;
  --amg-brand-600: 15 23 42;
  --amg-glow: 71 85 105;
  --amg-accent-400: 100 116 139;
  --amg-accent-500: 71 85 105;
}
html[data-mode='light'][data-accent='green'] {
  --amg-brand-300: 34 197 94;
  --amg-brand-400: 22 163 74;
  --amg-brand-500: 21 128 61;
  --amg-brand-600: 22 101 52;
  --amg-glow: 34 197 94;
  --amg-accent-400: 74 222 128;
  --amg-accent-500: 34 197 94;
}

body {
  background-color: rgb(var(--amg-ink-950));
  color: rgb(var(--amg-text));
  background-image:
    radial-gradient(circle at 20% -10%, rgb(var(--amg-glow) / 0.12), transparent 50%),
    radial-gradient(circle at 80% 110%, rgb(var(--amg-accent-400) / 0.08), transparent 55%);
}

::-webkit-scrollbar-track { background: var(--amg-scroll-track); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgb(var(--amg-brand-600)),
    rgb(var(--amg-brand-400))
  );
  border-color: var(--amg-scroll-track);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgb(var(--amg-brand-500)),
    rgb(var(--amg-brand-300))
  );
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--amg-autofill) inset !important;
  -webkit-text-fill-color: rgb(var(--amg-text)) !important;
  caret-color: rgb(var(--amg-text));
}

:focus-visible {
  outline-color: rgb(var(--amg-brand-300));
}

header[data-header] img[alt='Ambigram'],
footer img[alt='Ambigram'] {
  /* legacy img logos: no filter (caused pixelation) */
  filter: none;
}

header[data-header].is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
html[data-mode='light'] header[data-header].is-scrolled,
html.amg-mode-light header[data-header].is-scrolled {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* Logo vectorial (SVG inline + color por tema) — tamaño original del topbar */
.amg-logo {
  display: block;
  flex-shrink: 0;
  color: var(--amg-logo-color, #ffffff);
  overflow: visible;
}
.amg-logo--sm {
  width: 11.5rem;
  height: 3.75rem;
}
@media (min-width: 640px) {
  .amg-logo--sm {
    width: 13.5rem;
    height: 4.5rem;
  }
}
.amg-logo--lg {
  width: min(100%, 36rem);
  height: 8rem;
  margin-left: auto;
  margin-right: auto;
}

html[data-mode='light'] .amg-logo,
html.amg-mode-light .amg-logo {
  color: #0f172a;
}

html[data-mode='dark'] .amg-logo,
html.amg-mode-dark .amg-logo {
  color: #ffffff;
}

/* Remapes de utilidad en modo claro */
html[data-mode='light'] .text-white:not(.amg-keep-white) {
  color: rgb(15 23 42) !important;
}
html[data-mode='light'] .bg-brand-500,
html[data-mode='light'] .bg-brand-400,
html[data-mode='light'] .bg-brand-600,
html[data-mode='light'] [class*='bg-brand-'] .text-white,
html[data-mode='light'] .bg-brand-500.text-white,
html[data-mode='light'] a.bg-brand-500,
html[data-mode='light'] button.bg-brand-500,
html[data-mode='light'] button.bg-brand-400 {
  color: #fff !important;
}
html[data-mode='light'] .text-slate-100 { color: #0f172a !important; }
html[data-mode='light'] .text-slate-200 { color: #0f172a !important; }
html[data-mode='light'] .text-slate-300 { color: #0f172a !important; }
html[data-mode='light'] .text-slate-400 { color: #1e293b !important; }
html[data-mode='light'] .text-slate-500 { color: #334155 !important; }
html[data-mode='light'] .border-white\/5,
html[data-mode='light'] .border-white\/10,
html[data-mode='light'] .border-white\/15 {
  border-color: #e2e8f0 !important;
}
html[data-mode='light'] .bg-white\/5,
html[data-mode='light'] .bg-white\/10,
html[data-mode='light'] .bg-white\/15,
html[data-mode='light'] .hover\:bg-white\/5:hover,
html[data-mode='light'] .hover\:bg-white\/10:hover {
  background-color: rgb(15 23 42 / 0.07) !important;
}
html[data-mode='light'] .bg-white\/\[0\.03\] {
  background-color: rgb(15 23 42 / 0.04) !important;
}
html[data-mode='light'] .ring-white\/15,
html[data-mode='light'] .ring-white\/20 {
  --tw-ring-color: rgb(15 23 42 / 0.18) !important;
}
html[data-mode='light'] .bg-ink-900 {
  background-color: #fff !important;
}
html[data-mode='light'] .bg-ink-950\/70 {
  background-color: rgb(255 255 255 / 0.9) !important;
}
html[data-mode='light'] .placeholder-slate-500::placeholder {
  color: #64748b !important;
}

/* Picker UI — swatches compactos */
.amg-theme-prefs {
  padding: 0.35rem 0.55rem 0.45rem;
}
.amg-theme-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--amg-muted));
  margin: 0.3rem 0 0.35rem;
}
.amg-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}
.amg-theme-swatch {
  width: 100%;
  height: 1.25rem;
  aspect-ratio: auto;
  border-radius: 0.3rem;
  border: 0;
  border-width: 0;
  cursor: pointer;
  padding: 0;
  background:
    linear-gradient(135deg, var(--swatch-a), var(--swatch-b) 55%, var(--swatch-c));
  box-shadow: none;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.amg-theme-swatch:hover {
  transform: scale(1.06);
}
.amg-theme-swatch.is-active {
  border: 0;
  border-width: 0;
  box-shadow: 0 0 0 2px var(--amg-swatch-ring);
}

.amg-portal-dropdown {
  width: 280px;
  background: var(--amg-dropdown-bg);
  border-color: rgb(var(--amg-border) / var(--amg-border-a));
  color: rgb(var(--amg-text));
}
.amg-portal-profile,
.amg-portal-item {
  color: rgb(var(--amg-text)) !important;
}
.amg-portal-profile:hover,
.amg-portal-item:hover {
  background: rgb(var(--amg-overlay) / 0.06);
}
.amg-portal-profile-name {
  color: rgb(var(--amg-text)) !important;
}
.amg-portal-profile-email {
  color: rgb(var(--amg-muted)) !important;
}
.amg-portal-profile-hint {
  color: rgb(var(--amg-brand-500)) !important;
}
.amg-portal-sep {
  background: rgb(var(--amg-border) / var(--amg-border-a));
}
.amg-portal-profile-letter {
  background: rgb(var(--amg-brand-500));
}
.amg-theme-label {
  color: rgb(var(--amg-muted)) !important;
}

html[data-mode='light'] .amg-portal-dropdown {
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.25);
  border-color: rgb(15 23 42 / 0.14);
}
html[data-mode='light'] .amg-portal-item svg,
html[data-mode='light'] .amg-portal-profile svg {
  color: #334155;
  stroke: #334155;
}

/* Estilos personalizados que complementan Tailwind. */

html {
  scroll-behavior: smooth;
}

body {
  background-image:
    radial-gradient(circle at 20% -10%, rgb(var(--amg-glow) / 0.10), transparent 50%),
    radial-gradient(circle at 80% 110%, rgb(var(--amg-accent-400) / 0.06), transparent 55%);
  background-attachment: fixed;
}

/* Scrollbar moderna */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0b0f1a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a25e0, #7e5cff);
  border-radius: 999px;
  border: 3px solid #0b0f1a;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #5e36ff, #a48cff); }

/* Pequeño fade-in en carga */
@keyframes amg-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
main > section { animation: amg-fade-up .55s ease-out both; }
main > section:nth-child(2) { animation-delay: .05s; }
main > section:nth-child(3) { animation-delay: .10s; }
main > section:nth-child(4) { animation-delay: .15s; }

/* Inputs autofill oscuros */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0b0f1a inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  transition: background-color 9999s ease-out;
}

/* Foco accesible */
:focus-visible {
  outline: 2px solid #a48cff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Fotografías de producto */
.amg-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.amg-shot-frame {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111727;
}
.amg-shot-frame img {
  transition: transform 0.6s ease;
}
.amg-shot-frame:hover img {
  transform: scale(1.04);
}

.amg-dropzone {
  position: relative;
  min-height: 160px;
  padding: 1rem;
  border: 2px dashed rgba(164, 140, 255, 0.35);
  border-radius: 1rem;
  background: rgba(11, 15, 26, 0.55);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.amg-dropzone:hover,
.amg-dropzone.is-dragover {
  border-color: #7e5cff;
  background: rgba(17, 23, 39, 0.9);
}
.amg-dropzone-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.45;
  pointer-events: none;
}
.amg-dropzone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.65rem;
}
.amg-dropzone-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.amg-dropzone-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.amg-dropzone-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  background: rgba(255,255,255,0.04);
  text-align: center;
}
.amg-dropzone-file strong {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a48cff;
}
.amg-dropzone-file span {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: #94a3b8;
  word-break: break-all;
  line-height: 1.25;
}
.amg-dropzone-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(7, 9, 18, 0.85);
  color: #fecaca;
  line-height: 1;
  font-size: 1rem;
}

.amg-faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.amg-faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.amg-faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #fff;
}
.amg-faq-summary::-webkit-details-marker { display: none; }
.amg-faq-icon {
  flex-shrink: 0;
  color: #a48cff;
  transition: transform 0.2s ease;
}
.amg-faq-item[open] .amg-faq-icon {
  transform: rotate(180deg);
}
.amg-faq-body {
  padding: 0 1.25rem 1.2rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.65;
}
.amg-faq-body p { margin: 0; }

html[data-mode='light'] .amg-faq-item,
html.amg-mode-light .amg-faq-item {
  border-color: #e2e8f0;
  background: #ffffff;
}
html[data-mode='light'] .amg-faq-summary,
html.amg-mode-light .amg-faq-summary {
  color: #0f172a !important;
}
html[data-mode='light'] .amg-faq-summary span,
html.amg-mode-light .amg-faq-summary span {
  color: inherit !important;
}
html[data-mode='light'] .amg-faq-icon,
html.amg-mode-light .amg-faq-icon {
  color: #5e36ff !important;
}
html[data-mode='light'] .amg-faq-body,
html[data-mode='light'] .amg-faq-body p,
html.amg-mode-light .amg-faq-body,
html.amg-mode-light .amg-faq-body p {
  color: #334155 !important;
}
html[data-mode='light'] .amg-faq-body a,
html.amg-mode-light .amg-faq-body a {
  color: #5e36ff !important;
}
html[data-mode='light'] .amg-faq-body a:hover,
html.amg-mode-light .amg-faq-body a:hover {
  color: #4c1d95 !important;
}

.amg-prose p { margin: 0 0 1rem; }
.amg-prose h1, .amg-prose h2, .amg-prose h3, .amg-prose h4 {
  color: #fff;
  font-weight: 600;
  margin: 1.4rem 0 0.6rem;
}
.amg-prose h1 { font-size: 1.75rem; }
.amg-prose h2 { font-size: 1.4rem; }
.amg-prose h3 { font-size: 1.2rem; }
.amg-prose ul, .amg-prose ol { margin: 0 0 1rem 1.2rem; }
.amg-prose a { color: #a48cff; }
.amg-prose img { max-width: 100%; border-radius: 0.75rem; margin: 1rem 0; }
.amg-prose figure {
  margin: 1.5rem 0;
  break-inside: avoid;
}
.amg-prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}
.amg-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.amg-prose td, .amg-prose th { border: 1px solid rgba(255,255,255,0.1); padding: 0.4rem 0.6rem; }

@media (min-width: 768px) {
  .amg-prose-cols {
    column-count: 2;
    column-gap: 2.75rem;
    column-rule: 1px solid rgba(255, 255, 255, 0.08);
  }
  .amg-prose-cols h1,
  .amg-prose-cols h2,
  .amg-prose-cols h3,
  .amg-prose-cols h4,
  .amg-prose-cols img,
  .amg-prose-cols figure,
  .amg-prose-cols table,
  .amg-prose-cols ul,
  .amg-prose-cols ol,
  .amg-prose-cols blockquote {
    break-inside: avoid;
  }
}

.amg-tts {
  overflow: visible;
}
.amg-tts-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px dashed #34d399;
  pointer-events: none;
  opacity: 1;
  animation: amg-tts-spin 12s linear infinite;
}
.amg-tts.is-playing .amg-tts-ring {
  animation: amg-tts-fade 2s ease forwards;
}
@keyframes amg-tts-spin {
  to { transform: rotate(360deg); }
}
@keyframes amg-tts-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Banner de consentimiento (cookies y políticas) */
.policy-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 0.75rem;
  pointer-events: none;
}
.policy-consent[hidden] {
  display: none !important;
}
.policy-consent-panel {
  pointer-events: auto;
  max-width: 52rem;
  margin: 0 auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 15, 26, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.65);
}
.policy-consent-inner {
  padding: 1rem 1.15rem 1.1rem;
}
.policy-consent-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.policy-consent-text {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #94a3b8;
}
.policy-consent-text a {
  color: #a48cff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-consent-text a:hover {
  color: #c9bbff;
}
.policy-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.policy-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.policy-consent-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.policy-consent-btn-primary {
  border-color: rgba(164, 140, 255, 0.45);
  background: #5e36ff;
  color: #fff;
}
.policy-consent-btn-primary:hover {
  background: #7e5cff;
}
.policy-consent-btn-ghost {
  background: transparent;
}
.policy-consent-options {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.policy-consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
}
.policy-consent-option strong {
  display: block;
  color: #fff;
  font-size: 0.8rem;
}
.policy-consent-option small {
  display: block;
  margin-top: 0.15rem;
  color: #94a3b8;
  line-height: 1.45;
}
.policy-consent-option input {
  margin-top: 0.15rem;
  accent-color: #5e36ff;
}
.policy-consent-option input:disabled {
  opacity: 0.7;
}

.policy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
}
.policy-check input {
  margin-top: 0.2rem;
  accent-color: #5e36ff;
  flex-shrink: 0;
}
.policy-check a {
  color: #a48cff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-check a:hover {
  color: #c9bbff;
}

/* Controles del header móvil: mismo tamaño, alineación y hueco */
.amg-mnav {
  display: none;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
}
@media (max-width: 1023px) {
  .amg-mnav {
    display: flex;
  }
}
.amg-mnav-portal {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
}
.amg-mnav-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  line-height: 0;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.amg-mnav-btn:hover {
  color: #fff;
}
.amg-mnav-btn svg {
  display: block;
  width: 2.5rem !important;
  height: 2.5rem !important;
  max-width: 2.5rem;
  max-height: 2.5rem;
  transform: none !important;
  stroke-width: 1.75;
}
.amg-mnav-menu {
  overflow: visible;
}
.amg-mnav-menu svg {
  width: 2.5rem !important;
  height: 2.5rem !important;
  stroke-width: 2;
}
.amg-mnav-avatar {
  border-radius: 9999px;
  overflow: hidden;
}
.amg-mnav-avatar.is-user {
  background: rgb(var(--amg-brand-500, 94 54 255));
  color: #fff;
}
.amg-mnav-avatar.is-guest {
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.amg-mnav-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.amg-mnav-avatar svg {
  width: 1.35rem !important;
  height: 1.35rem !important;
}
.amg-mnav-initial {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}

/* Logo más a la izquierda en móvil (compensa padding del viewBox SVG) */
@media (max-width: 1023px) {
  header[data-header] [data-header-bar] {
    padding-left: 0.5rem;
    padding-right: 0.75rem;
  }
  header[data-header] [data-header-bar] > a:first-child {
    margin-left: -0.85rem;
  }
}

.amg-portal-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-height: min(80vh, 640px);
  overflow-y: auto;
  background: var(--amg-dropdown-bg, #111727);
  border: 1px solid rgb(var(--amg-border, 255 255 255) / var(--amg-border-a, 0.1));
  border-radius: 0.9rem;
  padding: 0.45rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  z-index: 60;
}
.amg-portal-dropdown.is-open {
  display: block;
}
.amg-portal-dropdown[hidden] {
  display: none !important;
}
.amg-portal-sheet-head {
  display: none;
}

/* Menú de cuenta a pantalla completa en móvil */
@media (max-width: 1023px) {
  .amg-mnav-portal {
    position: static;
  }
  .amg-portal-dropdown--mobile.is-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0.75rem 1rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #0b0f1a;
    box-shadow: none;
    z-index: 200;
  }
  .amg-portal-dropdown--mobile .amg-portal-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.25rem 0.85rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }
  .amg-portal-sheet-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    color: #f8fafc;
  }
  .amg-portal-sheet-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    cursor: pointer;
  }
  .amg-portal-sheet-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  .amg-portal-sheet-close svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  /* Temas rellenan el hueco vertical restante */
  .amg-portal-dropdown--mobile.is-open > .amg-theme-prefs {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: 0.45rem;
    min-height: 14rem;
    padding: 0.55rem 0.35rem;
  }
  .amg-portal-dropdown--mobile.is-open .amg-theme-label {
    margin: 0.15rem 0 0.2rem;
    flex-shrink: 0;
  }
  .amg-portal-dropdown--mobile.is-open .amg-theme-grid {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 0.5rem;
    min-height: 5.5rem;
  }
  .amg-portal-dropdown--mobile.is-open .amg-theme-swatch {
    width: 100%;
    height: 100%;
    min-height: 2.85rem;
    border-radius: 0.45rem;
  }
  .amg-portal-dropdown--mobile.is-open > .amg-portal-sep:last-of-type,
  .amg-portal-dropdown--mobile.is-open > form {
    margin-top: auto;
    flex-shrink: 0;
  }
  body.amg-portal-open {
    overflow: hidden;
  }
  body.amg-portal-open #amg-bot,
  body.amg-portal-open #amg-bot-fab {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
.amg-portal-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 0.55rem;
  color: rgb(var(--amg-text));
  text-decoration: none;
}
.amg-portal-profile:hover {
  background: rgb(var(--amg-overlay) / 0.06);
}
.amg-portal-profile-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgb(var(--amg-border) / 0.15);
}
.amg-portal-profile-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--amg-brand-500));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}
.amg-portal-profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.amg-portal-profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--amg-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amg-portal-profile-email {
  font-size: 0.75rem;
  color: rgb(var(--amg-muted));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amg-portal-profile-hint {
  font-size: 0.7rem;
  color: rgb(var(--amg-brand-500));
  margin-top: 0.1rem;
}
.amg-portal-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.875rem;
  color: rgb(var(--amg-text));
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.amg-portal-item:hover {
  background: rgb(var(--amg-overlay) / 0.06);
}
.amg-portal-sep {
  height: 1px;
  margin: 0.35rem 0.4rem;
  background: rgb(var(--amg-border) / var(--amg-border-a));
}

/* === Contraste forzado modo claro (debe ir al final) === */
html[data-mode='light'],
html.amg-mode-light {
  --amg-text: 15 23 42;
  --amg-muted: 30 41 59;
}

html[data-mode='light'] body,
html.amg-mode-light body {
  color: #0f172a !important;
}

html[data-mode='light'] .amg-portal-dropdown,
html.amg-mode-light .amg-portal-dropdown {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.28) !important;
}

html[data-mode='light'] .amg-portal-sheet-title,
html.amg-mode-light .amg-portal-sheet-title {
  color: #0f172a !important;
}
html[data-mode='light'] .amg-portal-dropdown--mobile .amg-portal-sheet-head,
html.amg-mode-light .amg-portal-dropdown--mobile .amg-portal-sheet-head {
  border-bottom-color: #e2e8f0 !important;
}
html[data-mode='light'] .amg-portal-sheet-close,
html.amg-mode-light .amg-portal-sheet-close {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-mode='light'] .amg-portal-sheet-close:hover,
html.amg-mode-light .amg-portal-sheet-close:hover {
  background: #cbd5e1 !important;
  color: #020617 !important;
}
html[data-mode='light'] .amg-portal-sheet-close svg,
html.amg-mode-light .amg-portal-sheet-close svg {
  color: #0f172a !important;
  stroke: #0f172a !important;
}

html[data-mode='light'] .amg-portal-profile,
html[data-mode='light'] .amg-portal-item,
html[data-mode='light'] .amg-portal-profile-name,
html.amg-mode-light .amg-portal-profile,
html.amg-mode-light .amg-portal-item,
html.amg-mode-light .amg-portal-profile-name {
  color: #0f172a !important;
}

html[data-mode='light'] .amg-portal-profile-email,
html[data-mode='light'] .amg-theme-label,
html.amg-mode-light .amg-portal-profile-email,
html.amg-mode-light .amg-theme-label {
  color: #1e293b !important;
}

html[data-mode='light'] .amg-portal-profile-hint,
html.amg-mode-light .amg-portal-profile-hint {
  color: #5b21b6 !important;
  font-weight: 600;
}

html[data-mode='light'] .amg-portal-item svg,
html[data-mode='light'] .amg-portal-profile svg,
html[data-mode='light'] .amg-portal-item [data-lucide],
html[data-mode='light'] .amg-portal-profile [data-lucide],
html.amg-mode-light .amg-portal-item svg,
html.amg-mode-light .amg-portal-profile svg {
  color: #0f172a !important;
  stroke: #0f172a !important;
}

html[data-mode='light'] .amg-portal-sep,
html.amg-mode-light .amg-portal-sep {
  background: #94a3b8 !important;
}

html[data-mode='light'] .amg-portal-profile:hover,
html[data-mode='light'] .amg-portal-item:hover,
html.amg-mode-light .amg-portal-profile:hover,
html.amg-mode-light .amg-portal-item:hover {
  background: #e2e8f0 !important;
}

/* Topbar móvil: ayuda y hamburguesa visibles en modo claro */
html[data-mode='light'] .amg-mnav-btn,
html.amg-mode-light .amg-mnav-btn {
  color: #0f172a !important;
}
html[data-mode='light'] .amg-mnav-btn:hover,
html.amg-mode-light .amg-mnav-btn:hover {
  color: #020617 !important;
}
html[data-mode='light'] .amg-mnav-btn svg,
html.amg-mode-light .amg-mnav-btn svg {
  color: #0f172a !important;
  stroke: #0f172a !important;
}
html[data-mode='light'] .amg-mnav-avatar.is-guest,
html.amg-mode-light .amg-mnav-avatar.is-guest {
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

html[data-mode='light'] .text-white:not(.amg-keep-white),
html.amg-mode-light .text-white:not(.amg-keep-white) {
  color: #0f172a !important;
}

html[data-mode='light'] .text-slate-100,
html[data-mode='light'] .text-slate-200,
html.amg-mode-light .text-slate-100,
html.amg-mode-light .text-slate-200 {
  color: #0f172a !important;
}

html[data-mode='light'] .text-slate-300,
html.amg-mode-light .text-slate-300 {
  color: #0f172a !important;
}

html[data-mode='light'] .text-slate-400,
html.amg-mode-light .text-slate-400 {
  color: #1e293b !important;
}

html[data-mode='light'] .text-slate-500,
html.amg-mode-light .text-slate-500 {
  color: #334155 !important;
}

html[data-mode='light'] h1,
html[data-mode='light'] h2,
html[data-mode='light'] h3,
html[data-mode='light'] h4,
html.amg-mode-light h1,
html.amg-mode-light h2,
html.amg-mode-light h3,
html.amg-mode-light h4 {
  color: #0f172a !important;
}

/* Degradados: no forzar color opaco sobre text-transparent */
html[data-mode='light'] h1.bg-clip-text,
html[data-mode='light'] h2.bg-clip-text,
html[data-mode='light'] h3.bg-clip-text,
html[data-mode='light'] h4.bg-clip-text,
html[data-mode='light'] .bg-clip-text,
html.amg-mode-light h1.bg-clip-text,
html.amg-mode-light h2.bg-clip-text,
html.amg-mode-light h3.bg-clip-text,
html.amg-mode-light h4.bg-clip-text,
html.amg-mode-light .bg-clip-text {
  color: transparent !important;
}

html[data-mode='light'] .bg-brand-500,
html[data-mode='light'] .bg-brand-400,
html[data-mode='light'] .bg-brand-600,
html[data-mode='light'] a.bg-brand-500,
html[data-mode='light'] button.bg-brand-500,
html[data-mode='light'] button.bg-brand-400,
html[data-mode='light'] .amg-keep-white,
html.amg-mode-light .bg-brand-500,
html.amg-mode-light .bg-brand-400,
html.amg-mode-light .amg-keep-white {
  color: #ffffff !important;
}

html[data-mode='light'] .border-white\/5,
html[data-mode='light'] .border-white\/10,
html[data-mode='light'] .border-white\/15,
html[data-mode='light'] .border-white\/20,
html[data-mode='light'] .border-white\/30,
html.amg-mode-light .border-white\/5,
html.amg-mode-light .border-white\/10,
html.amg-mode-light .border-white\/15,
html.amg-mode-light .border-white\/20,
html.amg-mode-light .border-white\/30 {
  border-color: #cbd5e1 !important;
}

html[data-mode='light'] .hover\:border-white\/30:hover,
html[data-mode='light'] .hover\:border-white\/20:hover,
html.amg-mode-light .hover\:border-white\/30:hover {
  border-color: #94a3b8 !important;
}

html[data-mode='light'] .bg-white\/5,
html[data-mode='light'] .bg-white\/10,
html[data-mode='light'] .bg-white\/15,
html[data-mode='light'] .bg-white\/\[0\.03\],
html[data-mode='light'] .bg-white\/\[0\.02\],
html[data-mode='light'] .bg-white\/\[0\.05\],
html.amg-mode-light .bg-white\/5,
html.amg-mode-light .bg-white\/10,
html.amg-mode-light .bg-white\/15,
html.amg-mode-light .bg-white\/\[0\.03\] {
  background-color: #f1f5f9 !important;
}

html[data-mode='light'] .hover\:bg-white\/5:hover,
html[data-mode='light'] .hover\:bg-white\/10:hover,
html.amg-mode-light .hover\:bg-white\/5:hover {
  background-color: #e2e8f0 !important;
}

html[data-mode='light'] .ring-white\/15,
html[data-mode='light'] .ring-white\/20,
html.amg-mode-light .ring-white\/15,
html.amg-mode-light .ring-white\/20 {
  --tw-ring-color: #cbd5e1 !important;
}

/* Separador topbar: más tenue */
html[data-mode='light'] header[data-header],
html.amg-mode-light header[data-header] {
  border-bottom-color: #e2e8f0 !important;
}

/* Botones secundarios outline: borde y fondo bien visibles */
html[data-mode='light'] a.rounded-full.border,
html[data-mode='light'] button.rounded-full.border,
html.amg-mode-light a.rounded-full.border,
html.amg-mode-light button.rounded-full.border {
  border-width: 1.5px !important;
  border-color: #64748b !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

html[data-mode='light'] a.rounded-full.border:hover,
html[data-mode='light'] button.rounded-full.border:hover,
html.amg-mode-light a.rounded-full.border:hover,
html.amg-mode-light button.rounded-full.border:hover {
  border-color: rgb(var(--amg-brand-500)) !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Primarios: mantienen blanco */
html[data-mode='light'] a.rounded-full.bg-brand-500,
html[data-mode='light'] a.rounded-full.bg-brand-400,
html[data-mode='light'] button.rounded-full.bg-brand-500,
html[data-mode='light'] button.rounded-full.bg-brand-400,
html.amg-mode-light a.rounded-full.bg-brand-500,
html.amg-mode-light button.rounded-full.bg-brand-500 {
  border-color: transparent !important;
  background-color: rgb(var(--amg-brand-500)) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px -8px rgb(var(--amg-glow) / 0.45);
}

/* Nav activa e inactiva */
html[data-mode='light'] header nav a,
html.amg-mode-light header nav a {
  color: #0f172a !important;
  font-weight: 600;
}

html[data-mode='light'] header nav a.bg-white\/15,
html[data-mode='light'] header nav a[class*='bg-white/15'],
html.amg-mode-light header nav a.bg-white\/15 {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  --tw-ring-color: #cbd5e1 !important;
}

html[data-mode='light'] header nav a:hover,
html.amg-mode-light header nav a:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Cards / paneles: borde suave */
html[data-mode='light'] .rounded-xl.border,
html[data-mode='light'] .rounded-2xl.border,
html.amg-mode-light .rounded-xl.border,
html.amg-mode-light .rounded-2xl.border {
  border-color: #e2e8f0 !important;
  background-color: #ffffff !important;
}

html[data-mode='light'] .rounded-xl.border.bg-white\/5,
html[data-mode='light'] .rounded-xl.bg-white\/5,
html.amg-mode-light .rounded-xl.bg-white\/5 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Enlaces secundarios muy claros */
html[data-mode='light'] a.text-slate-400,
html[data-mode='light'] .text-slate-400 a,
html.amg-mode-light a.text-slate-400 {
  color: #1e293b !important;
}

html[data-mode='light'] .text-brand-200,
html.amg-mode-light .text-brand-200 {
  color: rgb(var(--amg-brand-500)) !important;
}

html[data-mode='light'] .amg-shot-frame {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
}

html[data-mode='light'] .amg-theme-swatch,
html.amg-mode-light .amg-theme-swatch,
html[data-mode='dark'] .amg-theme-swatch,
html.amg-mode-dark .amg-theme-swatch {
  border: 0 !important;
  border-width: 0 !important;
}

html[data-mode='light'] .amg-theme-swatch.is-active,
html.amg-mode-light .amg-theme-swatch.is-active {
  border: 0 !important;
  border-width: 0 !important;
  box-shadow: 0 0 0 2px #2563eb !important;
}

html[data-mode='dark'] .amg-theme-swatch.is-active,
html.amg-mode-dark .amg-theme-swatch.is-active {
  border: 0 !important;
  border-width: 0 !important;
  box-shadow: 0 0 0 2px #60a5fa !important;
}

@media (max-width: 640px) {
  .policy-consent {
    padding: 0.5rem;
  }
  .policy-consent-actions {
    flex-direction: column;
  }
  .policy-consent-btn {
    width: 100%;
  }
}

/* ——— Megamenú topbar por áreas ——— */
.amg-mega {
  position: relative;
}
.amg-mega-link,
.amg-mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  color: rgb(203 213 225);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.amg-mega-link:hover,
.amg-mega-trigger:hover,
.amg-mega.is-open .amg-mega-trigger {
  color: #fff;
  background: rgb(255 255 255 / 0.05);
}
.amg-mega-link.is-active,
.amg-mega-trigger.is-active {
  color: #fff;
  background: rgb(255 255 255 / 0.15);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
}
.amg-mega-chevron {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.amg-mega.is-open .amg-mega-chevron {
  transform: rotate(180deg);
}

.amg-mega-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: max(18rem, var(--amg-mega-width, 100%));
  padding: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.amg-mega.is-open .amg-mega-panel,
.amg-mega-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}
.amg-mega-panel[hidden] {
  display: none !important;
}
.amg-mega.is-open .amg-mega-panel[hidden] {
  display: block !important;
}

.amg-mega-inner {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr) 14rem;
  gap: 1.25rem;
  padding: 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(11 15 26 / 0.97);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(16px);
}

.amg-mega-intro {
  padding: 0.35rem 0.25rem;
}
.amg-mega-intro-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.amg-mega-intro-desc {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgb(148 163 184);
}
.amg-mega-intro-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(var(--amg-accent-400));
}
.amg-mega-intro-cta:hover {
  color: rgb(var(--amg-accent-500));
}
.amg-mega-intro-extra {
  margin-top: 2.25rem;
  padding-top: 0;
  border-top: none;
}
.amg-mega-intro-extra .amg-mega-intro-cta {
  margin-top: 1rem;
}

.amg-mega-grid {
  display: grid;
  gap: 0.35rem 0.75rem;
  align-content: start;
}
.amg-mega-grid--2 {
  grid-template-columns: 1fr 1fr;
}
.amg-mega-grid--1 {
  grid-template-columns: 1fr;
}

.amg-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.65rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
.amg-mega-item:hover {
  background: rgb(255 255 255 / 0.05);
}
.amg-mega-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.amg-mega-item-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.amg-mega-item-desc {
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgb(148 163 184);
}

.amg-mega-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
  color: #fff;
}
.amg-mega-icon--violet { background: #5e36ff; }
.amg-mega-icon--purple { background: #7c3aed; }
.amg-mega-icon--blue { background: #2563eb; }
.amg-mega-icon--cyan { background: #0891b2; }
.amg-mega-icon--emerald { background: #059669; }
.amg-mega-icon--green { background: #16a34a; }
.amg-mega-icon--orange { background: #ea580c; }
.amg-mega-icon--slate { background: #475569; }

.amg-mega-featured {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem;
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.08);
}
.amg-mega-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  color: rgb(var(--amg-accent-400));
  background: rgb(var(--amg-accent-500) / 0.15);
}
.amg-mega-featured-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.amg-mega-featured-desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgb(148 163 184);
  flex: 1;
}
.amg-mega-featured-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--amg-accent-400) / 0.55);
  color: rgb(var(--amg-accent-400));
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.amg-mega-featured-cta:hover {
  background: rgb(var(--amg-accent-500) / 0.12);
  color: #fff;
}

/* Móvil: áreas colapsables */
.amg-mobile-area-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 0;
  background: transparent;
  color: rgb(203 213 225);
  font-size: 0.875rem;
  cursor: pointer;
}
.amg-mobile-area-toggle.is-active,
.amg-mobile-area-toggle[aria-expanded='true'] {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}
.amg-mobile-area-panel {
  padding: 0.25rem 0 0.5rem 0.35rem;
  display: grid;
  gap: 0.2rem;
}
.amg-mobile-area-panel[hidden] {
  display: none !important;
}
.amg-mobile-area-all {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--amg-brand-300));
}
.amg-mobile-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  text-decoration: none;
}
.amg-mobile-item:hover {
  background: rgb(255 255 255 / 0.05);
}
.amg-mobile-item-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}
.amg-mobile-item-desc {
  display: block;
  font-size: 0.7rem;
  color: rgb(148 163 184);
  margin-top: 0.1rem;
}

@media (max-width: 1100px) {
  .amg-mega-inner {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
  .amg-mega-featured {
    grid-column: 1 / -1;
  }
}

/* Modo claro */
html[data-mode='light'] .amg-mega-link,
html[data-mode='light'] .amg-mega-trigger,
html.amg-mode-light .amg-mega-link,
html.amg-mode-light .amg-mega-trigger {
  color: rgb(51 65 85);
}
html[data-mode='light'] .amg-mega-link:hover,
html[data-mode='light'] .amg-mega-trigger:hover,
html[data-mode='light'] .amg-mega.is-open .amg-mega-trigger,
html.amg-mode-light .amg-mega-link:hover,
html.amg-mode-light .amg-mega-trigger:hover,
html.amg-mode-light .amg-mega.is-open .amg-mega-trigger {
  color: rgb(15 23 42);
  background: rgb(15 23 42 / 0.05);
}
html[data-mode='light'] .amg-mega-link.is-active,
html[data-mode='light'] .amg-mega-trigger.is-active,
html.amg-mode-light .amg-mega-link.is-active,
html.amg-mode-light .amg-mega-trigger.is-active {
  color: rgb(15 23 42);
  background: rgb(15 23 42 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.12);
}
html[data-mode='light'] .amg-mega-inner,
html.amg-mode-light .amg-mega-inner {
  background: rgb(255 255 255 / 0.98);
  border-color: #e2e8f0;
  box-shadow: 0 24px 50px rgb(15 23 42 / 0.12);
}
html[data-mode='light'] .amg-mega-intro-title,
html[data-mode='light'] .amg-mega-item-label,
html[data-mode='light'] .amg-mega-featured-title,
html[data-mode='light'] .amg-mobile-item-label,
html.amg-mode-light .amg-mega-intro-title,
html.amg-mode-light .amg-mega-item-label,
html.amg-mode-light .amg-mega-featured-title,
html.amg-mode-light .amg-mobile-item-label {
  color: rgb(15 23 42);
}
html[data-mode='light'] .amg-mega-intro-desc,
html[data-mode='light'] .amg-mega-item-desc,
html[data-mode='light'] .amg-mega-featured-desc,
html[data-mode='light'] .amg-mobile-item-desc,
html.amg-mode-light .amg-mega-intro-desc,
html.amg-mode-light .amg-mega-item-desc,
html.amg-mode-light .amg-mega-featured-desc,
html.amg-mode-light .amg-mobile-item-desc {
  color: rgb(71 85 105);
}
html[data-mode='light'] .amg-mega-item:hover,
html.amg-mode-light .amg-mega-item:hover {
  background: rgb(15 23 42 / 0.04);
}
html[data-mode='light'] .amg-mega-featured,
html.amg-mode-light .amg-mega-featured {
  background: #f8fafc;
  border-color: #e2e8f0;
}
html[data-mode='light'] .amg-mega-featured-cta,
html.amg-mode-light .amg-mega-featured-cta {
  border-color: #64748b;
  color: rgb(15 23 42);
  background: #fff;
}
html[data-mode='light'] .amg-mega-featured-cta:hover,
html.amg-mode-light .amg-mega-featured-cta:hover {
  background: #f1f5f9;
  color: rgb(15 23 42);
}
html[data-mode='light'] .amg-mobile-area-toggle,
html.amg-mode-light .amg-mobile-area-toggle {
  color: rgb(51 65 85);
}
html[data-mode='light'] .amg-mobile-area-toggle.is-active,
html[data-mode='light'] .amg-mobile-area-toggle[aria-expanded='true'],
html.amg-mode-light .amg-mobile-area-toggle.is-active,
html.amg-mode-light .amg-mobile-area-toggle[aria-expanded='true'] {
  color: rgb(15 23 42);
  background: rgb(15 23 42 / 0.06);
}

/* ——— Contraste global modo claro (CTA, footer, ink) ——— */
.amg-cta-banner-overlay {
  background: linear-gradient(
    to right,
    rgb(7 9 18),
    rgb(7 9 18 / 0.88),
    rgb(7 9 18 / 0.42)
  );
}
.amg-cta-banner-lead {
  color: #cbd5e1;
}

html[data-mode='light'] .text-ink-900,
html.amg-mode-light .text-ink-900 {
  color: #0f172a !important;
}

html[data-mode='light'] .amg-cta-banner,
html.amg-mode-light .amg-cta-banner {
  border-color: rgb(15 23 42 / 0.12) !important;
}
html[data-mode='light'] .amg-cta-banner-overlay,
html.amg-mode-light .amg-cta-banner-overlay {
  background: linear-gradient(
    to right,
    rgb(7 9 18 / 0.92),
    rgb(7 9 18 / 0.78),
    rgb(7 9 18 / 0.45)
  ) !important;
}
html[data-mode='light'] .amg-cta-banner-content h2,
html[data-mode='light'] .amg-cta-banner-content .amg-keep-white,
html[data-mode='light'] .amg-cta-banner-lead,
html.amg-mode-light .amg-cta-banner-content h2,
html.amg-mode-light .amg-cta-banner-content .amg-keep-white,
html.amg-mode-light .amg-cta-banner-lead {
  color: #ffffff !important;
}
html[data-mode='light'] .amg-cta-banner-lead,
html.amg-mode-light .amg-cta-banner-lead {
  color: #e2e8f0 !important;
}
html[data-mode='light'] .amg-cta-banner-primary,
html.amg-mode-light .amg-cta-banner-primary {
  background: #ffffff !important;
  color: #0f172a !important;
}
html[data-mode='light'] .amg-cta-banner-primary:hover,
html.amg-mode-light .amg-cta-banner-primary:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-mode='light'] .amg-cta-banner-secondary,
html.amg-mode-light .amg-cta-banner-secondary {
  background: transparent !important;
  border-color: rgb(255 255 255 / 0.55) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
html[data-mode='light'] .amg-cta-banner-secondary:hover,
html.amg-mode-light .amg-cta-banner-secondary:hover {
  background: rgb(255 255 255 / 0.12) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

html[data-mode='light'] footer,
html.amg-mode-light footer {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-mode='light'] footer h3,
html.amg-mode-light footer h3 {
  color: #0f172a !important;
}
html[data-mode='light'] footer p,
html[data-mode='light'] footer li,
html[data-mode='light'] footer a,
html.amg-mode-light footer p,
html.amg-mode-light footer li,
html.amg-mode-light footer a {
  color: #1e293b !important;
}
html[data-mode='light'] footer a:hover,
html.amg-mode-light footer a:hover {
  color: #5e36ff !important;
}
html[data-mode='light'] footer .text-brand-300,
html.amg-mode-light footer .text-brand-300 {
  color: #5e36ff !important;
}
html[data-mode='light'] footer [data-lucide],
html[data-mode='light'] footer svg,
html.amg-mode-light footer [data-lucide],
html.amg-mode-light footer svg {
  color: #334155 !important;
  stroke: currentColor !important;
}

html[data-mode='light'] a.text-brand-300,
html[data-mode='light'] .text-brand-300,
html.amg-mode-light a.text-brand-300,
html.amg-mode-light .text-brand-300 {
  color: #5e36ff !important;
}
html[data-mode='light'] a.text-brand-200:hover,
html[data-mode='light'] .hover\:text-brand-200:hover,
html.amg-mode-light a.text-brand-200:hover {
  color: #4c1d95 !important;
}

html[data-mode='light'] .text-brand-200,
html.amg-mode-light .text-brand-200 {
  color: #6d28d9 !important;
}



/* FAB del bot: visible antes de cargar bot-widget.css */
#amg-bot-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgb(var(--amg-brand-500, 94 54 255));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
#amg-bot[hidden] {
  display: none !important;
}
#amg-bot-fab .hidden {
  display: none !important;
}
