:root {
    --primary-color: #e67e22; /* A vibrant orange */
    --secondary-color: #ffffff; /* White for accents */
    --background-color: #000000; /* Pure black background */
    --text-color: #f4f4f4; /* Off-white for readability */
    --card-background: #1c1c1c; /* Dark grey for cards/sections */
    --font-family: 'Montserrat', sans-serif;
    --noise-texture: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100" stroke="rgba(255,255,255,0.02)" stroke-width="1"/><path d="M100,0 L0,100" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></svg>');
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    background-image: radial-gradient(circle at center, #1c1c1c, #000000), var(--noise-texture);
    color: var(--text-color);
    line-height: 1.6;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    width: 100%;
    max-width: 960px;
    padding: 5rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    box-sizing: border-box;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section:nth-of-type(odd) {
    background-color: var(--card-background);
}

#mission {
    background-image: url('data:image/svg+xml,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" fill="%231c1c1c"/><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%232c2c2c" stroke-width="1"/></svg>');
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Deeper shadow for lifted look */
    padding: 2.5rem 2rem;
}

#agenda .timeline-container {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
}

#agenda .timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
    transition: left 0.3s ease-out, transform 0.3s ease-out;
}

#agenda .timeline-item {
    position: relative;
    width: 50%;
    padding: 0.5rem 0;
    box-sizing: border-box;
    transition: all 0.3s ease-out;
}

#agenda .timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2rem;
    text-align: right;
}

#agenda .timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2rem;
    text-align: left;
}

#agenda .timeline-item::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--card-background);
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-color);
    transition: left 0.3s ease-out, right 0.3s ease-out;
}

#agenda .timeline-item:nth-child(odd)::after {
    right: -8px;
}

#agenda .timeline-item:nth-child(even)::after {
    left: -8px;
}

#agenda .timeline-item event-card {
    display: block;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

#hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/fitch1.jpeg');
    background-size: cover;
    background-position: top;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

#hero h1 {
    color: white;
    font-size: 4rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 2rem;
    transition: font-size 0.3s ease-out;
}

.cta-button {
    background-color: var(--primary-color);
    color: #000;
    padding: 1rem 3rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.cta-button:hover {
    transform: translateY(-5px);
    background-color: #d35400;
    box-shadow: 0 10px 30px rgba(230, 126, 34, 0.6);
}

#story p {
    max-width: 60ch;
    margin: 0 auto;
    font-size: 1.1rem;
}

.mission-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    transition: grid-template-columns 0.3s ease-out;
}

.mission-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mission-item h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

#gallery .gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

#gallery .gallery-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

#gallery .gallery-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #111;
}

.election-info {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.social-links a {
    color: white;
    font-size: 2rem;
    margin: 0 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
}

#back-to-top:hover {
    background-color: #d35400;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    section {
        padding: 3rem 1rem;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .mission-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #gallery .gallery-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #agenda .timeline-container::before {
        left: 20px;
        transform: translateX(0);
    }

    #agenda .timeline-item,
    #agenda .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 4rem;
        padding-right: 0;
        text-align: left;
    }

    #agenda .timeline-item:nth-child(odd) {
        padding-right: 0;
        text-align: left;
    }

    #agenda .timeline-item::after,
    #agenda .timeline-item:nth-child(odd)::after, 
    #agenda .timeline-item:nth-child(even)::after {
        left: 12px;
        right: auto;
    }
}
