@charset "UTF-8";
/* CSS Document */

/* Grid Container Style Rules */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1300px;
    margin: 0 auto;
    justify-items: center;
}

.grid-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 4; 
}

.grid-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.grid-item .text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: #fff;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.text-overlay h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.text-overlay p {
    font-size: 0.95rem;
}

/* Tablet Display (2 rows of 2 columns) */
@media (min-width: 481px) and (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
}

/* Desktop Display (4 columns, min 200px / max 300px per column) */
@media (min-width: 1025px) {
    .grid-container {
        grid-template-columns: repeat(4, minmax(200px, 300px));
        justify-content: center;
    }
}
/* ==========================================================================
   4. Overlay Cards Section
   ========================================================================== */
/* Mobile Portrait: 1 Column, 4 Rows */
.overlay-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.overlay-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
    width: 80%;
}
