/* ============================================
   Botanical Section Backgrounds
   Each section has its own unique SVG decoration
   positioned as a subtle atmospheric background
   ============================================ */

/* ── Base: all content sections relative + above bg ── */
.content-section {
    position: relative;
    z-index: 1;
}

.content-section > * {
    position: relative;
    z-index: 2;
}

/* ── Shared ::before pattern for all section botanical backgrounds ── */
.content-section.has-botanical-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: left top;
    background-size: auto 100%;
    opacity: 0.7;
    filter: saturate(0.3);
    z-index: 0;
}

/* ── Per-section botanical backgrounds ── */

/* Standesamt: eucalyptus PNG from left edge */
#standesamt.has-botanical-bg::before {
    background-image: url('../img/botanical/magenta_eucalyptus_left_2.png');
    background-position: left top;
    background-size: auto 100%;
    opacity: 1;
}

/* Kirche: eucalyptus PNG from right edge */
#kirche.has-botanical-bg::before {
    background-image: url('../img/botanical/magenta_eucalyptus_right_2.png');
    background-position: right top;
    background-size: auto 100%;
    opacity: 1;
}

/* Kaffee: PNG from left edge */
#kaffee.has-botanical-bg::before {
    background-image: url('../img/botanical/section_left_1.png');
    background-position: left top;
    background-size: auto 100%;
    opacity: 1;
}

/* Wissenswert: olive PNG from right edge */
#wissenswert.has-botanical-bg::before {
    background-image: url('../img/botanical/magenta_olive_right.png');
    background-position: right top;
    background-size: auto 100%;
    opacity: 1;
}

/* Anmeldung: olive PNG from left edge (quadratisch) */
#anmeldung.has-botanical-bg::before {
    background-image: url('../img/botanical/imgs_magenta_olive_left_square.png');
    background-position: left top;
    background-size: auto 100%;
    opacity: 1;
}

/* Abendessen: olive PNG centered at bottom */
#abendessen.has-botanical-bg::before {
    background-image: url('../img/botanical/magenta_olive_bottom.png');
    background-position: center bottom;
    background-size: auto 100%;
    opacity: 1;
}

/* ── Remove old alt-bg background-image approach ── */
.content-section.alt-bg {
    /* Reset: no longer use background-image on the section itself */
    /* The ::before pseudo-element now handles the botanical bg */
    background-color: var(--cream, #FAF8F3) !important;
    background-image: none !important;
    padding-top: var(--section-py, 80px);
}

/* ── Horizontal Section Dividers (standalone between sections) ── */
/* These are separate div elements between sections, not backgrounds */
.section-divider {
    display: none;
    position: relative;
    height: 80px;
    overflow: hidden;
    background: var(--cream, #FAF8F3);
}

.section-divider.short { height: 60px; }
.section-divider.tall  { height: 120px; }

.section-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(168, 160, 142, 0) 0%,
        rgba(200, 210, 198, 0.2) 20%,
        rgba(200, 210, 198, 0.2) 80%,
        rgba(168, 160, 142, 0) 100%
    );
    pointer-events: none;
}

/* Decorative grow-from-edges within dividers */
.deco-grow-left,
.deco-grow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: clamp(150px, 25vw, 400px);
    opacity: 0;
    animation: growFromEdge 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.deco-grow-left  { left: 0; }
.deco-grow-right { right: 0; }

.deco-grow-left img,
.deco-grow-right img {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: left center;
    filter: url(#watercolor-soft) saturate(1.1) brightness(1.02);
    opacity: 0.9;
}

.deco-grow-right img {
    object-position: right center;
}

.deco-grow-both {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 80%;
    width: clamp(200px, 40vw, 600px);
    opacity: 0;
    animation: growFromCenter 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.deco-grow-both img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: url(#watercolor-detail) saturate(1.2) hue-rotate(15deg) brightness(1.02);
    opacity: 0.88;
}

/* Staggered animation delays */
.divider-left-1  { animation-delay: 0.1s; }
.divider-left-2  { animation-delay: 0.25s; }
.divider-right-1 { animation-delay: 0.15s; }
.divider-right-2 { animation-delay: 0.3s; }

@keyframes growFromEdge {
    0%   { opacity: 0; transform: translateY(-50%) scaleX(0.3); }
    25%  { opacity: 0.85; }
    100% { opacity: 1; transform: translateY(-50%) scaleX(1); }
}

@keyframes growFromCenter {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3, 0.5); }
    30%  { opacity: 0.8; }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1, 1); }
}

/* ── Mobile: hide horizontal dividers for cleaner look ── */
@media (max-width: 768px) {
    .section-divider {
        display: none;
    }
    .content-section.has-botanical-bg::before {
        background-size: 60% auto;
        opacity: 0.7;
        filter: saturate(0.3);
    }
}

/* ── Desktop sizing for divider botanicals ── */
@media (min-width: 769px) {
    .deco-grow-left  { width: clamp(180px, 22vw, 380px); }
    .deco-grow-right { width: clamp(180px, 22vw, 380px); }
    .deco-grow-both  { width: clamp(250px, 38vw, 580px); }
}
