/* Base Layout Wrapper Adjustments */
.content-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Banner Styling */
.gallery-banner {
    position: relative;
    background-image: linear-gradient(rgba(0, 50, 84, 0.6), rgba(0, 50, 84, 0.6)), url('https://www.amni.com/wp-content/uploads/2014/08/7-OKORO-gallery-large.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.banner-overlay h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Sub Navigation Bar */
.gallery-nav {
    border-bottom: 2px solid #d7dfe4;
    margin-bottom: 35px;
}

.gallery-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-nav li a {
    display: block;
    padding: 12px 4px;
    color: #555555;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 3px solid transparent;
}

.gallery-nav li a:hover,
.gallery-nav li.active a {
    color: #003254;
    border-bottom-color: #ffce00;
}

/* Responsive CSS Grid for Gallery Items */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Media Cards */
.gallery-item {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Forces images to maintain uniform shapes regardless of source dimensions */
.card-image {
    position: relative;
    width: 100%;
    padding-top: 66.6%; /* Modern 3:2 landscape aspect ratio */
    background-color: #f5f5f5;
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .card-image img {
    transform: scale(1.04);
}

/* Card Typography & Content Elements */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h3 {
    color: #003254;
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.card-body p {
    color: #4e4e4e;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 20px 0;
    flex-grow: 1; /* Pushes the download button down evenly across uneven descriptions */
}

/* Download Button UI Elements */
.download-btn {
    align-self: flex-start;
    color: #D34C00;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #D34C00;
    padding: 8px 18px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.download-btn:hover {
    background-color: #D34C00;
    color: #ffffff;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .banner-overlay h1 {
        font-size: 1.85rem;
    }
    .gallery-nav ul {
        gap: 10px;
    }
    .gallery-nav li a {
        font-size: 0.9rem;
        padding: 8px 2px;
    }
}