/* ============================================
   PAGINI DINAMICE — animatii prietenoase
   ============================================ */

.page-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #FFF9F0 0%, #fff 35%, #F8FBFF 100%);
}

/* --- Header cu decoratiuni --- */
.page-header--playful::after {
    display: none;
}

.page-header--playful {
    overflow: hidden;
    padding: 56px 24px 70px;
    background: linear-gradient(135deg, #2D3561 0%, #7B2D8E 42%, #4A90E2 78%, #E8A838 100%);
    background-size: 200% 200%;
    animation: pageHeaderGlow 12s ease infinite;
}

@keyframes pageHeaderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page-header--playful h1 {
    position: relative;
    z-index: 3;
    animation: pageTitlePop 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes pageTitlePop {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

.page-deco {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    opacity: 0.88;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.page-deco i {
    display: block;
}

.page-deco--balloon-1,
.page-deco--balloon-2,
.page-floatie--balloon {
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.12));
}

.page-deco--balloon-1 i,
.page-deco--balloon-2 i,
.page-floatie--balloon i {
    position: relative;
    border-radius: 50%;
    box-shadow: inset -4px -6px 0 rgba(0, 0, 0, 0.08);
}

.page-deco--balloon-1 {
    top: 18%;
    left: 6%;
    font-size: 36px;
    color: #FF6B9D;
    animation: pageFloatA 5s ease-in-out infinite;
}

.page-deco--balloon-2 {
    top: 28%;
    right: 8%;
    font-size: 30px;
    color: #4ECDC4;
    animation: pageFloatB 6.5s ease-in-out infinite 0.8s;
}

.page-deco--star-1 {
    top: 14%;
    right: 18%;
    font-size: 26px;
    color: #FFD700;
    animation: pageTwinkle 4s ease-in-out infinite;
}

.page-deco--star-2 {
    bottom: 32%;
    left: 12%;
    font-size: 22px;
    color: #FFE66D;
    animation: pageTwinkle 5s ease-in-out infinite 1.2s;
}

.page-deco--cloud-1 {
    top: 22%;
    left: 20%;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.75);
    animation: pageCloudDrift 8s ease-in-out infinite;
}

.page-deco--cloud-2 {
    bottom: 28%;
    right: 14%;
    font-size: 34px;
    color: rgba(255, 255, 255, 0.6);
    animation: pageCloudDrift 10s ease-in-out infinite reverse 2s;
}

.page-deco--heart {
    bottom: 38%;
    right: 6%;
    font-size: 24px;
    color: #FF8FAB;
    animation: pageHeartbeat 2.5s ease-in-out infinite;
}

.page-deco--sun {
    top: 12%;
    left: 14%;
    font-size: 28px;
    color: #FFD700;
    animation: pageSunSpin 14s linear infinite;
}

@keyframes pageFloatA {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-18px) rotate(6deg); }
}

@keyframes pageFloatB {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-22px) rotate(-5deg); }
}

@keyframes pageTwinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.88; }
    50% { transform: scale(1.15) rotate(15deg); opacity: 1; }
}

@keyframes pageCloudDrift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(12px); }
}

@keyframes pageHeartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.12); }
    50% { transform: scale(1); }
}

@keyframes pageSunSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 4;
    line-height: 0;
}

.page-header-wave svg {
    width: 100%;
    height: 48px;
    display: block;
}

/* --- Zona continut --- */
.page-body-zone {
    position: relative;
    padding: 10px 0 60px;
}

.page-side-deco {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.page-side-deco--left { left: 0; }
.page-side-deco--right { right: 0; }

.page-floatie {
    position: absolute;
    opacity: 0.35;
    animation: pageSideFloat 7s ease-in-out infinite;
}

.page-floatie--ship {
    bottom: 18%;
    left: 8px;
    font-size: 42px;
    color: #4A90E2;
    animation: pageShipSail 9s ease-in-out infinite;
}

.page-floatie--fish {
    top: 25%;
    left: 12px;
    font-size: 28px;
    color: #2ECC71;
    animation-delay: 1.5s;
}

.page-floatie--anchor {
    top: 55%;
    left: 6px;
    font-size: 26px;
    color: #7B2D8E;
    animation-delay: 3s;
}

.page-floatie--balloon {
    top: 12%;
    right: 10px;
    font-size: 38px;
    color: #E84855;
    animation: pageFloatA 6s ease-in-out infinite 0.5s;
}

.page-floatie--kite {
    top: 42%;
    right: 6px;
    font-size: 32px;
    color: #E8A838;
    animation: pageFloatB 7s ease-in-out infinite 2s;
}

.page-floatie--rainbow {
    bottom: 22%;
    right: 4px;
    font-size: 30px;
    color: #9B59B6;
    opacity: 0.4;
    animation: pageTwinkle 6s ease-in-out infinite;
}

@keyframes pageSideFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pageShipSail {
    0%, 100% { transform: translateX(0) rotate(-3deg); }
    50% { transform: translateX(8px) rotate(3deg); }
}

.page-body--playful {
    position: relative;
    z-index: 2;
}

.page-body--playful .page-featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 12px 40px rgba(45, 53, 97, 0.15);
    border: 4px solid #fff;
}

.page-content-inner > *:first-child {
    margin-top: 0;
}

/* --- Breadcrumb & titlu subpagini --- */
.page-breadcrumb {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 14px;
    max-width: 900px;
    font-size: 13px;
    font-weight: 700;
}

.page-breadcrumb a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.page-breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.page-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.page-breadcrumb-current {
    color: rgba(255, 255, 255, 0.75);
}

.page-title-row {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.page-title-row h1 {
    margin: 0;
}

.page-title-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-header--sub {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--page-accent, #7B2D8E) 35%, #2D3561) 0%,
        var(--page-accent, #7B2D8E) 55%,
        #4A90E2 100%
    );
}

.page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid color-mix(in srgb, var(--page-accent, #7B2D8E) 20%, #fff);
    color: var(--page-accent, #7B2D8E);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(45, 53, 97, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-back-link:hover {
    transform: translateX(-3px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--page-accent, #7B2D8E) 18%, transparent);
}

/* --- Card continut --- */
.page-content-card {
    background: #fff;
    border-radius: 24px;
    padding: 32px 36px;
    border: 2px solid rgba(45, 53, 97, 0.06);
    box-shadow: 0 12px 40px rgba(45, 53, 97, 0.08);
    border-top: 5px solid var(--page-accent, #7B2D8E);
}

.page-content-card .page-content-inner {
    max-width: none;
}

/* --- Proza / continut importat --- */
.page-prose,
.page-plain-text {
    font-size: 17px;
    line-height: 1.85;
    color: #444;
}

.page-prose p,
.page-prose div,
.page-plain-text {
    margin: 0 0 18px;
}

.page-prose div:last-child,
.page-prose p:last-child {
    margin-bottom: 0;
}

.page-prose h1,
.page-prose h2,
.page-prose h3,
.page-prose h4 {
    color: #2D3561;
    margin: 28px 0 14px;
    line-height: 1.35;
    font-family: 'Baloo 2', var(--page-font, 'Nunito'), sans-serif !important;
}

.page-prose h2 { font-size: 26px; }
.page-prose h3 { font-size: 22px; }
.page-prose h4 { font-size: 19px; }

.page-prose a {
    color: var(--page-accent, #7B2D8E);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-prose a:hover {
    opacity: 0.85;
}

.page-prose ul,
.page-prose ol {
    margin: 0 0 20px;
    padding-left: 1.4em;
}

.page-prose li {
    margin-bottom: 8px;
}

.page-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 8px 28px rgba(45, 53, 97, 0.12);
}

.page-prose blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--page-accent, #E8A838);
    background: linear-gradient(135deg, #FFF9F0, #fff);
    border-radius: 0 14px 14px 0;
    font-style: italic;
    color: #2D3561;
}

.page-prose .page-import-block,
.page-prose [class*="elementor"],
.page-prose [class*="pxl-"] {
    margin: 0 0 18px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.page-prose iframe {
    max-width: 100%;
    border-radius: 14px;
    margin: 20px 0;
}

.page-child-card-emoji {
    font-size: 48px;
    line-height: 1;
}

.page-body--playful .page-card-box,
.page-body--playful .page-highlight,
.page-body--playful .page-layout-2cols > div,
.page-body--playful .page-layout-3cols > div {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.page-body--playful .page-card-box:hover,
.page-body--playful .page-highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(123, 45, 142, 0.12);
}

/* Galerie */
.page-gallery--playful {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px dashed rgba(123, 45, 142, 0.15);
}

.page-gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(45, 53, 97, 0.1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    overflow: hidden;
}

.page-gallery-item .protected-media,
.page-gallery-item .protected-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 13px;
}

.page-gallery-item:hover {
    transform: scale(1.04) rotate(-1deg);
    box-shadow: 0 14px 36px rgba(123, 45, 142, 0.2);
}

.page-gallery-item .protected-media-shield {
    pointer-events: none;
}

/* Scroll reveal */
.page-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.page-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.page-gallery--playful .page-reveal {
    transform: translateY(20px) scale(0.97);
}

.page-gallery--playful .page-reveal.is-visible {
    transform: none;
}

/* Baloane ascendente (fundal subtil) */
.page-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.page-bubble {
    position: absolute;
    bottom: -60px;
    border-radius: 50%;
    opacity: 0.2;
    animation: pageBubbleRise linear infinite;
}

.page-bubble:nth-child(1) { left: 8%; width: 24px; height: 24px; background: #FF6B9D; animation-duration: 14s; }
.page-bubble:nth-child(2) { left: 22%; width: 16px; height: 16px; background: #4A90E2; animation-duration: 18s; animation-delay: 2s; }
.page-bubble:nth-child(3) { left: 45%; width: 20px; height: 20px; background: #E8A838; animation-duration: 16s; animation-delay: 4s; }
.page-bubble:nth-child(4) { left: 68%; width: 14px; height: 14px; background: #2ECC71; animation-duration: 20s; animation-delay: 1s; }
.page-bubble:nth-child(5) { left: 85%; width: 22px; height: 22px; background: #9B59B6; animation-duration: 15s; animation-delay: 6s; }

@keyframes pageBubbleRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.25; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

@media (max-width: 1100px) {
    .page-side-deco {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-wrap {
        overflow-x: hidden;
    }

    .page-header--playful {
        padding: 44px 16px 58px;
    }

    .page-header--playful h1 {
        font-size: 28px;
    }

    .page-title-emoji {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .page-breadcrumb {
        font-size: 12px;
    }

    .page-content-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .page-prose,
    .page-plain-text {
        font-size: 16px;
        line-height: 1.75;
    }

    .page-deco {
        opacity: 0.55;
        transform: scale(0.75);
    }

    .page-deco--cloud-1,
    .page-deco--cloud-2 {
        display: none;
    }

    .page-body {
        padding: 36px 20px 60px;
    }
}

/* Pagini parinte (Detalii, Activitati) — index subpagini */
.page-parent-lead {
    text-align: center;
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 32px;
    padding: 0 12px;
}

.page-parent-intro {
    margin-bottom: 36px;
}

.page-children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 10px;
}

.page-child-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(45, 53, 97, 0.08);
    box-shadow: 0 8px 28px rgba(45, 53, 97, 0.08);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.page-child-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px color-mix(in srgb, var(--card-accent) 25%, transparent);
}

.page-child-card--depth-1 {
    grid-column: span 1;
}

.page-child-card-icon {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-child-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-child-card-icon i {
    font-size: 42px;
    color: #fff;
}

.page-child-card-body {
    padding: 22px 20px 24px;
    border-top: 4px solid var(--card-accent);
}

.page-child-card-body h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #2D3561;
}

.page-child-card-body p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.65;
    color: #666;
}

.page-child-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    color: var(--card-accent);
}

.page-child-card--depth-1 .page-child-card-body h3::before {
    content: '└ ';
    color: #999;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .page-header--playful,
    .page-deco,
    .page-floatie,
    .page-bubble,
    .page-reveal {
        animation: none !important;
        transition: none !important;
    }

    .page-reveal {
        opacity: 1;
        transform: none;
    }
}
