/* Global CSS Variables */
:root {
    /* Colors based on requirements */
    --color-primary: #3B6B4B;      /* Forest Green */
    --color-secondary: #E7D7B7;    /* Warm Sand */
    --color-accent: #A47449;       /* Natural Wood Brown */
    --color-background: #F9F8F4;   /* Off-white */
    --color-text: #333333;         /* Charcoal Gray */

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
}

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.1rem;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

a:hover {
    color: #0b0707;
}

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

main {
    flex: 1;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-center {
    text-align: center;
}

/* Buttons & Form Elements */
button, .btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    display: inline-block;
    text-align: center;
}

button:hover, .btn:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

button:focus, .btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

input, textarea, select {
    font-family: var(--font-secondary);
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-primary);
}

/* Header Styles */
.site-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    position: relative;
}

/* Logo */
.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    z-index: 101; /* Keep logo above mobile menu */
}

/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.nav-item a {
    font-family: var(--font-primary);
    font-weight: 500;
    position: relative;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-item a:hover::after,
.nav-item a:focus::after {
    width: 100%;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 101; /* Keep toggle above mobile menu */
    transition: color var(--transition-fast);
}

.menu-toggle:hover,
.menu-toggle:focus {
    color: var(--color-accent);
    background: transparent;
    transform: none;
}

.menu-toggle .fa-bars,
.menu-toggle .fa-times {
    pointer-events: none; /* Ensure clicks go through to the button */
}

.close-menu {
    display: none;
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 102;
}

.close-menu:hover,
.close-menu:focus {
    color: var(--color-accent);
    background: transparent;
    transform: none;
}

/* Overlay for Mobile Menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.nav-overlay.active {
    opacity: 1;
}

/* Hero Section */
.hero {
    background: url("../images/12.webp") center center / cover no-repeat;
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}


.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Featured Section */
.featured-section {
    padding: var(--space-xl) 0;
}

.section-heading {
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.featured-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    background: white;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.featured-image {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.featured-content {
    padding: var(--space-md);
}

.featured-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.featured-price {
    font-weight: 600;
    color: var(--color-primary);
    margin-top: var(--space-sm);
}

/* About Section */
.about-section {
    padding: var(--space-xl) 0;
    background-color: var(--color-secondary);
    position: relative;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

/* Services Section */
.services-section {
    padding: var(--space-xl) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    height: 100%; /* Ensure equal height cards */
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

/* Testimonial Section */
.testimonial-section {
    padding: var(--space-xl) 0;
    background-color: var(--color-background);
}

.testimonial-card {
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    font-size: 2rem;
    color: var(--color-primary);
    opacity: 0.3;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
}

/* Contact Form */
.contact-section {
    padding: var(--space-xl) 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(59, 107, 75, 0.1);
}

.form-input.invalid,
.form-textarea.invalid {
    border-color: #e74c3c;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.form-checkbox input {
    margin-top: 5px;
}

.form-checkbox.invalid label {
    color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* Social icons styling */
.social-icons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    font-size: 1.2rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: white;
    padding: var(--space-lg) 0;
    margin-top: auto; /* Push footer to bottom */
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-heading {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.footer-nav {
    list-style: none;
}

.footer-nav li {
    margin-bottom: var(--space-sm);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: white;
}

.footer-contact {
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.footer-contact i {
    color: var(--color-secondary);
    margin-top: 4px;
}

.copyright {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-lg);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Product Page */
.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    justify-content: center;
}

.product-section{
    padding: 10px;
}

.filter-btn {
    background-color: white;
    color: var(--color-text);
    border: 1px solid #ddd;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.product-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.product-content {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.product-description {
    color: #666;
    margin-bottom: var(--space-sm);
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
}

.product-price {
    font-weight: 600;
    color: var(--color-primary);
}

.product-type {
    background-color: var(--color-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Sustainability Page */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-xl);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    position: relative;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: calc(50% - 10px);
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -26px;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -26px;
}

/* Team Section */
.team-section {
    padding: var(--space-xl) 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.team-member {
    text-align: center;
}

.team-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-md);
    border: 3px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.team-member:hover .team-image {
    transform: scale(1.05);
}

.team-name {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.team-role {
    color: var(--color-accent);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

/* Map Section */
.map-section {
    padding: var(--space-lg) 0;
}

.map-container {
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Privacy Policy Popup */
.privacy-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-md);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.privacy-popup.show {
    transform: translateY(0);
}

.privacy-text {
    flex: 1;
    margin-right: var(--space-md);
}

.privacy-close {
    padding: var(--space-xs) var(--space-sm);
    white-space: nowrap;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    line-height: 1;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

/* Thank You Page */
.thank-you-page {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.thank-you-icon {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

/* Plain Pages */
.plain-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.plain-page h1 {
    margin-bottom: var(--space-lg);
}

.plain-page h2 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Utility classes */
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-primary);
    color: white;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* =========================================================
   RESPONSIVE STYLES
   ========================================================= */

/* Extra large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

/* Large screens (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Medium screens (768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    h1, .hero-title {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Timeline responsive styles */
    .timeline::before {
        left: 31px; /* Move timeline line to left side */
    }

    .timeline-item {
        width: 100%; /* Full width items */
        padding-left: 70px; /* Space for timeline markers */
        padding-right: 0;
        margin-bottom: var(--space-lg);
    }

    .timeline-item:nth-child(even) {
        left: 0; /* Reset positioning */
    }

    .timeline-content::after {
        left: -36px !important; /* Position markers consistently */
        right: auto !important;
    }
}

/* Small screens (576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }

    html {
        font-size: 95%; /* Slightly reduce base font size */
    }

    h1, .hero-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .hero {
        padding: var(--space-lg) 0;
    }

    .featured-section,
    .about-section,
    .services-section,
    .team-section {
        padding: var(--space-lg) 0;
    }

    /* Mobile navigation styles */
    .menu-toggle {
        display: block; /* Show mobile menu toggle */
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%; /* Hide off-screen initially */
        width: 250px; /* Menu width */
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: var(--space-xl) var(--space-md);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
        transition: right var(--transition-medium), transform var(--transition-medium);
        overflow-y: auto;
    }

    .nav-list.active {
        right: 0;
        z-index: 1000;
    }

    .close-menu {
        display: block;
    }

    .nav-item {
        margin-bottom: var(--space-md);
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .footer-container {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .privacy-popup {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .privacy-text {
        margin-right: 0;
        margin-bottom: var(--space-md);
    }

    /* Contact page responsive */
    .featured-grid {
        gap: var(--space-lg);
    }
}

/* Extra small screens (up to 575px) */
@media (max-width: 575px) {
    html {
        font-size: 90%; /* Further reduce base font size */
    }

    h1, .hero-title {
        font-size: 1.8rem;
    }

    .header-container {
        padding: var(--space-sm);
    }

    .logo {
        font-size: 1.2rem; /* Smaller logo on very small screens */
    }

    .featured-grid,
    .services-grid,
    .team-grid,
    .products-grid {
        grid-template-columns: 1fr; /* Single column layouts on small screens */
    }

    .team-member {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Smaller margins and padding */
    .section-heading {
        margin-bottom: var(--space-md);
    }

    /* More compact filter buttons */
    .product-filters {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        margin-bottom: var(--space-xs);
        flex: 1 0 45%; /* 2 buttons per row approximately */
        text-align: center;
    }

    .error-code {
        font-size: 4rem; /* Smaller error code on small screens */
    }

    .error-message {
        font-size: 1.2rem;
    }

    /* More compact timelines */
    .timeline-item {
        padding-left: 50px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content::after {
        left: -26px !important;
        width: 15px;
        height: 15px;
    }
}

/* Very small screens (375px and below) */
@media (max-width: 375px) {
    html {
        font-size: 85%;
    }

    .nav-list {
        width: 85%; /* Wider menu on very small screens */
    }

    .btn {
        width: 100%; /* Full-width buttons */
        text-align: center;
    }

    .product-filters .filter-btn {
        flex: 1 0 100%; /* Full width filters */
    }
}