/* ============================================================
   BCPS — Section patterns & animations (portable)

   Patterns: add class only (section-pattern-grid, section-pattern-dot, …)
   Bubbles: add section-bubbles — shapes list auto-injected by main.js
            (or paste <ul class="section-bubbles__shapes"> with 10 <li>)

   Classes (add to any section/container):
     section-pattern-grid      — grid texture
     section-pattern-dot       — dot texture
     section-pattern-diagonal  — diagonal texture
     section-bubbles           — rising shape animation

   Example: class="page-section page-section--muted section-pattern-grid section-bubbles"
   Elementor: Advanced → CSS Classes
   ============================================================ */

:root {
  --pattern-dot: radial-gradient(circle at 1px 1px, rgba(0, 128, 128, 0.06) 1px, transparent 0);
  --pattern-grid: linear-gradient(rgba(0, 128, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 128, 128, 0.04) 1px, transparent 1px);
  --pattern-diagonal: linear-gradient(135deg, rgba(0, 128, 128, 0.04) 25%, transparent 25%),
    linear-gradient(225deg, rgba(111, 67, 42, 0.03) 25%, transparent 25%);
}

/* ---- Portable pattern textures (add class on the section) ---- */
.section-pattern-grid {
  background-color: var(--bg-white, #fff);
  background-image: var(--pattern-grid);
  background-size: 40px 40px;
}

.section-pattern-dot {
  background-color: var(--bg-white, #fff);
  background-image: var(--pattern-dot);
  background-size: 24px 24px;
}

.section-pattern-diagonal {
  background-color: var(--bg-white, #fff);
  background-image: var(--pattern-diagonal);
  background-size: 30px 30px;
}

/* ---- Rising bubbles — demo-style (rise + spin + square → circle) ---- */
.section-bubbles {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section-bubbles > :not(.section-bubbles__shapes) {
  position: relative;
  z-index: 1;
}

.section-bubbles::before,
.section-bubbles::after {
  display: none;
}

.section-bubbles__shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.section-bubbles__shapes li {
  position: absolute;
  display: block;
  width: 20px;
  height: 20px;
  bottom: -150px;
  background: rgba(0, 128, 128, 0.1);
  animation: sectionBubbleRise 25s linear infinite;
}

.section-bubbles__shapes li:nth-child(1) {
  left: 25%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.section-bubbles__shapes li:nth-child(2) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 12s;
}

.section-bubbles__shapes li:nth-child(3) {
  left: 70%;
  width: 20px;
  height: 20px;
  animation-delay: 4s;
}

.section-bubbles__shapes li:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 0s;
  animation-duration: 18s;
}

.section-bubbles__shapes li:nth-child(5) {
  left: 65%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
}

.section-bubbles__shapes li:nth-child(6) {
  left: 75%;
  width: 110px;
  height: 110px;
  animation-delay: 3s;
  background: rgba(23, 190, 187, 0.09);
}

.section-bubbles__shapes li:nth-child(7) {
  left: 35%;
  width: 150px;
  height: 150px;
  animation-delay: 7s;
}

.section-bubbles__shapes li:nth-child(8) {
  left: 50%;
  width: 25px;
  height: 25px;
  animation-delay: 15s;
  animation-duration: 45s;
}

.section-bubbles__shapes li:nth-child(9) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: 2s;
  animation-duration: 35s;
  background: rgba(220, 20, 60, 0.08);
}

.section-bubbles__shapes li:nth-child(10) {
  left: 85%;
  width: 150px;
  height: 150px;
  animation-delay: 0s;
  animation-duration: 11s;
}

/* Alternate spin direction on even bubbles */
.section-bubbles__shapes li:nth-child(even) {
  animation-name: sectionBubbleRiseReverse;
}

@keyframes sectionBubbleRise {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.45;
    border-radius: 0;
  }

  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
    border-radius: 50%;
  }
}

@keyframes sectionBubbleRiseReverse {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.45;
    border-radius: 0;
  }

  100% {
    transform: translateY(-1000px) rotate(-720deg);
    opacity: 0;
    border-radius: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-bubbles__shapes li {
    animation: none !important;
    opacity: 0.12 !important;
    border-radius: 50%;
  }
}
