/**
 * Photo Gallery Main Page Styles
 * 
 * Styling for the main gallery index page with album grid layout
 * and responsive design optimized for all screen sizes.
 */

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.album-tile {
    background: var(--tile-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.album-tile:hover,
.album-tile:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    outline: none;
}

.album-cover {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* Square aspect ratio */
    overflow: hidden;
    background: var(--image-bg);
}

.album-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-tile:hover .album-cover img,
.album-tile:focus-visible .album-cover img {
    transform: scale(1.05);
}

.album-info {
    padding: 1.5rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.album-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    word-wrap: break-word;
}

.album-link-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Empty state */
.no-albums {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-albums p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .gallery-container {
        padding: 1.5rem 1rem;
    }

    .gallery-title {
        margin-bottom: 2rem;
    }

    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .album-info {
        padding: 1rem;
    }

    .album-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .gallery-container {
        padding: 1rem;
    }

    .album-info {
        padding: 0.75rem;
    }

    .album-name {
        font-size: 1rem;
    }

    .album-link-hint {
        font-size: 0.75rem;
    }
}