@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --secondary-gradient: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    --glass-effect: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.wb{
	color: #777777ff !important;
}
/* Reset and Base Styles */
.shiva-gallery-archive,
.shiva-artwork-detail,
.shiva-artworks-grid {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

.shiva-gallery-archive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: -1;
}

.shiva-gallery-archive::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    z-index: -1;
}

.art-title {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
}

.glass-card {
    background: var(--glass-effect);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Main Title */
.gallery-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    margin-bottom: 3rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
    line-height: 1.2;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category Buttons - دقیقاً مثل عکس */
.category-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.category-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: white;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
    min-height: 60px;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* رنگ‌بندی دقیق مثل عکس */
.category-btn:nth-child(1) {
    background: linear-gradient(90deg, #374151 0%, #1f2937 100%);
}

.category-btn:nth-child(2) {
    background: linear-gradient(90deg, #4b5563 0%, #374151 100%);
}

.category-btn:nth-child(3) {
    background: linear-gradient(90deg, #6b7280 0%, #4b5563 100%);
}

.category-btn:nth-child(4) {
    background: linear-gradient(90deg, #9ca3af 0%, #6b7280 100%);
}

.category-btn:nth-child(5) {
    background: linear-gradient(90deg, #d1d5db 0%, #9ca3af 100%);
}

.category-btn:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.category-btn img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Subcategory Popup */
.subcategory-popup {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 35px 65px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    perspective: 1200px;
    transform-style: preserve-3d;
    position: fixed;
    width: 320px;
    max-width: calc(100vw - 40px);
    max-height: 85vh;
    overflow: hidden;
    z-index: 50;
}

.subcategory-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

.subcategory-popup::-webkit-scrollbar {
    width: 8px;
}

.subcategory-popup::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 20px 0;
}

.subcategory-popup::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.subcategory-popup::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
}



.subcategory-popup.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    animation: popupGlow 2s ease-in-out infinite alternate;
}


@keyframes popupGlow {
    0% {
        box-shadow: 
            0 35px 65px rgba(0, 0, 0, 0.8),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            0 0 40px rgba(255, 255, 255, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 
            0 40px 75px rgba(0, 0, 0, 0.9),
            0 0 0 1px rgba(255, 255, 255, 0.15),
            0 0 50px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

/* Popup Content */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: scale(1);
}

.popup-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.subcategory-list {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcategory-item {
    width: 100%;
    text-align: left;
    padding: 1.25rem;
    border-radius: 1rem;
    transition: all 0.5s ease;
    color: white;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border: 1px solid #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-size: 200% 100%;
    background-position: right bottom;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(0) scale(1);
}

.subcategory-item:hover {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: #6b7280;
    background-position: left bottom;
}

.subcategory-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.subcategory-name {
    font-weight: 600;
    font-size: 1.125rem;
    flex: 1;
    letter-spacing: 0.025em;
}

.subcategory-count {
    color: #9ca3af;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Artworks Grid */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
}

.artwork-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.8) 0%, rgba(26, 26, 26, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    position: relative;
}

.artwork-card:hover {
    transform: translateY(-8px) rotateX(5deg) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(255, 255, 255, 0.1);
}

.artwork-image {
    position: relative;
    overflow: hidden;
    height: 16rem;
}

.artwork-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    filter: brightness(0.9) contrast(1.1);
}

.artwork-card:hover img {
    transform: scale(1.08) rotate(0.5deg);
    filter: brightness(1) contrast(1.2);
}

.artwork-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.artwork-card:hover::before {
    opacity: 1;
}

.artwork-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.artwork-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.artwork-title a {
    color: inherit;
    text-decoration: none;
}

.artwork-card:hover .artwork-title {
    color: #93c5fd;
}

.artwork-year {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.artwork-category {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(45deg, #374151, #4b5563);
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Error and Loading States */
.error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    text-align: center;
    margin: 1rem 0;
}

.no-subcategories {
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.no-categories {
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .gallery-main-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .category-container {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    
    .category-btn {
        max-width: 280px;
        min-height: 50px;
        font-size: 1rem;
    }
    
    .artwork-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .subcategory-popup {
        width: 95%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .gallery-main-title {
        font-size: 2rem;
    }
    
    .artwork-grid {
        grid-template-columns: 1fr;
    }
    
    .artwork-image {
        height: 12rem;
    }
    
    .category-btn {
        max-width: 250px;
        min-height: 45px;
        font-size: 0.9rem;
    }
}
