/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ecf0fc;
    background-image: url('../images/btf-bg-custom2.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: white;
}

.progress-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.progress-circle {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 4;
}

.progress-circle-fill {
    fill: none;
    stroke: #d40b00;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 424.115;
    stroke-dashoffset: 424.115;
    transition: stroke-dashoffset 0.3s ease;
}

.btf-logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btf-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* Remove any default margins and ensure perfect centering */
    vertical-align: middle;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
    opacity: 0.9;
    color: #d40b00;
}

.loading-percentage {
    font-size: 14px;
    margin-top: 5px;
    opacity: 0.7;
    color: #d40b00;
}

/* Pulse animation for btf-logo */
@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btf-logo-container img {
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode styles */
.dark .preloader {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-container {
        width: 120px;
        height: 120px;
    }

    .progress-circle {
        width: 120px;
        height: 120px;
    }

    .progress-circle-fill,
    .progress-circle-bg {
        stroke-dasharray: 282.743;
    }

    .progress-circle-fill {
        stroke-dashoffset: 282.743;
    }

    .btf-logo-container {
        width: 65px;
        height: 65px;
    }

    .loading-text {
        font-size: 16px;
        color: #d40b00;
    }
}