/* === معرض الصور الثوري === */

/* قسم معرض الباصات */
.revolutionary-bus-gallery {
    padding: var(--space-24) 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.revolutionary-bus-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(245, 158, 11, 0.03) 100%);
    z-index: 1;
}

/* قسم معرض الفنادق */
.revolutionary-hotel-gallery {
    padding: var(--space-24) 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #0ea5e9 75%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.revolutionary-hotel-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    z-index: 1;
}

/* الحاوية */
.gallery-container {
    position: relative;
    z-index: 2;
}

/* عنوان المعرض */
.gallery-title {
    text-align: center;
    margin-bottom: var(--space-16);
}

.gallery-title h2 {
    font-family: 'Cairo', sans-serif;
    font-size: var(--text-5xl);
    font-weight: var(--font-black);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-4);
    position: relative;
}

.revolutionary-hotel-gallery .gallery-title h2 {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

.gallery-title p {
    font-size: var(--text-xl);
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.revolutionary-hotel-gallery .gallery-title p {
    color: rgba(255, 255, 255, 0.9);
}

/* شبكة المعرض */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
}

/* عنصر المعرض الثوري */
.revolutionary-gallery-item {
    position: relative;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    background: var(--white);
    height: 350px;
    cursor: pointer;
}

.revolutionary-hotel-gallery .revolutionary-gallery-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.revolutionary-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

.revolutionary-gallery-item:hover::before {
    opacity: 1;
}

.revolutionary-gallery-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-3xl);
}

/* صورة المعرض */
.gallery-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    filter: brightness(1) contrast(1.1);
}

.revolutionary-gallery-item:hover .gallery-image img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.2);
}

/* طبقة التراكب */
.revolutionary-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.8) 0%,
        rgba(14, 165, 233, 0.7) 50%,
        rgba(245, 158, 11, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 2;
}

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

/* محتوى التراكب */
.gallery-overlay-content {
    text-align: center;
    color: var(--white);
    transform: translateY(30px);
    transition: var(--transition-normal);
    padding: var(--space-6);
}

.revolutionary-gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-overlay-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: var(--text-3xl);
    color: var(--white);
    transition: var(--transition-normal);
}

.revolutionary-gallery-item:hover .gallery-overlay-icon {
    transform: scale(1.1) rotate(10deg);
    background: rgba(255, 255, 255, 0.3);
}

.gallery-overlay-title {
    font-family: 'Cairo', sans-serif;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-overlay-description {
    font-size: var(--text-base);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.gallery-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: var(--transition-normal);
}

.gallery-overlay-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: var(--white);
}

/* شارة المعرض */
.gallery-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--gradient-gold);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    z-index: 3;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.revolutionary-gallery-item:hover .gallery-badge {
    transform: scale(1.1);
}

/* حالة عدم وجود صور */
.no-gallery-items {
    text-align: center;
    padding: var(--space-20) var(--space-8);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-3xl);
    margin: var(--space-8) 0;
}

.revolutionary-hotel-gallery .no-gallery-items {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.no-gallery-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    font-size: var(--text-4xl);
    color: var(--white);
    box-shadow: var(--shadow-xl);
}

.no-gallery-title {
    font-family: 'Cairo', sans-serif;
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--space-4);
}

.revolutionary-hotel-gallery .no-gallery-title {
    color: var(--white);
}

.no-gallery-description {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.revolutionary-hotel-gallery .no-gallery-description {
    color: rgba(255, 255, 255, 0.8);
}

.no-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    background: var(--gradient-emerald);
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-2xl);
    text-decoration: none;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.no-gallery-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-emerald-glow);
    color: var(--white);
}

/* تأثيرات خاصة للباصات */
.bus-gallery-item .revolutionary-gallery-overlay {
    background: linear-gradient(
        135deg,
        rgba(14, 165, 233, 0.8) 0%,
        rgba(6, 182, 212, 0.7) 50%,
        rgba(16, 185, 129, 0.8) 100%
    );
}

/* تأثيرات خاصة للفنادق */
.hotel-gallery-item .revolutionary-gallery-overlay {
    background: linear-gradient(
        135deg,
        rgba(245, 158, 11, 0.8) 0%,
        rgba(217, 119, 6, 0.7) 50%,
        rgba(180, 83, 9, 0.8) 100%
    );
}

/* الاستجابة للأجهزة */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-6);
    }
    
    .revolutionary-gallery-item {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .revolutionary-bus-gallery,
    .revolutionary-hotel-gallery {
        padding: var(--space-16) 0;
    }
    
    .gallery-title h2 {
        font-size: var(--text-4xl);
    }
    
    .gallery-title p {
        font-size: var(--text-lg);
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .revolutionary-gallery-item {
        height: 280px;
        margin: 0 var(--space-4);
    }
    
    .gallery-overlay-icon {
        width: 60px;
        height: 60px;
        font-size: var(--text-2xl);
    }
    
    .gallery-overlay-title {
        font-size: var(--text-xl);
    }
    
    .gallery-overlay-description {
        font-size: var(--text-sm);
    }
}

@media (max-width: 640px) {
    .revolutionary-gallery-item {
        height: 250px;
        margin: 0 var(--space-2);
    }

    .no-gallery-items {
        padding: var(--space-12) var(--space-4);
    }

    .no-gallery-icon {
        width: 80px;
        height: 80px;
        font-size: var(--text-3xl);
    }

    .no-gallery-title {
        font-size: var(--text-2xl);
    }

    .no-gallery-description {
        font-size: var(--text-base);
    }
}

/* === مودال عرض الصور === */
.image-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-modal .modal-content {
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* تحسينات للموبايل في المودال */
@media (max-width: 768px) {
    .image-modal .modal-content {
        max-width: 95%;
        max-height: 95%;
        margin: var(--space-4);
    }

    .image-modal .modal-close {
        top: 10px !important;
        right: 10px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
    }
}

/* تأثيرات إضافية للمعرض */
.revolutionary-gallery-item {
    will-change: transform;
}

.revolutionary-gallery-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.revolutionary-gallery-item:nth-child(even) {
    animation-delay: 0.2s;
}

/* تحسين الأداء */
.gallery-image img {
    will-change: transform;
}

.revolutionary-gallery-overlay {
    will-change: opacity;
}

/* تأثيرات التحميل */
.gallery-image img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-image img.loaded {
    opacity: 1;
}

/* حالة التحميل */
.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 158, 11, 0.3);
    border-top: 3px solid var(--gold-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

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