/* General Resets and Base Styles */
:root {
    --color-primary: #A3C1AD; /* Soft Green */
    --color-secondary: #F0F2E8; /* Light Beige/Off-white */
    --color-dark: #3F574E; /* Deeper Green/Grey */
    --color-accent: #E8D3B3; /* Subtle Earthy Yellow */
    --color-white: #ffffff;
    --color-text-dark: #333333;
    --color-text-light: #555555;
    --font-family-sans: 'Montserrat', sans-serif;
    --font-family-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    --shadow-subtle: 0 4px 8px rgba(0, 0, 0, 0.05);
    --border-radius-medium: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--color-text-light);
    background-color: var(--color-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8px 15px;
    z-index: 9999;
    transition: top 0.3s ease-in-out;
    border-bottom-right-radius: var(--border-radius-medium);
    font-size: 0.9em;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-dark);
    margin-bottom: 0.8em;
    font-weight: 600;
}

h2.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.2em;
    color: var(--color-dark);
}

a {
    text-decoration: none;
    color: var(--color-dark);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

/* Header & Navigation */
.main-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1440px;
    margin: 0 auto;
    position: relative; /* For hamburger/nav-icons positioning */
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-dark);
}

.nav-menu {
    list-style: none;
    display: flex; /* Default for desktop */
    gap: 2.5rem;
}

.nav-menu li a {
    font-weight: 500;
    color: var(--color-text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    left: 0;
    background: var(--color-primary);
    transition: width 0.3s ease;
    -webkit-transition: width 0.3s ease;
}

.nav-menu li a:hover::after,
.nav-menu li a[aria-current="page"]::after { /* Use aria-current for active state */
    width: 100%;
    background: var(--color-primary);
}

.nav-icons {
    display: flex;
    gap: 1.5rem; /* Space between icons */
    align-items: center;
}

.nav-icons button {
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--color-text-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-icons button:hover {
    color: var(--color-primary);
}

.hamburger-menu {
    display: none; /* Hidden by default for desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--color-dark);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Ensure it's above other elements if needed */
}

/* Hero Banner */
.hero-banner {
    width: 100%;
    height: 550px; /* Adjust height as needed */
    background-image: url('https://images.unsplash.com/photo-1549286411-a0833215f795?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    position: relative;
    margin-bottom: 4rem;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Dark overlay for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-white);
}

.hero-content p {
    font-size: 1.4em;
    margin-bottom: 2rem;
    color: var(--color-secondary); /* Lighter text for contrast */
}


/* Featured Products Grid */
.featured-products {
    padding: 3rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 3rem;
}

.product-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 1.5rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 300px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.5em;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.product-card p {
    color: var(--color-text-light);
    font-size: 0.95em;
    padding: 0 1rem;
}

/* CTA Buttons */
.cta-button {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--color-primary), var(--color-dark));
    color: var(--color-white);
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-subtle);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: linear-gradient(45deg, var(--color-dark), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.primary-cta {
    margin-top: 2rem;
}

.secondary-cta {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}

.secondary-cta:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tertiary-cta {
    background: none;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
    box-shadow: none;
    padding: 0.8rem 2rem; /* Slightly smaller padding */
    font-size: 1em; /* Slightly smaller font */
}

.tertiary-cta:hover {
    background: var(--color-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}


/* About Section */
.about-section {
    padding: 4rem 0;
    background-color: var(--color-white);
    margin-bottom: 4rem;
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-subtle);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.about-content p {
    font-size: 1.15em;
    margin-bottom: 2rem;
    color: var(--color-text-dark);
    line-height: 1.8;
}

/* Footer */
.main-footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-between; /* Space out items on larger screens */
    align-items: flex-start; /* Align items to the top */
    text-align: left; /* Default text align for sections */
    gap: 2rem;
}

.footer-section {
    flex: 1 1 250px; /* Allow sections to grow and shrink, min width of 250px */
}

.footer-section h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3em;
}

.footer-section p {
    color: var(--color-secondary); /* Adjust text color for contrast on dark background */
}

.social-icons {
    text-align: center; /* Center icons in their section */
}

.social-icons a {
    color: var(--color-white);
    font-size: 1.5em;
    margin: 0 0.8rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-primary);
}

.newsletter-signup {
    text-align: center; /* Center text and form in this section */
}

.newsletter-signup p {
    margin-bottom: 1rem;
    font-size: 1.1em;
}

.newsletter-signup form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.newsletter-signup input[type="email"] {
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--color-primary);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    outline: none;
    font-size: 0.95em;
    width: 250px;
    max-width: 100%;
}

.newsletter-signup input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-signup button {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: none;
    background-color: var(--color-primary);
    color: var(--color-dark);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.95em;
}

.newsletter-signup button:hover {
    background-color: var(--color-accent);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.copyright {
    margin-top: 1.5rem; /* Increased margin-top */
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-family-mono);
    text-align: center; /* Ensure copyright is centered */
}


/* Mobile-First & Responsiveness */

/* Small devices (e.g., mobile phones, up to 767px) */
@media (max-width: 767px) {
    .navbar {
        flex-direction: row; /* Keep logo, icons, hamburger on same row */
        justify-content: space-between; /* Spread them out */
        align-items: center;
        padding: 1rem 15px;
        flex-wrap: nowrap; /* Keep elements on one line initially */
        position: relative; /* For the absolute positioning of the expanded menu */
    }

    .logo {
        flex-grow: 1; /* Allow logo to take up available space, pushing others right */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        margin-left: 1rem; /* Space from nav-icons */
    }

    .nav-icons {
        display: flex; /* Ensure it's a flex container */
        gap: 1rem;
        margin-left: auto; /* Push icons to the right, next to hamburger */
    }

    .nav-menu {
        position: absolute; /* Position it below the header row */
        top: 100%; /* Place it right below the navbar */
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--color-white); /* Background for the expanded menu */
        box-shadow: var(--shadow-subtle);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        display: none; /* Hidden by default, toggled by JS */
        z-index: 999; /* Ensure it's above content */
    }

    .nav-menu.active { /* Class added by JS when menu is open */
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        padding: 0.7rem 0;
        display: block; /* Make links full width */
    }

    .nav-menu li a::after {
        display: none; /* Hide hover effect on mobile menu */
    }

    .hero-banner {
        height: 350px;
        margin-bottom: 2rem;
    }

    .hero-content h1 {
        font-size: 2.2em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    h2.section-title {
        font-size: 1.8em;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-image {
        height: 250px;
    }

    .newsletter-signup form {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .newsletter-signup input[type="email"],
    .newsletter-signup button {
        width: 80%;
        margin: 0 auto;
    }

    .footer-content {
        padding: 0 15px;
        flex-direction: column; /* Stack sections vertically */
        align-items: center; /* Center items for column layout */
        text-align: center; /* Center text within sections */
    }

    .footer-section {
        margin-bottom: 2rem; /* Space between stacked sections */
        width: 100%; /* Full width */
    }

    .social-icons, .newsletter-signup, .footer-links {
        text-align: center; /* Ensure centered text for mobile footer */
    }
}

/* Medium devices (e.g., tablets, 768px to 1023px) */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none; /* Hide hamburger menu on tablet and up */
    }

    .navbar {
        flex-wrap: nowrap; /* Prevent nav-menu from wrapping */
        padding: 1rem 30px;
    }

    .nav-menu {
        display: flex; /* Show horizontal menu */
        flex-direction: row;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        box-shadow: none;
        border-top: none;
        order: initial; /* Reset order */
        margin-left: auto; /* Push nav-menu to the right, next to logo */
        margin-right: 2.5rem; /* Space between menu and nav icons */
    }

    .nav-menu li {
        border-bottom: none;
        padding: 0;
    }

    .nav-menu li a {
        padding: 0.5rem 0;
    }

    .nav-menu li a::after {
        display: block; /* Re-enable hover effect */
    }

    .nav-icons {
        position: static;
        margin-left: 0;
        gap: 1.5rem;
    }

    .hero-banner {
        height: 450px;
    }

    .hero-content h1 {
        font-size: 2.8em;
    }

    .hero-content p {
        font-size: 1.2em;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .newsletter-signup input[type="email"] {
        width: 200px;
    }

    .footer-content {
        flex-direction: row; /* Arrange sections horizontally */
        text-align: left; /* Align text left for multi-column layout */
        align-items: flex-start;
    }

    .footer-section {
        flex: 1 1 30%; /* Give more balanced width to sections */
        margin-bottom: 0;
    }

    .social-icons, .newsletter-signup {
        text-align: left; /* Reset alignment for larger screens */
    }

    .newsletter-signup form {
        justify-content: flex-start; /* Align form elements to the left */
    }
}

/* Large devices (desktops, 1024px and up) - default styling */
@media (min-width: 1024px) {
    .navbar {
        padding: 1.2rem 20px;
    }
    .nav-menu {
        display: flex; /* Ensure menu is visible and horizontal */
    }

    .hero-content h1 {
        font-size: 3.5em; /* Restore larger font size */
    }

    .hero-content p {
        font-size: 1.4em; /* Restore larger font size */
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop */
        gap: 30px;
    }

    .footer-section {
        flex: 1 1 30%; /* Roughly equal thirds for 3 sections */
    }

    .footer-content .footer-section:first-child { /* social icons */
        flex: 1 1 25%;
    }

    .footer-content .footer-section:nth-child(2) { /* newsletter */
        flex: 2 1 50%; /* Make newsletter wider */
    }

    .footer-content .footer-section:last-child { /* quick links */
        flex: 1 1 25%;
    }
}