/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.gallery-header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-header h1 {
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

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

/* Style dla katalogów */
.directories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.directory-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s;
}

.directory-item a:hover {
    transform: translateY(-5px);
}

.folder-icon {
    font-size: 3rem;
    color: #6e8efb;
    margin-bottom: 0.5rem;
}

.directory-item span {
    text-align: center;
    word-break: break-word;
}

/* Style dla zdjęć */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 1;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #333;
    color: white;
    margin-top: 2rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .directories-grid, .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .directories-grid, .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .gallery-header h1 {
        font-size: 1.5rem;
    }
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.image-item {
    width: 200px;
    height: 200px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Przycina obraz zachowując proporcje */
}