/* ===== General Body Styling ===== */
body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
    color: #333;
}

/* ===== Header & Footer Styling (Unified) ===== */
header, footer {
    background-color: #d32f2f;
    color: white;
    padding: 20px;
    text-align: center;
}

/* Header Title */
header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
}

/* ===== Navigation ===== */
.primary-nav,
.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    text-align: center;
}

.primary-nav li,
.footer-nav-list li {
    display: inline-block;
    margin: 0 15px;
}

.primary-nav a,
.footer-nav-list a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}

.primary-nav a:hover,
.footer-nav-list a:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ===== Main Section ===== */
main {
    padding: 20px;
    max-width: 980px;
    margin: 0 auto;
    background: white;
}

h2 {
    color: #d32f2f;
    margin-top: 40px;
}

p {
    max-width: 800px;
    margin-bottom: 20px;
}

/* ===== Tables for Gallery ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 15px;
    margin-bottom: 40px;
}

td {
    vertical-align: top;
    text-align: center;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Image Styling */
td img {
    width: 90%;
    max-width: 240px;
    height: auto;
    border-radius: 10px;
    border: 3px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Gallery Uniform Images */
.gallery-img {
    width: 260px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
}

figcaption {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #555;
}

/* ===== Voting Form Styling ===== */
.vote-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    background: #fdfdfd;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vote-item img {
    width: 90%;
    max-width: 240px;
    height: auto;
    border-radius: 10px;
    border: 3px solid #eee;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vote-item:hover img {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.vote-item label {
    font-weight: bold;
    text-align: center;
    margin-top: 0.25rem;
    cursor: pointer;
}

.vote-item input[type="radio"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
    cursor: pointer;
}

fieldset {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background: #fafafa;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

fieldset legend {
    font-weight: bold;
    padding: 0 0.5rem;
}

/* ===== Footer Links ===== */
.footer-links {
    display: inline-block;
    text-align: center;
}

.footer-links a {
    color: white !important;
    text-decoration: underline;
    font-weight: bold;
    margin: 0 10px;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-links .separator {
    color: white;
    margin: 0 6px;
}
