/* Light theme (default) */
:root {
    /* Color Palette - Light Theme */
    /*--primary: #bd273a;*/
    --primary: rgb(71 108 132);
    --primary-light: #a5b9d7; /* Added light variant */
    --primary-dark: #3e5b76;
    --secondary: #2c2c2c;
    --secondary-light: #444444; /* Added light variant */
    --secondary-dark: #1a1a1a; /* Added dark variant */
    --accent: #16a5a5; /* Added accent color - teal */
    --secondary-transparent: rgba(44, 44, 44, 0.85);
    --secondary-trans-light: rgba(235, 235, 235, 0.85);
    --text-black: #000000;
    --text-white: #ffffff;
    --text-x-dark: #111111;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #bcbcbc;
    --bg-light: #ffffff;
    --bg-dark: #2c2c2c;
    --bg-gray: #e6e7e8;
    --bg-split-gray: #f6f7f8;
    
    /* Transition for smooth theme switching */
    --theme-transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Dark theme */
[data-theme="dark"] {
    /* Color Palette - Dark Theme */
    /*--primary: #ff3a54;*/
    --primary: #A76C47;
    --primary-light: #d19773; /* Added light variant */
    --primary-dark: #6f4f30;
    --secondary: #1f1f1f;
    --secondary-light: #333333; /* Added light variant */
    --secondary-dark: #121212; /* Added dark variant */
    --accent: #26c6c6; /* Brighter accent for dark mode */
    --secondary-transparent: rgba(31, 31, 31, 0.85);
    --secondary-trans-light: rgba(185, 185, 185, 0.85);
    --text-x-dark: #f9f9f9;
    --text-dark: #f5f5f5; /* Light text for dark backgrounds */
    --text-light: #d3d3d3;
    --text-muted: #a0a0a0;
    --bg-light: #232323; /* Dark background */
    --bg-dark: #121212; /* Even darker background */
    --bg-gray: #333333;
    --bg-split-gray: #1c1b1d;
}

/* Add transition to elements that need to change with theme */
body, .site-header, .footer-main, .full-width-image-content, 
.full-width-image-title, .full-width-image-description, 
.split-content-module, .split-content-title,
.split-content-description, .hero-slider,
.grid-layout-module, .grid-item, .scene-module,
.button, .btn, .card, .feature-item:before {
    transition: var(--theme-transition);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: calc(var(--current-scale) * (1.2vw + 0.6vh));
    cursor: pointer;
    padding: calc(var(--current-scale) * (0.4vw + 0.2vh));
    margin-right: calc(var(--current-scale) * (0.8vw + 0.4vh));
    transition: transform 0.3s ease;
    position: relative;
    outline: none;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Lightbulb styles - unlit for light theme */
.theme-toggle .fa-lightbulb {
    transition: color 0.3s ease, text-shadow 0.3s ease;
    color: var(--text-light);
}

/* Lightbulb styles - glowing for dark theme */
.theme-toggle.theme-dark .fa-lightbulb {
    color: #ffeb3b; /* Bright yellow */
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.7), 0 0 12px rgba(255, 235, 59, 0.5);
}

/* Specific dark theme adjustments */
[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

[data-theme="dark"] .site-header {
    background-color: var(--secondary-transparent);
}

/* Enhanced dark theme styles */
[data-theme="dark"] .button,
[data-theme="dark"] .hero-button,
[data-theme="dark"] .contact-button,
[data-theme="dark"] .btn {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .button:hover,
[data-theme="dark"] .hero-button:hover,
[data-theme="dark"] .contact-button:hover,
[data-theme="dark"] .btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .feature-item:before {
    color: var(--primary-light);
}

/* Specific light theme adjustments */
[data-theme="light"] .site-header {
    background-color: rgba(230, 230, 230, 0.85); /* Lighter transparent background */
}

[data-theme="light"] .nav-link {
    color: #555555; /* Darker text for better contrast on light header */
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-item.active .nav-link {
    color: #2c2c2c; /* Very dark text on hover/active */
}

[data-theme="light"] .nav-link:hover::after,
[data-theme="light"] .nav-item.active .nav-link::after {
    background-color: var(--primary); /* Keep primary color for indicator */
}

[data-theme="light"] .dropdown-menu {
    background-color: rgba(230, 230, 230, 0.85); /* Light dropdown */
}

[data-theme="light"] .dropdown-item a {
    color: #555555; /* Dark text for dropdown items */
}

[data-theme="light"] .dropdown-item a:hover {
    color: var(--primary); /* Primary color on hover */
}

[data-theme="light"] .mobile-menu {
    background-color: rgba(245, 245, 245, 0.9); /* Light mobile menu */
}

[data-theme="light"] .mobile-nav-item a {
    color: #555555; /* Dark text for mobile menu */
}

[data-theme="light"] .mobile-dropdown-item a {
    color: #777777; /* Slightly lighter text for submenu */
}

[data-theme="light"] .dropdown-toggle::before {
    border-color: #555555; /* Dark arrow for dropdown toggle */
}

[data-theme="light"] .mobile-menu-toggle span {
    background-color: #555555; /* Dark hamburger icon */
}

[data-theme="dark"] .footer-main,
[data-theme="dark"] .footer-bottom {
    background-color: var(--bg-dark);
}

[data-theme="dark"] .full-width-image-overlay {
    background-color: rgba(0, 0, 0, 0.7); /* Darker overlay for dark theme */
}

[data-theme="dark"] .full-width-image-title,
[data-theme="dark"] .full-width-image-description {
    color: var(--text-light); /* Light text for dark overlay */
}

/* Update image sources for theme logos */
[data-theme="dark"] .logo img {
    content: url('/assets/images/logo-light.svg');
}

[data-theme="light"] .logo img {
    content: url('/assets/images/logo-dark.svg');
}

[data-theme="dark"] .footer-logo img {
    content: url('/assets/images/logo-light.svg');
}

[data-theme="light"] .footer-logo img {
    content: url('/assets/images/logo-light.svg');
}

/* Theme toggle icon color adjustment */
[data-theme="light"] .theme-toggle {
    color: #555555; /* Dark icon for light mode */
}

[data-theme="light"] .theme-toggle .fa-lightbulb {
    color: #555555; /* Dark icon for light mode */
}

/* Accent color usage */
.accent-bg {
    background-color: var(--accent);
    color: var(--text-light);
}

.accent-border {
    border-color: var(--accent);
}

.accent-text {
    color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        font-size: calc(var(--current-scale) * (1vw + 0.5vh));
        margin-right: calc(var(--current-scale) * (0.5vw + 0.25vh));
    }
}