/* General Dark Mode Setup */
body,
html {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #0d0d0d;
    margin: 0;
    padding: 0;
    color: #eaeaea;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;

    border-bottom: 3px solid;
    /* thickness */
    border-image: linear-gradient(to right, #00ff7f, #00c853, #00ffea) 1;
}

.candidate-list {
    margin-bottom: 24px;
}

#election-list-cont {
    overflow-y: scroll;
}

.navbar .logo {
    display: flex;
    align-items: center;
    /* vertical alignment */
    gap: 10px;
    /* space between icon and text */
    font-size: 1.2em;
    font-weight: bold;
    color: #00ff7f;
}

.navbar .logo img {
    width: 28px;
    /* adjust size */
    height: 28px;
    /* make square */
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.navbar ul li a {
    color: #eaeaea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 4px;
}

.navbar ul li a:hover {
    color: #00ff7f;
    border-bottom: 2px solid #00ff7f;
}
.navbar ul li a.active {
    color: #00ff7f;
    border-bottom: 2px solid #00ff7f;
}

/* Main Container */
.container {
    max-width: 55%;
    margin: 40px auto;
    background: #1a1a1a;
    padding: 28px 36px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.breakingnews {
    background: linear-gradient(90deg, #ff0000, #ff5656, #ff0000);
}

/* Headings */
h1,
h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
}

/* Candidate List Styling */
.candidate {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #f4f4f4;
}

.candidate-name {
    flex: 0 0 150px;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

.progress-bar-bg {
    flex: 1;
    height: 18px;
    background: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 12px;
}

.progress-bar {
    background: linear-gradient(to right, #00ff7f, #00c853);
    width: 0;
    height: 100%;
    border-radius: 6px 0 0 6px;
    transition: width 0.4s ease-in-out;
}
.progress-bar-minister {
    background: linear-gradient(to right, #00ddff, #00eaff);
    width: 0;
    height: 100%;
    border-radius: 6px 0 0 6px;
    transition: width 0.4s ease-in-out;
}

.candidate-votes {
    flex: 0 0 80px;
    text-align: right;
}

.candidate-percent {
    flex: 0 0 80px;
    text-align: right;
    font-weight: 600;
    color: #00ff7f;
}

/* Buttons */
button,
.discord-button {
    background-color: #222;
    color: #fff;
    border: 1px solid #00ff7f;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover,
.discord-button:hover {
    background-color: #00ff7f;
    color: #111;
    transform: translateY(-2px);
}


.discord-button {
    background-color: #5865f2;
    border: none;
}

.discord-button:hover {
    background-color: #4752c4;
    color: #fff;
}

.special-mayor-past {
    background: linear-gradient(45deg, #851759, #3f002c) !important;
}

.election-item {
    padding: 10px;
    margin: 5px 0;
    background: linear-gradient(45deg, #3a3a3a, #141414);
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}
.election-item:hover {
    transform: scale(1.02);
}


/* Article List - Display articles in rows */
.article-list {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to the next row */
    gap: 24px; /* Space between articles */
    justify-content: center; /* Center articles horizontally */
    margin-top: 24px;
}

/* Individual Article Item */
.article-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    text-decoration: none;
    color: inherit;
    background: #323232;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 16px;
    width: 250px; /* Fixed width for each article */
}

/* Hover effect for article items */
.article-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Article Image - Make it square and center */
.article-image {
    width: 100%;
    max-width: 250px; /* Set a max width for the image */
    height: 250px; /* Make the image square */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Article Title */
.article-item h2 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 8px;
    color: #00ff7f;
    text-align: center; /* Center the title */
}

/* Article Description */
.article-item p {
    font-size: 1em;
    color: #eaeaea;
    margin: 0;
    text-align: center; /* Center the description */
}
.breaking-news-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: #ff0000;
    text-align: center;
    margin-top: 10px;
    padding: 5px 5px;
    border-radius: 5px;
}
.published-date {
    font-size: 0.9em;
    color: #bbb;
    font-style: italic;
    margin-top: 8px;
}