/* صفحة المعرض الرئيسية */
.gallery-main {
    padding: 120px 0 80px;
    background: var(--light-bg);
    min-height: 100vh;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 800;
}

.gallery-header p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.gallery-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover::before {
    opacity: 0.05;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.category-card:hover .category-icon {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.category-content {
    flex: 1;
    z-index: 2;
    position: relative;
}

.category-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.category-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-stats span {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-stats i {
    color: var(--primary-color);
}

.category-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.category-card:hover .category-arrow {
    transform: translateX(-5px);
    color: var(--secondary-color);
}

/* صفحة الأقسام الفرعية */
.subcategory-page {
    padding: 120px 0 80px;
    background: var(--light-bg);
    min-height: 100vh;
}

.subcategory-header {
    text-align: center;
    margin-bottom: 4rem;
}

.subcategory-header .breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .separator {
    color: var(--text-color);
}

.subcategory-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 800;
}

.subcategory-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.subcategory-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.subcategory-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.subcategory-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.subcategory-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.subcategory-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.subcategory-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.subcategory-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--light-bg);
    margin-top: auto;
}

.subcategory-stats span {
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subcategory-stats i {
    color: var(--primary-color);
}

/* صفحة عرض الصور */
.gallery-page {
    padding: 120px 0 80px;
    background: var(--light-bg);
    min-height: 100vh;
}

.gallery-header-page {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-header-page .breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-header-page h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 800;
}

.gallery-header-page p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ffffff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

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

.gallery-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

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

.gallery-item-content {
    padding: 1.5rem;
}

.gallery-item-content h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery-item-content p {
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.gallery-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* النافذة المنبثقة للصور */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: var(--primary-color);
}

.modal-prev {
    left: -70px;
}

.modal-next {
    right: -70px;
}

/* تجاوب الشاشات */
@media (max-width: 768px) {
    .gallery-header h1,
    .subcategory-header h1,
    .gallery-header-page h1 {
        font-size: 2rem;
    }
    
    .gallery-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .subcategory-content {
        padding: 1.2rem;
    }
    
    .subcategory-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
        min-height: 2.6rem;
        display: flex;
        align-items: center;
    }
    
    .subcategory-content p {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-main,
    .subcategory-page,
    .gallery-page {
        padding: 100px 0 60px;
    }
    
    .category-card {
        flex-direction: column;
        text-align: center;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .subcategory-content {
        padding: 1rem;
    }
    
    .subcategory-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        min-height: 2.4rem;
        display: flex;
        align-items: center;
    }
    
    .subcategory-content p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .subcategory-stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .subcategory-stats span {
        font-size: 0.8rem;
    }
} 