/* ============================================
   THEME SYSTEM - Multiple Color Themes
   ============================================ */

/* Base Theme Variables - Default Green Theme */
:root {
    /* Primary Colors */
    --primary-color: #2d6a4f;
    --secondary-color: #52b788;
    --accent-color: #74c69d;
    --dark-color: #1b4332;
    --light-color: #d8f3dc;
    --white: #ffffff;
    --gray: #6c757d;
    
    /* Navigation Style */
    --nav-bg: #198754;
    --nav-text: rgba(255, 255, 255, 0.9);
    --nav-hover: #d8f3dc;
}

/* ============================================
   COLOR THEME OPTIONS
   ============================================ */

/* GREEN THEME (Default) */
[data-theme="green"] {
    --primary-color: #2d6a4f;
    --secondary-color: #52b788;
    --accent-color: #74c69d;
    --dark-color: #1b4332;
    --light-color: #d8f3dc;
}

/* ORANGE THEME */
[data-theme="orange"] {
    --primary-color: #d97706;
    --secondary-color: #f59e0b;
    --accent-color: #fbbf24;
    --dark-color: #92400e;
    --light-color: #fef3c7;
}

/* PURPLE THEME */
[data-theme="purple"] {
    --primary-color: #7c3aed;
    --secondary-color: #a78bfa;
    --accent-color: #c4b5fd;
    --dark-color: #5b21b6;
    --light-color: #ede9fe;
}

/* RED THEME */
[data-theme="red"] {
    --primary-color: #dc2626;
    --secondary-color: #ef4444;
    --accent-color: #f87171;
    --dark-color: #991b1b;
    --light-color: #fee2e2;
}

/* BLUE THEME */
[data-theme="blue"] {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --dark-color: #1e3a8a;
    --light-color: #dbeafe;
}

/* TEAL THEME */
[data-theme="teal"] {
    --primary-color: #0d9488;
    --secondary-color: #14b8a6;
    --accent-color: #5eead4;
    --dark-color: #115e59;
    --light-color: #ccfbf1;
}

/* PINK THEME */
[data-theme="pink"] {
    --primary-color: #db2777;
    --secondary-color: #ec4899;
    --accent-color: #f472b6;
    --dark-color: #9f1239;
    --light-color: #fce7f3;
}

/* INDIGO THEME */
[data-theme="indigo"] {
    --primary-color: #4338ca;
    --secondary-color: #6366f1;
    --accent-color: #818cf8;
    --dark-color: #312e81;
    --light-color: #e0e7ff;
}

/* ============================================
   BUTTON STYLING WITH THEME COLORS
   ============================================ */

/* Primary Buttons */
.btn-primary,
.btn-success {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color)) !important;
    border-color: var(--dark-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Outline Buttons */
.btn-outline-primary,
.btn-outline-success {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-success:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Light Buttons (for dark backgrounds) */
.btn-light {
    background-color: white !important;
    border-color: white !important;
    color: var(--primary-color) !important;
}

.btn-light:hover {
    background-color: var(--light-color) !important;
    border-color: var(--light-color) !important;
    color: var(--dark-color) !important;
}

/* Secondary Buttons */
.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* ============================================
   NAVIGATION STYLE OPTIONS
   ============================================ */

/* DARK NAVIGATION */
[data-nav="dark"] .navbar {
    background-color: #212529 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-nav="dark"] .navbar-brand,
[data-nav="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-nav="dark"] .nav-link:hover {
    color: var(--accent-color) !important;
}

[data-nav="dark"] .dropdown-menu {
    background-color: #343a40 !important;
}

[data-nav="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-nav="dark"] .dropdown-item:hover {
    background-color: #495057 !important;
    color: white !important;
}

/* LIGHT NAVIGATION */
[data-nav="light"] .navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-nav="light"] .navbar-brand,
[data-nav="light"] .nav-link {
    color: #333333 !important;
}

[data-nav="light"] .nav-link:hover {
    color: var(--primary-color) !important;
}

[data-nav="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6;
}

[data-nav="light"] .dropdown-item {
    color: #333333 !important;
}

[data-nav="light"] .dropdown-item:hover {
    background-color: var(--light-color) !important;
    color: var(--primary-color) !important;
}

/* COLORED NAVIGATION (Matches Theme) */
[data-nav="colored"] .navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

[data-nav="colored"] .navbar-brand,
[data-nav="colored"] .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-nav="colored"] .nav-link:hover {
    color: var(--light-color) !important;
}

[data-nav="colored"] .dropdown-menu {
    background-color: var(--primary-color) !important;
}

[data-nav="colored"] .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-nav="colored"] .dropdown-item:hover {
    background-color: var(--secondary-color) !important;
    color: white !important;
}

/* TRANSPARENT NAVIGATION (Modern) */
[data-nav="transparent"] .navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-nav="transparent"] .navbar-brand,
[data-nav="transparent"] .nav-link {
    color: #333333 !important;
}

[data-nav="transparent"] .nav-link:hover {
    color: var(--primary-color) !important;
}

/* ============================================
   THEME SWITCHER UI
   ============================================ */

.theme-switcher-widget {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 9999;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    max-width: 280px;
    transition: all 0.3s ease;
}

.theme-switcher-widget.collapsed {
    padding: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.theme-switcher-widget.hidden {
    display: none !important;
}

.theme-toggle-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(45deg);
}

.theme-switcher-content {
    display: none;
    padding: 1rem;
}

.theme-switcher-widget:not(.collapsed) .theme-switcher-content {
    display: block;
}

.theme-switcher-widget.collapsed .theme-toggle-btn {
    margin: 0;
}

.theme-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.theme-switcher-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.close-switcher {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.theme-section {
    margin-bottom: 1rem;
}

.theme-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.theme-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.theme-color-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.theme-color-btn.active {
    border-color: #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

.theme-color-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-color-btn.active::after {
    opacity: 1;
}

/* Color Button Styles */
.theme-color-btn[data-theme="green"] {
    background: linear-gradient(135deg, #2d6a4f, #52b788);
}

.theme-color-btn[data-theme="orange"] {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.theme-color-btn[data-theme="purple"] {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.theme-color-btn[data-theme="red"] {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.theme-color-btn[data-theme="blue"] {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.theme-color-btn[data-theme="teal"] {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.theme-color-btn[data-theme="pink"] {
    background: linear-gradient(135deg, #db2777, #ec4899);
}

.theme-color-btn[data-theme="indigo"] {
    background: linear-gradient(135deg, #4338ca, #6366f1);
}

/* Navigation Style Buttons */
.nav-styles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.nav-style-btn {
    padding: 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.nav-style-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.nav-style-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.nav-style-btn i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

/* Theme Labels */
.theme-label {
    font-size: 0.7rem;
    text-align: center;
    margin-top: 0.25rem;
    color: var(--gray);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-switcher-widget {
        right: 10px;
        bottom: 70px;
        max-width: 260px;
    }
    
    .theme-colors {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Preserve specific transitions */
.nav-link,
.btn,
.plant-card,
.service-preview-card,
.feature-box,
.process-card,
.testimonial-card {
    transition: all 0.3s ease !important;
}
