/* COLLECTIONS SECTION */
.collections-section {
    /*padding: 80px 0;*/
    background: #ffffff;
    position: relative;
}

.collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 52px;
}

.collections-header h3 {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--second-color);
    margin: 0;
    /* font-family: 'Geom', sans-serif; */
    /* letter-spacing: -0.02em; */
}

.collections-header .view-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--second-color);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 50px;
        position: relative;
}
.collections-header .view-link::before {
    position: absolute;
    top: 50%;
    left: 0px;
    width: 55px;
    height: 40px;
    border-radius: 100px;
    background: #F5F5F5;
    content: "";
    transform: translateY(-50%);
    transition: all 0.4s;
}
.collections-header .view-link:hover::before {
    width: 100%;
    background: var(--main-color);
}

.collections-header .view-link:hover {
    /* background: var(--main-color); */
    color: white;
    /* border-color: var(--main-color); */
    gap: 12px;
}

.collections-header .view-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8px;
    fill: none;
    transition: transform 0.2s ease;
}

.collections-header .view-link:hover svg {
    transform: translateX(4px);
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px 24px;
}

.collection-card {
    position: relative;
    border-radius: .5rem;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    max-height: 400px;
    width: 100%;
}

/* Image Grid - 3 images */
.collection-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #f5f5f5;
    padding: 2px;
    border-radius: .5rem;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.collection-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.collection-card:hover .collection-images img {
    transform: scale(1.02);
}

/* First image takes 2 columns */
.collection-images img:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* OVERLAY - Title and count inside card */
.collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, 
        rgba(8, 16, 45, 0.95) 0%,
        rgba(8, 16, 45, 0.7) 50%,
        transparent 100%);
    color: white;
    padding: 30px 16px 16px;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.collection-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collection-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    /* font-family: 'Geom', sans-serif; */
    line-height: 1.3;
    flex: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.photo-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 30px;
    white-space: nowrap;
    margin-left: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.photo-count svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

/* Hover effect on overlay */
.collection-card:hover .collection-overlay {
    background: linear-gradient(to top, 
        rgba(15, 115, 238, 0.95) 0%,
        rgba(15, 115, 238, 0.7) 50%,
        transparent 100%);
}

/* Skeleton Loader */
.collections-skeleton {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.skeleton-collection-card {
    background: var(--fourth-color);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    aspect-ratio: 3/4;
}

.skeleton-collection-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-collection-content {
    padding: 15px;
    background: var(--fourth-color);
}

.skeleton-collection-title {
    height: 18px;
    width: 80%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-collection-meta {
    height: 12px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* End of Collections */
.end-of-collections {
    text-align: center;
    padding: 40px;
    color: var(--third-color);
    clear: both;
    width: 100%;
    display: none;
}

/* No Results */
.no-collections-section {
    text-align: center;
    padding: 80px 40px;
    background: var(--fourth-color);
    border-radius: 30px;
    border: 1px solid var(--border-color);
    margin: 40px 0;
}

/* Responsive */
@media (max-width: 1440px) {
    .collection-card {
        max-height: 320px;
    }
}

@media (max-width: 1200px) {
    .collections-grid, .collections-grid, .collections-skeleton {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .collections-grid, .collections-grid, .collections-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .collections-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .collections-header h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .collections-grid, .collections-grid, .collections-skeleton {
        grid-template-columns: 1fr;
    }
    
    .collection-info {
        flex-wrap: wrap;
    }
    
    .photo-count {
        margin-left: 0;
    }
    
    .collections-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* --- MODERN COLLECTIONS CARD STRUCTURE --- */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 24px;
    width: 100%;
}

.collection-card-modern {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    width: 100%;
    background: transparent;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.collection-card-modern:hover {
    transform: translateY(-4px);
}

/* Image Wrapper Box: Split layout matching image_cb71e0.jpg */
.collection-media-box {
    display: flex;
    width: 100%;
    aspect-ratio: 3 / 4; /* Balanced landscape/square profile container */
    max-height: 320px;
    border-radius: .5rem; /* Smooth professional corner rounding */
    overflow: hidden;
    gap: 0.0875rem; /* Crisp clean space between pictures */
    background: #f7f7f9;
}

/* Big primary picture column takes up 65% of layout width */
.media-main-col {
    width: 55%;
    height: 100%;
    overflow: hidden;
}

/* Side stacked image column takes up remaining 35% */
.media-side-col {
    display: flex;
    flex-direction: column;
    width: 45%;
    height: 100%;
    gap: 0.0875rem;
}

.side-img-wrapper {
    flex: 1;
    height: 50%;
    overflow: hidden;
}

.collection-media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Soft, controlled zoom effect on image columns when parent card is hovered */
.collection-card-modern:hover .collection-media-box img {
    transform: scale(1.04);
}

/* --- BOTTOM INFO ROW --- */
.collection-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding: 0 2px;
}

.collection-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1d1d1f; /* Premium dark neutral tone */
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
    text-transform: capitalize;
}

/* Pill badge styling matching reference file */
.collection-pill-badge {
    font-size: 14px;
    font-weight: 500;
    color: #4361ee; /* Royal tech blue variant tint */
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.collection-card-modern:hover .collection-pill-badge {
    background: #4361ee;
    color: #ffffff;
}

/* --- RESPONSIVE LAYOUT CONSTRAINTS --- */
@media (max-width: 1200px) {
    .collections-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .collection-media-box {
        aspect-ratio: 16 / 10; /* Wider viewports on thin mobile screens */
    }
}