:root {
    --primary: hsl(158, 77%, 10%);
    /* Deep Forest Green */
    --primary-light: hsl(158, 60%, 20%);
    --secondary: hsl(38, 75%, 50%);
    /* Golden Wheat */
    --secondary-dark: hsl(38, 70%, 40%);
    --accent: hsl(38, 30%, 97%);
    --text-dark: hsl(0, 0%, 12%);
    --text-light: hsl(0, 0%, 98%);
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-container {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--accent);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loader-container p {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.text-center {
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-light);
    position: relative;
}

nav.scrolled .nav-links a {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.logo img {
    height: 70px;
    width: auto;
    transition: var(--transition);
    filter: brightness(0) invert(1);
    /* Ensure white logo on transparent background initially */
}

nav.scrolled .logo img {
    height: 55px;
    filter: none;
    /* Return to original color on scroll */
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('assets/hero.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    /* Adjusted for better title stacking */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Feature Section */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for desktop as requested */
    gap: 2rem;
}

.feature-card {
    padding: 3.5rem 2.5rem;
    background: var(--white);
    border-radius: 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Stat Items (Counters) */
.stat-item {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    min-width: 60px;
    text-align: center;
}

@media (max-width: 768px) {
    .stat-item {
        font-size: 1.4rem;
    }

    .stats-container {
        gap: 1.5rem !important;
    }
}

/* Mission & Vision Grid */
.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Custom Solutions Card */
.custom-solutions-card {
    background-color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5rem;
    padding: 5rem;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-solutions-content {
    flex: 1.5;
}

.custom-solutions-list {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.custom-solutions-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.custom-solutions-list i {
    color: var(--secondary);
}

.custom-solutions-icon {
    flex: 1;
    font-size: 12rem;
    color: var(--primary);
    opacity: 0.15;
    text-align: center;
}

/* Khoga Gallery Styles */
.khoga-gallery {
    flex: 1.2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 1;
}

.gallery-item:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.section-tag {
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

/* Products Section */
/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 3rem;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 1rem 5px 2rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-track .product-item {
    flex: 0 0 calc(33.333% - 1.35rem);
    min-width: 300px;
    scroll-snap-align: start;
    height: 450px;
}

@media (max-width: 1100px) {
    .carousel-track .product-item {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .carousel-track {
        gap: 1rem;
    }

    .carousel-track .product-item {
        flex: 0 0 280px;
        height: 400px;
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.carousel-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.carousel-btn.prev {
    left: -25px;
}

.carousel-btn.next {
    right: -25px;
}

/* Hide buttons for mobile since touch-swipe is preferred */
@media (max-width: 992px) {
    .carousel-btn {
        display: none;
    }
}

.product-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.product-item:hover img {
    transform: scale(1.1);
}

/* Contact Section */
.contact-section {
    background-color: var(--primary);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    color: var(--white);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    background-color: #052b22;
    color: var(--white);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

nav.scrolled .menu-toggle {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-solutions-card {
        flex-direction: column;
        padding: 3rem;
        text-align: center;
        gap: 3rem;
    }

    .custom-solutions-icon {
        display: none;
    }

    .custom-solutions-list {
        text-align: left;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-img {
        order: 2;
    }

    .about-text {
        order: 1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        display: none;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--text-dark) !important;
        padding: 1.5rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: block;
    }

    .nav-links a::after {
        display: none;
    }

    nav .btn {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .custom-solutions-card {
        padding: 2.5rem 1.5rem;
    }

    .custom-solutions-list {
        grid-template-columns: 1fr;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .hero-btns .btn {
        margin-left: 0 !important;
        width: 100%;
    }

    .hero-content {
        padding-top: 4rem;
        /* Prevent overlap with fixed navbar */
    }
}

/* Logo Styling Fixes - Simplified for logo.png */
.logo img {
    display: block;
}

nav:not(.scrolled) .logo img {
    /* Ensure visibility against hero image */
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

nav.scrolled .logo img {
    height: 50px;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 4rem;
    /* Repositioned higher to avoid stickiness */
    right: 2rem;
    background-color: #25d366;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    font-weight: 600;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #128c7e;
}

.whatsapp-float i {
    font-size: 1.5rem;
}

@media (max-width: 500px) {
    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float {
        padding: 1rem;
        border-radius: 50%;
    }
}

/* Contact Form Mobile Fix */
@media (max-width: 768px) {
    .contact-form form div {
        grid-template-columns: 1fr !important;
    }
}