﻿/* --- New Splash Screen Styles --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff; /* Clean white background */
    z-index: 1099;
    display: flex;
    align-items: center;
    justify-content: center;
    /* This is the new "rewind" transition */
    opacity: 1;
    visibility: visible;
    transform: scale(1.1); /* Start slightly zoomed in */
    /* Apply animations on load */
    animation: fadeIn 0.5s ease-in, applySepia 2s 0.5s ease-out forwards;
    /* This is the final "zoom out" transition */
    transition: opacity 1.5s ease-in, transform 1.5s ease-in, visibility 1.5s;
}

    /* This pseudo-element creates the film grain overlay */
    #splash-screen::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* A subtle, repeating noise pattern */
        background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAANElEQVR42mP4//8/w38GIAXDIBKE0WA0iAYjBYNIMBoEoxmMhiJgNBgNIgFJNIgGoxkMwwcAwgQ3m/urwVAAAAAASUVORK5CYII=');
        /* Animate the grain */
        animation: grain 0.3s steps(1) infinite;
        opacity: 0; /* Start hidden */
    }

    /* This class triggers all the animations */
    #splash-screen.is-animating::after {
        opacity: 0.08; /* Make grain visible */
        transition: opacity 1s 1s ease-in; /* Fade in grain after 1s */
    }

    /* This class hides the splash screen */
    #splash-screen.is-hidden {
        opacity: 0;
        visibility: hidden;
        transform: scale(1); /* Zoom back out to normal */
    }

    /* The logo and text content */
    #splash-screen .splash-content {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        /* Soft glow + pop-in animation */
        animation: popInGlow 1s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        opacity: 0; /* Start hidden */
    }

    #splash-screen .splash-logo {
        width: 80px;
        height: 80px;
        margin-right: 15px;
    }

    #splash-screen .splash-text {
        font-size: 2.5rem;
        font-weight: 700;
        color: #333;
        margin-bottom: 0;
    }

/* --- Keyframe Animations --- */

/* Fades in the whole screen */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Fades in the content with a glow */
@keyframes popInGlow {
    0% {
        transform: scale(0.5);
        opacity: 0;
        filter: brightness(3) blur(10px);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1) blur(0);
    }
}

/* Gradually applies the sepia filter */
@keyframes applySepia {
    0% {
        filter: sepia(0);
    }

    100% {
        filter: sepia(0.8);
    }
}

/* Animates the film grain to look "alive" */
@keyframes grain {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(2px, -3px);
    }

    50% {
        transform: translate(-1px, 2px);
    }

    75% {
        transform: translate(3px, 1px);
    }

    100% {
        transform: translate(0, 0);
    }
}
/* --- End New Splash Screen Styles --- */


/* ... (keep all your other .hero-background-image, .hero-content-overlay, etc. styles) ... */



/* --- 1. LOGGED-IN WELCOME PAGE STYLES --- */
/* We scope these styles to the #welcome-container to prevent conflicts */

#welcome-container .pop-in {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0.5);
    opacity: 0;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#welcome-container .float-bubble {
    animation: floatBubble 6s ease-in-out infinite;
}

#welcome-container .float-bubble-delay {
    animation: floatBubble 7s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes floatBubble {
    0% {
        transform: translate(var(--tx, 0), var(--ty, 0));
    }

    50% {
        transform: translate(var(--tx, 0), calc(var(--ty, 0) - 10px));
    }

    100% {
        transform: translate(var(--tx, 0), var(--ty, 0));
    }
}

/* --- 2. LOGGED-OUT PRELOADER STYLES --- */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f0f8ff; /* Light sky blue */
    z-index: 1056;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.75s ease, visibility 0.75s ease;
    overflow: hidden; /* Hide wave overflow */
}

    #preloader.preloader-hidden {
        opacity: 0;
        visibility: hidden;
    }

.preloader-content {
    text-align: center;
    z-index: 10;
}

.preloader-text {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
    animation: fadeIn 1.5s ease-out;
}

.preloader-subtext {
    font-size: 1rem;
    font-weight: 400;
    color: #0a58ca;
    animation: fadeIn 1.5s ease-out;
}

/* Animation for text fading in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preloader-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 5;
}

    .preloader-waves svg {
        /* Make the SVG twice as wide as the container to scroll it */
        width: 200%;
        height: 100px;
        position: absolute;
        left: 0;
        transform: translateZ(0); /* Force hardware acceleration */
        /* The animation will move this */
        animation: scrollWaves 4s linear infinite;
    }

/* Stagger the animations for a parallax effect */
.wave-path-1 {
    fill: rgba(13, 110, 253, 0.3);
    animation-duration: 4s;
}

.wave-path-2 {
    fill: rgba(13, 110, 253, 0.5);
    animation-duration: 5s;
}

.wave-path-3 {
    fill: #0d6efd;
    animation-duration: 6s;
}

/* Animation to scroll the waves */
@keyframes scrollWaves {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move left by 50% (which is one full wave width) */
        transform: translateX(-50%);
    }
}

/* Hero Section Specific Styles */
#home {
    /* Ensure no padding on the section itself, as the content container will handle it */
    padding: 0 !important; /* Override any Bootstrap section padding */
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center bottom; /* This positions the image low */
    background-size: cover;
}

.hero-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Adjust opacity as needed */
    z-index: 1;
}

/* Ensure content is positioned over the background and overlay */
#home .container {
    height: 100%; /* Make sure the container takes full height of the section */
    display: flex; /* Use flexbox for vertical centering of content */
    align-items: center; /* Vertically center the row */
    z-index: 2; /* Ensures text is above the overlay */
}

/* You might want to remove these if you had them for the old hero */
.hero-overlay { /* Remove or adjust if no longer needed */
    display: none;
}