/* Gallery Styles */
.company-gallery-area {
    background: #f8f9fa;
    position: relative;
}

.profile-gallery {
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.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: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.overlay-content h4 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.load-more-btn {
    background: linear-gradient(45deg, #fa4612, #ff6b35);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    color: white !important;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(250, 70, 18, 0.2);
}

.load-more-btn:hover {
    background: linear-gradient(45deg, #e63900, #fa4612);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(250, 70, 18, 0.4);
    color: white !important;
}

.load-more-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(250, 70, 18, 0.3);
    color: white !important;
}

.load-more-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(250, 70, 18, 0.3);
}

.load-more-btn i {
    margin-left: 10px;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: rotate(90deg) scale(1.1);
}

.load-more-btn span {
    transition: all 0.3s ease;
    position: relative;
}

.load-more-btn:hover span {
    letter-spacing: 0.5px;
}

/* تأثير إضافي للزر */
.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.load-more-btn:hover::before {
    left: 100%;
}

/* حالة خاصة عندما يكون الزر في وضع إخفاء الصور */
.load-more-btn.hide-mode {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.load-more-btn.hide-mode:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.4);
}

.load-more-btn.hide-mode i {
    transform: rotate(180deg);
}

.load-more-btn.hide-mode:hover i {
    transform: rotate(180deg) scale(1.1);
}

/* تحسين انميشن المعرض */
.more-images {
    animation: fadeInUp 0.6s ease;
}

.more-images.hiding {
    animation: fadeOutDown 0.4s ease;
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Preview Styles for Index Page */
.project-gallery-preview {
    margin-top: 40px;
}

.preview-project-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 30px;
    transition: all 0.4s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.preview-project-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.preview-project-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.preview-project-item:hover .preview-project-image {
    transform: scale(1.1);
}

.preview-project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(250, 70, 18, 0.9), transparent);
    color: white;
    padding: 40px 25px 25px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.preview-project-item:hover .preview-project-overlay {
    transform: translateY(0);
}

.preview-overlay-content h4 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.preview-overlay-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive Design for Preview */
@media (max-width: 768px) {
    .preview-project-image {
        height: 280px;
    }
    
    .preview-overlay-content h4 {
        font-size: 20px;
    }
    
    .preview-overlay-content p {
        font-size: 14px;
    }
      .preview-project-overlay {
        padding: 30px 20px 20px;
    }
}

@media (max-width: 576px) {
    .preview-project-image {
        height: 220px;
    }
    
    .preview-overlay-content h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .preview-overlay-content p {
        font-size: 13px;
    }
      .preview-project-overlay {
        padding: 25px 15px 15px;
    }
}

/* تحسينات إضافية للانميشن */
.preview-project-item {
    animation: fadeInUp 0.8s ease;
}

.preview-project-item:nth-child(1) { animation-delay: 0.1s; }
.preview-project-item:nth-child(2) { animation-delay: 0.2s; }
.preview-project-item:nth-child(3) { animation-delay: 0.3s; }
.preview-project-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Lightbox Styles */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-info {
    padding: 20px;
    text-align: center;
}

.lightbox-info h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.lightbox-info p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}