/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 120px 0 60px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 50%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 80%;
    left: 20%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 70%;
    animation-delay: 8s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-60px) translateX(-20px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-30px) translateX(20px) rotate(270deg);
        opacity: 0.6;
    }
}

.gallery-hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.gallery-hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.gallery-hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.hero-stats .stat p {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
}

/* Gallery Filters Section */
.gallery-filters-section {
    padding: 3rem 0;
    background: #f8f9fa;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.filter-btn i {
    font-size: 1rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.gallery-search {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.gallery-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.gallery-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gallery-search i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

/* Main Gallery */
.main-gallery {
    padding: 4rem 0;
    background: white;
}

.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: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    aspect-ratio: 4/5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    width: 100%;
    color: white;
}

.overlay-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.overlay-icons {
    display: flex;
    gap: 0.8rem;
}

.overlay-icons button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-icons button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.like-btn:hover {
    background: #e74c3c !important;
}

.share-btn:hover {
    background: #3498db !important;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-image-container {
    position: relative;
    max-width: 1200px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lightbox-info {
    text-align: center;
    color: white;
    max-width: 600px;
}

.lightbox-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-description {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.lightbox-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.lightbox-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lightbox-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lightbox-like:hover {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

.lightbox-share:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.2);
}

.lightbox-download:hover {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

/* Hidden state for filtered items */
.gallery-item.hidden {
    display: none;
}

/* Animation for gallery items */
.gallery-item {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stats .stat h3 {
        font-size: 2rem;
    }
    
    .filter-controls {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-title {
        font-size: 1.3rem;
    }
    
    .lightbox-actions {
        flex-wrap: wrap;
    }
    
    .lightbox-actions button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 100px 0 40px;
    }
    
    .gallery-hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filters-section {
        padding: 1.5rem 0;
    }
    
    .filter-btn {
        padding: 0.5rem 0.8rem;
    }
}
/* Enhanced Lightbox Effects */

/* Lightbox entrance animation */
.lightbox {
    backdrop-filter: blur(0px);
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.lightbox.active {
    backdrop-filter: blur(10px);
}

/* Enhanced lightbox content animation */
.lightbox-content {
    transform: scale(0.8) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1) translateY(0);
}

/* Image zoom and pan effect */
.lightbox-image {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.lightbox-image.zoomed {
    cursor: zoom-out;
    transform: scale(2);
}

/* Enhanced navigation buttons with glow effect */
.lightbox-prev,
.lightbox-next,
.lightbox-close {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.3);
}

/* Lightbox info slide-up animation */
.lightbox-info {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s ease 0.2s, opacity 0.5s ease 0.2s;
}

.lightbox.active .lightbox-info {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced action buttons with ripple effect */
.lightbox-actions button {
    position: relative;
    overflow: hidden;
}

.lightbox-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.lightbox-actions button:active::before {
    width: 100px;
    height: 100px;
}

/* Image loading shimmer effect */
.lightbox-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.lightbox-image-container.loading::before {
    left: 100%;
}

/* Enhanced loader with pulsing effect */
.loader-spinner {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

/* Lightbox counter */
.lightbox-counter {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active .lightbox-counter {
    opacity: 1;
}

/* Image metadata overlay */
.lightbox-metadata {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-image-container:hover .lightbox-metadata {
    opacity: 1;
}

/* Fullscreen mode */
.lightbox.fullscreen {
    background: rgba(0, 0, 0, 1);
}

.lightbox.fullscreen .lightbox-image {
    max-width: 100vw;
    max-height: 100vh;
}

.lightbox.fullscreen .lightbox-info {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Thumbnail navigation */
.lightbox-thumbnails {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    max-width: 80%;
    overflow-x: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show-thumbnails .lightbox-thumbnails {
    opacity: 1;
}

.lightbox-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lightbox-thumbnail.active {
    border-color: white;
    transform: scale(1.1);
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Keyboard shortcuts overlay */
.keyboard-shortcuts {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10003;
}

.lightbox:hover .keyboard-shortcuts {
    opacity: 1;
}

.keyboard-shortcuts h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.keyboard-shortcuts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.keyboard-shortcuts li {
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.keyboard-shortcuts kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* Enhanced gallery item hover effects */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    transform: translateX(100%) rotate(45deg);
}

/* Gallery item click effect */
.gallery-item.clicked {
    animation: clickPulse 0.3s ease;
}

@keyframes clickPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced mobile lightbox */
@media (max-width: 768px) {
    .lightbox-thumbnails {
        bottom: 1rem;
        max-width: 90%;
    }
    
    .lightbox-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .keyboard-shortcuts {
        display: none;
    }
    
    .lightbox-counter {
        top: 1rem;
        font-size: 0.8rem;
    }
    
    .lightbox-metadata {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Touch gestures indicator */
.touch-indicator {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10001;
    pointer-events: none;
}

.lightbox.show-touch-indicator .touch-indicator {
    opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
    .touch-indicator {
        display: block;
    }
}