/* ========================================
   Gallery Styles - Modern & Responsive
   ======================================== */

/* Gallery Header */
.gallery-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.gallery-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Gallery Container */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Gallery Card */
.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.gallery-card-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-overlay-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.gallery-overlay-content p {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Gallery Button */
.gallery-btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #667eea;
    text-decoration: none;
}

/* ========================================
   Gallery Details Page
   ======================================== */

/* Gallery Details Header */
.gallery-details-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px 40px;
    color: white;
    margin-bottom: 60px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.back-btn:hover {
    opacity: 1;
    transform: translateX(-5px);
    color: white;
}

.gallery-details-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.gallery-details-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Gallery Details Container */
.gallery-details-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Gallery Details Grid */
.gallery-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.05);
}

/* Gallery Item Overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 3rem;
    color: white;
}

/* ========================================
   Lightbox Modal
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #667eea;
    transform: rotate(90deg);
}

/* Lightbox Navigation */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 60px;
    font-weight: 300;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Caption */
.lightbox-caption {
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Lightbox Counter */
.lightbox-counter {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
    opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .gallery-details-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-details-title {
        font-size: 1.8rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        width: 50px;
        height: 50px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 50px 15px;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-overlay-content h3 {
        font-size: 1.4rem;
    }

    .gallery-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Bottom Back Button */
.gallery-bottom-back {
    margin-top: 50px;
    display: flex;
    justify-content: right;
}

.bottom-back-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

    .bottom-back-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    }
