.gallery-section {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(135deg, 
        rgba(0, 184, 148, 0.02) 0%, 
        rgba(9, 132, 227, 0.02) 100%);
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        rgba(0, 184, 148, 0.1) 0%, 
        transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
}

.gallery-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        rgba(9, 132, 227, 0.1) 0%, 
        transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
}

.gallery-container {
    position: relative;
    z-index: 1;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.gallery-slider {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.swiper-container {
    width: 100%;
    height: 600px;
    position: relative;
}

.swiper-wrapper {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}

.swiper-slide-active {
    opacity: 1;
}

.slide-image {
    position: relative;
    overflow: hidden;
    height: 600px;
}

.slide-image::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, 
        rgba(0, 184, 148, 0.2) 0%, 
        rgba(9, 132, 227, 0.2) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.swiper-slide-active .slide-image::before {
    opacity: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .slide-image img {
    transform: scale(1.05);
}

.slide-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.slide-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        transparent 70%);
    border-radius: 0 0 0 100px;
    opacity: 0.05;
}

.slide-number {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 5rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.1;
    line-height: 1;
}

.slide-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.slide-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to left, 
        var(--primary-color), 
        var(--secondary-color));
    border-radius: 1.5px;
}

.slide-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.slide-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.slide-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    position: relative;
    padding-right: 1.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.swiper-slide-active .slide-features li {
    opacity: 1;
    transform: translateX(0);
}

.swiper-slide-active .slide-features li:nth-child(1) {
    transition-delay: 0.1s;
}

.swiper-slide-active .slide-features li:nth-child(2) {
    transition-delay: 0.2s;
}

.swiper-slide-active .slide-features li:nth-child(3) {
    transition-delay: 0.3s;
}

.swiper-slide-active .slide-features li:nth-child(4) {
    transition-delay: 0.4s;
}

.slide-features li::before {
    content: '';
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.slide-features li:nth-child(1)::before {
    content: '۱';
}

.slide-features li:nth-child(2)::before {
    content: '۲';
}

.slide-features li:nth-child(3)::before {
    content: '۳';
}

.slide-features li:nth-child(4)::before {
    content: '۴';
}

.slide-cta {
    margin-top: 2rem;
}

.gallery-navigation {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.swiper-button-prev,
.swiper-button-next {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(223, 230, 233, 0.5);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.swiper-button-prev::before,
.swiper-button-next::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swiper-button-prev:hover::before,
.swiper-button-next:hover::before {
    opacity: 1;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-secondary);
    border-top: none;
    border-left: none;
    transform: rotate(135deg);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.swiper-button-next::after {
    transform: rotate(-45deg);
}

.swiper-button-prev:hover::after,
.swiper-button-next:hover::after {
    border-color: white;
    transform: rotate(135deg) scale(1.1);
}

.swiper-button-next:hover::after {
    transform: rotate(-45deg) scale(1.1);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.swiper-pagination {
    position: relative;
    width: auto;
    display: flex;
    gap: 0.75rem;
    bottom: auto !important;
    pointer-events: auto;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(223, 230, 233, 0.8);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color));
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.swiper-pagination-bullet-active {
    width: 40px;
}

.swiper-pagination-bullet-active::before {
    transform: translateX(0);
}

.gallery-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: rgba(223, 230, 233, 0.3);
    overflow: hidden;
}

.gallery-progress-bar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, 
        var(--primary-color), 
        var(--secondary-color));
    transition: width 0.3s ease;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1rem;
    overflow-x: auto;
}

.gallery-thumbnail {
    width: 100px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumbnail:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3D Gallery Effect */
.gallery-3d-effect {
    perspective: 1000px;
}

.swiper-slide .slide-content {
    transform-style: preserve-3d;
    transform: rotateY(20deg) translateZ(50px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .slide-content {
    transform: rotateY(0) translateZ(0);
    opacity: 1;
}

.swiper-slide .slide-image {
    transform-style: preserve-3d;
    transform: rotateY(-20deg) translateZ(50px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.swiper-slide-active .slide-image {
    transform: rotateY(0) translateZ(0);
    opacity: 1;
}

@media (max-width: 1200px) {
    .swiper-container {
        height: 500px;
    }
    
    .slide-image {
        height: 500px;
    }
    
    .slide-content {
        padding: 3rem;
    }
    
    .slide-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .swiper-slide {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .swiper-container {
        height: auto;
    }
    
    .slide-image {
        height: 400px;
        order: 2;
    }
    
    .slide-content {
        padding: 2rem;
        order: 1;
    }
    
    .slide-number {
        display: none;
    }
    
    .gallery-navigation {
        position: relative;
        bottom: 0;
        right: 0;
        left: 0;
        margin-top: 2rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 6rem 0;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
    
    .slide-image {
        height: 300px;
    }
    
    .slide-title {
        font-size: 1.6rem;
    }
    
    .slide-description {
        font-size: 1rem;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .slide-content {
        padding: 1.5rem;
    }
    
    .slide-features li {
        font-size: 0.9rem;
    }
    
    .gallery-thumbnails {
        gap: 0.5rem;
    }
    
    .gallery-thumbnail {
        width: 80px;
        height: 50px;
    }
}

/* Animations */
@keyframes gallerySlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading Animation */
.gallery-loader {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 184, 148, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(50%, -50%) rotate(0deg); }
    100% { transform: translate(50%, -50%) rotate(360deg); }
}