/* Gallery Grid */

.container h1 {
    text-align: center;
    padding: 20px 0;
    margin: 30px 0;
    color: #ffffff; /* Fehér szín */
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.container h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: #cc3429; /* Piros szín */
    margin: 15px auto 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.gallery-item {
    background: #252525;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.image-preview-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.image-preview.active {
    opacity: 1;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .image-preview img {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(204, 52, 41, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.gallery-item h3 {
    padding: 15px 15px 5px;
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.gallery-item p {
    padding: 0 15px 15px;
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    font-size: 16px;
}

.pagination a {
    color: #cc3429;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #cc3429;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #cc3429;
    color: white;
}

.pagination span {
    color: #ddd;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    margin: 2% auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(204, 52, 41, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    margin-top: 15px;
    text-align: center;
    font-size: 18px;
    max-width: 80%;
}


.gallery-item p.image-alt-text {
    display: none;
}

/* Lightbox-ban sem jelenjen meg */
.lightbox-caption .alt-text {
    display: none;
}

/* Touch controls for mobile */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-container {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    
    /* Swipeable area */
    .lightbox-content {
        width: 100%;
        height: 100%;
    }
    
    .lightbox-image {
        max-height: 75vh;
    }
}

/* Responsive Gallery Grid */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .image-preview-container {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}