:root {
    --bg-color: #1a1a1a; /* Dark background */
    --text-color: #e0e0e0; /* Light text */
    --primary-color: #4CAF50; /* Accent color (Green) */
    --secondary-bg-color: #2c2c2c; /* Slightly lighter background for elements */
    --border-color: #444;
    --header-bg-color: #000;
    --header-text-color: #fff;
    --link-color: var(--primary-color);
    --link-hover-color: #0097a7;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --image-bg-color: var(--secondary-bg-color);
    --image-border-color: #555;
    --faq-border-color: var(--primary-color);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

header {
    background: var(--header-bg-color);
    color: var(--header-text-color);
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
}

header h1 {
    margin: 0;
    font-size: 2.8rem;
    font-weight: 300;
}

.header-content-wrapper {
    display: flex;
    align-items: center; /* Vertically align items in the center */
    justify-content: center; /* Center the group if space allows, or adjust as needed */
    gap: 20px; /* Adds space between the image and the text */
    margin-top: 1rem;
}

header figure {
    margin: 0; /* Reset margin if wrapped */
    flex-shrink: 0; /* Prevent image from shrinking too much */
}

header figure img {
    max-height: 400px; /* Adjust this value as needed */
    width: auto;
    max-width: 100%; /* Ensure it doesn't overflow its container */
}

header .subtitle {
    font-size: 1.2rem;
    margin-top: 0; /* Reset margin if wrapped and aligned by flex */
    color: #bbb; /* Slightly dimmer than main text for subtitle */
    max-width: 400px; /* Optional: constrain width of subtitle */
    text-align: left; /* Align subtitle text to the left */
}

main {
    padding: 20px;
    max-width: 900px;
    margin: 30px auto;
    background: var(--secondary-bg-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-radius: 8px;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.6rem;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    font-size: 2rem;
    font-weight: 400;
}

h3 {
    color: #ccc; /* Lighter than main text but distinct */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 400;
}

ul {
    list-style-type: disc;
    margin-left: 25px;
    padding-left: 0;
}

li {
    margin-bottom: 0.5rem;
}

figure {
    margin: 1.5rem auto;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--image-border-color);
    padding: 5px;
    background: var(--image-bg-color);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

figcaption {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 0.75rem;
    font-style: italic;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--header-bg-color);
    color: var(--header-text-color);
    margin-top: 3rem;
    border-top: 3px solid var(--primary-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Specific section styling if needed */
#faq article {
    margin-bottom: 1.8rem;
    padding-left: 1.2rem;
    border-left: 4px solid var(--faq-border-color);
    background-color: rgba(0,0,0,0.1); /* Slight background tint for FAQ articles */
    padding: 1rem;
    border-radius: 4px;
}

#faq h3 {
    font-style: normal; /* Overriding previous italic for a cleaner look */
    color: var(--primary-color);
    margin-top: 0; /* Remove extra top margin if inside a padded article */
}

/* Light theme variables - will be toggled by JS */
.light-theme {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --primary-color: #2e7d32; /* Darker Green for light theme contrast */
    --secondary-bg-color: #fff;
    --border-color: #ddd;
    --header-bg-color: #333;
    --header-text-color: #fff;
    --link-color: var(--primary-color);
    --link-hover-color: #0056b3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --image-bg-color: #fff;
    --image-border-color: #ccc;
    --faq-border-color: var(--primary-color);
}

/* Theme toggle button styling - will be added to HTML later */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: var(--header-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    z-index: 1000;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: var(--link-hover-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem; /* Smaller H1 for mobile */
    }

    .header-content-wrapper {
        flex-direction: column; /* Stack image and subtitle vertically */
        align-items: center; /* Center items when stacked */
    }

    header figure img {
        max-height: 300px; /* Adjust image height for mobile */
    }

    header .subtitle {
        text-align: center; /* Center subtitle text on mobile */
        max-width: 90%; /* Allow subtitle to use more width on mobile */
        margin-top: 1rem; /* Add some space above the subtitle when stacked */
    }

    main {
        margin: 20px 10px; /* Reduce side margins for main content */
        padding: 15px;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.3rem;
    }
} 