@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette (Earthy/Rustic - NO BLUE) */
    --clr-primary: #D36C44; /* Terracotta/Rust */
    --clr-primary-hover: #b85b37;
    --clr-secondary: #5C7A5A; /* Sage/Forest Green */
    --clr-secondary-hover: #4a6348;
    --clr-accent: #E1C190; /* Sand/Wheat */
    --clr-bg: #FAF6F0; /* Warm Off-white */
    --clr-text: #2C2A29; /* Warm Charcoal */
    --clr-text-light: #5c5855;
    --clr-surface: #FFFFFF;
    --clr-border: #E0D6C8;
    
    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing & Layout */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 30px rgba(44, 42, 41, 0.05);
    --shadow-hover: 0 15px 40px rgba(44, 42, 41, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-text);
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--clr-text-light);
}

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

a:hover {
    color: var(--clr-primary-hover);
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: var(--clr-surface);
}

.btn-primary:hover {
    background-color: var(--clr-primary-hover);
    color: var(--clr-surface);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(211, 108, 68, 0.3);
}

.btn-secondary {
    background-color: var(--clr-secondary);
    color: var(--clr-surface);
}

.btn-secondary:hover {
    background-color: var(--clr-secondary-hover);
    color: var(--clr-surface);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(92, 122, 90, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--clr-text);
    border: 2px solid var(--clr-border);
}

.btn-outline:hover {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

/* --- HEADER (Slim & Unstuck) --- */
.site-header {
    background-color: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0; /* Slim padding */
    position: relative; /* Unstuck */
    z-index: 100;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--clr-secondary);
}

.brand-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--clr-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--clr-text);
    position: relative;
    transition: var(--transition);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--clr-text);
    left: 0;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--clr-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--clr-primary);
}

/* --- HERO SECTION --- */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--clr-bg) 0%, var(--clr-surface) 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background-color: var(--clr-accent);
    border-radius: 50%;
    opacity: 0.2;
    z-index: 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--clr-secondary);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    height: 500px;
    width: 100%;
}

.hero-image::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--clr-primary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

/* --- SECTION ARCHITECTURE --- */
.section {
    padding: 80px 0;
}

.section-bg-alt {
    background-color: var(--clr-surface);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--clr-secondary);
}

.section-header p {
    font-size: 1.1rem;
}

/* --- CARDS ARCHITECTURE --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--clr-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--clr-border);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--clr-accent);
}

.card-img-wrap {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--clr-secondary);
    color: var(--clr-surface);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card-title a {
    color: var(--clr-text);
}

.card-title a:hover {
    color: var(--clr-primary);
}

.card-excerpt {
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--clr-border);
    padding-top: 15px;
    margin-top: auto;
}

/* --- DETAIL PAGE (Articles/Tools) --- */
.detail-hero {
    background-color: var(--clr-surface);
    padding: 60px 0 0 0;
    border-bottom: 1px solid var(--clr-border);
}

.detail-header {
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.detail-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--clr-secondary);
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--clr-text-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.detail-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-content-wrap {
    background-color: var(--clr-bg);
    padding: 60px 0;
}

.detail-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--clr-surface);
    padding: 40px 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.detail-content h2 {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--clr-primary);
}

.detail-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.detail-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.detail-content ul, .detail-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
    font-size: 1.1rem;
    color: var(--clr-text-light);
}

.detail-content li {
    margin-bottom: 10px;
}

.feature-box {
    background-color: var(--clr-bg);
    border-left: 4px solid var(--clr-secondary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.external-ref-btn {
    display: inline-block;
    margin-top: 20px;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--clr-text);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--clr-bg);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-secondary);
    box-shadow: 0 0 0 3px rgba(92, 122, 90, 0.1);
}

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

.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--clr-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.contact-info h3 {
    color: var(--clr-primary);
    margin-bottom: 20px;
}

.contact-detail {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-detail strong {
    color: var(--clr-text);
    display: block;
}

/* --- FOOTER (Mandatory on all pages) --- */
.site-footer {
    background-color: #1A1A1A; /* Dark Earthy base */
    color: #e0e0e0;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    color: var(--clr-accent);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-brand p {
    color: #a0a0a0;
    font-size: 0.95rem;
}

.footer-title {
    color: var(--clr-surface);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--clr-primary);
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a0a0a0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--clr-accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--clr-surface);
    border-top: 2px solid var(--clr-primary);
    padding: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none; /* Hidden by default, toggled via JS */
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--clr-text);
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.8rem; }
    .hero-image img { height: 400px; }
    .contact-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--clr-surface);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        border-top: 1px solid var(--clr-border);
    }
    
    .main-nav.active {
        max-height: 400px;
        padding: 20px;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .nav-btn {
        text-align: center;
        width: 100%;
    }
    
    .nav-toggle.active .hamburger { background-color: transparent; }
    .nav-toggle.active .hamburger::before { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.active .hamburger::after { transform: translateY(-8px) rotate(-45deg); }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero::after { display: none; }
    
    .hero-image::before {
        bottom: -10px;
        left: -10px;
    }
    
    .detail-hero-img { height: 300px; }
    .detail-content { padding: 30px 20px; }
    .detail-header h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-content h1 { font-size: 2.2rem; }
    .section { padding: 50px 0; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 15px; }
}