/* ملف تنسيق صفحة معرض الصور
-------------------------------------------------- */
:root {
    --primary-color: #1c4f82;
    --secondary-color: #e6b400;
    --dark-color: #0a2240;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --primary-rgb: 28, 79, 130;
    --secondary-rgb: 230, 180, 0;
}

/* تنسيقات العنوان الرئيسي */
.page-title-section {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    position: relative;
    margin-bottom: 30px;
}

.page-title-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/patterns/pattern-light.png');
    background-repeat: repeat;
    opacity: 0.1;
}

.section-divider {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

/* تنسيقات قسم المعرض */
.gallery-section {
    padding: 60px 0;
}

.section-padding {
    padding: 60px 0;
}

/* تنسيقات بطاقات الصور */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 280px; /* تثبيت ارتفاع الصور */
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* تنسيقات أزرار التفاعل */
.gallery-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-actions {
    transform: translateY(0);
}

.action-button {
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.action-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.action-button i {
    margin-left: 5px;
    font-size: 16px;
}

.action-button.active {
    color: var(--danger-color);
}

.action-count {
    margin: 0 5px;
    font-weight: bold;
}

/* تنسيقات مودال المشاركة */
.share-modal-content {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.share-modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
}

.share-modal-body {
    padding: 20px;
}

.share-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.share-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.share-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.share-button i {
    font-size: 24px;
    margin-bottom: 5px;
}

.share-button.whatsapp i {
    color: #25D366;
}

.share-button.facebook i {
    color: #1877F2;
}

.share-button.twitter i {
    color: #1DA1F2;
}

.share-button.copy i {
    color: #6c757d;
}

/* تنسيقات الترقيم */
.pagination-wrapper {
    margin-top: 40px;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: rgba(28, 79, 130, 0.1);
}

/* تأثيرات الظهور */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* تنسيقات الرسائل */
.alert-custom {
    background-color: rgba(23, 162, 184, 0.1);
    border-left: 4px solid var(--info-color);
    border-radius: 5px;
    padding: 15px;
    display: flex;
    align-items: center;
}

.alert-custom i {
    font-size: 24px;
    margin-left: 15px;
    color: var(--info-color);
}

/* تنسيقات متجاوبة */
@media (max-width: 991px) {
    .gallery-item {
        margin-bottom: 20px;
    }
    
    .gallery-item img {
        height: 220px;
    }
    
    .gallery-info h4 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .gallery-item img {
        height: 220px;
    }
    
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2), transparent);
    }
    
    .gallery-actions {
        transform: translateY(0);
    }
}

/* تنسيقات GLightbox المخصصة */
.glightbox-clean .gslide-description {
    background: rgba(0, 0, 0, 0.7);
}

.glightbox-clean .gslide-title {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 5px;
}

.glightbox-clean .gslide-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

.glightbox-clean .gclose, 
.glightbox-clean .gnext, 
.glightbox-clean .gprev {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.glightbox-clean .gclose:hover, 
.glightbox-clean .gnext:hover, 
.glightbox-clean .gprev:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.goverlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9) !important;
}

.glightbox-container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999 !important;
    overflow: hidden;
    touch-action: none;
    -webkit-text-size-adjust: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    outline: none;
    overflow: hidden;
}

.gslide img {
    max-height: 85vh;
    width: auto;
    object-fit: contain;
}

.gbtn {
    cursor: pointer;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.gbtn:hover {
    background-color: #007bff;
}

@media (max-width: 768px) {
    .gslide img {
        max-height: 75vh;
    }
    
    .glightbox-clean .gclose, 
    .glightbox-clean .gnext, 
    .glightbox-clean .gprev {
        width: 35px;
        height: 35px;
    }
}

/* تنسيقات الباجينيشن */
.pagination {
    margin: 0;
    padding: 0;
}

.pagination .page-item .page-link {
    border-radius: 50%;
    margin: 0 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.pagination .page-item .page-link:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: scale(1.1);
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #aaa;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .pagination .page-item .page-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin: 0 2px;
    }
}
