/* ========================================
   Custom CSS for Lefabo Hair & Beauty
   Themes: Clean Luxury (Light) & Premium Night (Dark)
   ======================================== */

/* ========== Color Variables & Theming ========== */
:root {
    /* Default: Light Theme "Clean Luxury" */
    --page-bg: #FBFCF1;
    --section-alt-bg: #EFE9D3;
    --text-color: #0B0B0B;
    --heading-color: #0B0B0B;
    --muted-color: #555555;

    /* Primary / CTA */
    --primary-color: #C19E4D;
    --primary-text: #0B0B0B;
    --primary-hover: #9C7F45;

    /* Components */
    --card-bg: #FFFFFF;
    --card-border: 1px solid #FCF8CA;
    --card-shadow: 0 10px 30px rgba(111, 98, 70, 0.1);

    /* Navigation & Footer */
    --nav-bg: #FFFFFF;
    --footer-bg: #1A1712;
    --footer-text: #EFE9D3;

    /* Additional */
    --overlay-color: rgba(0, 0, 0, 0.4);
    --input-bg: #FFFFFF;
    --input-border: #EFE9D3;
}

[data-theme="dark"] {
    /* Dark Theme "Premium Night" */
    --page-bg: #0B0B0B;
    --section-alt-bg: #1A1712;
    /* Surfaces */
    --text-color: #EFE9D3;
    /* Body text */
    --heading-color: #FBFCF1;
    --muted-color: #999999;

    /* Primary / CTA */
    --primary-color: #C19E4D;
    --primary-text: #0B0B0B;
    --primary-hover: #D7BB70;

    /* Components */
    --card-bg: #1A1712;
    --card-border: 1px solid #333333;
    /* Subtle border for dark */
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Navigation & Footer */
    --nav-bg: #0B0B0B;
    --footer-bg: #000000;
    --footer-text: #999999;

    /* Additional */
    --overlay-color: rgba(0, 0, 0, 0.7);
    --input-bg: #1A1712;
    --input-border: #333333;
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--page-bg);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    color: var(--heading-color);
}

.text-muted {
    color: var(--muted-color) !important;
}

.bg-light {
    background-color: var(--section-alt-bg) !important;
}

.bg-white {
    background-color: var(--card-bg) !important;
}

/* ========== Bootstrap Color Override ========== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--primary-text);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: var(--primary-text) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--primary-text);
}

.btn-outline-light {
    color: #fff;
    border-color: #fff;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: #000;
}

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

/* ========== Navigation ========== */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background-color: var(--nav-bg) !important;
}

[data-theme="dark"] .navbar.scrolled {
    border-bottom: 1px solid #333;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 2.5rem;
    width: auto;
    margin-right: 15px;
}

.brand-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: var(--heading-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(193, 158, 77, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-image: url('https://images.unsplash.com/photo-1560869713-7d0a29430803?w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-section h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    /* Always white on hero image */
}

.hero-section .lead {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #f0f0f0;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ========== Services Section ========== */
#services {
    padding: 80px 0;
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    background-color: var(--card-bg);
    border: var(--card-border);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow) !important;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--section-alt-bg), var(--primary-color));
    border-radius: 50%;
    color: var(--primary-text);
}

/* ========== About Section ========== */
#about {
    padding: 80px 0;
}

.about-image img {
    border-radius: 15px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.mission-statement {
    border-left: 4px solid var(--primary-color);
    background-color: var(--card-bg) !important;
}

.stat-box {
    transition: transform 0.3s ease;
    background-color: var(--card-bg) !important;
}

.stat-box:hover {
    transform: scale(1.05);
}

.stat-box h3 {
    font-size: 2rem;
}

/* ========== Gallery Section ========== */
#gallery {
    padding: 80px 0;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    border: var(--card-border);
}

.gallery-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(193, 158, 77, 0.8);
    /* Using primary color with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--primary-text);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.btn-group .btn {
    margin: 0 5px;
}

.gallery-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.hidden {
    display: none;
}

/* ========== Testimonials Section ========== */
#testimonials {
    padding: 80px 0;
}

.testimonial-card {
    border-radius: 15px;
    background: var(--card-bg);
    border: var(--card-border);
}

.testimonial-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.rating {
    font-size: 1.2rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 20px;
}

.carousel-indicators button {
    background-color: var(--primary-color) !important;
}

/* ========== Contact Section ========== */
#contact {
    padding: 80px 0;
}

.contact-info .icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--section-alt-bg), var(--primary-color));
    border-radius: 10px;
    color: var(--primary-text);
}

.contact-form-wrapper {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: var(--card-border);
}

.form-control,
.form-select {
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-control::placeholder {
    color: var(--muted-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(193, 158, 77, 0.25);
    background-color: var(--input-bg);
    color: var(--text-color);
}

.form-label {
    font-weight: 600;
    color: var(--heading-color);
}

/* ========== Footer ========== */
.footer {
    background-color: var(--footer-bg) !important;
    color: var(--footer-text);
}

.footer .text-muted {
    color: var(--footer-text) !important;
    opacity: 0.8;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.footer .social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.footer .social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Responsive Design ========== */
@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }

    .navbar-nav .nav-link::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-section {
        height: auto;
        min-height: 500px;
        padding: 100px 0 50px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .stat-box h3 {
        font-size: 1.5rem;
    }

    .gallery-card img {
        height: 250px;
    }

    /* Hide brand text on mobile - logo already contains brand name */
    .brand-text {
        display: none;
    }

    .navbar-brand img {
        height: 2rem;
        margin-right: 0;
    }
}

@media (max-width: 575px) {
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    #services,
    #about,
    #gallery,
    #testimonials,
    #contact {
        padding: 50px 0;
    }
}

/* ========== Accessibility ========== */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== Modal Improvements ========== */
.modal-content {
    border-radius: 15px;
    border: none;
    background-color: var(--card-bg);
    /* Match theme */
}

.modal-header .btn-close {
    filter: invert(0.5);
    /* Adjust for visibility */
}

[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1);
    /* Make white in dark mode */
}

#modalImage {
    max-height: 80vh;
    object-fit: contain;
}

/* Theme Selector in Footer */
.theme-selector-wrapper {
    display: inline-block;
    margin-left: 15px;
}

.theme-select {
    background-color: transparent;
    color: var(--footer-text);
    border: 1px solid var(--footer-text);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.theme-select:hover,
.theme-select:focus {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.theme-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 10px;
}

/* Service Card Title Fix */
.service-card .card-title {
    color: var(--heading-color) !important;
    font-weight: 700;
}