:root {
    --primary-green: #2E7D32;
    --accent-green: #4CAF50;
    --highlight-orange: #ff6600;
    --hover-orange: #F57C00;
    --bg-color: #E8F5E9;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-muted: #666666;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll from off-screen menu */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
}

/* GRID LAYOUT SITE-WIDE */
.grid-container {
    display: grid;
    grid-template-areas: 
        "header"
        "main"
        "footer";
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* HEADER & NAVBAR */
.header {
    grid-area: header;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Glassmorphism */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); /* Softer shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-green);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px; /* Slightly wider for modern feel */
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo img {
    height: 45px; /* Slightly larger */
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-green);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
    padding: 0.5rem 0;
}

/* Hover effect for links */
.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: width 0.3s ease;
}

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

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

.nav-links i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.dropdown:hover > a i {
    transform: rotate(180deg);
}

/* DROPDOWN - DESKTOP */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: block; /* Always block, handle visibility with opacity for animation */
    position: absolute;
    top: 120%; /* Start slightly lower */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--white);
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Deep elegant shadow */
    border-radius: 12px;
    list-style: none;
    padding: 0.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-left: 1px solid rgba(0,0,0,0.05);
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        top: 100%;
    }
}

.dropdown-content li a {
    padding: 0.8rem 1.2rem;
    display: block;
    color: var(--text-dark);
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-content li a:hover {
    background-color: var(--bg-color);
    color: var(--primary-green);
    padding-left: 1.5rem; /* Slide effect */
}

/* LOGIN BUTTONS */
.btn-login-desktop, .btn-login-mobile {
    background: linear-gradient(135deg, var(--highlight-orange), var(--hover-orange));
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.25);
    display: inline-block;
}

.btn-login-desktop:hover, .btn-login-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.35);
    filter: brightness(1.1);
}

.btn-login-mobile {
    display: none;
}

/* HAMBURGER (Mobile) */
.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 1001; /* Above menu */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.hamburger:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Body Lock for Mobile Menu */
body.no-scroll {
    overflow: hidden;
}

/* MAIN CONTENT */
.main-content {
    grid-area: main;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 5rem 0;
    animation: fadeIn 0.8s ease-out;
}

.hero h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-green);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-cta:hover {
    background-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.4);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px; /* Smoother corners */
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

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

.feature-card i {
    font-size: 3.5rem;
    background: -webkit-linear-gradient(45deg, var(--primary-green), var(--accent-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* FOOTER */
.footer {
    grid-area: footer;
    background-color: var(--primary-green);
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 0.95rem;
    margin-top: auto;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .btn-login-desktop {
        display: none;
    }

    .btn-login-mobile {
        display: block;
        text-align: center;
        margin-top: 1.5rem;
        width: 100%;
    }

    .hamburger {
        display: flex; /* Activate flex for centering */
    }

    .nav-links {
        display: block; /* Changed from flex to block/flow for vertical layout */
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%; /* Wider drawer */
        max-width: 350px;
        height: 100vh;
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding: 5rem 2rem 2rem; /* Top padding for breathing room under close button? No, close button is hamburger */
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    /* Mobile Links Styling */
    .nav-links > li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        padding: 1rem 0;
        justify-content: space-between; /* Space out text and arrow */
    }
    
    .nav-links > li > a::after {
        display: none; /* Remove underline on mobile */
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        border-radius: 8px;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease, padding 0.3s ease;
        border: none;
    }

    .dropdown-content::before {
        display: none;
    }

    /* Show dropdown when parent has active class OR on hover (User Request) */
    .dropdown.active .dropdown-content,
    .dropdown:hover .dropdown-content {
        max-height: 500px; /* Arbitrary large height */
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .dropdown-content li a {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .dropdown.active > a i,
    .dropdown:hover > a i {
        transform: rotate(180deg);
    }

    /* Overlay */
    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100vw; /* Covers the rest of the screen */
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none; /* Let js handle click outside on document, or we can use this */
    }
    
    /* We can't easily put the overlay BEFORE the nav-links if nav-links is essentially the drawer. 
       Usually the overlay is a sibling. But our HTML structure doesn't have a separate overlay element.
       I rely on the JS 'click outside' logic.
       However, adding a visual overlay helps. I can attach it to the body or main container class if I could edit HTML easily to add a div.
       For now, let's stick to the styling of the menu itself.
    */
    
    /* Fix Hero Font Size */
    .hero h2 {
        font-size: 2.2rem;
    }

    .navbar {
        padding: 0.8rem 1.5rem;
    }
}