html,
body {
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background: #f7faf7;
}

body > *:not(.cia-main-wave-stage) {
  position: relative;
  z-index: 1;
}

.cia-main-wave-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(247, 250, 247, 0.98), rgba(220, 235, 228, 0.42)),
    radial-gradient(circle at 18% 12%, rgba(79, 128, 101, 0.16), transparent 34%),
    radial-gradient(circle at 88% 24%, rgba(217, 189, 104, 0.16), transparent 30%);
}

.cia-main-wave-stage__glow,
.cia-main-wave-stage__ring,
.cia-main-wave-stage__waves {
  position: absolute;
}

.cia-main-wave-stage__glow {
  border-radius: 999px;
  opacity: 0.58;
}

.cia-main-wave-stage__glow--left {
  width: min(56vw, 720px);
  aspect-ratio: 1;
  left: -18vw;
  top: 8vh;
  background: radial-gradient(circle, rgba(79, 128, 101, 0.2), rgba(79, 128, 101, 0.04) 58%, transparent 72%);
  animation: ciaMainFloatLeft 32s ease-in-out infinite alternate;
}

.cia-main-wave-stage__glow--right {
  width: min(46vw, 620px);
  aspect-ratio: 1;
  right: -14vw;
  bottom: 2vh;
  background: radial-gradient(circle, rgba(217, 189, 104, 0.2), rgba(217, 189, 104, 0.05) 56%, transparent 72%);
  animation: ciaMainFloatRight 28s ease-in-out infinite alternate;
}

.cia-main-wave-stage__ring {
  border: 1px solid rgba(79, 128, 101, 0.18);
  border-radius: 50%;
  opacity: 0.7;
}

.cia-main-wave-stage__ring--one {
  width: min(58vw, 700px);
  aspect-ratio: 1;
  right: -20vw;
  top: 4vh;
  animation: ciaMainRingOne 36s ease-in-out infinite alternate;
}

.cia-main-wave-stage__ring--two {
  width: min(42vw, 520px);
  aspect-ratio: 1;
  left: -16vw;
  bottom: 5vh;
  border-color: rgba(217, 189, 104, 0.2);
  animation: ciaMainRingTwo 30s ease-in-out infinite alternate;
}

.cia-main-wave-stage__waves {
  left: 50%;
  top: 50%;
  width: 150vw;
  min-width: 1280px;
  transform: translate(-50%, -50%);
  opacity: 0.72;
  animation: ciaMainWaveDrift 34s ease-in-out infinite alternate;
}

.cia-main-wave-stage__waves path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2;
}

.cia-main-wave-stage__waves .wave-strong {
  stroke: rgba(79, 128, 101, 0.24);
}

.cia-main-wave-stage__waves .wave-soft {
  stroke: rgba(35, 84, 61, 0.13);
}

.cia-main-wave-stage__waves .wave-gold {
  stroke: rgba(217, 189, 104, 0.22);
}

@keyframes ciaMainFloatLeft {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 5vh, 0) scale(1.08); }
}

@keyframes ciaMainFloatRight {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5vw, -4vh, 0) scale(1.06); }
}

@keyframes ciaMainRingOne {
  from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(-3vw, 4vh, 0) rotate(8deg) scale(1.04); }
}

@keyframes ciaMainRingTwo {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(4vw, -3vh, 0) rotate(-7deg); }
}

@keyframes ciaMainWaveDrift {
  from { transform: translate(-50%, -50%) translate3d(-2vw, 0, 0); }
  to { transform: translate(-50%, -50%) translate3d(2vw, 2vh, 0); }
}

@media (max-width: 720px) {
  .cia-main-wave-stage__waves {
    min-width: 860px;
    opacity: 0.52;
  }

  .cia-main-wave-stage__ring--one {
    width: 86vw;
    right: -44vw;
  }

  .cia-main-wave-stage__ring--two {
    width: 74vw;
    left: -42vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cia-main-wave-stage *,
  .cia-main-wave-stage {
    animation: none !important;
  }
}

/* CIAFiscalPro: keep dropdown navigation above the hero/background layers. */
body > header,
header,
.site-header,
.main-header,
.navbar,
.navbar-area,
.navigation,
nav,
.menu,
.dropdown,
.dropdown-menu {
  position: relative;
  z-index: 1000;
}

header *,
.site-header *,
.main-header *,
.navbar *,
.navbar-area *,
.navigation *,
nav * {
  z-index: auto;
}

.dropdown-menu,
.sub-menu,
nav ul ul,
.navbar ul ul {
  z-index: 1100;
}

/* CIAFiscalPro: prevent the hero section from covering dropdown menus. */
body {
  isolation: isolate;
}

.cia-main-wave-stage {
  z-index: -1;
}

body > *:not(.cia-main-wave-stage) {
  z-index: auto;
}

body > *:has(nav),
body > *:has(.dropdown),
body > *:has(.dropdown-menu),
header,
.header,
.header-area,
.site-header,
.main-header,
.navbar,
.navbar-area,
.navigation,
.menu-area {
  position: relative !important;
  z-index: 5000 !important;
  overflow: visible !important;
}

nav,
nav ul,
nav li,
.navbar,
.navbar ul,
.navbar li,
.dropdown,
.dropdown-menu,
.sub-menu {
  overflow: visible !important;
}

.dropdown-menu,
.sub-menu,
nav ul ul,
.navbar ul ul {
  position: absolute;
  z-index: 6000 !important;
}

/* CIAFiscalPro: header and dropdown must float over the first dark section. */
body {
  isolation: isolate;
}

.cia-main-wave-stage {
  z-index: -1 !important;
}

body > *:not(.cia-main-wave-stage) {
  z-index: auto;
}

/* The wave script inserts .cia-main-wave-stage as the first child,
   so the public header is normally the second direct body child. */
body > :nth-child(2),
body > header,
body > .header,
body > .site-header,
body > .main-header,
body > .navbar,
body > .navbar-area,
body > .navigation,
body > .menu-area {
  position: relative !important;
  z-index: 99999 !important;
  overflow: visible !important;
}

body > :nth-child(2) *,
header *,
.header *,
.site-header *,
.main-header *,
.navbar *,
.navbar-area *,
.navigation *,
.menu-area * {
  overflow: visible !important;
}

.dropdown,
.dropdown-menu,
.sub-menu,
nav ul ul,
.navbar ul ul {
  position: absolute;
  z-index: 100000 !important;
  overflow: visible !important;
}

/* Keep the first visual section below the header/menu layer. */
body > :nth-child(3),
section:first-of-type,
.hero,
.hero-section,
.banner,
.banner-section,
.main-banner {
  position: relative;
  z-index: 1 !important;
}

/* CIAFiscalPro: make animated background visible on public content pages. */
.cia-main-wave-stage {
  z-index: 0 !important;
}

body > *:not(.cia-main-wave-stage) {
  position: relative;
  z-index: 1;
}

body > header,
body > .header,
body > .site-header,
body > .main-header,
body > .navbar,
body > .navbar-area {
  z-index: 99999 !important;
  background: #ffffff;
}

main,
body > main,
.blog-section,
.blog-area,
.article-section,
.article-area,
.resources-section,
.resources-area,
section.bg-light,
section.bg-gray,
section.bg-white {
  background: transparent !important;
}

.dropdown,
.dropdown-menu,
.sub-menu,
nav ul ul,
.navbar ul ul {
  z-index: 100000 !important;
}

/* CIAFiscalPro: show animated background behind article pages. */
.article-page,
.article-detail,
.article-content,
.article-wrapper,
.blog-detail,
.blog-details,
.blog-content,
.post-content,
.single-post,
main.article,
main.blog,
section.article,
section.blog,
section.post,
section.content,
.content-section,
.page-section {
  background: transparent !important;
}

.article-page::before,
.article-detail::before,
.article-content::before,
.article-wrapper::before,
.blog-detail::before,
.blog-details::before,
.blog-content::before,
.post-content::before,
.single-post::before,
main.article::before,
main.blog::before,
section.article::before,
section.blog::before,
section.post::before,
section.content::before,
.content-section::before,
.page-section::before {
  background: transparent !important;
}

article,
.article-card,
.article-body,
.post-body,
.entry-content {
  position: relative;
  z-index: 1;
}

/* Keep readable blocks solid while the page background remains animated. */
.article-card,
.sidebar,
.sidebar-widget,
.widget,
.card,
.author-box,
.related-posts,
blockquote,
pre {
  background-color: rgba(255, 255, 255, 0.92);
}

/* CIAFiscalPro: visible animated background for articuloTiposCFDI. */
body.cia-waves-articulo-tipos-cfdi {
  background: transparent !important;
}

body.cia-waves-articulo-tipos-cfdi main,
body.cia-waves-articulo-tipos-cfdi section,
body.cia-waves-articulo-tipos-cfdi .article-section,
body.cia-waves-articulo-tipos-cfdi .article-detail,
body.cia-waves-articulo-tipos-cfdi .blog-detail,
body.cia-waves-articulo-tipos-cfdi .blog-details,
body.cia-waves-articulo-tipos-cfdi .post-detail,
body.cia-waves-articulo-tipos-cfdi .content-area,
body.cia-waves-articulo-tipos-cfdi .page-content {
  background: transparent !important;
}

body.cia-waves-articulo-tipos-cfdi article,
body.cia-waves-articulo-tipos-cfdi .article-body,
body.cia-waves-articulo-tipos-cfdi .post-body,
body.cia-waves-articulo-tipos-cfdi .entry-content {
  background: transparent !important;
}

body.cia-waves-articulo-tipos-cfdi .card,
body.cia-waves-articulo-tipos-cfdi .sidebar,
body.cia-waves-articulo-tipos-cfdi .widget,
body.cia-waves-articulo-tipos-cfdi .toc,
body.cia-waves-articulo-tipos-cfdi .content-box,
body.cia-waves-articulo-tipos-cfdi table,
body.cia-waves-articulo-tipos-cfdi blockquote {
  background-color: rgba(255, 255, 255, 0.92) !important;
}

