:root {
    /* --- BRAND COLORS --- */
    --primary: #4a7c59;          /* Fresh Green */
    --primary-hover: #3a6346;    /* Darker Green */
    --accent: #d4e09b;           /* Highlight */
    
    /* --- LIGHT THEME (Default) --- */
    --bg-body: #ffffff;
    --bg-light: #f4f7f5;        
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);
    
    /* Footer Color for Light Mode (Deep Green) */
    --bg-footer: #3a6346;       
    
    --text-main: #2f3e46;       
    --text-muted: #666666;
    --border-color: #eeeeee;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Typography & Layout */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* --- DARK THEME OVERRIDES --- */
[data-theme="dark"] {
    --primary: #63a375;         
    --primary-hover: #84bd93;   
    
    --bg-body: #1a2320;         /* Deep Earthy Charcoal */
    --bg-light: #232d2a;        
    --bg-card: #2c3633;         
    --bg-nav: rgba(26, 35, 32, 0.95);
    
    /* Footer Color for Dark Mode (Deepest Soil) */
    --bg-footer: #111614;       
    
    --text-main: #eaefe9;       
    --text-muted: #aeb5bc;      
    --border-color: #3a4542;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
    font-family: var(--font-main); 
    color: var(--text-main); 
    line-height: 1.6; 
    background-color: var(--bg-body); 
    transition: background-color 0.3s ease, color 0.3s ease; 
}
a { text-decoration: none; color: inherit; }
img { height: auto; font-size: 0; display: block; max-width: 100%; }

/* --- Utilities --- */
.container { width: 90%; max-width: var(--container-width); margin: 0 auto; }
.section-padding { padding: 4rem 0; }
.bg-light { background-color: var(--bg-light); transition: background-color 0.3s ease; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }

/* Custom Link Style */
.custom-link {
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
    padding: 0 4px;
    margin: 0 -4px;
    border-radius: 4px;
}
.custom-link:hover {
    background-color: rgba(74, 124, 89, 0.15);
    color: var(--primary-hover);
}

/* --- Navigation --- */
.navbar { 
    position: sticky; 
    top: 0; 
    background: var(--bg-nav); 
    backdrop-filter: blur(10px); 
    z-index: 1000; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    padding: 0.5rem 0;
    transition: background-color 0.3s ease;
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }

/* Logo Sizing */
.logo { display: flex; align-items: center; text-decoration: none; }

.nav-logo-img { 
    height: 50px; 
    width: auto; 
    max-width: 150px; 
    object-fit: contain; 
    display: block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.logo:hover .nav-logo-img { transform: scale(1.1) rotate(-5deg); }

.nav-links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }

/* SHARED SLINKY ANIMATION (Nav & Footer) */
.nav-links a,
.footer-links a { 
    font-weight: 600; 
    transition: var(--transition);
    position: relative;
}
.nav-links a { font-size: 0.9rem; color: var(--text-main); }

.nav-links a::after,
.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transition: all 0.3s ease-out;
    transform: translateX(-50%);
}

/* Specific Colors for Slinky */
.nav-links a::after { background-color: var(--primary); }
.footer-links a::after { background-color: #ffffff; }

/* Exclude the image logo from slinky underline */
.footer-links a:has(img)::after { display: none; }

.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after,
.footer-links a:hover::after { width: 100%; }
.footer-links a:hover { opacity: 1; }

/* THEME TOGGLE BUTTON */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}
.theme-toggle:hover { color: var(--primary); transform: rotate(15deg); }
.theme-toggle svg { width: 22px; height: 22px; fill: currentColor; }

/* --- Hero --- */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff; 
    background-color: #2f3e46;
    background-image: linear-gradient(135deg, rgba(47, 62, 70, 0.8), rgba(74, 124, 89, 0.6)), url('/assets/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-content { position: relative; z-index: 2; max-width: 800px; }

/* Floating Logo Animation */
.hero-logo { 
    width: 120px; 
    margin: 0 auto 1rem; 
    border-radius: 50%; 
    border: 3px solid #ffffff;
    animation: floatLogo 6s ease-in-out infinite; 
}
@keyframes floatLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); } 
    100% { transform: translateY(0px); }
}

.hero-section h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero-section .tagline { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }

/* "Black Gold" Hover Glow Effect */
.highlight { 
    color: var(--accent);
    animation: goldPulse 3s ease-in-out infinite;
}
@keyframes goldPulse {
    0%, 100% { color: var(--accent); text-shadow: 0 0 5px rgba(212, 224, 155, 0.1); }
    50% { color: #e0ecaa; text-shadow: 0 0 20px rgba(212, 224, 155, 0.8), 0 0 40px rgba(212, 224, 155, 0.4); }
}

/* --- Section Headers (Centered) --- */
.centered-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.centered-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}
.centered-header .section-title::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--primary); margin: 0.5rem auto 0; border-radius: 2px;
}
.centered-header p { font-size: 1.1rem; color: var(--text-muted); }

/* --- About Section --- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: start; }
.about-image-wrapper { position: static !important; top: auto !important; display: block; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; object-fit: cover; aspect-ratio: 1/1; }

.highlight-text { font-size: 1.5rem; color: var(--text-main); font-weight: 600; margin-bottom: 2rem; line-height: 1.3; }
.story-block { margin-bottom: 2rem; }
.story-block h4 { 
    color: var(--primary); font-size: 1.1rem; font-weight: 800; 
    margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; 
}
.about-content p { color: var(--text-muted); }

/* Stats */
.stats-row { 
    display: flex; gap: 3rem; margin-top: 2rem; 
    border-top: 1px solid var(--border-color); 
    padding-top: 2rem; justify-content: center; 
}
.stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

/* Wave Animation */
.wave { display: inline-block; animation: wave-animation 2.5s infinite; transform-origin: 70% 70%; }
@keyframes wave-animation {
    0% { transform: rotate( 0.0deg) } 10% { transform: rotate(14.0deg) } 20% { transform: rotate(-8.0deg) } 30% { transform: rotate(14.0deg) } 40% { transform: rotate(-4.0deg) } 50% { transform: rotate(10.0deg) } 60% { transform: rotate( 0.0deg) } 100% { transform: rotate( 0.0deg) }
}

/* --- Buttons --- */
.btn { 
    display: inline-block; padding: 0.8rem 1.5rem; border-radius: 50px; 
    font-weight: 600; transition: var(--transition); position: relative; overflow: hidden; 
}
.btn::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transition: 0.5s;
}
.btn:hover::after { left: 100%; }

.btn-primary { background: var(--primary); color: #ffffff; border: 2px solid var(--primary); margin-right: 10px; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: #ffffff; border: 2px solid #ffffff; }
.btn-secondary:hover { background: #ffffff; color: #2f3e46; transform: translateY(-2px); }

/* --- SHARED CARD STYLES --- */
.card, .blog-card {
    background: var(--bg-card);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.card:hover, .blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card { 
    padding: 2rem; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    text-align: center; 
}
.card:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }

/* Social Cards */
.icon-wrapper { font-size: 2.5rem; margin-bottom: 1rem; }
.social-card h3 { margin-bottom: 0.5rem; color: var(--primary); }
.icon-wrapper svg { width: 40px; height: 40px; fill: var(--primary); transition: var(--transition); }
.card:hover .icon-wrapper svg { fill: var(--primary-hover); transform: scale(1.1); } 

/* Blog Cards */
.blog-card { 
    overflow: hidden; 
    text-align: left; 
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    border-radius: var(--radius); /* Ensures corners match normal cards */
}

.blog-img { 
    width: 100%; 
    height: 200px; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    background-color: #ddd; 
}

.blog-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.blog-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-main); }
.blog-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; flex-grow: 1; }
.read-more { font-weight: 600; color: var(--primary); font-size: 0.9rem; transition: transform 0.2s ease;}
.blog-card:hover .read-more { transform: translateX(5px); }

/* --- Post Template Styles --- */
.mini-hero { height: 40vh; min-height: 300px; }
.mini-hero h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.blog-container { max-width: 800px; margin: 0 auto; }
.meta-text { color: var(--text-muted); font-style: italic; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.article-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); }
.article-content p { margin-bottom: 1.5rem; }
.article-content h3 { color: var(--primary); margin-top: 2rem; margin-bottom: 1rem; font-size: 1.5rem; }

/* --- Footer --- */
.footer { 
    background: var(--bg-footer);
    color: #ffffff; 
    padding: 3rem 0 1rem; 
    margin-top: auto; 
    transition: background-color 0.3s ease;
}
.footer-flex { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }

/* v1.2 Updated: Strict vertical centering */
.footer-links { 
    display: flex; 
    gap: 2rem; 
    align-items: center;
}

/* Ensure text links don't have extra vertical space throwing off alignment */
.footer-links a:not(:has(img)) {
    display: inline-block;
    line-height: 1;
    padding-top: 4px;
}

/* v1.2 Updated: Glow Effect for Logo */
.footer-business-logo {
    height: 55px; 
    width: auto;
    display: block;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.footer-business-logo:hover {
    transform: none; 
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.footer-brand h4 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; }
.footer-brand p { font-size: 0.9rem; opacity: 0.9; font-weight: 400; }

/* v1.6 NEW: Copyright Bar Styling */
.copyright { 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; /* Keeps it safe for very small screens */
    margin-top: 3rem; 
    font-size: 0.8rem; 
    opacity: 0.8; /* Slight fade for bottom bar */
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 1rem; 
}

/* v1.6 NEW: Footer Flag Container */
.footer-flags {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* v1.9 FIX: Fixed Height for Flags */
.flag-icon {
    width: auto;     /* Let width maintain aspect ratio */
    height: 20px;    /* Fixed height ensures matching alignment */
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.flag-icon:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* --- Animations --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; will-change: opacity, transform; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Media Queries --- */
@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .about-grid { grid-template-columns: 1fr 1fr; }
    .about-image-wrapper { position: sticky !important; top: 100px !important; }
    .hero-section h1 { font-size: 4rem; }
    .footer-flex { flex-direction: row; justify-content: space-between; text-align: left; }
    .section-subtitle { font-size: 1.1rem; margin-bottom: 2rem; color: var(--text-muted); }
}