/* ============================================
   THEME SWITCHER – DRY Version (Variables only)
   ============================================ */

/* ---------- Global rules (applies to all themes) ---------- */
footer,
.bg-dark {
    background-color: var(--footer-bg) !important;
}

.bg-light,
.bg-light .card {
    background-color: var(--background-light) !important;
}

.text-success,
.btn-outline-success {
    color: var(--primary-color) !important;
}

.btn-success,
.bg-success,
.badge.bg-success {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-success {
    border-color: var(--primary-color) !important;
}

.btn-outline-success:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.counter-section,
.page-hero,
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* ---------- Theme definitions (only variable values) ---------- */

/* Default Green */
html[data-theme="default"] {
    --primary-color: #2E8B57;
    --primary-dark: #1a5a3a;
    --accent-color: #D4AF37;
    --background-light: #f5f5f5;
    --footer-bg: #1a5a3a;
    background-color: #ffffff;
    color: #333;
}

/* Burgundy (Maroon) */
html[data-theme="burgundy"] {
    --primary-color: #8B1E3F;
    --primary-dark: #5C1228;
    --accent-color: #D4AF37;
    --background-light: #FDF8F5;
    --footer-bg: #5C1228;
    background-color: #FFF9F5;
    color: #2C1A1A;
}

/* Sapphire Blue */
html[data-theme="sapphire"] {
    --primary-color: #1E6F9F;
    --primary-dark: #0E4A6E;
    --accent-color: #FFC107;
    --background-light: #E3F2FD;
    --footer-bg: #0E4A6E;
    background-color: #f0f7fc;
    color: #0d2f46;
}

/* Amber Warm */
html[data-theme="amber"] {
    --primary-color: #D97706;
    --primary-dark: #B45309;
    --accent-color: #FDE047;
    --background-light: #FEF3C7;
    --footer-bg: #B45309;
    background-color: #fffbeb;
    color: #5c3a0a;
}

/* Midnight Dark */
html[data-theme="midnight"] {
    --primary-color: #4B5563;
    --primary-dark: #1F2937;
    --accent-color: #F59E0B;
    --background-light: #1E1E2E;
    --footer-bg: #1F2937;
    background-color: #121212;
    color: #E5E5E5;
}

html[data-theme="midnight"] .card {
    background-color: #2D2D3A !important;
    color: #E5E5E5;
}

html[data-theme="midnight"] .text-muted {
    color: #A3A3A3 !important;
}

html[data-theme="midnight"] footer .text-white-50 {
    color: #A3A3A3 !important;
}

/* ---------- Smooth transitions ---------- */
body,
.card,
.bg-light,
.btn,
.navbar,
.top-bar,
footer,
.counter-section,
.page-hero {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}