/* ============================================ */
/* PAGE LOADER & LOADING ANIMATION */
/* ============================================ */

/* Loading Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0e5313 0%, #19a73a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Loader Container */
.loader-container {
    text-align: center;
    color: white;
}

/* Logo Container */
.loader-logo {
    position: relative; /* Position the spinner around the logo */
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.loader-logo img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 50%;
}

/* Spinner Animation Positioned Around the Logo */
.loader-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1; /* Place the spinner behind the logo */
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

/* Second spinner circle with different animation speed */
.spinner-circle:nth-child(2) {
    border-top-color: #ffd700;
    animation-duration: 2s;
    animation-direction: reverse;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loader Text */
.loader-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loader-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px auto 0;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #fff);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}


/* ============================================ */
/* RESPONSIVE STYLES */
/* ============================================ */

/* For screens smaller than 768px (tablets and phones) */
@media (max-width: 768px) {
    /* Adjust logo size */
    .loader-logo {
        width: 100px;
        height: 100px;
    }

    .loader-logo img {
        width: 80px;
        height: 80px;
    }

    /* Adjust text size */
    .loader-text {
        font-size: 1rem;
        margin-top: 10px;
    }

    /* Adjust progress bar size */
    .loader-progress {
        width: 150px;
    }
}

/* For screens smaller than 480px (phones) */
@media (max-width: 480px) {
    .loader-logo {
        width: 80px;
        height: 80px;
    }

    .loader-logo img {
        width: 60px;
        height: 60px;
    }

    .loader-text {
        font-size: 0.9rem;
    }

    .loader-progress {
        width: 120px;
    }

    /* Reduce the spacing between elements */
    .loader-container {
        padding: 10px;
    }
}
