/* Aldea Paleta Global PRO v1.8 — Fondos cromáticos dinámicos.
   Se activa por defecto, también en instalaciones actualizadas desde v1.7.
   Evita cambios globales del tema, fotos, logotipo y widgets externos. */

/* Superficie general de las landings: base teñida y dos luces cromáticas suaves. */
html body.ap-chromatic :is(#ad-home,#aldea-nosotros,#aldea-contacto,#aldea-marketing,#aldea-ia,#aldea-portafolio,#aldea-footer) {
  background:radial-gradient(ellipse 86% 58% at 88% 4%,var(--ap-chroma-halo),transparent 72%),
    radial-gradient(ellipse 90% 55% at 5% 95%,var(--ap-chroma-halo-secondary),transparent 75%),
    linear-gradient(137deg,var(--ap-chroma-section),var(--ap-chroma-bg))!important;
  color:var(--ap-title)!important;
}

/* Portadas: degradado siempre adaptado al color seleccionado. */
html body.ap-chromatic #ad-home .ad-header,
html body.ap-chromatic #aldea-nosotros .an-hero,
html body.ap-chromatic #aldea-contacto .ac-hero,
html body.ap-chromatic #aldea-marketing .am-hero,
html body.ap-chromatic #aldea-ia .ad-hero {
  background:radial-gradient(ellipse 80% 66% at 85% 12%,var(--ap-chroma-halo),transparent 68%),
    radial-gradient(ellipse 85% 65% at 2% 96%,var(--ap-chroma-halo-secondary),transparent 77%),
    linear-gradient(134deg,var(--ap-chroma-bg),var(--ap-chroma-section))!important;
}

/* Secciones ordinarias: mantiene cierta profundidad, no solamente colores planos. */
html body.ap-chromatic #ad-home :is(.ad-section,.ad-section-soft,.ad-section-alt),
html body.ap-chromatic #aldea-nosotros :is(.an-section,.an-section-alt),
html body.ap-chromatic #aldea-contacto :is(.ac-section,.ac-section-alt),
html body.ap-chromatic #aldea-marketing :is(.am-section,.am-section-alt),
html body.ap-chromatic #aldea-ia :is(.ad-section,.ad-section-soft) {
  background:radial-gradient(ellipse 75% 80% at 96% 4%,var(--ap-chroma-halo-secondary),transparent 73%),
    linear-gradient(150deg,var(--ap-chroma-bg),var(--ap-chroma-section))!important;
}
/* Alternancia entre secciones que ya venían marcadas como alternativas. */
html body.ap-chromatic #ad-home :is(.ad-section-alt,.ad-section-soft),
html body.ap-chromatic #aldea-nosotros .an-section-alt,
html body.ap-chromatic #aldea-contacto .ac-section-alt,
html body.ap-chromatic #aldea-marketing .am-section-alt,
html body.ap-chromatic #aldea-ia .ad-section-soft {
  background:radial-gradient(ellipse 76% 78% at 5% 82%,var(--ap-chroma-halo),transparent 78%),
    linear-gradient(145deg,var(--ap-chroma-section),var(--ap-chroma-bg))!important;
}

/* Cajas informativas de mayor tamaño, banners y llamadas a la acción. */
html body.ap-chromatic #ad-home :is(.ad-hero-board,.ad-about,.ad-final,.ad-creative-panel),
html body.ap-chromatic #aldea-nosotros :is(.an-display,.an-person,.an-cta-inner,.an-story-side),
html body.ap-chromatic #aldea-contacto :is(.ac-panel,.ac-cta),
html body.ap-chromatic #aldea-marketing :is(.am-dashboard,.am-example,.am-cta),
html body.ap-chromatic #aldea-ia :is(.ad-experience,.ad-cta),
html body.ap-chromatic #aldea-footer .af-cta {
  background:radial-gradient(ellipse at 89% 7%,var(--ap-chroma-halo),transparent 69%),
    linear-gradient(137deg,var(--ap-chroma-card2),var(--ap-chroma-section))!important;
  border-color:var(--ap-border)!important;
}

/* Tarjetas uniformes en todo el sitio: tono de paleta, no gris fijo.
   No afecta a tarjetas tipo cristal activadas manualmente. */
html body.ap-chromatic:not(.ap-glass) #ad-home :is(.ad-service,.ad-feature,.ad-project,.ad-fact,.ad-faqs details),
html body.ap-chromatic:not(.ap-glass) #aldea-nosotros :is(.an-card,.an-mini,.an-cap,.an-purpose-item,.an-project,.an-person-chip,.an-proof span),
html body.ap-chromatic:not(.ap-glass) #aldea-contacto :is(.ac-channel,.ac-form-card,.ac-aside-card,.ac-visual-row,.ac-faq details),
html body.ap-chromatic:not(.ap-glass) #aldea-marketing :is(.am-service,.am-kpi,.am-ai-item,.am-example-list li,.am-faq details),
html body.ap-chromatic:not(.ap-glass) #aldea-ia :is(.ad-service,.ad-step,.ad-trust div,.ad-faq details),
html body.ap-chromatic:not(.ap-glass) #aldea-portafolio :is(.adp-project,.adp-history),
html body.ap-chromatic:not(.ap-glass) #aldea-footer :is(.af-pill,.af-social a) {
  background:radial-gradient(ellipse 65% 80% at 7% 0%,var(--ap-chroma-card-glow),transparent 78%),
    linear-gradient(145deg,var(--ap-chroma-card2),var(--ap-chroma-card))!important;
  border-color:var(--ap-border)!important;
}

/* Conserva el control adicional de degradados con ángulo configurable. */
html body.ap-chromatic.ap-gradient #ad-home .ad-header,
html body.ap-chromatic.ap-gradient #aldea-nosotros .an-hero,
html body.ap-chromatic.ap-gradient #aldea-contacto .ac-hero,
html body.ap-chromatic.ap-gradient #aldea-marketing .am-hero,
html body.ap-chromatic.ap-gradient #aldea-ia .ad-hero {
  background:linear-gradient(var(--ap-grad-angle,140deg),var(--ap-gradient-overlay),transparent 73%),
    radial-gradient(ellipse 80% 68% at 86% 12%,var(--ap-chroma-halo),transparent 70%),
    linear-gradient(138deg,var(--ap-chroma-bg),var(--ap-chroma-section))!important;
}

/* Si se activa Glass, sus tarjetas siguen translúcidas. */
html body.ap-chromatic.ap-glass #ad-home :is(.ad-service,.ad-feature,.ad-project,.ad-faqs details),
html body.ap-chromatic.ap-glass #aldea-nosotros :is(.an-card,.an-cap,.an-project),
html body.ap-chromatic.ap-glass #aldea-contacto :is(.ac-channel,.ac-form-card,.ac-faq details),
html body.ap-chromatic.ap-glass #aldea-marketing :is(.am-service,.am-ai-item,.am-faq details),
html body.ap-chromatic.ap-glass #aldea-ia :is(.ad-service,.ad-step,.ad-faq details),
html body.ap-chromatic.ap-glass #aldea-portafolio .adp-project,
html body.ap-chromatic.ap-glass #aldea-footer .af-pill {
  background:var(--ap-glass-bg)!important;
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}

/* Imagen/ilustración y ventanas de código mantienen sus colores semánticos.
   Conserva el texto claro para todos los degradados oscuros. */
html body.ap-chromatic :is(#ad-home,#aldea-nosotros,#aldea-contacto,#aldea-marketing,#aldea-ia,#aldea-portafolio,#aldea-footer) :is(h1,h2,h3,h4) {
  color:var(--ap-title)!important;
  -webkit-text-fill-color:var(--ap-title)!important;
}

/* Compatible con los plugins de cabecera/footers dinámicos de Aldea. */
html body.ap-chromatic #aldea-header.ah-dynamic {
  background:radial-gradient(ellipse at 88% 2%,var(--ap-chroma-halo-secondary),transparent 72%),
    linear-gradient(135deg,var(--ap-chroma-bg),var(--ap-chroma-section))!important;
}
html body.ap-chromatic #aldea-header.ah-dynamic :is(.ah-mobile-panel,.ah-menu .sub-menu) {
  background:linear-gradient(135deg,var(--ap-chroma-section),var(--ap-chroma-bg))!important;
}
html body.ap-chromatic #aldea-header.ah-dynamic :is(.ah-languages,.ah-menu-mobile a) {
  background:linear-gradient(140deg,var(--ap-chroma-card),var(--ap-chroma-section))!important;
}
html body.ap-chromatic #aldea-footer :is(.af-main,.af-bottom) {
  background:radial-gradient(ellipse at 5% 6%,var(--ap-chroma-halo-secondary),transparent 75%),
    linear-gradient(145deg,var(--ap-chroma-bg),var(--ap-chroma-section))!important;
}
