/* Base Variables */
:root {
    --bg-dark: #1c1c1c;
    --text-light: #f0f0f0;
    --bg-light: #ffffff;
    --text-dark: #333333;
    --header-green: #66b266;
    --secondary-color: #555555;
    --button-bg: #66b266; /* Matches header green */
    --button-hover: #558a55;
    --chevron-color: #82b3ff;

    --form-bg-dark: rgba(40, 40, 40, 0.9); /* Form background for dark mode */
    --form-bg-light: rgba(240, 240, 240, 0.9); /* Form background for light mode */
    --form-text-dark: #333333; /* Text color for light mode */
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

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

/* Header and Footer */
header, footer {
    text-align: center;
    padding: 1em 0;
}

h1, h2 {
    color: var(--header-green);
}

/* Toggle */
.toggle {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
}

.toggle input {
    display: none;
}

.toggle .slider {
    width: 40px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
}

.toggle .slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--text-light);
    border-radius: 50%;
    top: 1px;
    left: 1px;
    transition: left 0.3s;
}

input:checked + .slider:before {
    left: 21px;
}

.mode-text {
    color: var(--text-light);
}

body.light-mode .mode-text {
    color: var(--text-dark);
}

/* Forms and Content Section (Shared Styling) */
.form, .content-section {
    background-color: var(--form-bg-dark);
    color: var(--text-light);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode .form,
body.light-mode .content-section {
    background-color: var(--form-bg-light);
    color: var(--form-text-dark);
}

/* Form Labels */
.form label {
    display: block;
    font-size: 1em;
    font-weight: bold;
}

/* Input Fields */
input[type="text"],
input[type="email"],
textarea {
    width: calc(96% - 1em); /* Adjust width for name/email alignment */
    padding: 0.75em;
    margin: 0 0.5em 1em 0; /* Even spacing */
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode textarea {
    background-color: #ffffff;
    color: var(--form-text-dark);
    border-color: #ccc;
}

/* Textarea Styling */
textarea {
    width: calc(100% - 2em);
    height: 150px;
    resize: none;
    margin: 0 auto 1em;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin-bottom: 1.5em;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2); /* Make checkbox more prominent */
}

/* Buttons */
.styled-button {
    width: 100%;
    padding: 0.75em 1.5em;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: var(--button-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.styled-button:hover {
    background-color: var(--button-hover);
}

/* Expandable Sections */
.expandable {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em 0;
    font-size: 1.5em;
    color: var(--header-green);
    transition: background-color 0.3s;
}

.expandable:hover {
    background-color: rgba(102, 178, 102, 0.2);
}

.chevron {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.collapsible {
    display: none;
    margin-top: 1em;
}

/* Detailed Explanation Section */
.content-section h2 {
    font-size: 1.8em;
    color: #66b266;
    margin-bottom: 1em;
    border-bottom: 2px solid #66b266;
    padding-bottom: 0.5em;
}

.content-section h3 {
    font-size: 1.5em;
    color: #66b266; /* Differentiates subheadings */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.content-section p {
    margin-bottom: 1.5em;
    font-size: 1em;
    text-align: justify;
}

.content-section ul {
    list-style-type: disc;
    margin-left: 1.5em;
}

.content-section ul li {
    margin-bottom: 0.8em;
    font-size: 1em;
}

.content-section a {
    color: #66b266;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-section a:hover {
    color: #66b266;
}
