/* --- Variables --- */
:root {
    --primary-color: #5a6a4d; /* Earthy Green */
    --secondary-color: #8b4513; /* Saddle Brown / Wood Brown */
    --accent-color: #d4ac6e; /* Warm Ochre/Gold */
    --light-bg: #f4f1eb; /* Warm Cream/Off-white */
    --dark-text: #333333;
    --light-text: #ffffff;
    --border-color: #cccccc;

    --font-primary: 'Georgia', serif; /* Or a slightly rustic serif */
    --font-secondary: 'Lato', sans-serif; /* Clean sans-serif */

    --container-width: 1140px;
    --header-height: 80px;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-secondary);
    color: var(--dark-text);
    line-height: 1.7;
    background-color: var(--light-bg);
    /* Optional subtle background texture */
    /* background-image: url('../img/wood-texture-light.png'); */
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-primary); color: var(--primary-color); margin-bottom: 0.8em; line-height: 1.3; }
h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
p { margin-bottom: 1.2em; }
a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-color); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* --- Utilities --- */
.section-padding { padding: 60px 0; }
.bg-light { background-color: #ffffff; } /* Slightly different from body */
.text-center { text-align: center; }
.subtitle { font-size: 1.2rem; color: #555; margin-top: -0.5em; margin-bottom: 1.5em; }
.section-subtitle { margin-bottom: 40px; color: #666; }
.img-responsive { width: 100%; height: auto; }
.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }
.grid-col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.reverse-grid { grid-template-columns: 1fr 1fr; } /* Used for alternating layout */
.back-link { display: inline-block; margin-bottom: 20px; color: var(--primary-color); }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.btn-primary { background-color: var(--primary-color); color: var(--light-text); }
.btn-primary:hover { background-color: #3f4a36; color: var(--light-bg); /* Even Darker Green, slightly off-white text */ }
.btn-secondary { background-color: var(--secondary-color); color: var(--light-text); }
.btn-secondary:hover { background-color: #7a3c10; color: var(--light-bg); /* Darker Brown, slightly off-white text */ }
.btn-link { color: var(--secondary-color); font-weight: bold; padding: 0; background: none; }
.btn-link:hover { text-decoration: underline; }

/* --- Header --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 0 20px;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo {
    display: flex; /* Align image and text */
    align-items: center;
    text-decoration: none; /* Remove underline from link */
}
.logo img { max-height: 50px; } /* Adjust as needed */
.logo span {
    margin-left: 12px; /* Space between logo and text */
    font-family: var(--font-primary); /* Use primary brand font */
    font-size: 1.5rem; /* Adjust size as needed */
    font-weight: bold;
    color: var(--primary-color); /* Use primary brand color */
    line-height: 1; /* Prevent extra line height affecting alignment */
}
/* Optional: Change text color on hover if desired */
/* .logo:hover span { color: var(--secondary-color); } */

.main-nav > ul { display: flex; } /* Target only the top-level UL */
.main-nav li { margin-left: 25px; position: relative; }
.main-nav a { color: var(--dark-text); font-weight: bold; padding: 10px 0; display: block; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }
/* Dropdown Menu */
.dropdown .dropdown-arrow { font-size: 0.7em; margin-left: 5px; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    min-width: 180px;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { margin-left: 0; display: block; /* Ensure vertical stacking */ }
.dropdown-menu a { padding: 10px 15px; font-weight: normal; white-space: nowrap; }
.dropdown-menu a:hover { background-color: var(--light-bg); }
/* Mobile Nav Toggles (Initially Hidden) */
.nav-toggle-btn, .nav-close-btn { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle-btn img, .nav-close-btn img { width: 24px; height: 24px; }

/* --- Hero Section --- */
.hero {
    height: calc(100vh - var(--header-height));
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    text-align: center;
    position: relative;
}
.hero::before { /* Overlay for text readability */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { color: var(--light-text); font-size: 3.5rem; margin-bottom: 0.5em; }
.hero .subtitle { color: rgba(255, 255, 255, 0.9); font-size: 1.4rem; margin-bottom: 1.5em; }

/* --- Intro Section --- */
.intro img { margin-top: 20px; }

/* --- Featured Timber --- */
.timber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.timber-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease;
}
.timber-card:hover { transform: translateY(-5px); }
.timber-card img { width: 100%; height: 200px; object-fit: cover; }
.timber-card h3 { margin-top: 15px; margin-bottom: 10px; color: var(--primary-color); }
.timber-card p { padding: 0 15px; margin-bottom: 15px; font-size: 0.95rem; color: #555; }
.timber-card .btn-link { margin-top: auto; }

/* --- Timber Detail Page --- */
.timber-detail h1 { margin-bottom: 0.2em; }
.timber-subtitle { font-style: italic; color: #666; margin-bottom: 1.5em; }
.timber-intro ul { margin-top: 20px; padding-left: 20px; list-style: disc; }
.timber-intro li { margin-bottom: 8px; }
.timber-main-image { margin-top: 20px; }
.oscar-note {
    background-color: var(--light-bg);
    padding: 20px;
    margin-top: 30px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--accent-color);
}
.oscar-note h3 { margin-bottom: 10px; color: var(--secondary-color); }
.oscar-note p { margin-bottom: 0; font-size: 0.95rem; font-style: italic; }

/* --- Calculator & Form --- */
.calculator-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.calculator-form, .inquiry-form {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--primary-color); }
.form-group select, .form-group input[type="number"],
.form-group input[type="text"], .form-group input[type="email"],
.form-group input[type="tel"], .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-secondary);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.unit-label { font-size: 0.9rem; color: #666; margin-left: 10px; }
.calculator-output { margin: 20px 0; font-size: 1.2rem; }
.estimated-price { font-weight: bold; color: var(--secondary-color); }
.disclaimer { font-size: 0.85rem; color: #777; margin-top: 5px; }
.inquiry-form-container { margin-top: 30px; }
.form-actions { margin-top: 20px; display: flex; gap: 15px; }
.form-status { margin-top: 15px; font-weight: bold; padding: 10px; border-radius: var(--border-radius); }
.form-status.success { background-color: #e6f4ea; color: #3c763d; border: 1px solid #c3e6cb; }
.form-status.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }


/* --- Footer --- */
.site-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.site-footer h4 { color: var(--light-text); margin-bottom: 15px; }
.site-footer p, .site-footer li { font-size: 0.95rem; margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.8); }
.site-footer a:hover { color: var(--light-text); text-decoration: underline; }
.footer-logo { max-height: 40px; margin-top: 15px; opacity: 0.8; }
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .grid-col-2 { grid-template-columns: 1fr; }
    .reverse-grid { grid-template-columns: 1fr; } /* Stack normally on smaller screens */
    .grid-col-2 img { margin-bottom: 30px; } /* Add space when stacked */
    .reverse-grid img { order: -1; margin-bottom: 30px; } /* Ensure image is above text */
    .hero h1 { font-size: 2.8rem; }
    .hero .subtitle { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .section-padding { padding: 40px 0; }
    .hero { height: 80vh; }
    .hero h1 { font-size: 2.5rem; }

    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 60px 20px 20px;
        transition: right 0.4s ease-in-out;
        z-index: 1002; /* Ensure menu is above toggle */
        overflow-y: auto;
    }
    .main-nav.active { right: 0; }
    .main-nav ul { flex-direction: column; /* Ensure vertical stacking on mobile */ }
    .main-nav li { margin-left: 0; margin-bottom: 15px; }
    .main-nav a { padding: 10px 0; }
    .dropdown-menu {
        display: none; /* Hide by default on mobile */
        position: static;
        box-shadow: none;
        background: none;
        padding-left: 15px;
        margin-top: 5px;
    }
    .dropdown-menu a { padding: 5px 0; font-weight: normal; }
    /* .dropdown:hover .dropdown-menu { display: block; } /* Remove hover effect for mobile */ */
    .dropdown .dropdown-arrow { display: none; } /* Hide arrow on mobile */

    .nav-toggle-btn { display: block; z-index: 1001; /* Below menu, above overlay */ }
    .nav-close-btn { display: block; position: absolute; top: 20px; right: 20px; }

    /* Body overlay when nav is open */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .calculator-form, .inquiry-form { padding: 20px; }
    .form-actions { flex-direction: column; }
    .form-actions button { width: 100%; }
}