/* Gallery Page Styles */

.hero-small {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-small p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Gallery Controls */
.gallery-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-info p {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    background: var(--white-color);
}

/* Album stílus - egymásra rakott fotók effektus */
.gallery-item.album {
    position: relative;
}

/* Háttérben lévő "fotók" szimulálása */
.gallery-item.album::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: 8px;
    bottom: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: -2;
    transform: rotate(-2deg);
}

.gallery-item.album::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: 4px;
    bottom: 4px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: -1;
    transform: rotate(1deg);
}

/* Felső kép (a fő kártya) */
.gallery-item.album {
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.gallery-item.album:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.gallery-item.album:hover::before {
    transform: rotate(-3deg) translateY(2px);
}

.gallery-item.album:hover::after {
    transform: rotate(2deg) translateY(1px);
}

/* Képek száma jobb felső sarokban */
.gallery-item.album .image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 86, 166, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

/* Album overlay stílus */
.gallery-item.album .gallery-item-overlay {
    background: linear-gradient(transparent, rgba(0, 86, 166, 0.9));
}

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

.gallery-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-description {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.gallery-item-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Loading and Empty States */
.gallery-loading,
.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-color);
}

.gallery-loading i,
.gallery-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--light-color);
}

.gallery-loading p,
.gallery-empty p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.gallery-empty .small-text {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.gallery-empty code {
    background: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

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

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lightbox-nav {
        padding: 0 1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-small h1 {
        font-size: 2rem;
    }
    
    .hero-small p {
        font-size: 1rem;
    }
}

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

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

.gallery-item {
    animation: slideUp 0.6s ease forwards;
}

.gallery-item:nth-child(even) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(3n) {
    animation-delay: 0.2s;
}
