/* Loader Styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
/* =========================
   THEME VARIABLES
========================= */
:root {
    /* Brand */
    --primary-color: #13167B;
    --primary-dark: #0e115c;
    --primary-light: #2a2f9e;
    --accent-color: #ff6b00;

    /* Light mode */
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #1a1d1f;
    --text-secondary: #6c757d;
    --border-color: #e8ecef;
}

/* DARK MODE */
body[data-theme="dark"] {
    --bg-color: #0b1020;          /* deep blue-black */
    --card-bg: #141a33;           /* cards */
    --text-color: #e4e8ff;
    --text-secondary: #9aa3d6;
    --border-color: #2a3166;

    /* brand boost for dark */
    --primary-color: #5b6cff;
}

/* =========================
   GLOBAL USAGE
========================= */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card,
.service-card,
.news-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

p {
    color: var(--text-secondary);
}


.loader {
    width: 120px;
    height: 120px;
    position: relative;
}

.loader-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: absolute;
    animation: loader-rotate 2s linear infinite;
}

.loader-ring:nth-child(1) {
    border: 8px solid transparent;
    border-top-color: var(--accent-color);
    border-right-color: var(--accent-color);
    animation-delay: 0s;
}

.loader-ring:nth-child(2) {
    border: 8px solid transparent;
    border-top-color: var(--primary-light);
    border-right-color: var(--primary-light);
    animation-delay: 0.2s;
    width: 100px;
    height: 100px;
    top: 10px;
    left: 10px;
}

.loader-ring:nth-child(3) {
    border: 8px solid transparent;
    border-top-color: white;
    border-right-color: white;
    animation-delay: 0.4s;
    width: 80px;
    height: 80px;
    top: 20px;
    left: 20px;
}

.loader-text {
    color: white;
    font-size: 1.5rem;
    margin-top: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes loader-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}
/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: background 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-color);
    transform: rotate(20deg);
}


.theme-toggle:hover {
    background: var(--accent-color);
    transform: rotate(30deg);
}