/* Base Page Styling */
body {
    background-color: #0d0d0d; /* Ultra-sleek dark background */
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 40px 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.gallery-header p {
    color: #888888;
    font-size: 1rem;
}

/* The Grid Framework */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Individual Card Blocks */
.gallery-item {
    background: #161616;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #262626;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* Hover effect */
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: #404040;
}

/* Image Containers */
.gallery-item a {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Centers and cleanly fills the box */
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* Card Descriptions Layout */
.image-description {
    padding: 16px;
    background: #161616;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-description p {
    margin: 0;
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    word-break: break-word;
}