:root {
    --primary-color: #D32F2F; /* Professional Red */
    --primary-dark: #b71c1c;
    --secondary-color: #388E3C; /* Professional Green */
    --text-color: #212121; /* Dark Black/Grey */
    --bg-color: #ffffff;
    --light-bg: #f5f5f5;
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #ff5252;
    --primary-dark: #d32f2f;
    --secondary-color: #66bb6a;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --light-bg: #1e1e1e;
    --footer-bg: #000000;
    --footer-text: #bdbdbd;
    --white: #1e1e1e;
    --card-bg: rgba(30, 30, 30, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Custom Text Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 30px;
}

.stat-item {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 18px;
    color: var(--text-color);
    font-weight: 500;
}

/* Feature Card (Added) */
.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.hide {
    transform: translateY(-100%);
}

.loader-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Theme Toggle Button */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 5px;
}

.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--card-border);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust based on logo aspect ratio */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 16px;
    color: var(--text-color);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-extras {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-label {
    font-size: 14px;
    color: #666;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(-45deg, #ffffff, #f0f2f5, #e0e7ff, #ffffff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text h2 {
    font-size: 48px;
    margin-bottom: 25px;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-text p {
    margin-bottom: 30px;
    color: #555;
    font-size: 18px;
    font-weight: 300;
}

.hero-image img {
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    /* Transform removed for optimization, kept static style */
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    /* Kept simple hover effect */
    transform: scale(1.02);
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.section-title {
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.product-info p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block; /* Added for correct button behavior */
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 15px 50px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

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

.overlay i {
    color: var(--white);
    font-size: 30px;
}

/* Contact CTA Section */
.contact-cta-section {
    position: relative;
    height: 500px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    color: var(--white);
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay to make text readable */
    z-index: 1;
}

.contact-cta-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.contact-cta-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--white);
}

.contact-cta-content p {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section (Keeping styles if needed for other pages) */
.contact-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group.half {
    width: calc(50% - 10px);
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select { /* Added select */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    background-color: var(--white);
    color: var(--text-color);
}

.form-checkbox {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-wrapper {
    width: 100%;
    margin-top: 10px;
}

.captcha-hint {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

.btn-submit {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

#form-message {
    width: 100%;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 20px;
    border-top: none;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-column p, .footer-column li {
    color: #bbb;
    margin-bottom: 10px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 14px;
    color: #888;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--text-color);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Enhanced Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: blur(5px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 100%; /* Full width to cover screen */
        background-color: var(--card-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        padding: 0;
        z-index: 998; /* Below burger button (1000) */
        overflow-y: auto; /* Allow scrolling if menu is tall */
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .burger {
        display: block;
        z-index: 1001; /* Above nav-links */
        position: relative; /* Ensure z-index works */
    }

    .hero-container, .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }
    
    .form-group.half {
        width: 100%;
    }
}
