:root {
    --pureWhite: rgba(255, 255, 255, 0.98);
    --gopRed: #e9141d;
    --lightBackground: #ffece9;
    --shadeVariation: #130000;
    --shadeVariatio2: #ffd9d3;
    --shadeVariation3: #fc8a7d;
    --shadeVariation4: #ff545f;
    --flagBlue: #002147;
    --tintVariation: #ec242d;
    --textPrimary: #030000;
    --textSecondary: #ffece9;

    /* Carousel frosted Background */
    --carouselFWO: rgba(255, 255, 2555, 0.3);

}

html, body {
    font-family: Libre franklin;
    color: var(--textPrimary);
    scroll-behavior: smooth;
    
}

body {
    margin: 0;
    padding: 0;
    background: rgba(245, 245, 245, 1);
}

main {
    margin-top: 50px;
}

h1, h2, h3, h4, h5, h6, p {
    margin-block-start: 0;
    margin-block-end: 0;
}

a,
a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none !important;
    color: inherit !important;
}

#navBar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    height: 50px;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--pureWhite);
    opacity: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

#navMenu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
}

#menuToggle {
    display: none; /* Hide by default */
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

#navBar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

#navBar img {
    height: 40px;
    width: auto;
    margin-left: 20px;
    padding: 2px;
    align-items: center;
}

#navBar li:first-child {
    margin-left: auto;
}

#navBar li {
    margin-left: 20px;
    padding: 10px 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;;
}

#navBar li a {
    font-family: Libre Franklin;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 115%;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--textPrimary);
}

@media (max-width: 768px) { /* Adjust the breakpoint as needed */
    #navMenu {
        width: 100vw; /* Full viewport width */
    }

    #navMenu li {
        width: 100%; /* Full width of the viewport */
        padding: 0;
        margin: 0;
    }

    #navMenu li a {
        display: block; /* Makes the anchor element a block element */
        width: 100%; /* Full width of the parent list item */
        padding: 2rem; /* Adjust padding as desired */
        text-align: center;
        font-size: 18px;
        cursor: pointer;
    }

    #navMenu li a:hover {
        background: var(--shadeVariation4);
    }
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    /* Basic styling for the menu container */
    #menuToggle {
        display: flex;
        align-items: center; /* Center vertically */
        cursor: pointer; /* Change cursor to a pointer when hovering */
    }

    /* Styling for the hamburger icon */
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px; /* Width of the hamburger icon */
        height: 30px; /* Height of the hamburger icon */
        margin-right: 10px; /* Space between the icon and the text */
    }

    /* Styling for the bars */
    .hamburger-icon span {
        width: 100%;
        height: 2px; /* Thickness of each bar */
        background: var(--textPrimary); /* Color of the bars */
        border-radius: 2px; /* Optional: rounded edges */
        transition: all 0.3s; /* Smooth transition for animations */
    }

    /* Styling for the MENU text */
    .menu-text {
        font-family: Libre Franklin;
        font-size: 13.5px;
        font-style: normal;
        font-weight: 600;
        line-height: 115%;
        letter-spacing: 1px;
        text-decoration: none;
        color: var(--textPrimary);
        margin-right: 5px;
    }

    .menu-text:hover {
        font-size: 14px;
    }

    /* Animation for the active state */
    #menuToggle.active .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translateY(3px);
        position: relative;
        top: 8px;
    }

    #menuToggle.active .hamburger-icon span:nth-child(2) {
        opacity: 0; /* Hide the middle bar */
    }

    #menuToggle.active .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translateY(-3px);
        position: relative;
        top: -8px;
    }

    #navMenu {
        position: absolute;
        top: 50px; /* Place below the fixed nav bar */
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: var(--lightBackground);
        flex-direction: column;
        transition: max-height 0.3s ease-in-out;
    }

    #navMenu.active {
        max-height: 75vh; /* Adjust as needed */
        opacity: 90% !important;
        overflow: visible;
    }

    #navMenu li {
        width: 100%;
        text-align: right !important;
        border-bottom: 1px solid var(--textPrimary);
    }

    #navBar li:first-child {
        margin-left: 0;
    }
}

footer {
    height: auto;
    background-color: rgba(39, 39, 39, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    color: var(--textSecondary);
    padding: 1rem;
}

.footerBreak {
    width: calc(100% - 75%);
    height: 1px;
    border-radius: 100%;
    background-color: white;
}

.footer-links, .socials-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: auto; 
    margin-bottom: 0;
}
.footerLinks  {
    margin-bottom: 1rem;
}

.footer-links h4 {
    font-family: Libre Franklin;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 115%;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}
.footer-links a {
    font-family: Libre Franklin;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 115%;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.social-media {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
}

.social-media span {
    display: none;
}

.social-media a {
    margin: 0 10px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0; 
    list-style: none; 
    margin: 1rem auto;
}

.footer-links li {
    margin: 0 10px;
}

.footer-links a, .social-media a, .x-link {
    color: var(--textSecondary);
    text-decoration: none;
}

.footer-links a:hover, .social-media a:hover {
    color: var(--textPrimary);
}
.copyright {
    text-align: center;
    margin-top: 1rem;
    height: auto;
}

.copyright p {
    font-family: Libre Franklin;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 115%;
    letter-spacing: 1px;
}

/* Pop-up background overlay */
.popup {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Pop-up content styling */
.popup-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    font-size: 24px;
    line-height: 115%;
    font-weight: 600;
    font-family: Libre Franklin;
}

.popup button {
    padding: 20px 20px;
    margin-right: 5px;
    width: auto;
    height: auto;
    background: var(--shadeVariation); 
    color: var(--pureWhite);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: Libre-Franklin;
    line-height: 125%;
    font-weight: 400;
    letter-spacing: .25px;
    color: var(--pureWhite);
    padding: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2);
}

.popup button:hover {
    background: var(--flagBlue);
    transform: translateY(2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.popup button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#voterRegistrationDeadlineCountdown a:hover {
    color: var(--flagBlue);
}
.sections {
    margin: 0;
    padding: 0;
}

/* Carousel styling */
.carousel {
    position: relative;
    width: 100vw;
    margin: auto;
    margin-top: 50px; /* height of navBar */
    height: 75vh; /* height of carousel container */
    overflow: hidden;
    background-image: linear-gradient(to top, rgba(0, 33, 71, 0.9), rgba(0, 33, 71, 0.9)), url('./../assets/flag.png');
    background-size: cover, 100% auto;
    background-position: bottom;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 0, 0, .5);
    border-radius: 1%;
}

/* Carousel inner container for the slides */
.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%; /* Make sure the inner container takes up the full height of the carousel */
}

/* Individual carousel item styling */
.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    display: none;
    justify-content: center;
    align-items: center;
    height: 100%; /* Ensure the container is the same height as the carousel */
}

/* Style for the link wrapping the image */
.carousel-item a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* Image styling */
.carousel-item img {
    max-height: 100%; /* Set max height to 100% of the carousel-item */
    width: auto; /* Maintain aspect ratio */
    max-width: 95vw;
    object-fit: contain; /* Ensure the image fits inside the container while preserving the aspect ratio */
}

.carousel-item.active {
    display: flex; /* Show the active slide */
}

/* Hide all but the active slide */
.carousel-item:not(.active) {
    visibility: hidden; /* Use visibility instead of display to maintain layout */
}

/* Dots container styling */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

/* Individual dot styling */
.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, .5);
    border-radius: 50%;
    cursor: pointer;
}

/* Active dot styling */
.carousel-dot.active {
    background-color: white;
}

/* Navigation controls styling */
.carousel-control {
    position: absolute;
    top: 50%;
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--pureWhite);
    padding: 10px;
    cursor: pointer;
    font-size: 50px;
    border: none;
    will-change: transform, scale;
    transform: translateY(-50%);
    transform-origin: center center;
    transition: transform 0.05s ease-in-out;
}

.carousel-control.scale-down {
    transform: translateY(-50%) scale(0.9);
}

/* Alternatively, try anchoring it to the side to see if it helps */
.prev {
    left: 10px;
    transform-origin: left center;
}

.next {
    right: 10px;
    transform-origin: right center;
}

/* Centering the signup container */
.signup {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the content horizontally */
    text-align: center; /* Centers the text inside */
    margin: 0 auto; /* Centers the container itself */
}

.signup h2 {
    font-size: 24px;
    line-height: 115%;
    font-weight: 600;
    font-family: Libre Franklin;
    margin: 0;
    padding-top: 1rem;
}

.signup input {
    font-size: 16px;
    font-family: Libre-Franklin;
    line-height: 125%;
    font-weight: 400;
    letter-spacing: .25px;
}

.signup button {
    font-size: 16px;
    font-family: Libre-Franklin;
    line-height: 125%;
    font-weight: 400;
    letter-spacing: .25px;
    padding: 10px;
    color: var(--pureWhite)
}

/* Styling the form */
form {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    margin-bottom: 0;
    width: 75%
}

/* Styling the input field */
form input[type="email"] {
    flex: 1;
    padding: 10px;
    margin: 10px 0;
    font-size: 16px;
}

/* Styling the button */
form button {
    padding: 20px 20px;
    margin-right: 5px;
    width: auto;
    height: auto;
    background: var(--shadeVariation); 
    color: var(--pureWhite);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2);
}

form button:hover {
    background: var(--flagBlue);
    font-size: 17px;
    margin-right: 1.05rem;
    transform: translateY(1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

form button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Optional: styling the responses */
#mc-embedded-subscribe-form .response {
    margin-top: 10px;
    margin-bottom: 0px;
    font-size: 0.9em;
    color: #555;
}

#countdown {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    color: var(--textPrimary);
}

#voterRegistrationDeadlineCountdown {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    color: var(--textPrimary);
}

#voterRegistrationDeadlineCountdown a {
    text-decoration: none;
    color: var(--textPrimary);
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

/*TODO: Add min-height for divisions */
#home, #events {
    margin: 0;
    padding: 0;
}

.events {
    display: grid;
    height: auto; /* Full viewport height */
    gap: 0; /* No gap between rows */
}

.eventSec h4, .eventSec p:first-child {
    margin: 0;
    padding: 0;
    text-align: center;
}

.eventSec h4 {
    margin-bottom: .5rem;
    font-size: 16px;
}

.event-preview-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.row {
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.event-preview {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    background: rgba(255,255,255, 1);
    border-radius: 5px;
}

.event-preview:hover {
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.event-preview:active {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Style for the events list */
.events-list {
    border-top: 1px solid rgba(19, 0, 0, .1);
    border-bottom: 1px solid rgba(19, 0, 0, .1);
    width: calc(100% - 32px);
    border-radius: 1%;
    margin-top: 30px;
    overflow-y: auto; /* Enable scrolling */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; /* Make it fill its grid cell */
    max-height: 20vh;
    margin-bottom: 5vh;
}

.events-list h4 {
    padding-top: 1rem;
}

.eventsDivider {
    border-bottom: 1px solid rgba(19, 0, 0, .1);
    align-self: center;
    width: calc(100% - 48px);
    margin: 10px;
}

/* Optional: force the height of the children to fit */
.events-list > * {
    flex: 1 1 auto; /* Make child elements fill the parent container */
}

.events-list a{
    margin: 0;
}

.events-list p {
    font-family: Libre Franklin;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 125%;
    letter-spacing: .25px;
}

.events-list p strong {
    font-weight: bold; /* Keep <strong> elements bold */
}

@media screen and (min-width: 550px) {
    .signup h2 {
        font-size: 40px;
    }

    .events-heading h2 {
        font-size: 28px;
    }

    .signup button{
        padding: 20px;
        font-size: 20px
    }

    .signup input {
        padding: 20px;
        font-size: 18px;
    }

    form input[type="email"] {
        padding: 20px;
    }

    .eventSec h4 {
        font-size: 18px;
    }

    .events-list p, .event-preview p {
        font-size: 16px;
    }
}