/* --- RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    width: 100%;
    overflow-x: hidden;
}
.home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background-color: #8B0000; /* Matching your dark red theme */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; /* Keeps it above other elements */
}

.home-button:hover {
    background-color: #660000; /* Slightly darker on hover */
}
/* --- 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;
}
/* --- MEDAL ICONS --- */
.medal-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 10px 0;
    min-height: 50px; /* Increased to fit the images */
    align-items: center;
}

.medal-img {
    height: 50px; /* Standard height for all medals */
    width: auto;
    object-fit: contain;
    cursor: help;
    transition: transform 0.2s ease;
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.3));
}

.medal-img:hover {
    transform: scale(1.1);
}

/* Tooltip container for the medals */
.medal-wrapper {
    position: relative;
    display: inline-block;
}

/* Tooltip on hover (Replaces the old .star-icon:hover::after) */
.medal-wrapper:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 110%;
    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}