/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333; /* Dark grey text */
    background-color: #F8F6F2; /* Very light beige background */
}

/* Color Palette Variables */
:root {
    --primary-green: #8FBC8F; /* Dark Sea Green */
    --secondary-green: #556B2F; /* Dark Olive Green */
    --terracotta: #BC8F8F;    /* Rosy Brown */
    --cream: #F5F5DC;         /* Beige */
    --light-beige: #F8F6F2;
    --dark-text: #333;
    --accent-gold: #DAA520;   /* Goldenrod */
}

h1, h2, h3 {
    font-family: 'Lora', serif;
    color: var(--secondary-green);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.4rem;
    color: var(--primary-green);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-green);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-green);
}

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

/* Utility Classes */
.content-section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.textured-bg {
    background-color: var(--cream); /* Light texture background */
    /* Optional: Add subtle background image texture */
    /* background-image: url('images/paper-texture.png'); */
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-green);
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--secondary-green);
    color: #fff;
    transform: translateY(-2px);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.cta-button.secondary:hover {
    background-color: var(--primary-green);
    color: #fff;
}


/* Header & Navigation */
header {
    background-color: rgba(248, 246, 242, 0.9); /* Semi-transparent light beige */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 20px;
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-green);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--secondary-green);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-green);
}

/* --- Hamburger Menu Styles --- */

.hamburger {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Ensure it's above other header content if needed */
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-green); /* Use your theme color */
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- Mobile Navigation Styles (within Media Query) --- */

@media (max-width: 768px) {
    /* Hide desktop nav links (you might already have this) */
    nav ul#nav-links {
        display: none; /* Hide initially */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Position below header (adjust height if needed) */
        left: 0;
        width: 100%;
        background-color: rgba(248, 246, 242, 0.98); /* Semi-transparent light beige background */
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--primary-green); /* Add a top border */
    }

    /* Style for when mobile menu is active/open */
    nav ul#nav-links.active {
        display: flex; /* Show the menu */
    }

    nav ul#nav-links li {
        margin: 0; /* Remove horizontal margin */
        width: 100%;
        text-align: center;
    }

    nav ul#nav-links li a {
        display: block; /* Make link fill list item */
        padding: 15px 20px; /* Add padding for easier tapping */
        color: var(--secondary-green);
        border-bottom: 1px solid rgba(85, 107, 47, 0.1); /* Faint separator */
    }
     nav ul#nav-links li a:hover {
         background-color: rgba(143, 188, 143, 0.1); /* Light green hover */
         color: var(--primary-green);
     }

    nav ul li a:hover {
        /* You might already have this, ensure it doesn't conflict */
        color: var(--primary-green);
    }

    /* Show the hamburger button */
    .hamburger {
        display: block; /* Show hamburger on mobile */
    }

    /* Optional: Animate hamburger to an 'X' when active */
    .hamburger.active .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

} /* End of @media (max-width: 768px) */

/* Hero Section */
.hero-section {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden; /* Contain the animation */
    background: url('images/hero-background.jpg') no-repeat center center/cover; /* Replace with your background image */
    margin-top: 70px; /* Adjust based on header height */
}

.hero-section::before { /* Overlay for text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(85, 107, 47, 0.4); /* Dark Olive Green overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 20px;
}

.hero-content h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Simple Background Animation Placeholder */
.hero-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Example: Soft leaves overlay - replace 'leaves.png' */
    /* background: url('images/leaves-overlay.png') repeat; */
    opacity: 0.1; /* Make it subtle */
    animation: subtleMovement 40s linear infinite alternate;
    z-index: 0;
}

@keyframes subtleMovement {
    from { background-position: 0 0; }
    to { background-position: 100px 50px; }
}


/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
    margin-bottom: 2rem; /* Add margin before button */
}

.service-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.service-item img {
    width: 100%; /* Make image stretch to container width */
    height: 200px; /* Keep fixed height (or adjust as desired) */
    object-fit: cover; /* Ensure image covers the area, cropping vertically */
    /* Match top corners of card radius, none on bottom */
    border-radius: 8px 8px 0 0;
    margin-bottom: 1rem; /* Keep space below the image */
    display: block; /* Keep as block element */
    /* Removed max-width and horizontal auto margins */
}

/* --- Draggable Comparison Slider Styles --- */
.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 700px; /* Adjust max width as needed */
    margin: 2rem auto;
    overflow: hidden; /* Crucial */
    border-radius: 8px;
    cursor: ew-resize; /* Indicate horizontal dragging */
    aspect-ratio: 16 / 9; /* Maintain aspect ratio, adjust if needed */
    border: 2px solid var(--primary-green);
    user-select: none; /* Prevent text selection during drag */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.comparison-figure {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0; /* Reset figure margin */
    overflow: hidden; /* Important for clipping */
}

.comparison-figure img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Ensure image covers the container */
    height: 100%;
    object-fit: cover; /* Cover the area without distortion */
    pointer-events: none; /* Prevent image interaction */
}
#desc{
    text-align: center;
}

.comparison-figure.after {
    /* Width will be controlled by JavaScript */
    width: 50%; /* Initial position */
    z-index: 1; /* 'After' image is clipped */
}
.comparison-figure.before {
    z-index: 0; /* 'Before' image is underneath */
}


/* Figcaption Styles (Before/After Labels) */
.comparison-figure figcaption {
    position: absolute;
    top: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    z-index: 3; /* Above images */  
    pointer-events: none; /* Don't interfere with drag */
}
.comparison-figure.before figcaption { right: 10px; }
.comparison-figure.after figcaption { right: 10px; }


/* Draggable Handle Styles */
.comparison-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Initial position, controlled by JS */
    width: 4px; /* Width of the draggable line */
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* White line, slightly transparent */
    transform: translateX(-50%); /* Center the handle based on its left position */
    cursor: ew-resize;
    z-index: 2; /* Above 'before' image, below 'after' figcaption if needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.comparison-handle .handle-line {
    flex-grow: 1;
    width: 100%;
    background-color: inherit; /* Inherit from parent handle */
}

.comparison-handle .handle-arrows {
    width: 40px; /* Width of the arrow circle */
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background-color: var(--primary-green); /* Circle background */
    flex-shrink: 0;
    position: relative; /* For positioning arrows */
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Add arrows using pseudo-elements */
.comparison-handle .handle-arrows::before,
.comparison-handle .handle-arrows::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    transform: translateY(-50%);
}

/* Left arrow */
.comparison-handle .handle-arrows::before {
    left: 6px; /* Position inside the circle */
    border-width: 6px 8px 6px 0; /* Triangle shape */
    border-color: transparent white transparent transparent;
}

/* Right arrow */
.comparison-handle .handle-arrows::after {
    right: 6px; /* Position inside the circle */
    border-width: 6px 0 6px 8px; /* Triangle shape */
    border-color: transparent transparent transparent white;
}
/* --- End Draggable Comparison Slider Styles --- */

/* Recommendation Form */
#recommendation-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-green);
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(143, 188, 143, 0.3); /* Soft green glow */
}

#recommendation-form button {
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.recommendation-result {
    margin-top: 2rem;
    padding: 20px;
    background-color: var(--cream);
    border-left: 5px solid var(--primary-green);
    border-radius: 4px;
    text-align: center;
    display: none; /* Hidden initially */
}

.recommendation-result h4 {
    color: var(--secondary-green);
    margin-bottom: 0.5rem;
}


/* Contact Section */
.contact-info p {
    margin-bottom: 0.5rem;
}
.contact-info strong {
    color: var(--secondary-green);
}


/* Chatbot */
.chatbot-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.chatbot-button:hover {
    background-color: var(--secondary-green);
    transform: scale(1.1);
}

.chatbot-popup {
    position: fixed;
    bottom: 90px; /* Above the button */
    right: 25px;
    width: 320px;
    max-height: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 998;
    overflow: hidden;
    display: none; /* Hidden by default */
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.chatbot-popup.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chatbot-header {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header span {
    font-weight: bold;
}

.close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chatbot-body {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1; /* Allow body to take remaining space */
}

.chatbot-body p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.chatbot-body p strong {
    color: var(--secondary-green);
}

/* Footer */
footer {
    background-color: var(--secondary-green);
    color: var(--cream);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}


/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    nav ul { display: none; } /* Hide nav links - more complex mobile menu needs more JS */
    .logo { font-size: 1.5rem; } /* Adjust logo size */

    .hero-section { height: 70vh; margin-top: 60px; } /* Adjust hero height and top margin */
    .hero-content p { font-size: 1rem; }

    .content-section { padding: 40px 15px; }

    .service-grid { grid-template-columns: 1fr; } /* Stack services */

    .before-after-slider { max-width: 95%; }

    #recommendation-form { padding: 20px; }

    .chatbot-popup { width: 90%; right: 5%; }
    .chatbot-button { width: 50px; height: 50px; font-size: 1.5rem; }
}