/* =========================================================================
   1. ELECTION DATA SECTION STYLES (Existing)
   ========================================================================= */

.election-main-container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.election-main-container h2 {
    text-align: center;
    color: #d9534f;
    border-bottom: 2px solid #d9534f;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.year-group {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 6px;
    padding: 15px;
}
.year-group h3 {
    background-color: #007bff; /* Blue header for the year */
    color: white;
    padding: 10px;
    margin: -15px -15px 15px -15px;
    border-radius: 6px 6px 0 0;
    font-size: 1.4em;
    text-align: center;
}
.document-entry {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
}
.doc-label {
    font-weight: bold;
    color: #555;
    flex-basis: 30%;
    min-width: 120px;
}
.doc-link-main a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}
.doc-link-main a:hover {
    text-decoration: underline;
    color: #d9534f;
}

/* 📱 Responsive Styles for Election Data Section 📱 */
@media (max-width: 768px) {
    .election-main-container {
        width: 95%;
        margin: 15px auto;
        padding: 10px;
    }
    .election-main-container h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    .year-group {
        padding: 10px;
        margin-bottom: 15px;
    }
    .year-group h3 {
        padding: 8px;
        margin: -10px -10px 10px -10px;
        font-size: 1.2em;
    }
    /* Stack the label and the link for narrow screens */
    .document-entry {
        flex-direction: column; /* Stack vertically */
        align-items: flex-start; /* Align stacked items to the left */
        padding: 8px 0;
    }
    .doc-label {
        flex-basis: auto; /* Reset flex basis */
        min-width: auto;
        font-size: 0.9em;
        margin-bottom: 3px;
        color: #d9534f; /* Highlight label color on mobile */
    }
    .doc-link-main a {
        font-size: 0.95em;
    }
}

---
/* =========================================================================
   2. DOWNLOAD SECTION STYLES (Existing)
   ========================================================================= */

.Download {
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}
h1 {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-align: center;
}
.download-list {
    list-style: none;
    padding: 0;
}
.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.download-item:last-child {
    border-bottom: none;
}
.download-title-link {
    font-size: 1.1em;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    flex-grow: 1;
    padding-right: 10px;
}
.download-title-link:hover {
    color: #007bff;
    text-decoration: underline;
}
.download-meta {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}
.error-message {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
}
.download-icon {
    margin-right: 10px;
    color: #28a745; /* Green icon */
}

/* 📱 Responsive Styles for Download Section 📱 */
@media (max-width: 768px) {
    .Download {
        width: 95%;
        margin: 15px auto;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    /* Adjust the layout for download items */
    .download-item {
        flex-direction: column; /* Stack title/link and metadata */
        align-items: flex-start;
        padding: 10px 0;
    }

    /* Wrap the link in its own container to handle the icon positioning */
    .download-title-container {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        width: 100%;
    }

    .download-title-link {
        font-size: 1em;
        flex-grow: 1;
        padding-right: 0;
    }

    .download-meta {
        /* Move metadata to its own line, adjust styling */
        width: 100%;
        text-align: left;
        padding-left: 20px; /* Indent metadata slightly */
        font-size: 0.85em;
        color: #999;
    }

    .download-icon {
        /* Ensure icon remains visible beside the title */
        margin-right: 5px;
        font-size: 1.1em;
    }
}