/* assets/css/style.css */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    /* Gold */
    margin-bottom: 0.5em;
}

a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 5px #d4af37;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Nav */
nav {
    background: #000;
    border-bottom: 2px solid #d4af37;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link img {
    max-height: 60px;
    width: auto;
    display: block;
    /* Removes bottom spacing */
}

nav ul {
    display: flex;
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

nav ul li {
    margin: 0 20px;
}

nav a {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Items */
.card {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn {
    display: inline-block;
    background: #d4af37;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    text-transform: uppercase;
}

.btn:hover {
    background: #f0c350;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: #444;
    color: #fff;
}

.btn-secondary:hover {
    background: #666;
}

/* Forms */
input,
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* Grid for Campaigns */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Flash Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background: #2e7d32;
    color: #fff;
}

.alert-error {
    background: #c62828;
    color: #fff;
}

/* Calendar Styling */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 20px;
}

.calendar-day {
    background: #2a2a2a;
    padding: 10px;
    min-height: 80px;
    border: 1px solid #444;
    position: relative;
    cursor: pointer;
}

.calendar-day:hover {
    background: #333;
    border-color: #d4af37;
}

/* User's vote - Green */
.calendar-day.vote-user {
    background: rgba(46, 125, 50, 0.4);
    /* Green */
    border-color: #4caf50;
}

/* Others' vote - Blue */
.calendar-day.vote-others {
    background: rgba(21, 101, 192, 0.4);
    /* Blue */
    border-color: #42a5f5;
}

/* Past Date - Grayed out */
.calendar-day.past-date {
    background: #111;
    color: #444;
    border-color: #222;
    cursor: not-allowed;
    pointer-events: none;
    /* Prevent clicks */
}

.vote-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #d4af37;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;

    /* Centering */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    font-weight: bold;
}

/* Burger Menu */
.burger-menu {
    display: none;
    cursor: pointer;
    margin-left: auto;
    /* Push to right */
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #d4af37;
    margin: 5px 0;
    transition: all 0.3s;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
        order: 2;
    }

    .logo-link {
        order: 1;
    }

    .nav-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    /* Mobile Menu Animation */
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        order: 3;

        /* Hidden state */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        margin-top: 0;

        /* Smooth Transition */
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.4s ease-in-out;
    }

    /* Show nav when active */
    nav ul.active {
        max-height: 300px;
        opacity: 1;
        margin-top: 15px;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        width: 100%;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    div[style*="display: flex"] {
        flex-direction: column;
    }

    .calendar-day {
        min-height: 50px;
        padding: 5px;
        font-size: 0.9em;
    }

    .vote-count {
        width: 15px;
        height: 15px;
        font-size: 0.6em;
        /* Flex alignment inherited from desktop */
    }
}