/* Global Reset and Typography */
body {
    font-family: Cambria, Georgia, serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
}

/* --- HEADER WITH TWO LOGOS --- */
.site-header {
    text-align: center;
    padding: 20px 20px;
    margin-bottom: 20px;
    background-color: #fff;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
}

.site-logo {
    max-width: 80px;
    height: auto;
    flex-shrink: 0;
}

.header-text {
    flex-grow: 0;
}

h1 {
    font-size: 2em;
    font-weight: 300;
    margin: 0 0 5px 0;
    font-family: Cambria, Georgia, serif;
}

.site-header p {
    font-size: 1em;
    color: #666;
    margin: 0;
    font-family: Cambria, Georgia, serif;
}

/* --- GRID CONTAINER (6 columns for smaller images) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Grid item link wrapper */
.grid-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- GRID ITEM (Half the size) --- */
.grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1 / 1;
    max-width: 200px;
    margin: 0 auto;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
    display: block;
}

/* --- Hover Effect --- */
.grid-item:hover img {
    transform: scale(1.05);
}

/* Title overlay - always visible in top third */
.title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 33.33%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    pointer-events: none;
}

.title-overlay h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
    font-family: Cambria, Georgia, serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Description overlay - shows on hover at bottom */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.grid-item:hover .overlay {
    transform: translateY(0);
}

.overlay p {
    margin: 0;
    font-size: 0.9em;
    text-align: center;
    font-family: Cambria, Georgia, serif;
}

/* No content message */
.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #666;
}

/* --- FOOTER --- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-top: 1px solid #ddd;
    z-index: 1000;
}

.footer-logo {
    max-height: 30px;
    width: auto;
    display: block;
}

/* --- MEDIA QUERY for Responsiveness --- */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .site-logo {
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}