/* =====================================================
 * PHOTOS MODULE IMPROVEMENTS
 * Responsive Grid & Aspect Ratio Fixes
 * ===================================================== */

/* --- 1. Grid Layout Fixes --- */
.photo-grid-row {
    margin-left: -10px;
    margin-right: -10px;
    display: flex;
    flex-wrap: wrap;
}

.photo-grid-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
    float: none !important;
    /* Override standard float */
}

/* --- 2. Aspect Ratio Image Container --- */
.photo-img-container {
    display: block;
    position: relative;
    width: 100%;
    /* 4:3 Aspect Ratio (75%) or 16:9 (56.25%) */
    padding-bottom: 75%;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.photo-img-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #bbb;
}

.photo-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Important: Cuts off excess to fill container */
    object-position: center;
    transition: transform 0.5s ease;
}

.photo-img-container:hover img {
    transform: scale(1.05);
    /* Slight zoom effect on hover */
}

/* --- 3. Content Styling --- */
.photo-info {
    padding: 10px 0;
}

.photo-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.photo-meta {
    font-size: 12px;
    color: #888;
}

/* --- 4. Responsive Queries --- */

/* Mobile Phones (Portrait) */
@media (max-width: 480px) {
    .col-xs-12 {
        width: 100%;
        /* 1 item per row */
    }
}

/* Mobile Phones (Landscape) & Small Tablets */
@media (min-width: 481px) and (max-width: 767px) {
    .col-sm-12 {
        width: 50%;
        /* 2 items per row */
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .col-md-8 {
        width: 33.33%;
        /* 3 items per row */
    }
}