/* Loading Screen Styles - Clean Minimal */
:root {
  --brand-dark: #1a2332;
  --brand-yellow: #fecf07;
  --brand-blue: #2563eb;
  --brand-blue-dark: #1d4ed8;
  --brand-blue-light: #3b82f6;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Pulsing circles loader animation */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    --color: var(--brand-blue-dark);
    --animation: 2s ease-in-out infinite;
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.loader .circle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 20px;
    height: 20px;
    border: solid 2px var(--color);
    border-radius: 50%;
    margin: 0 10px;
    background-color: transparent;
    animation: circle-keys var(--animation);
    animation-delay: -1s; /* Start mid-cycle */
}

.loader .circle .dot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color);
    animation: dot-keys var(--animation);
    animation-delay: -1s; /* Start mid-cycle */
}

.loader .circle .outline {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: outline-keys var(--animation);
}

.circle:nth-child(1) {
    animation-delay: -1s;
}

.circle:nth-child(2) {
    animation-delay: -0.7s;
}

.circle:nth-child(3) {
    animation-delay: -0.4s;
}

.circle:nth-child(4) {
    animation-delay: -0.1s;
}

.circle:nth-child(5) {
    animation-delay: 0.2s;
}

.circle:nth-child(1) .dot {
    animation-delay: -1s;
}

.circle:nth-child(2) .dot {
    animation-delay: -0.7s;
}

.circle:nth-child(3) .dot {
    animation-delay: -0.4s;
}

.circle:nth-child(4) .dot {
    animation-delay: -0.1s;
}

.circle:nth-child(5) .dot {
    animation-delay: 0.2s;
}

.circle:nth-child(1) .outline {
    animation-delay: -0.1s;
}

.circle:nth-child(2) .outline {
    animation-delay: 0.2s;
}

.circle:nth-child(3) .outline {
    animation-delay: 0.5s;
}

.circle:nth-child(4) .outline {
    animation-delay: 0.8s;
}

.circle:nth-child(5) .outline {
    animation-delay: 1.1s;
}

@keyframes circle-keys {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes dot-keys {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes outline-keys {
    0% {
        transform: scale(0);
        outline: solid 20px var(--color);
        outline-offset: 0;
        opacity: 1;
    }
    100% {
        transform: scale(1);
        outline: solid 0 transparent;
        outline-offset: 20px;
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loader .circle {
        width: 16px;
        height: 16px;
        margin: 0 8px;
    }

    .loader .circle .dot {
        width: 12px;
        height: 12px;
    }

    .loader .circle .outline {
        width: 16px;
        height: 16px;
    }

    @keyframes outline-keys {
        0% {
            transform: scale(0);
            outline: solid 16px var(--color);
            outline-offset: 0;
            opacity: 1;
        }
        100% {
            transform: scale(1);
            outline: solid 0 transparent;
            outline-offset: 16px;
            opacity: 0;
        }
    }
}

@media (max-width: 480px) {
    .loader .circle {
        width: 14px;
        height: 14px;
        margin: 0 6px;
    }

    .loader .circle .dot {
        width: 10px;
        height: 10px;
    }

    .loader .circle .outline {
        width: 14px;
        height: 14px;
    }

    @keyframes outline-keys {
        0% {
            transform: scale(0);
            outline: solid 14px var(--color);
            outline-offset: 0;
            opacity: 1;
        }
        100% {
            transform: scale(1);
            outline: solid 0 transparent;
            outline-offset: 14px;
            opacity: 0;
        }
    }
}