/* ==========================================================================
   Josnebi Farms & Agro Consult Ltd - Premium Dark & Light Theme System
   ========================================================================== */

/* Dark Mode Theme Variables & Root Overrides */
html.dark-theme {
    --bg-main: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #283548;
    --bg-surface-soft: #172132;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-light: #1e293b;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
    --brand-green: #10b981;
    --brand-gold: #f59e0b;
}

/* Base Body and Layout in Dark Mode */
html.dark-theme body {
    background-color: var(--bg-main) !important;
    color: var(--text-secondary) !important;
}

/* Headings & Text */
html.dark-theme h1,
html.dark-theme h2,
html.dark-theme h3,
html.dark-theme h4,
html.dark-theme h5,
html.dark-theme h6,
html.dark-theme .headline h2,
html.dark-theme .headline-left h2,
html.dark-theme .headline-left h2 span,
html.dark-theme .heading-normal h2 {
    color: var(--text-primary) !important;
}

html.dark-theme p,
html.dark-theme li,
html.dark-theme span,
html.dark-theme label {
    color: var(--text-secondary);
}

html.dark-theme .text-muted,
html.dark-theme .headline h3,
html.dark-theme .headline-left h3 {
    color: var(--text-muted) !important;
}

/* Header & Navigation */
html.dark-theme .header-area {
    background: #090d16 !important;
    border-bottom: 1px solid var(--border-color);
}

html.dark-theme .menu-area {
    background: var(--bg-surface) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

html.dark-theme ul.nav-menu li a {
    color: var(--text-primary) !important;
}

html.dark-theme ul.nav-menu li ul {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

html.dark-theme ul.nav-menu li ul li a {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

html.dark-theme ul.nav-menu li ul li:hover > a {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--brand-green) !important;
}

/* Mobile Meanmenu */
html.dark-theme .mean-container .mean-bar {
    background: var(--bg-surface) !important;
}
html.dark-theme .mean-container .mean-nav {
    background: var(--bg-surface-elevated) !important;
}
html.dark-theme .mean-container .mean-nav ul li a {
    color: var(--text-primary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Cards, Content Sections & Surfaces */
html.dark-theme .about-area,
html.dark-theme .choose-area,
html.dark-theme .services-area,
html.dark-theme .feature-area,
html.dark-theme .portfolio-area,
html.dark-theme .team-area,
html.dark-theme .testimonial-area,
html.dark-theme .blog-area,
html.dark-theme .faq-home,
html.dark-theme .product-area,
html.dark-theme .cart-area,
html.dark-theme .checkout-area,
html.dark-theme .single-service-area,
html.dark-theme .single-blog-area,
html.dark-theme .contact-area,
html.dark-theme .event-area,
html.dark-theme .pricing-area,
html.dark-theme .photo-gallery-area {
    background-color: var(--bg-main) !important;
}

html.dark-theme .choose-item,
html.dark-theme .services-item,
html.dark-theme .feature-item,
html.dark-theme .team-item,
html.dark-theme .team-card,
html.dark-theme .blog-item,
html.dark-theme .testimonial-item,
html.dark-theme .product-card,
html.dark-theme .order-summary,
html.dark-theme .payment-box,
html.dark-theme .sidebar-item,
html.dark-theme .card,
html.dark-theme .well,
html.dark-theme .pricing-item {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}

html.dark-theme .services-text,
html.dark-theme .blog-text,
html.dark-theme .feature-text,
html.dark-theme .choose-text,
html.dark-theme .team-text {
    background-color: var(--bg-surface) !important;
}

html.dark-theme .services-text h3 a,
html.dark-theme .blog-text h3 a,
html.dark-theme .feature-text h3,
html.dark-theme .choose-text h3,
html.dark-theme .product-title a {
    color: var(--text-primary) !important;
}

/* FAQ Accordion in Dark Mode */
html.dark-theme .faq-header button.faq-button {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

html.dark-theme .faq-body {
    background: var(--bg-surface-soft) !important;
    border: 1px solid var(--border-color) !important;
    border-top: none !important;
    color: var(--text-secondary) !important;
}

/* E-Commerce Shop, Cart & Checkout in Dark Mode */
html.dark-theme .product-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
}

html.dark-theme .product-price,
html.dark-theme .price-current {
    color: var(--brand-gold) !important;
}

html.dark-theme .table {
    color: var(--text-secondary) !important;
}

html.dark-theme .table-bordered,
html.dark-theme .table-bordered > tbody > tr > td,
html.dark-theme .table-bordered > tbody > tr > th,
html.dark-theme .table-bordered > tfoot > tr > td,
html.dark-theme .table-bordered > tfoot > tr > th,
html.dark-theme .table-bordered > thead > tr > td,
html.dark-theme .table-bordered > thead > tr > th {
    border-color: var(--border-color) !important;
}

html.dark-theme .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

html.dark-theme .cart-table thead,
html.dark-theme .order-table thead {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
}

/* Form Inputs, Selects & Textareas */
html.dark-theme input.form-control,
html.dark-theme select.form-control,
html.dark-theme textarea.form-control {
    background-color: var(--bg-surface-soft) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

html.dark-theme input.form-control:focus,
html.dark-theme select.form-control:focus,
html.dark-theme textarea.form-control:focus {
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
    background-color: var(--bg-surface) !important;
}

html.dark-theme .input-group-addon {
    background-color: var(--bg-surface-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* Footer Section in Dark Mode */
html.dark-theme .footer-area {
    background: #070b12 !important;
    border-top: 1px solid var(--border-color);
}

html.dark-theme .footer-copywrite {
    background: #04060a !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}

html.dark-theme .call-us {
    border-bottom: 1px solid var(--border-color);
}

/* Breadcrumbs & Banners */
html.dark-theme .banner-slider {
    border-bottom: 1px solid var(--border-color);
}

/* Modal Windows in Dark Mode */
html.dark-theme .modal-content {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

html.dark-theme .modal-header,
html.dark-theme .modal-footer {
    border-color: var(--border-color) !important;
}

/* ==========================================================================
   Theme Switcher Toggle Button Styling
   ========================================================================== */
.theme-switch-wrapper {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 14px;
}

.theme-toggle-btn {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #2c3e50;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    padding: 0;
}

.theme-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
    transform: scale(1.08) rotate(15deg);
}

html.dark-theme .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
    color: #f59e0b;
}

html.dark-theme .theme-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fbbf24;
    transform: scale(1.08) rotate(-15deg);
}

/* Floating Switcher for Mobile & Immediate Desktop Access */
.theme-toggle-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e7e34;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-float:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    color: #ffffff;
}

html.dark-theme .theme-toggle-float {
    background: #f59e0b;
    color: #0f172a;
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 6px 20px rgba(245,158,11,0.35);
}

@media (max-width: 768px) {
    .theme-toggle-float {
        bottom: 80px;
        right: 18px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
