/* Dark Theme (Default) */
:root.dark-theme {
    --primary-color: #4a9eff;
    --secondary-color: #28a745;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --light-gray: #2d2d2d;
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --accent-green: #2E8B57;
    --hover-green: #228B22;
    --accent-yellow: #FFD700;
    --discount-text: #9e9e9e; /* Muted color for discount text in dark mode */
    --discount-icon: #aaa186; /* Muted gold for discount icons in dark mode */
    --highlight-bg: rgba(255, 215, 0, 0.1);
    --navbar-bg: rgba(60, 60, 60, 0.9);
    --navbar-shadow: rgba(0, 0, 0, 0.1);
    --card-border: transparent;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --accent-shadow: rgba(46, 139, 87, 0.3);
    --highlight-shadow: rgba(255, 215, 0, 0.3);
    --scrollbar-track: #1a1a1a;
    --scrollbar-thumb: #2E8B57;
    --scrollbar-hover: #228B22;
    --hero-text: #ffffff; /* Hero section text color */
    --hero-text-secondary: #cccccc;
    --hero-bg: rgba(26, 26, 26, 0.8); /* Hero background for dark theme */
    --nav-text: #cccccc; /* Light text for navbar in dark mode */
    --nav-text-hover: #2E8B57; /* Accent color for hover state */
}

/* Light Theme */
:root.light-theme {
    --primary-color: #1e88e5;
    --secondary-color: #2E8B57;
    --dark-bg: #ffffff; /* Pure white background */
    --darker-bg: #f8f8f8;
    --light-gray: #ffffff;
    --text-light: #2c2c2c; /* Darker text for better contrast */
    --text-gray: #555555; /* Darker gray text */
    --accent-green: #2E8B57;
    --hover-green: #228B22;
    --accent-yellow: #FF8C00;
    --discount-text: #888888; /* Muted color for discount text in light mode */
    --discount-icon: #b8a980; /* Muted gold for discount icons in light mode */
    --highlight-bg: rgba(255, 140, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.98); /* Almost white navbar */
    --navbar-shadow: rgba(0, 0, 0, 0.1);
    --card-border: #eeeeee;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --accent-shadow: rgba(46, 139, 87, 0.2);
    --highlight-shadow: rgba(255, 140, 0, 0.2);
    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #2E8B57;
    --scrollbar-hover: #228B22;
    --hero-text: #1a1a1a; /* Dark text for the hero section */
    --hero-text-secondary: #2c2c2c; /* Darker secondary text */
    --hero-bg: rgba(255, 255, 255, 0.7); /* More transparent white to let background image show through */
    --nav-text: #333333; /* Dark text for navbar in light mode */
    --nav-text-hover: #2E8B57; /* Accent color for hover state */
}

/* Default to light theme */
:root {
    --primary-color: #1e88e5;
    --secondary-color: #2E8B57;
    --dark-bg: #ffffff;
    --darker-bg: #f8f8f8;
    --light-gray: #ffffff;
    --text-light: #2c2c2c;
    --text-gray: #555555;
    --accent-green: #2E8B57;
    --hover-green: #228B22;
    --accent-yellow: #FF8C00;
    --highlight-bg: rgba(255, 140, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.98);
    --navbar-shadow: rgba(0, 0, 0, 0.1);
    --card-border: #eeeeee;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --accent-shadow: rgba(46, 139, 87, 0.2);
    --highlight-shadow: rgba(255, 140, 0, 0.2);
    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #2E8B57;
    --scrollbar-hover: #228B22;
    --hero-text: #1a1a1a;
    --hero-text-secondary: #2c2c2c;
    --hero-bg: rgba(255, 255, 255, 0.7);
}

/* Theme Switch Styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 0.5rem;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--darker-bg);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-light);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-green);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.theme-icon {
    font-size: 1rem;
    color: var(--nav-text);
}

/* Transition effects */
body,
body::before,
.navbar,
.static-feature,
.video-card,
.team-card,
.pricing-note,
.features-table,
.footer,
.nav-link,
.social-links a,
button,
a {
    transition: all 0.3s ease;
}

/* Fix dark/light specific elements */
body.light-theme::before {
    opacity: 0.18; /* More visible background image in light theme */
}

.light-theme .hero-left h1.hero-title {
    background: linear-gradient(135deg, var(--hero-text) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    font-weight: 800;
}

.light-theme .hero-left p.hero-text {
    color: var(--hero-text);
    font-weight: 600;
    text-shadow: none;
}

.light-theme .hero-description p.hero-text {
    color: var(--hero-text-secondary);
    font-weight: 600;
    text-shadow: none;
}

.light-theme .static-feature:hover,
.light-theme .video-card:hover,
.light-theme .team-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px var(--accent-shadow);
}

.light-theme .pricing-note:hover {
    box-shadow: 0 10px 30px var(--highlight-shadow);
}

.light-theme .navbar {
    box-shadow: 0 4px 10px var(--navbar-shadow);
}