/* filename: design.css */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #003B73 0%, #0051A3 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 20px;
    color: #e0f2fe;
    position: relative;
    z-index: 1;
}

/* Intro Section */
.intro-section {
    padding: 64px 0;
    background: white;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #003B73;
}

.intro-text {
    font-size: 18px;
    line-height: 2;
    color: #374151;
    text-align: center;
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: #f9fafb;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: #6b7280;
    margin-bottom: 48px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-item {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 59, 115, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    border-bottom: 4px solid #003B73;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 59, 115, 0.2);
    border-bottom-color: #FFA500;
}

.service-item-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #003B73;
    transition: all 0.3s;
}

.service-item:hover .service-item-icon {
    background: linear-gradient(135deg, #003B73 0%, #0051A3 100%);
    color: white;
    transform: scale(1.1);
}

.service-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.service-item-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.8;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 20px; /* کاهش padding سمت راست و چپ (بالا و پایین بدون تغییر) */
    background: white;
}
.gallery-section .container {
    padding-left: 10px; /* کاهش فضای چپ */
    padding-right: 10px; /* کاهش فضای راست */
    max-width: 100%; /* کاملاً full-width */
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* وسط کردن ردیف‌ها */
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible; /* اجازه overflow برای scale بدون clip شدن */
    padding: 0 10px;
    box-sizing: border-box;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9; /* نسبت ۱۶:۹ */
    flex: 0 0 calc(30% - 16px); /* عرض کوچکتر */
    height: auto;
    box-shadow: 0 4px 16px rgba(0, 59, 115, 0.08);
    border: 2px solid #e0f2fe;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* برای فعال کردن z-index */
}

.gallery-item:hover {
    transform: scale(1.05) translateY(-8px); /* بزرگ کردن کل باکس */
    box-shadow: 0 16px 40px rgba(0, 59, 115, 0.25);
    border-color: #FFA500;
    z-index: 10; /* بالاتر قرار گرفتن از عناصر اطراف (مثل بخش سفید) */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: none;
}
/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 94%;
    max-height: 94%;
    gap: 40px; /* فاصله بین فلش‌ها و عکس */
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: 0.3s;
    user-select: none;
}

.lightbox-close:hover {
    color: #FFA500;
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: static; /* مهم: از absolute به static تغییر کرد */
    transform: none !important;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 48px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: #FFA500;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    color: #ccc;
    font-size: 18px;
    margin-top: 15px;
    text-align: center;
}
/* .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 59, 115, 0.95), transparent);
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
} */

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay span {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #003B73 0%, #0051A3 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 20px;
    color: #bfdbfe;
    margin-bottom: 32px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #FFA500;
    color: white;
    padding: 18px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.cta-btn:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.4);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .intro-section,
    .services-section,
    .gallery-section,
    .cta {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .intro-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .gallery-grid {
        gap: 22px;
        padding: 0 15px;
    }
    .gallery-item {
        flex: 0 0 100%;
        max-width: 420px;
        margin: 0 auto;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-subtitle {
        font-size: 16px;
    }
    
    .cta-btn {
        padding: 16px 32px;
        font-size: 16px;
    }
    .lightbox-content {
        flex-direction: column;
        gap: 28px;
        max-width: 96%;
    }

    .lightbox-img {
        max-height: 68vh;
        border-radius: 16px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 64px;
        height: 64px;
        font-size: 40px;
        background: rgba(255, 165, 0, 0.25);
        backdrop-filter: blur(12px);
    }

    .lightbox-prev:hover,
    .lightbox-next:hover {
        background: #FFA500;
        transform: scale(1.2);
    }

    .lightbox-caption {
        order: 4;
        margin-top: 10px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 48px 0;
    }
    
    .intro-section,
    .services-section,
    .gallery-section,
    .cta {
        padding: 48px 0;
    }
    
    .service-item {
        padding: 28px;
    }
    
    .service-item-icon {
        width: 56px;
        height: 56px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}