/* ==========================================================================
   CSS Variables & Typography Definitions
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-green: #532c1f;
    /* Main dark green for headers/buttons */
    --accent-green: #532c1f;
    /* Lighter green for hovers/icons */
    --light-bg: #F8F4F1;
    /* Cream background for sections */
    --secondary-bg: #F3F7F6;
    /* Off-white/blue background */
    --text-color: #555555;
    /* Body text color */
    --heading-color: #532c1f;
    /* Headings default color */
    --white: #FFFFFF;
    --border-color: #E2DFDD;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 50px;

    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Spacing */
section {
    padding: 80px 0;
}

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

.section-bg-dark {
    background-color: var(--primary-green);
    color: var(--white);
}

.section-bg-dark h2,
.section-bg-dark h3 {
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

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

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: absolute;
    /* Kept absolute from previous instruction */
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    /* Solid background by default */
    z-index: 1000;
    padding: 15px 0;
    /* Reduced padding to match scrolled state */
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    /* Subtle border instead of transparent white */
}

.header.scrolled {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.logo img {
    height: 40px;
    transition: var(--transition);
}

/* Nav styles */
.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--heading-color);
    /* Default to dark color */
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

/* Keep dark color for scrolled state */
.header.scrolled .nav-links a {
    color: var(--heading-color);
}

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

.header.scrolled .nav-links a::after {
    background-color: var(--primary-green);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-green);
    /* Default to dark icon */
    font-size: 24px;
    cursor: pointer;
}

.header.scrolled .mobile-menu-toggle {
    color: var(--primary-green);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero,
.services-section,
.benefits-section,
.before-after-section {
    position: relative;
    overflow: hidden;
}

.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* Offset for header */
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(102, 69, 8, 0.452);
    /* Dark green overlay */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-subtitle {
    display: inline-block;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-title {
    color: var(--white);
    font-size: 64px;
    font-weight: 600;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-actions {
    animation: fadeInUp 1s ease 0.8s both;
}

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

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

/* ==========================================================================
   Before & After Slider Section
   ========================================================================== */
.before-after-section {
    padding: 80px 0;
}

.ba-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .ba-grid {
        grid-template-columns: 1fr;
    }
}

.ba-container {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.ba-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.ba-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.img-before {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.img-after {
    z-index: 1;
}

.ba-divider {
    position: absolute;
    width: 2px;
    height: 100%;
    background: white;
    top: 0;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.ba-slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
}

.ba-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="16" fill="white"><path d="M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z"/></svg>') no-repeat center center;
    border: 3px solid white;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.ba-slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-green) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="16" fill="white"><path d="M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z"/></svg>') no-repeat center center;
    border: 3px solid white;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

/* ==========================================================================
   Background Shapes & Animations
   ========================================================================== */
.bg-shape {
    position: absolute;
    z-index: 10;
    opacity: 0.15;
    pointer-events: none;
}

.hero .bg-shape {
    opacity: 0.8;
}

.shape-1 {
    top: 25%;
    left: 10%;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
    bottom: 30%;
    right: 15%;
    animation: floatShape 6s ease-in-out infinite reverse;
}

.shape-3 {
    top: 60%;
    left: 80%;
    animation: floatShape 10s ease-in-out infinite;
}

.shape-4 {
    top: 80%;
    left: 20%;
    animation: floatShape 7s ease-in-out infinite reverse;
}

.shape-5 {
    top: 15%;
    right: 15%;
    animation: floatShape 9s ease-in-out infinite;
}

.shape-6 {
    top: 30%;
    left: 8%;
    animation: floatShape 8s ease-in-out infinite reverse;
}

.shape-7 {
    bottom: 20%;
    right: 10%;
    animation: floatShape 7s ease-in-out infinite;
}

.shape-8 {
    top: 25%;
    left: 15%;
    animation: floatShape 6s ease-in-out infinite reverse;
}

.shape-9 {
    bottom: 30%;
    right: 15%;
    animation: floatShape 9s ease-in-out infinite;
}

@keyframes floatShape {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(15deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ==========================================================================
   Responsive Logic (Basic)
   ========================================================================== */
@media (max-width: 991px) {
    .main-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden off-screen by default */
        width: 300px;
        height: 100vh;
        background-color: var(--primary-green);
        padding: 80px 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }

    .main-nav.active {
        right: 0;
        /* Slide in */
    }

    .nav-links {
        flex-direction: column;
        gap: 25px;
    }

    .nav-links a {
        font-size: 18px;
        display: block;
        width: 100%;
        color: var(--white) !important;
        /* Force white text on dark green menu */
    }

    .header-container {
        position: relative;
        z-index: 1001;
        /* Ensure header and toggle stay above mobile menu */
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: 20px;
        z-index: 1002;
    }

    .hero-title {
        font-size: 48px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 36px;
    }

    .header-action .btn {
        display: none;
        /* Hide button on very small screens to fit logo and toggle */
    }
}