/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* --- CSS Variables for Easy Theming --- */
:root {
    --primary-color: #3498db;
    --primary-color-dark: #2980b9;
    --secondary-color: #2c3e50;
    --background-color: #f4f7f9;
    --text-color: #333;
    --heading-color: #2c3e50;
    --white-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
}

/* --- General & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--white-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: none;
    /* Hidden by default on mobile */
    flex-direction: column;
    position: absolute;
    top: 65px;
    /* Height of header */
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: var(--shadow);
}

.nav-links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.nav-links li:last-child {
    border-bottom: none;
}

.nav-links a {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

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

/* --- Hamburger Menu --- */
.menu-toggle {
    display: block;
    /* Show on mobile */
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    position: relative;
    transition: transform 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

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

.hamburger::after {
    bottom: -8px;
}

/* --- Nav Toggle Logic --- */
#nav-toggle-checkbox {
    display: none;
}

#nav-toggle-checkbox:checked~.nav-links {
    display: flex;
}

#nav-toggle-checkbox:checked+.menu-toggle .hamburger {
    transform: rotate(45deg);
}

#nav-toggle-checkbox:checked+.menu-toggle .hamburger::before {
    top: 0;
    transform: rotate(90deg);
}

#nav-toggle-checkbox:checked+.menu-toggle .hamburger::after {
    bottom: 0;
    transform: rotate(90deg);
    opacity: 0;
}

/* --- Main Content & Sections --- */
main {
    padding: 40px 0;
}

.content-section {
    background-color: var(--white-color);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-section h2 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-section p,
.content-section li {
    margin-bottom: 15px;
    color: #555;
}

.content-section ol {
    padding-left: 20px;
}

.content-section img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Special Elements --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

pre {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 15px;
}

code {
    font-family: monospace;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.site-footer p {
    opacity: 0.8;
}

/* --- Responsive Design (Media Queries) --- */

/* Tablet and larger */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
        /* Hide hamburger on larger screens */
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background-color: transparent;
        box-shadow: none;
    }

    .nav-links li {
        border-bottom: none;
        margin-left: 10px;
    }

    .nav-links a {
        padding: 10px 15px;
        border-radius: var(--border-radius);
    }

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

    .nav-links a.active {
        background-color: var(--primary-color);
        color: var(--white-color);
    }
}