/* Gallery Styles */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    padding: 120px 0 80px;
    text-align: center;
    color: white;
}

.gallery-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-hero-content p {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Main Section */
.gallery-main {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: white;
}

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

.gallery-overlay i {
    font-size: 2rem;
    margin-top: auto;
    margin-bottom: 10px;
}

.gallery-overlay h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Modal Close Button */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
}

.close:hover {
    color: #ccc;
}

/* Modal Caption */
.modal-caption {
    text-align: center;
    color: white;
    margin-top: 20px;
}

.modal-caption h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

/* Modal Navigation */
.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.modal-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-nav-btn:disabled:hover {
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero-content h1 {
        font-size: 2.5rem;
    }

    .gallery-hero-content p {
        font-size: 1rem;
        padding: 0 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 0 20px;
    }

    .modal-content {
        padding: 10px;
    }

    .close {
        font-size: 30px;
        right: 20px;
        top: 10px;
    }

    .modal-nav {
        padding: 0 10px;
    }

    .modal-nav-btn {
        padding: 10px 15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .gallery-hero {
        padding: 100px 0 60px;
    }
    
    .gallery-main {
        padding: 60px 0;
    }
}