/* documentation/style.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #6CBE21; /* Vibrant green from your logo */
    --primary-green-dark: #5A9E1E; /* Darker green for hover/active */
    --light-bg: #F9FAFB; /* Very light gray background */
    --surface-color: #FFFFFF; /* White for cards/surfaces */
    --dark-text: #1F2937; /* Dark gray for main text */
    --muted-text: #6B7280; /* Muted gray for secondary text */
    --border-color: #E5E7EB; /* Light gray for borders */
    --shadow-color: rgba(0, 0, 0, 0.08); /* Subtle shadow */
    --glow-color: rgba(108, 190, 33, 0.2); /* Green glow for focus/hover */
    --error-color: #EF4444; /* Strong red for errors */
    --success-color: #16A34A; /* Darker green for success messages */
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    margin: 0;
    padding-top: 60px; /* Space for fixed navbar */
    padding-bottom: 50px; /* Space for fixed footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Container */
.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;
    flex-grow: 1;
}

/* Sidebar */
.sidebar {
    width: 260px;
    position: fixed;
    left: 0;
    top: 60px; /* Height of the navbar */
    height: calc(100vh - 60px);
    background-color: var(--light-bg);
    border-right: 1px solid var(--border-color);
    z-index: 999; /* Correct layering */
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.main-content {
    margin-left: 260px; /* Space for the fixed sidebar */
    padding: 2rem 3rem;
    max-width: 900px;
}

.sidebar-nav a {
    display: block;
    color: var(--muted-text);
    text-decoration: none;
    padding: 0.4rem 1rem; /* Reduced padding */
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
    border-radius: 4px;
    font-size: 0.85rem; /* Reduced font size */
}

.sidebar-nav a:hover {
    color: var(--dark-text);
    background-color: #f0f0f0;
}

.sidebar-nav a.active {
    color: var(--primary-green);
    font-weight: 600;
    border-left: 3px solid var(--primary-green);
    background-color: white;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-text);
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1:first-child {
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

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

pre {
    background-color: #2d2d2d;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: 0.7rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border-color);
}

.navbar .logo {
    height: 36px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    color: var(--muted-text);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-buttons .button,
.hero-buttons .button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.75rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 180px;
    box-sizing: border-box;
}

.hero-buttons .button {
    background-color: var(--primary-green);
    color: var(--surface-color);
    border: none;
}

.hero-buttons .button:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
}

.hero-buttons .button-outline {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.hero-buttons .button-outline:hover {
    background-color: var(--primary-green);
    color: var(--surface-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.hero-buttons .button-outline i {
    margin-right: 0.5rem;
}

/* Sections & Cards */
.content-section { padding: 40px 0; }
.section-title { text-align: center; color: var(--dark-text); font-size: 2.25rem; margin-bottom: 2.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.card { background: var(--surface-color); padding: 22px; border-radius: 8px; text-decoration: none; border: 1px solid var(--border-color); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; color: var(--dark-text); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); border-color: var(--primary-green); box-shadow: 0 10px 20px var(--shadow-color); }
.card .icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary-green); }
.card h3 { color: var(--dark-text); margin-top: 0; }
.card p { font-size: 0.9rem; color: var(--muted-text); flex-grow: 1; }
.card .button { width: auto; align-self: flex-start; margin-top: 1rem; }

/* Footer */
.footer { text-align: center; padding: 2rem 0; margin-top: 4rem; color: var(--muted-text); font-size: 0.85rem; border-top: 1px solid var(--border-color); }
.footer a { color: var(--primary-green); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--primary-green-dark); }

/* Pagination */
.pagination { display: flex; justify-content: space-between; margin-top: 3rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.pagination a { text-decoration: none; color: var(--primary-green); font-weight: 500; padding: 0.7rem 1.4rem; border: 1px solid var(--border-color); border-radius: 8px; transition: all 0.2s ease; }
.pagination a:hover { background-color: var(--primary-green-dark); color: var(--surface-color); border-color: var(--primary-green-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }

/* Donate Button */
#donate .button { display: inline-flex; align-items: center; justify-content: center; background-color: #0070BA; color: white; border: none; padding: 0.8rem 1.75rem; border-radius: 6px; font-size: 1rem; font-weight: 600; text-decoration: none; transition: background-color 0.2s ease, transform 0.1s ease; margin-top: 1rem; }
#donate .button:hover { background-color: #005EA6; transform: translateY(-2px); }

/* Hamburger Menu Button */
.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 0; margin: 0; z-index: 1002; }
.menu-btn .icon { font-size: 24px; color: var(--dark-text); }
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; }
.overlay.active { display: block; }

/* Responsive Design */
@media (max-width: 768px) {
    body { padding-top: 55px; }
    .container { padding: 24px; }
    .navbar { padding: 0.5rem 1.5rem; justify-content: space-between; }
    .sidebar { position: fixed; top: 0; left: 0; height: 100%; transform: translateX(-100%); transition: transform 0.3s ease-in-out; z-index: 1001; padding-top: 60px; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .menu-btn { display: block; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 0.8rem; }
    .hero-buttons .button, .hero-buttons .button-outline { width: 80%; max-width: 320px; min-width: unset; padding: 0.8rem 1rem; font-size: 0.95rem; }
    h1, .hero-content h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    body { padding-top: 50px; }
    .container { padding: 16px; }
    .navbar .logo { height: 30px; }
    .hero-content h1 { font-size: 1.9rem; }
    .hero-content .subtitle { font-size: 0.95rem; }
    .section-title { font-size: 1.8rem; }
    .card-grid { grid-template-columns: 1fr; }
    .hero-buttons .button, .hero-buttons .button-outline { width: 90%; padding: 0.75rem 1rem; font-size: 0.9rem; }
    .main-content { padding: 1rem; }
}

/* Landing Page Specific Styles */
.landing-page .menu-btn { display: none !important; }
.landing-page .navbar { justify-content: flex-start; }
