/* COLLECTIONS SECTION */
.collections-section {
    padding: 80px 0;
    background: #ffffff;
    position: relative;
}

.collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.collections-header h3 {
    font-size: 2.2rem;
    font-weight: 600;
    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(--main-color);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid rgba(15,115,238,0.2);
}

.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: 24px;
}

.collection-card {
    position: relative;
    border-radius: 20px;
    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: 20px;
    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;
    }
}