/* ============================================================
   1. FONT IMPORTS & DEFINITIONS
   ============================================================ */

/* Import 'Outfit' Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Define Custom 'Bestoom' Font (Local File) */
@font-face {
    font-family: 'MyUniqueFont';
    src: url('../fonts/BestoomBold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ============================================================
   2. GLOBAL RESET & CSS VARIABLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --- Brand Colors --- */
    --brand-color: #4c3c83;
    --brand-accent: #F8C62F;
    --brand-dark: #2a085e;

    /* --- Text Colors --- */
    --text-dark: #1F263B;
    --text-gray: #555;
    --white: #ffffff;

    /* --- Fonts --- */
    --font-primary: 'Outfit', sans-serif;
    --font-heading: 'MyUniqueFont', sans-serif;

    /* --- Layout --- */
    --nav-height: 80px;

    /* --- Page Background --- */
    --page-bg: #ffffff;

    /* --- Footer --- */
    --footer-text-muted: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   3. GLOBAL BODY STYLES (IMPORTANT FIX HERE)
   ============================================================ */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--page-bg);
    overflow-x: hidden;

    /* 🔥 CRITICAL FIX FOR HEADER JUMP */
    padding-top: var(--nav-height);
}

/* ============================================================
   4. GLOBAL SECTION SAFETY (OPTIONAL BUT RECOMMENDED)
   ============================================================ */

section {
    position: relative;
}

/* ============================================================
   END OF MAIN GLOBAL STYLES
   ============================================================ */





/* ======================================================================================================
=================================== HOME TOP SCROLL START ===============================================
====================================================================================================== */

/* --- Main Button Container (Responsive Base) --- */
    .top {
        position: fixed;
        /* Default Position (Desktop) */
        bottom: 40px;
        right: 40px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        cursor: pointer;
        
        /* Initial State: Hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateY(100px);
        transition: all 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        
        /* Mobile Touch Optimization */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Active State (Visible) */
    .top.active-scroll {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* --- THE DOTTED LINE (Responsive) --- */
    .top::before {
        content: '';
        position: absolute;
        bottom: 100%; 
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        
        /* Desktop Height */
        height: 150px; 
        
        border-left: 2px dashed #b0bec5;
        z-index: -1;
        -webkit-mask-image: linear-gradient(to top, black 20%, transparent 100%);
        mask-image: linear-gradient(to top, black 20%, transparent 100%);
    }

    /* --- Rocket Image (Responsive) --- */
    .top img {
        /* Desktop Size */
        width: 50px; 
        height: auto;
        position: relative;
        z-index: 2;
        animation: rocketHover 3s ease-in-out infinite;
    }

    /* --- Fire Container (Responsive) --- */
    .css_prefix-fire {
        position: absolute;
        top: 80%; 
        left: 50%;
        transform: translateX(-50%);
        
        /* Desktop Size */
        width: 30px;
        height: 40px;
        
        z-index: 1;
        display: flex;
        justify-content: center;
        pointer-events: none;
    }

    /* --- Fire Particles --- */
    .css_prefix-fire-element {
        width: 4px; /* Fixed width looks best for particles */
        background: linear-gradient(to bottom, #ffeb3b, #ff5722);
        margin: 0 1px;
        border-radius: 4px;
        opacity: 0;
        animation: fireBurn 0.4s infinite linear alternate;
    }

    /* Randomize Fire */
    .css_prefix-fire-element:nth-child(1) { height: 60%; animation-delay: 0.1s; }
    .css_prefix-fire-element:nth-child(2) { height: 80%; animation-delay: 0.2s; }
    .css_prefix-fire-element:nth-child(3) { height: 100%; animation-delay: 0s; }
    .css_prefix-fire-element:nth-child(4) { height: 70%; animation-delay: 0.3s; }
    .css_prefix-fire-element:nth-child(5) { height: 50%; animation-delay: 0.15s; }

    /* --- Animations --- */
    @keyframes fireBurn {
        0% { transform: scaleY(1); opacity: 0.8; }
        100% { transform: scaleY(1.3); opacity: 1; box-shadow: 0 0 8px #ff5722; }
    }
    @keyframes rocketHover {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
    }

    /* Click Animation */
    .top.flying {
        transform: translateY(-120vh) !important;
        transition: transform 1s ease-in;
    }
    .top.flying::before { opacity: 0; transition: opacity 0.2s; }


    /* =========================================
       RESPONSIVE MEDIA QUERIES
    ========================================= */

    /* Tablet (Max Width 1024px) */
    @media (max-width: 1024px) {
        .top {
            bottom: 30px;
            right: 30px;
        }
        .top img {
            width: 45px; /* Slightly smaller rocket */
        }
        .css_prefix-fire {
            width: 26px;
            height: 35px; /* Smaller fire */
        }
        .top::before {
            height: 120px; /* Shorter line */
        }
    }

    /* Mobile (Max Width 600px) */
    @media (max-width: 600px) {
        .top {
            bottom: 20px;
            right: 20px;
        }
        .top img {
            width: 35px; /* Smallest rocket for mobile */
        }
        .css_prefix-fire {
            width: 20px;
            height: 25px; /* Smallest fire */
            top: 75%;
        }
        .css_prefix-fire-element {
            width: 3px; /* Thinner particles */
            margin: 0;
        }
        .top::before {
            height: 100px; /* Shortest line */
        }
    }



/* ======================================================================================================
=================================== HOME TOP SCROLL END =================================================
====================================================================================================== */

/* ======================================================================================================
=================================== POPUP FORM START ====================================================
====================================================================================================== */

/* --- ANIMATIONS --- */
    @keyframes btnHighlightPulse {
        0% { transform: translateY(-50%) rotate(180deg) scale(1); box-shadow: -2px 0 10px rgba(0,0,0,0.2); }
        50% { transform: translateY(-50%) rotate(180deg) scale(1.05); box-shadow: -4px 0 25px rgba(106, 90, 205, 0.7); }
        100% { transform: translateY(-50%) rotate(180deg) scale(1); box-shadow: -2px 0 10px rgba(0,0,0,0.2); }
    }

    @keyframes shakeError {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }

    @keyframes floatParticle {
        0% { transform: translateY(0) translateX(0); opacity: 0; }
        10% { opacity: 1; }
        90% { opacity: 0.8; }
        100% { transform: translateY(-600px) translateX(var(--drift)); opacity: 0; }
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    /* --- ENQUIRE BUTTON (Fixed RIGHT) --- */
    .enquire-trigger-btn {
        position: fixed;
        top: 50%;
        right: 0; /* Changed from Left to Right */
        left: auto; /* Ensure left is reset */
        transform: translateY(-50%) rotate(180deg);
        writing-mode: vertical-rl;
        text-orientation: mixed;
        background: linear-gradient(135deg, #4c3c83 0%, #6a5acd 100%);
        color: white;
        border: none;
        padding: 30px 12px;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.5px;
        cursor: pointer;
        z-index: 9998;
        border-radius: 0px 12px 12px 0px; /* Adjusted radius for right side */
        box-shadow: -4px 0 15px rgba(0,0,0,0.3);
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        transition: all 0.3s ease;
        animation: btnHighlightPulse 2s infinite ease-in-out;
    }

    .enquire-trigger-btn:hover {
        padding-top: 40px;
        animation: none;
        transform: translateY(-50%) rotate(180deg) scale(1.05);
        background: #4c3c83;
    }

    /* --- POPUP OVERLAY --- */
    .popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 9999;
        display: none;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .popup-overlay.active { display: flex; opacity: 1; }

    /* --- WRAPPER --- */
    .kids-popup-wrapper {
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    /* --- THE POPUP CARD --- */
    .kids-popup-card {
        position: relative;
        width: 100%;
        max-width: 900px;
        background-color: #4c3c83;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        display: flex;
        overflow: hidden;
        min-height: 520px;
        transform: scale(0.9);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .popup-overlay.active .kids-popup-card { transform: scale(1); }

    /* --- CLOSE BUTTON --- */
    .close-popup-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.2);
        color: white;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 20px;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s, transform 0.2s;
    }
    .close-popup-btn:hover { background: rgba(0, 0, 0, 0.6); transform: rotate(90deg); }

    /* --- ANIMATION BACKGROUND --- */
    .kids-anim-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        pointer-events: none;
    }
    .k-particle {
        position: absolute;
        bottom: -10px;
        width: 6px;
        height: 6px;
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        animation: floatParticle linear infinite;
    }
    .kp1 { left: 10%; animation-duration: 8s; --drift: 20px; }
    .kp2 { left: 25%; animation-duration: 12s; animation-delay: 2s; --drift: -15px; width: 4px; height: 4px; }
    .kp3 { left: 40%; animation-duration: 10s; animation-delay: 1s; --drift: 25px; }
    .kp4 { left: 15%; animation-duration: 14s; animation-delay: 3s; --drift: -20px; width: 5px; height: 5px; }

    /* --- LEFT SIDE --- */
    .k-left-section {
        flex: 1;
        padding: 40px;
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .k-left-logo {
        width: 200px;
        height: auto;
        margin-bottom: 20px;
        filter: brightness(0) invert(1);
        opacity: 0.95;
        align-self: flex-start;
    }

    .k-left-section h2 {
        color: #ffffff;
        margin: 0 0 20px 0;
        font-weight: 600;
        font-size: 28px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    /* --- INPUTS UI --- */
    .k-input-group {
        margin-bottom: 18px;
        position: relative;
    }

    .k-input {
        width: 100%;
        padding: 14px 16px;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 10px;
        color: white;
        font-size: 14px;
        box-sizing: border-box;
        outline: none;
        transition: all 0.3s;
    }

    .k-input::placeholder { color: rgba(255, 255, 255, 0.7); }

    .k-input:focus {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 0 10px rgba(255,255,255,0.1);
    }

    textarea.k-input { resize: none; height: 90px; font-family: inherit; }

    /* Error Styling */
    .k-input.error-border {
        border-color: #ff8888;
        background: rgba(255, 0, 0, 0.05);
        animation: shakeError 0.4s ease-in-out;
    }

    .error-msg-text {
        color: #ffadad;
        font-size: 12px;
        margin-top: 6px;
        padding-left: 5px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .error-msg-text.hidden { display: none; }
    .error-msg-text.visible { display: flex; }

    /* --- SUBMIT BUTTON --- */
    .k-btn {
        width: 100%;
        padding: 14px;
        background: linear-gradient(to right, #6a5acd, #7b6be6);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.3s;
        margin-top: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

    .k-btn:hover { 
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }
    
    .k-btn:disabled { 
        background: #554488; 
        cursor: not-allowed; 
        transform: none; 
        box-shadow: none;
        opacity: 0.7;
    }

    .btn-spinner {
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 0.8s linear infinite;
        display: none;
    }

    /* --- SUCCESS / FAIL SCREEN --- */
    .form-status-msg {
        display: none;
        text-align: center;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        animation: floatParticle 0.5s ease-out;
    }
    
    .status-icon { 
        font-size: 60px; 
        margin-bottom: 20px; 
        background: rgba(255,255,255,0.1);
        width: 100px;
        height: 100px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 20px rgba(255,255,255,0.1);
    }
    
    .success-text { color: #ffffff; font-size: 24px; font-weight: bold; }
    .success-subtext { color: rgba(255,255,255,0.8); margin-top: 10px; font-size: 14px; }
    
    .error-global-text { color: #ff8888; font-size: 14px; margin-top: 15px; text-align: center; display: none; }

    /* --- RIGHT SIDE --- */
    .k-right-section {
        flex: 1;
        position: relative;
        z-index: 2;
        padding: 0; 
        display: flex;
    }
    .k-group-img { 
        width: 100%; 
        height: 100%; 
        object-fit: cover; 
        display: block; 
    }

    /* --- MOBILE RESPONSIVE --- */
    @media (max-width: 768px) {
        .kids-popup-card { flex-direction: column; height: auto; max-width: 100%; border-radius: 15px; }
        .k-left-section { padding: 30px 25px; order: 1; }
        .k-right-section { height: 220px; order: 2; }
        .k-left-logo { width: 200px; margin-bottom: 15px; }
        .close-popup-btn { background: rgba(0,0,0,0.6); top: 10px; right: 10px; }
        .enquire-trigger-btn { padding: 20px 10px; font-size: 14px; }
    }

/* ======================================================================================================
=================================== POPUP FORM END ======================================================
====================================================================================================== */


/* ======================================================================================================
=================================== WEBSITE PENCIL CURSOR START =========================================
====================================================================================================== */

/* --- CUSTOM PENCIL CURSOR (Purple #4c3c83) --- */

/* Apply to the entire body/html */
body, html {
    /* 1. URL: An SVG Data URI with fill='%234c3c83' (Your color).
       2. 0 24: The hotspot is at x=0, y=24 (Bottom-Left tip of the pencil).
    */
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%234c3c83'><path d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/></svg>") 0 24, auto;
}

/* Force the pencil cursor even on links and buttons */
a, button, .view-more-btn, .top, .bento-card {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%234c3c83'><path d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/></svg>") 0 24, pointer;
}

/* Ensure everything inherits it */
* {
    cursor: inherit;
}

/* ======================================================================================================
=================================== WEBSITE PENCIL CURSOR END ===========================================
====================================================================================================== */

