/* ===== HALL OF ARTIFACTS - GALLERY SECTION ===== */

.gallery-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 50%, #FFFFFF 100%);
    padding: 120px 20px;
    overflow: hidden;
}

/* ===== FLOATING PARTICLES ===== */
.gallery-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.gallery-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #B10000;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 8s ease-in-out infinite;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-30px) translateX(20px); }
}

/* ===== CONTAINER ===== */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===== HEADER ===== */
.gallery-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
}

.gallery-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    background: linear-gradient(45deg, #B10000, #000000, #B10000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.gallery-title::before,
.gallery-title::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #B10000;
    font-size: 2rem;
    opacity: 0.6;
}

.gallery-title::before { left: -60px; }
.gallery-title::after { right: -60px; }

.gallery-subtitle {
    font-size: 1.4rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #8B0000;
    opacity: 0.9;
}

/* ===== ELEMENTAL FILTERS ===== */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 60px;
    opacity: 0;
    position: relative;
    z-index: 100;
}

.filter-btn {
    position: relative;
    padding: 10px 24px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #B10000;
    background: transparent;
    border: 1.5px solid rgba(177, 0, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.filter-btn::before {
    display: none;
}

.filter-btn:hover {
    background: rgba(177, 0, 0, 0.05);
    border-color: #B10000;
    color: #000000;
}

.filter-btn.active {
    background: #B10000;
    color: #FFFFFF;
    border-color: #B10000;
}

.filter-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ===== MOBILE DROPDOWN FILTER ===== */
.gallery-filters-mobile {
    display: none;
}

.filter-dropdown {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;

}

.filter-dropdown-btn {
    width: 100%;
    padding: 15px 20px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #B10000;
    background: rgba(177, 0, 0, 0.1);
    border: 2px solid rgba(177, 0, 0, 0.12);
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.3s ease;
}

.filter-dropdown-btn:hover {
    border-color: #B10000;
    background: rgba(177, 0, 0, 0.15);

}

.filter-dropdown-icon {
    font-size: 1.2rem;
    color: #8B0000;
}

.filter-dropdown-text {
    flex: 1;
    text-align: left;
}

.filter-dropdown-arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.filter-dropdown.active .filter-dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(177, 0, 0, 0.12);
    border-radius: 15px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-dropdown.active .filter-dropdown-menu {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}

.filter-dropdown-item {
    width: 100%;
    padding: 15px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #B10000;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(177, 0, 0, 0.1);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.filter-dropdown-item:last-child {
    border-bottom: none;
}

.filter-dropdown-item:hover {
    background: rgba(177, 0, 0, 0.1);
    color: #8B0000;
    padding-left: 25px;
}

.filter-dropdown-item.active {
    background: linear-gradient(135deg, rgba(177, 0, 0, 0.2), rgba(139, 0, 0, 0.15));
    color: #8B0000;
    border-left: 3px solid #8B0000;
}

.filter-dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== MASONRY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* ===== ARTIFACT CARD ===== */
.artifact-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.9));
    border: 2px solid rgba(177, 0, 0, 0.12);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.4s ease;
}

.artifact-card:hover {
    border-color: rgba(177, 0, 0, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== ARTIFACT IMAGE ===== */
.artifact-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFFFFF, #FFFFFF);
}

.artifact-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.artifact-card:hover .artifact-img {
    transform: scale(1.05);
}

.artifact-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.artifact-rune {
    display: none;
}

/* ===== ARTIFACT INFO ===== */
.artifact-info {
    padding: 25px;
}

.artifact-category {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-family: 'Cinzel', serif;
    color: #B10000;
    background: rgba(177, 0, 0, 0.1);
    border: 1px solid rgba(177, 0, 0, 0.12);
    border-radius: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.artifact-name {
    font-size: 1.5rem;
    font-family: 'Cinzel', serif;
    color: #B10000;
    margin-bottom: 10px;
}

.artifact-desc {
    font-size: 1rem;
    font-family: 'Cormorant Garamond', serif;
    color: #000000;
    line-height: 1.6;
    opacity: 0.9;
}

.artifact-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(177, 0, 0, 0.2);
}

.artifact-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cormorant Garamond', serif;
    color: #8B0000;
    font-size: 0.95rem;
}

.stat-icon {
    font-size: 1.2rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    border: 3px solid #B10000;
    border-radius: 30px;
    padding: 50px;
    overflow-y: auto;
    transform: scale(0.8) rotateX(20deg);
    transition: transform 0.5s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1) rotateX(0deg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #B10000;
    background: rgba(177, 0, 0, 0.1);
    border: 2px solid rgba(177, 0, 0, 0.12);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(177, 0, 0, 0.12);
    border-color: #B10000;
    transform: rotate(90deg) scale(1.1);
}

.lightbox-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 20px;
    margin-bottom: 30px;
}

.lightbox-details {
    text-align: center;
}

.lightbox-title {
    font-size: 2.5rem;
    font-family: 'Cinzel', serif;
    color: #B10000;
    margin-bottom: 20px;
}

.lightbox-description {
    font-size: 1.2rem;
    font-family: 'Cormorant Garamond', serif;
    color: #000000;
    line-height: 1.8;
    margin-bottom: 30px;
}

.lightbox-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-family: 'Cinzel', serif;
    color: #8B0000;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.meta-value {
    font-family: 'Cormorant Garamond', serif;
    color: #B10000;
    font-size: 1.3rem;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .gallery-section {
        padding: 100px 20px 80px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 100px 20px 80px;
        overflow-x: hidden;
    }

    .gallery-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .gallery-title::before,
    .gallery-title::after {
        display: none;
    }

    /* Hide desktop filters, show mobile dropdown */
    .gallery-filters-desktop {
        display: none;
    }

    .gallery-filters-mobile {
        display: block;
        margin-bottom: 40px;
        opacity: 1;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .gallery-item {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .lightbox-content {
        padding: 30px 20px;
        width: 95%;
    }

    .lightbox-title {
        font-size: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .artifact-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
    .filter-dropdown {
        max-width: 100%;
    }

    .filter-dropdown-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .filter-dropdown-item {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

