/* ============================
   THEME & DARK MODE SUPPORT
   ============================ */

:root {
    /* Primary Colors - Purple/Plum Theme */
    --primary-color: #5B2C6F;
    --primary-dark: #3D1E4A;
    --primary-light: #7B3F99;
    --primary-lighter: #9D5CB8;
    
    /* Accent Colors - Yellow */
    --accent-color: #FFC857;
    --accent-dark: #FFB82E;
    --accent-light: #FFD98A;
    
    /* Background Colors */
    --bg-primary: #FAFAFA;
    --bg-secondary: #F5F0F0;
    --bg-card: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #1D1D1D;
    --text-secondary: #5A5A5A;
    --text-light: #8A8A8A;
    
    /* Border & Divider */
    --border-color: #E5E5E5;
    --divider-color: rgba(0, 0, 0, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(91, 44, 111, 0.08);
    --shadow-md: 0 4px 16px rgba(91, 44, 111, 0.12);
    --shadow-lg: 0 8px 32px rgba(91, 44, 111, 0.16);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5B2C6F 0%, #7B3F99 100%);
    --gradient-accent: linear-gradient(135deg, #FFC857 0%, #FFD98A 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(91, 44, 111, 0.8) 0%, rgba(61, 30, 74, 0.95) 100%);
}

/* Dark Mode Theme */
[data-theme="dark"] {
    /* Primary Colors - Adjusted for Dark Mode */
    --primary-color: #9D5CB8;
    --primary-dark: #7B3F99;
    --primary-light: #B88ACF;
    --primary-lighter: #D4B3E3;
    
    /* Accent Colors */
    --accent-color: #FFD98A;
    --accent-dark: #FFC857;
    --accent-light: #FFE5AD;
    
    /* Background Colors */
    --bg-primary: #0F0F0F;
    --bg-secondary: #1A1A1A;
    --bg-card: #262626;
    
    /* Text Colors */
    --text-primary: #F5F5F5;
    --text-secondary: #C4C4C4;
    --text-light: #8A8A8A;
    
    /* Border & Divider */
    --border-color: #3D3D3D;
    --divider-color: rgba(255, 255, 255, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7B3F99 0%, #9D5CB8 100%);
    --gradient-accent: linear-gradient(135deg, #FFD98A 0%, #FFC857 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(26, 26, 26, 0.8) 0%, rgba(15, 15, 15, 0.95) 100%);
}

/* Smooth Theme Transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Apply Theme Variables */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* ============================
   TEXT CONTRAST FIXES
   ============================ */

/* Ensure proper contrast on colored backgrounds */
.hero-lg-section,
.hero-inner-section,
.gallery-section,
.footer-center-wrap,
.footer-top-wrap,
.time-bg-wrap,
.offer-info {
    color: #FFFFFF !important;
}

.hero-lg-section *,
.hero-inner-section *,
.gallery-section *,
.footer-center-wrap *,
.footer-top-wrap *,
.time-bg-wrap *,
.offer-info * {
    color: inherit;
}

/* Override specific text elements on dark backgrounds */
.hero-title-left,
.hero-inner-title,
.footer-top-title,
.footer-title,
.footer-copyright,
.time-title,
.offer-description,
.text-white {
    color: #FFFFFF !important;
}

.hero-description-left,
.footer-description,
.footer-time-text,
.time-text,
.time-description {
    color: #E5E5E5 !important;
}

.footer-link,
.footer-link-item {
    color: #F5F5F5 !important;
}

.footer-link:hover,
.footer-link-item:hover {
    color: var(--accent-color) !important;
}

/* Accent color text on dark backgrounds */
.offer-list-title,
.footer-timing-title,
.time-list-title {
    color: var(--accent-color) !important;
}

/* Ensure proper contrast on light backgrounds */
.service-title,
.service-description,
.work-title,
.work-description,
.about-title,
.about-feature-text,
.team-title,
.team-position,
.testimonial-slider-text,
.testimonial-slider-name,
.location-title,
.text-dark,
.accordion-heading {
    color: var(--text-primary) !important;
}

/* Light backgrounds with proper text */
.service-item-wrap,
.work-item,
.about-info,
.team-bg-wrap,
.appointment-wrap,
.accordion-item {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Ensure paragraphs have proper contrast */
p {
    color: var(--text-secondary) !important;
}

/* Dark mode specific contrast fixes */
[data-theme="dark"] .hero-lg-section,
[data-theme="dark"] .hero-inner-section,
[data-theme="dark"] .gallery-section,
[data-theme="dark"] .footer-center-wrap,
[data-theme="dark"] .footer-top-wrap,
[data-theme="dark"] .time-bg-wrap {
    color: #F5F5F5 !important;
}

[data-theme="dark"] .offer-section,
[data-theme="dark"] .location-section {
    color: #1D1D1D !important;
}

[data-theme="dark"] .offer-section *,
[data-theme="dark"] .location-section * {
    color: #1D1D1D !important;
}

[data-theme="dark"] .offer-info {
    color: #F5F5F5 !important;
}

[data-theme="dark"] .offer-info * {
    color: #F5F5F5 !important;
}

[data-theme="dark"] .offer-list-title,
[data-theme="dark"] .time-list-title {
    color: var(--accent-color) !important;
}

/* Update existing color references */
.hero-lg-section,
.hero-inner-section {
    background-color: var(--primary-color) !important;
}

.button-primary-2 {
    background-color: var(--accent-color) !important;
    color: #1D1D1D !important;
}

.button-primary-2:hover {
    background-color: var(--accent-dark) !important;
    color: #1D1D1D !important;
}

.button-primary-1 {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important;
}

.button-primary-1:hover {
    background-color: var(--primary-light) !important;
    color: #FFFFFF !important;
}

.button-white {
    background-color: #FFFFFF !important;
    color: #1D1D1D !important;
}

.button-white:hover {
    background-color: var(--accent-color) !important;
    color: #1D1D1D !important;
}

/* Ensure button text is always readable */
.btn,
button,
.w-button {
    font-weight: 600;
}

.nav-link-button {
    background-color: #FFFFFF !important;
    color: #1D1D1D !important;
}

.nav-link-button:hover {
    background-color: var(--accent-color) !important;
    color: #1D1D1D !important;
}

.nav-btn-icon-round {
    background-color: var(--primary-color) !important;
}

.nav-link-button:hover {
    background-color: var(--accent-color) !important;
}

.navbar-toggler {
    background-color: var(--accent-color) !important;
}

.navbar-toggler i {
    color: #1D1D1D !important;
}

[data-theme="dark"] .navbar-toggler {
    background-color: var(--accent-color) !important;
}

[data-theme="dark"] .navbar-toggler i {
    color: #1D1D1D !important;
}

.service-arrow-wrap,
.play-state {
    background-color: var(--accent-color) !important;
}

.service-arrow-wrap i {
    color: #1D1D1D !important;
}

.offer-section,
.location-section {
    background: var(--gradient-accent) !important;
}

/* Ensure text on yellow background is dark */
.offer-section {
    color: #1D1D1D !important;
}

.offer-section .section-title,
.offer-section h2,
.location-section .section-title,
.location-section h2 {
    color: #1D1D1D !important;
}

.offer-section p:not(.offer-description),
.location-section p {
    color: #2D2D2D !important;
}

.offer-info {
    background: var(--gradient-primary) !important;
}

.offer-list-title {
    color: var(--accent-color) !important;
}

.footer-icon-round {
    background-color: var(--accent-color) !important;
}

.footer-timing-title {
    color: var(--accent-color) !important;
}

.footer-center-wrap,
.footer-top-wrap {
    background-color: var(--primary-color) !important;
}

.gallery-section {
    background-color: var(--primary-color) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(91, 44, 111, 0.3);
}

.theme-toggle i {
    font-size: 24px;
    color: #FFFFFF;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

[data-theme="dark"] .theme-toggle {
    background: var(--gradient-accent);
}

[data-theme="dark"] .theme-toggle i {
    color: var(--primary-dark);
}

/* Card Backgrounds */
.service-item-wrap,
.work-item,
.about-info,
.team-bg-wrap,
.appointment-wrap,
.accordion-item {
    background-color: var(--bg-card) !important;
}

/* Text Colors */
.service-title,
.service-description,
.work-title,
.work-description,
.about-feature-text,
.team-title,
.team-position,
.testimonial-slider-text,
.testimonial-slider-name,
.location-title,
.text-dark,
.accordion-heading {
    color: var(--text-primary) !important;
}

p {
    color: var(--text-secondary) !important;
}

/* Navigation Updates */
nav {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.nav-item .nav-link {
    color: var(--text-primary) !important;
}

.nav-item .nav-link:hover {
    color: var(--primary-color) !important;
    text-decoration-color: var(--accent-color) !important;
}

.nav-item .dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    color: var(--text-primary) !important;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary) !important;
    color: var(--primary-color) !important;
}

/* Mobile Navigation Override */
#collapsibleNavbar {
    background-color: var(--bg-card) !important;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 991px) {
    .nav-item .nav-link {
        color: var(--text-primary) !important;
    }
}

/* Time Section Update */
.time-bg-wrap {
    background: var(--gradient-primary) !important;
}

.time-list-title {
    color: var(--accent-color) !important;
}
