/* --- RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    width: 100%;
    overflow-x: hidden;
}
/* --- BODY --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* --- HEADER --- */
header {
    background-color: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
    border-bottom: 5px solid #8b0000;
    order: -1;
}
/* --- HEADER LINKS --- */
header a {
    color: #FF6B6B; /* Light coral for better visibility */
    text-decoration: underline;
}

header a:hover {
    color: #ffffff; /* White on hover */
}
/* --- GALLERY GRID --- */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
@media (max-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
}
/* --- CARD STYLING --- */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
    width: auto;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
}
.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-content h3,
.card-content p {
    margin-bottom: 10px;
}
/* --- IMAGE CONTAINER --- */
.card-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 15px;
}
.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.image-placeholder {
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}
/* --- MEDAL CONTAINER --- */
.medal-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
    min-height: 24px;
}
/* --- STAR ICONS --- */
.star-icon {
    font-size: 1.4rem;
    cursor: help;
    position: relative;
}
.silver-star::before {
    content: "★";
    color: #C0C0C0;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}
.bronze-star::before {
    content: "★";
    color: #CD7F32;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}
.star-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
}
/* --- BUTTONS --- */
.btn-view {
    display: inline-block;
    background-color: #8b0000;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-top: auto; /* This pushes the button to the bottom */
}
.btn-view:hover {
    background-color: #a00000;
}
.btn-nav {
    display: inline-block;
    padding: 8px 15px;
    background-color: #2c3e50;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3