:root {
    --primary-green: #2E7D32; /* Biofuel/Nature */
    --primary-green-hover: #1B5E20; /* For button hovers */
    --accent-orange: #EF6C00; /* Energy/Transformation */
    
    /* Dynamic Theme Mapped Variables (Light Defaults) */
    --body-bg: #F5F5F5;
    --section-white-bg: #FFFFFF;
    --section-diagram-bg: #fdfdfd;
    --text-primary: #37474F;
    --text-secondary: #455A64;
    --text-muted: #546E7A;
    --card-bg: #f4f7f6;
    --card-border: #ddd;
    --white: #FFFFFF;
    --cookie-bg: #ffffff;
    
    --industrial-dark: #263238; /* Used in Footer and Contact Cards */
    --transition: all 0.3s ease;
}

/* ==========================================================================
   DARK THEME VARIABLE OVERRIDES
   ========================================================================== */
body.dark-theme {
    --body-bg: #121A1D; /* Rich dark primary background */
    --section-white-bg: #1A2428; /* Layered container surface dark background */
    --section-diagram-bg: #151F22;
    --text-primary: #ECEFF1; /* High contrast text */
    --text-secondary: #CFD8DC;
    --text-muted: #90A4AE;
    --card-bg: #1E2B30; /* Tinted deep green card surfaces */
    --card-border: #2D3E45;
    --cookie-bg: #1A2428;
}

/* Enable smooth gliding for all #anchor links */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden; 
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Tells the main content area to stretch and fill all empty space */
main {
    flex-grow: 1; 
}

/* Global Container */
.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: auto; 
}

/* Clean up default links globally */
a {
    text-decoration: none;
    transition: var(--transition);
}

/* Global Button Styling */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover { 
    background: var(--primary-green-hover); 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.2);
}

@keyframes smoothLoad {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =========================================
   CUSTOM GREEN SCROLLBAR
   ========================================= */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) var(--body-bg);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--body-bg); 
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-green); 
    border-radius: 10px;
    border: 3px solid var(--body-bg);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-green-hover); 
}

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--cookie-bg);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: bottom 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease;
    border-top: 4px solid #2E7D32;
    gap: 20px;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-text {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.cookie-text a {
    color: #2E7D32;
    font-weight: 600;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.cookie-btn.accept {
    background: #2E7D32;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.cookie-btn.accept:hover {
    background: #1B5E20;
    transform: translateY(-2px);
}

.cookie-btn.decline {
    background: var(--body-bg);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
}

.cookie-btn.decline:hover {
    background: #e9ecef;
    color: #37474F;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        width: 100%;
    }
}
