/* Photo Gallery Modal Styles */

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

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gallery-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.gallery-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.gallery-header h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.gallery-header p {
    color: var(--gray-text);
    font-size: 1.1rem;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: rgba(45, 45, 45, 0.5);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

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

.gallery-nav button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav button:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: rgba(45, 45, 45, 0.5);
    border-radius: var(--radius-md);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Clickable Gallery Items */
.gallery-item {
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.gallery-item::after {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

/* Equipment items as gallery items */
.equipment-item.gallery-item:hover {
    transform: translateX(10px) scale(1.02);
    background: rgba(196, 30, 58, 0.15);
}

/* Record cards as gallery items */
.record-card.gallery-item {
    cursor: pointer;
}

.record-card.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Gallery indicator for items */
.gallery-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-primary);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: var(--transition-fast);
}

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

/* Responsive */
@media (max-width: 768px) {
    .gallery-modal-content {
        width: 95%;
        margin: 30px auto;
    }
    
    .gallery-header h3 {
        font-size: 1.8rem;
    }
    
    .gallery-main {
        height: 50vh;
        min-height: 300px;
    }
    
    .gallery-nav button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-thumbnail {
        width: 80px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .gallery-close {
        top: -30px;
        font-size: 30px;
    }
    
    .gallery-main {
        height: 40vh;
        min-height: 250px;
    }
    
    .gallery-thumbnails {
        padding: 5px;
    }
}