/* --- CSS Variables and Global Styles --- */
:root {
    --primary-dark: #1a1a1a;
    --primary-medium: #333333;
    --accent-primary: #ffa611;
    --accent-secondary: #ffcc2f;
    --dark-text: #343a40;
    --light-text: #ffffff;
    --background-light: #F8F9FA;
    --background-white: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--dark-text);
    background-color: var(--background-light);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 40px; }
p { margin-bottom: 1rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
}

.btn-secondary {
    background-color: var(--background-white);
    color: var(--primary-medium);
    border: 2px solid var(--primary-medium);
}
.btn-secondary:hover {
    background-color: var(--primary-medium);
    color: var(--light-text);
}

/* --- Header & Logo --- */
.header {
    background-color: var(--background-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    text-decoration: none;
    display: inline-block;
}

.logo img {
    height: 35px; /* Adjust height as needed */
    display: block; /* Removes extra space below the image */
}

/* --- Hero Section --- */
.hero {
    padding: 60px 0;
    background-color: var(--background-white);
    text-align: center;
}

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-image img {
    max-width: 100%;
    width: 320px;
    filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.1));
}

/* --- Features Section --- */
.features {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.feature-item {
    background: var(--background-white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
}

/* --- Form Section --- */
.form-section {
    background: var(--primary-dark);
    color: var(--light-text);
    padding: 60px 0;
}

.vote-form {
    background: var(--background-white);
    color: var(--dark-text);
    padding: 40px;
    border-radius: 8px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.vote-form h2 {
    text-align: center;
    margin-bottom: 1rem;
}
.vote-form > div > p {
    text-align: center;
    margin-bottom: 2rem;
}

.vote-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.vote-options label {
    cursor: pointer;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vote-options input[type="radio"] {
    display: none;
}

.vote-options input[type="radio"]:checked + label {
    background-color: var(--accent-primary);
    color: var(--primary-dark);
    border-color: var(--accent-primary);
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    min-height: 1.2em; /* Prevents layout shift */
    margin-top: 5px;
}

#vote-error {
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 0;
}

#optional-fields {
    display: none; /* Hidden by default, shown with JS */
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.optional-fields-title {
    text-align: center;
    font-weight: 600;
    color: var(--primary-medium);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group label small {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.85rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
}

.form-group select[multiple] {
    padding: 8px; /* Adjust padding for multi-select */
    height: auto; /* Allow the size attribute to define height */
    background-color: var(--background-white); /* Ensure background is white on all systems */
}

.form-section button[type="submit"] {
    width: 100%;
    margin-top: 2rem;
    font-size: 1.1rem;
}

.thank-you-message {
    text-align: center;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-dark);
    color: #ccc;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

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

/* Tablets and up */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .hero-layout {
        flex-direction: row;
        text-align: left;
        gap: 60px;
    }

    .hero-text {
        flex: 1;
    }
    
    .hero-image {
        flex: 1;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}