/* 
* Téli Berek Vendégház - Gallery Page CSS
* Custom styles for the Gallery page
*/

/* ===== Page Header ===== */
.page-header {
    position: relative;
    height: 40vh;
    min-height: 300px;
    background-image: url('./assets/Galery/DSC_8241.JPG');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-top: 80px;
}

.page-header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: white;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Gallery Categories ===== */
.gallery-categories {
    padding: 30px 0;
    background-color: #f9f9f9;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter li {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.category-filter li:hover {
    background-color: rgba(75, 111, 77, 0.1);
}

.category-filter li.active {
    background-color: var(--primary-color);
    color: white;
}

/* ===== Gallery Section ===== */
.gallery-section {
    padding: 50px 0;
}

.gallery-grid {
    margin: 0 -10px;
}

.gallery-item {
    padding: 10px;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.hidden-item {
    display: none;
}

.gallery-item a {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Image Loading Styles */
.gallery-item .image-container {
    position: relative;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
}

.gallery-item .loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(240, 240, 240, 0.7);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.gallery-item .loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.gallery-item .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(75, 111, 77, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 8px;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-info {
    text-align: center;
    color: white;
    padding: 0 20px;
}

.gallery-info h5 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: white;
}

.gallery-info span {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    transform: scale(0);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-info span {
    transform: scale(1);
}

/* ===== Load More Section ===== */
.load-more-section {
    padding-bottom: 80px;
}

#load-more {
    padding: 12px 30px;
    font-weight: 500;
}

/* ===== Fancybox Customization ===== */
.fancybox__container .fancybox__backdrop {
    background-color: rgba(0, 0, 0, 0.85);
}

.fancybox__container .fancybox__caption {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 991px) {
    .page-header {
        height: 30vh;
    }
    
    .gallery-section {
        padding: 40px 0;
    }
    
    .gallery-item img {
        height: 220px;
    }
}

@media (max-width: 767px) {
    .page-header h1 {
        font-size: 36px;
    }
    
    .category-filter li {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .gallery-section {
        padding: 30px 0;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .gallery-info h5 {
        font-size: 16px;
    }
    
    .gallery-info span {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .page-header {
        height: 25vh;
        min-height: 200px;
    }
    
    .page-header h1 {
        font-size: 30px;
    }
    
    .category-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .category-filter::-webkit-scrollbar {
        height: 5px;
    }
    
    .category-filter::-webkit-scrollbar-thumb {
        background-color: rgba(75, 111, 77, 0.3);
        border-radius: 5px;
    }
    
    .category-filter li {
        white-space: nowrap;
        margin: 5px 3px;
    }
    
    .gallery-item img {
        height: 150px;
    }
}