/* =====================================================================
   THEME: "A Happy Children's Learning World"
   Playful, colourful, accessible overlay theme for Jidda School website.
   This file is ADDITIVE — it only enhances the existing style.css,
   nothing is removed. Loaded AFTER style.css so it can safely override.
   ===================================================================== */

/* ---------- 1. PALETTE & FONTS ---------- */
:root{
    --sky:      #AEEBFF;
    --yellow:   #FFF4A3;
    --darkyellow: #FFB400;
    --mint:     #C8F7C5;
    --green:    #2DBE6C;
    --peach:    #FFD8B1;
    --pink:     #FFD6E8;
    --darkpink:    #FF5FA2;
    --purple:   #DCC6FF;

    --fun-ink:      #2C2A4A;   /* dark, readable text on pastels */
    --fun-primary:  #6C63FF;   /* friendly deep-pastel purple-blue for buttons/links */
    --fun-primary-2:#4C8DFF;
    --fun-accent:   #FF8FB1;   /* pink accent */
    --fun-radius:   22px;
    --fun-radius-sm:14px;
    --fun-shadow: 0 10px 25px rgba(108, 99, 255, .15);
    --fun-shadow-hover: 0 18px 32px rgba(108, 99, 255, .28);
}

body{
    font-family: 'Nunito', 'Quicksand', sans-serif;
    color: var(--fun-ink);
}

h1, h2, h3, h4, h5, h6,
.school-title, .carousel-title, .section-title{
    font-family: 'Baloo 2', 'Fredoka', 'Nunito', sans-serif !important;
}

/* Friendly, slightly bigger base body copy for readability */
p{ line-height: 1.7; }

/* ---------- 2. ACCESSIBILITY BASICS ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.gallery-card:focus-visible{
    outline: 3px solid var(--fun-primary-2);
    outline-offset: 3px;
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce){
    *,
    *::before,
    *::after{
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 3. SOFT PASTEL BACKGROUND PATTERN (very low opacity) ---------- */
body{
    position: relative;
    background-color: #FBFDFF;
    background-image:
        radial-gradient(circle at 8% 12%, var(--sky) 0, transparent 55px),
        radial-gradient(circle at 92% 18%, var(--pink) 0, transparent 60px),
        radial-gradient(circle at 15% 85%, var(--yellow) 0, transparent 65px),
        radial-gradient(circle at 88% 90%, var(--mint) 0, transparent 60px);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Tiny doodle pattern layer (books / stars / clouds / pencils / puzzle pieces) */
.doodle-bg{
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .05;
    font-size: 34px;
    line-height: 1;
    overflow: hidden;
    user-select: none;
}
.doodle-bg span{
    position: absolute;
    filter: grayscale(30%);
}

/* ---------- 4. GLOBAL FLOATING DECORATIONS ---------- */
.floaty-layer{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}
.floaty-layer .floaty{
    position: absolute;
    font-size: 28px;
    opacity: .55;
    will-change: transform;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.08));
}

/* Keep the roaming decorations from ever blocking clicks / text */
.floaty-layer,
.hero-decor,
.footer-decor{
    pointer-events: none;
}

/* ---------- 5. ANIMATION LIBRARY (CSS only) ---------- */
@keyframes floatUpDown{
    0%,100%{ transform: translateY(0) rotate(0deg); }
    50%{ transform: translateY(-18px) rotate(3deg); }
}
@keyframes swing{
    0%,100%{ transform: rotate(-8deg); }
    50%{ transform: rotate(8deg); }
}
@keyframes bounceSoft{
    0%,100%{ transform: translateY(0); }
    50%{ transform: translateY(-6px); }
}
@keyframes rotateSlight{
    0%,100%{ transform: rotate(-6deg); }
    50%{ transform: rotate(6deg); }
}
@keyframes cloudMove{
    0%{ transform: translateX(-10px); }
    50%{ transform: translateX(18px); }
    100%{ transform: translateX(-10px); }
}
@keyframes balloonFloat{
    0%{ transform: translateY(0) translateX(0) rotate(-4deg); }
    50%{ transform: translateY(-22px) translateX(6px) rotate(4deg); }
    100%{ transform: translateY(0) translateX(0) rotate(-4deg); }
}
@keyframes butterflyMove{
    0%{ transform: translate(0,0) rotate(0deg); }
    25%{ transform: translate(10px,-14px) rotate(8deg); }
    50%{ transform: translate(0,-22px) rotate(-6deg); }
    75%{ transform: translate(-10px,-10px) rotate(6deg); }
    100%{ transform: translate(0,0) rotate(0deg); }
}
@keyframes pencilDraw{
    0%{ transform: rotate(-12deg) translateX(0); }
    50%{ transform: rotate(4deg) translateX(4px); }
    100%{ transform: rotate(-12deg) translateX(0); }
}
@keyframes fadeInSoft{
    from{ opacity:0; transform: translateY(12px); }
    to{ opacity:1; transform: translateY(0); }
}
@keyframes scalePop{
    0%,100%{ transform: scale(1); }
    50%{ transform: scale(1.06); }
}
@keyframes twinkle{
    0%,100%{ opacity:.4; transform: scale(.85); }
    50%{ opacity:1; transform: scale(1.15); }
}
@keyframes sparkle{
    0%{ opacity:0; transform: scale(.4) rotate(0deg); }
    50%{ opacity:1; transform: scale(1) rotate(45deg); }
    100%{ opacity:0; transform: scale(.4) rotate(90deg); }
}

.anim-float{ animation: floatUpDown 4.5s ease-in-out infinite; }
.anim-swing{ animation: swing 3.2s ease-in-out infinite; transform-origin: top center; }
.anim-bounce{ animation: bounceSoft 2.4s ease-in-out infinite; }
.anim-rotate{ animation: rotateSlight 5s ease-in-out infinite; }
.anim-cloud{ animation: cloudMove 8s ease-in-out infinite; }
.anim-balloon{ animation: balloonFloat 5.5s ease-in-out infinite; }
.anim-butterfly{ animation: butterflyMove 6s ease-in-out infinite; }
.anim-pencil{ animation: pencilDraw 3.5s ease-in-out infinite; transform-origin: bottom left; }
.anim-twinkle{ animation: twinkle 2.6s ease-in-out infinite; }

/* ---------- 6. NAVBAR ---------- */
.navbar-custom{
    background: linear-gradient(90deg, #6C63FF 0%, #4C8DFF 55%, #6FD3F0 100%) !important;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 6px 20px rgba(76,141,255,.25);
}

.navbar-custom .nav-link{
    border-radius: 999px;
    margin: 6px 4px;
    position: relative;
    overflow: hidden;
}

.navbar-custom .nav-link::after{
    content:"";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0%;
    height: 3px;
    background: #FFF4A3;
    border-radius: 4px;
    transition: all .35s ease;
    transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after{
    width: 60%;
}

.navbar-custom .nav-link:hover{
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}

.logo-box{
    border-radius: 18px;
    box-shadow: var(--fun-shadow);
    transition: transform .4s ease;
}
.logo-box:hover{
    animation: rotateSlight 1s ease-in-out;
    transform: scale(1.05);
}

.dropdown-menu{
    border-radius: 18px !important;
    padding: 10px;
    animation: fadeInSoft .25s ease-in-out;
}
.dropdown-item{
    border-radius: 12px;
}
.dropdown-item:hover{
    background: var(--fun-primary) !important;
}

/* ---------- 7. BUTTONS ---------- */
.btn{
    border-radius: 999px !important;
    font-family: 'Baloo 2','Nunito', sans-serif;
    letter-spacing: .2px;
}

.btn-primary{
    background: linear-gradient(135deg, var(--fun-primary), var(--fun-primary-2)) !important;
    border: none !important;
    box-shadow: var(--fun-shadow);
    padding: 10px 26px;
}

.btn-primary:hover{
    animation: bounceSoft .6s ease-in-out;
    box-shadow: 0 0 0 6px rgba(108,99,255,.18), var(--fun-shadow-hover);
    transform: translateY(-3px);
}

.btn-secondary{
    background: linear-gradient(135deg, var(--fun-accent), var(--peach)) !important;
    border: none !important;
}

.btn-outline-light{
    border-radius: 999px !important;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 10px; /* Below WhatsApp */
    width: 50px;
    height: 50px;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    z-index: 9999;
}
/* ---------- 8. CARDS (services / about / generic content cards) ---------- */
.service-item,
.bg-light.p-4.rounded.shadow,
.card{
    border-radius: var(--fun-radius) !important;
    box-shadow: var(--fun-shadow) !important;
    position: relative;
    overflow: visible;
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.service-item:hover,
.bg-light.p-4.rounded.shadow:hover,
.card:hover{
    transform: translateY(-10px);
    box-shadow: var(--fun-shadow-hover) !important;
}

/* little floating corner icon on cards */
.service-item::before,
.bg-light.p-4.rounded.shadow::before{
    content: "🎈";
    position: absolute;
    top: -14px;
    right: 14px;
    font-size: 26px;
    animation: floatUpDown 3.6s ease-in-out infinite;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,.15));
}

.container.py-5 .col-lg-6:nth-of-type(2) .bg-light.p-4.rounded.shadow::before{ content:"✏️"; }
.container.py-5 .col-lg-6:nth-of-type(3) .bg-light.p-4.rounded.shadow::before{ content:"📚"; }
.container.py-5 .col-lg-6:nth-of-type(4) .bg-light.p-4.rounded.shadow::before{ content:"🎒"; }

.service-item{ background: var(--sky) !important; }
.row .col-lg-3.col-sm-6:nth-of-type(2) .service-item{ background: var(--pink) !important; }
.row .col-lg-3.col-sm-6:nth-of-type(3) .service-item{ background: var(--mint) !important; }
.row .col-lg-3.col-sm-6:nth-of-type(4) .service-item{ background: var(--yellow) !important; }

.service-item:hover{
 background: var(--fun-primary) !important;
}
.row .col-lg-3.col-sm-6:nth-of-type(2) .service-item:hover{ background: var(--darkpink) !important; }
.row .col-lg-3.col-sm-6:nth-of-type(3) .service-item:hover{ background: var(--green) !important; }
.row .col-lg-3.col-sm-6:nth-of-type(4) .service-item:hover{ background: var(--darkyellow) !important; }


/* ---------- 9. GALLERY ---------- */
.gallery-card{
    border-radius: var(--fun-radius) !important;
    overflow: hidden;
    position: relative;
    padding: 6px;
    background: linear-gradient(135deg, var(--sky), var(--pink), var(--yellow));
    box-shadow: var(--fun-shadow);
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
}

.gallery-card:hover{
    transform: scale(1.05) translateY(-6px);
    box-shadow: var(--fun-shadow-hover);
}

.gallery-img{
    border-radius: calc(var(--fun-radius) - 6px) !important;
    transition: transform .5s ease;
    display: block;
    width: 100%;
}

.gallery-card:hover .gallery-img{
    transform: scale(1.08);
}

.gallery-card::after{
    content: "✨";
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 20px;
    opacity: 0;
    transition: opacity .3s ease;
}
.gallery-card:hover::after{
    opacity: 1;
    animation: sparkle 1s ease-in-out infinite;
}

/* ---------- 10. MEMBER / ID CARDS ---------- */
.member-card{
    border-radius: var(--fun-radius) !important;
    overflow: hidden;
    box-shadow: var(--fun-shadow) !important;
    position: relative;
    transition: transform .35s ease, box-shadow .35s ease;
}

.member-card:hover{
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: var(--fun-shadow-hover) !important;
}

.member-header{
    position: relative;
    background: linear-gradient(135deg, var(--fun-primary), var(--fun-primary-2)) !important;
}

.member-card::before{
    content: "🎓";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 22px;
    z-index: 2;
    animation: swing 3s ease-in-out infinite;
    transform-origin: top center;
}

.member-role{
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--fun-accent), var(--peach)) !important;
    color: var(--fun-ink) !important;
    font-weight: 700;
    padding: 4px 14px;
    display: inline-block;
}

/* ---------- 11. HERO / CAROUSEL DECORATION ---------- */
.hero-decor{
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
}
.hero-decor span{
    position: absolute;
    font-size: 34px;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,.25));
}

.carousel-title{
    background: rgba(44,42,74,.35);
    padding: .3em .6em;
    border-radius: 16px;
    display: inline-block;
}

/* ---------- 12. FOOTER DECORATION ---------- */
.footer{
    border-radius: 32px 32px 0 0;
    position: relative;
    overflow: hidden;
}

.footer-rainbow{
    height: 8px;
    width: 100%;
    background: linear-gradient(90deg,
        #FF8FB1, #FFD8B1, #FFF4A3, #C8F7C5, #AEEBFF, #DCC6FF);
    border-radius: 0 0 8px 8px;
}

.footer-decor{
    display: flex;
    justify-content: center;
    gap: 28px;
    font-size: 26px;
    padding: 14px 0 0;
    opacity: .85;
}
.footer-decor span{ display:inline-block; }

/* ---------- 13. LANGUAGE SWITCHER / MISC BUTTONS ---------- */
.lang-btn{
    border-radius: 999px !important;
}

.whatsapp-float{
    box-shadow: var(--fun-shadow-hover);
}

/* ---------- 14. RESPONSIVE TUNING ---------- */
@media (max-width: 768px){
    .floaty-layer .floaty{ font-size: 20px; }
    .hero-decor span{ font-size: 22px; }
    .footer-decor{ gap: 16px; font-size: 20px; }
    .navbar-custom{ border-radius: 0 0 16px 16px; }
}
