/* Frontend Galéria Stílusok */

/* Konténer */
.fg-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Szűrő gombok */
.fg-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.fg-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fg-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.fg-btn.active {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(34,113,177,0.4);
}

/* Galéria grid - Masonry layout */
.fg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    grid-auto-flow: dense;
    grid-auto-rows: 200px;
}

.fg-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    grid-auto-rows: 250px;
}

.fg-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 180px;
}

.fg-gallery-grid[data-columns="5"] {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-rows: 150px;
}

/* Galéria elemek */
.fg-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    background: #f5f5f5;
    height: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fg-gallery-item.fg-hidden {
    display: none;
}

.fg-gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Különböző méretek (dinamikus masonry hatás) */
.fg-gallery-item.fg-is-portrait {
    grid-row: span 2;
}

/* Kép link */
.fg-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.fg-image-link img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

/* Overlay */
.fg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.fg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    color: #fff;
    transition: all 0.3s ease;
}

.fg-gallery-item:hover .fg-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Item info */
.fg-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
  display: none !important;
}

.fg-gallery-item:hover .fg-item-info {
    transform: translateY(0);
}

.fg-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.95);
    color: #333;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Lightbox */
.fg-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.fg-lightbox.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fg-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
}

.fg-lightbox-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

#fg-lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox vezérlők */
.fg-lightbox-close,
.fg-lightbox-prev,
.fg-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fg-lightbox-close:hover,
.fg-lightbox-prev:hover,
.fg-lightbox-next:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.fg-lightbox-close {
    top: 130px;
    right: 30px;
}

.fg-lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.fg-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.fg-lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.fg-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Üres állapot */
.fg-no-images {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    font-size: 18px;
}

/* Reszponzív */
@media (max-width: 1200px) {
    .fg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
        grid-auto-rows: 180px;
    }
    
    /* Mobilon egyszerűbb layout */
    .fg-gallery-item.fg-is-portrait {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .fg-gallery-container {
        padding: 15px;
    }
    
    .fg-filter-buttons {
        gap: 8px;
        margin-bottom: 25px;
    }
    
    .fg-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .fg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        grid-auto-rows: 150px;
    }
    
    /* Mobilon minden elem ugyanakkora */
    .fg-gallery-item.fg-is-portrait {
        grid-row: span 1;
    }
    
    .fg-lightbox-content {
        padding: 20px;
    }
    
    .fg-lightbox-close {
        top: 15px;
        right: 15px;
        padding: 10px;
    }
    
    .fg-lightbox-prev,
    .fg-lightbox-next {
        padding: 10px;
    }
    
    .fg-lightbox-prev {
        left: 15px;
    }
    
    .fg-lightbox-next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .fg-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    
    /* Minden elem egyforma magasságú mobilon */
    .fg-gallery-item {
        grid-row: span 1 !important;
    }
    
    .fg-filter-buttons {
        flex-direction: column;
    }
    
    .fg-btn {
        width: 100%;
    }
}

/* Smooth transitions for filter */
.fg-gallery-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fg-gallery-item.fg-filtering {
    opacity: 0;
    transform: scale(0.8);
}
