.header {
    height: 70px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 50;
}

.header img {
    transition: all 0.3s ease;
}

/* Ensure the container takes full height */
.header .container {
    padding: 0 15px;
    height: 100%;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img,
.logo {
    max-height: 55px;
    width: auto;
    height: 50px;
    transition: height 0.3s ease;
}

/* Language switcher styling */
#language-switcher button {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.3s ease;
}

#language-switcher button:hover {
    color: #333;
}

#language-switcher button.active {
    color: #000;
    font-weight: 600;
}

#language-switcher span {
    color: #ccc;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }
    
    .header .flex.justify-between {
        position: relative;
    }
    
    /* Reset previous absolute positioning */
    .header .flex.items-center {
        position: static;
        transform: none;
        margin: 0 auto;
    }
    
    /* Center logo container */
    .header .flex.items-center.justify-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    /* Hamburger button styling */
    #menuButton {
        padding: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #language-switcher {
        margin-right: 5px;
    }
    
    #language-switcher button {
        font-size: 12px;
        padding: 3px 4px;
    }
}

#language-switcher {
    font-size: 0.9rem;
}

.stars {
    line-height: 1;
    margin-top: -5px;
}

.nav-link {
    @apply text-gray-700 hover:text-blue-600 transition-colors duration-200;
    position: relative;
    padding: 0.5rem 0;
}

/* Underline animation for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger button */
#menuButton {
    @apply p-2 rounded-lg transition-colors duration-200;
    z-index: 51; /* Above header */
}

#menuButton:hover {
    @apply bg-gray-100;
}

/* Add styles for the icon itself */
#menuButton i {
    @apply text-2xl text-gray-600;
    transition: transform 0.2s ease;
}

/* Optional: Add rotation animation when menu is open */
#menuButton i.fa-times {
    transform: rotate(90deg);
}

/* Mobile Menu */
.mobile-menu {
    @apply fixed left-0 right-0 bg-white shadow-lg;
    top: calc(40px + 60px); /* Account for social bar + header */
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    z-index: 40;
}

.mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu .nav-link {
    @apply block w-full px-4 py-3 text-gray-700 hover:bg-gray-50;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

@media (max-width: 640px) {
    .mobile-menu {
        top: calc(48px + 60px); /* Account for taller social bar on mobile */
    }
}

/* Container padding */
.mobile-menu .max-w-7xl {
    padding: 0 1.5rem; /* Add padding to container */
}

/* Animation for menu items */
.mobile-menu a {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.mobile-menu:not(.hidden) a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu:not(.hidden) a:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu:not(.hidden) a:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu:not(.hidden) a:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Desktop breakpoint */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Log when styles are applied */
.header::after {
    content: '';
    display: none;
    /* This will show in the dev tools that the styles are loaded */
}

/* Update the main content padding to match header height exactly */
main {
    z-index: 10;
    position: relative;
    margin-top: 0;
}

/* Container alignment - using exact Tailwind max-w-7xl value */
.header .max-w-7xl,
.mobile-menu .max-w-7xl,
.bg-blue-900 .max-w-7xl {
    width: 100%;
    max-width: 1280px; /* Exact Tailwind max-w-7xl value */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo sizing and alignment */
.logo {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}

/* Navigation alignment */
.nav-link {
    @apply text-gray-700 hover:text-blue-600 transition-colors duration-200;
    position: relative;
    padding: 0.5rem 0;
}

/* Underline animation for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Desktop menu alignment */
@media (min-width: 768px) {
    .header .flex.justify-between {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
    }

    nav.md\:flex {
        flex: 1;
        justify-content: flex-end;
    }

    /* Logo container width adjustment */
    .header .flex.items-center.md\:w-48 {
        width: auto;
        min-width: 200px; /* Ensure consistent logo space */
    }
}

/* Remove duplicate max-width definitions */
.bg-blue-900 .max-w-7xl,
.header .max-w-7xl {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


.countdown-timer-overlay{
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

@media (max-width: 470px) {
    .countdown-timer-overlay{
        position: absolute;
        top: 65%;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 430px) {
    .countdown-timer-overlay{
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translateX(-50%);
    }
}

.vote-by-mail, .early-voting, .election-day-voting{
    display: flex;
    flex-direction: column;
    align-items: center;
}
