/* 
 * Lightz - B2B Commercial Lighting
 * Modern, Premium, High-Converting Design
 */

:root {
    /* Color Palette (Primitives) */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;

    --blue-800: #1e40af;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --white: #ffffff;

    /* Legacy Aliases (for backward compatibility with HTML inline styles) */
    --primary-dark: var(--slate-900);
    --gray-50: var(--slate-50);
    --gray-100: var(--slate-100);
    --gray-200: var(--slate-100);
    /* Mapped to slate-100 for border */
    --gray-300: var(--slate-300);
    --gray-800: var(--slate-800);
    --primary-blue: var(--blue-800);
    --accent-gold: var(--amber-500);

    /* Semantic Variables (Light Mode Default) */
    --bg-body: var(--white);
    --bg-surface: var(--white);
    /* Cards, inputs */
    --bg-nav: rgba(255, 255, 255, 0.95);

    --text-main: var(--slate-900);
    /* Headings */
    --text-body: var(--slate-600);
    /* Body text */
    --text-muted: var(--slate-500);

    --primary-color: var(--blue-800);
    --accent-color: var(--amber-500);

    --border-color: var(--slate-100);
    /* gray-200 replacement */

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --section-padding: 5rem 2rem;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}



/* Mega Menu Styles */
.nav-item {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 600px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1100;
    border-color: var(--border-color);
    color: var(--text-main);
}

.mega-menu h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.mega-menu a {
    color: var(--text-body);
    font-size: 0.9rem;
    display: block;
}

.mega-menu a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}



/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    /* Always white text on primary button */
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--slate-900);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--slate-900);
}

.btn-accent:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-nav);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    transition: var(--transition);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)),
        url('https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    /* Always white text on hero image */
    padding: 0 1rem;
    position: relative;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    color: var(--gray-200);
    font-weight: 300;
}

/* Sub-page Hero Overrides */
.about-hero h1,
.contact-hero h1,
.product-header h1,
.portfolio-header h1 {
    color: var(--white) !important;
}

.about-hero p,
.contact-hero p,
.product-header p,
.portfolio-header p {
    color: var(--gray-200) !important;
}

/* Services Page (Light Background) needs Dark Text */
.services-hero h1 {
    color: var(--text-main) !important;
}

.services-hero p {
    color: var(--text-body) !important;
}

/* Sections */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    margin: 10px auto 0;
}

.section-header p {
    color: var(--gray-800);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--primary-blue);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Featured Projects Carousel (Simple Grid implementation for now, will upgrade) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    transform: translateY(100%);
    transition: var(--transition);
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

/* Testimonials */
/* Testimonials */
.testimonials {
    background-color: var(--bg-surface);
    /* In dark mode this might need a variant, or we just trust surface color */
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-body);
    /* Invert: card on surface vs surface on body */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    position: relative;
    border: 1px solid var(--border-color);
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-body);
    margin-bottom: 1.5rem;
}

.testimonial-author strong {
    display: block;
    color: var(--text-main);
}

.testimonial-author span {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 5rem 2rem 2rem;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col p {
    color: var(--slate-300);
    /* Keep footer text light */
    margin-bottom: 0.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: var(--gray-300);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        margin: 1rem 0;
    }

    .hero {
        background-attachment: scroll;
        /* Better for mobile performance */
    }
}

/* Scroll Animations */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up-element.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Product Filtering */
.filter-controls {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-body);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Quick View Modal */
.modal-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-image img {
    width: 100%;
    border-radius: 4px;
}

.modal-details h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.modal-specs {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.modal-specs div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-body);
}

.modal-specs strong {
    color: var(--text-main);
}

@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
    }
}