/* استایل نمایش شرکت‌ها با اسلایدر */

:root {
    --company-primary: #667eea;
    --company-secondary: #764ba2;
    --company-bg: #ffffff;
    --company-text: #2d3748;
}

.companies-wrapper {
    position: relative;
    padding: 30px 0;
    max-width: 1300px;
    margin: 0 auto;
}

.companies-swiper {
    padding: 20px 40px;
    overflow: hidden;
}

.swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.company-card {
    cursor: pointer;
    background: var(--company-bg);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(0, 0, 0, 0.04);
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.company-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--company-primary);
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--company-primary), var(--company-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px 20px 0 0;
}

.company-card:hover::before {
    opacity: 1;
}

.company-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #f0f0f0;
    transition: all 0.4s ease;
}

.company-card:hover .company-logo {
    border-color: var(--company-primary);
    transform: scale(1.1) rotate(-5deg);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-logo-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--company-primary), var(--company-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
}

.company-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--company-text);
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.company-card:hover .company-name {
    color: var(--company-primary);
}

/* علامت مثبت - در همه دستگاه‌ها نمایش داده میشه */
.company-hover-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--company-primary), var(--company-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    /* در حالت عادی کمی کمرنگ */
    opacity: 0.7;
    transform: scale(0.9);
}

.company-card:hover .company-hover-icon {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.company-hover-icon svg {
    width: 24px;
    height: 24px;
}

/* استایل دکمه‌های ناوبری Swiper */
.swiper-button-next,
.swiper-button-prev {
    background: linear-gradient(135deg, var(--company-primary), var(--company-secondary));
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: 700;
}

/* ===== تغییر مهم: فاصله نقطه‌های پایین ===== */
.swiper-pagination {
    position: relative !important;
    margin-top: 30px !important; /* فاصله ۳۰ پیکسل از اسلایدر */
    bottom: 0 !important;
    padding-top: 10px !important;
}

.swiper-pagination-bullet {
    background: var(--company-primary);
    opacity: 0.3;
    width: 12px;
    height: 12px;
    margin: 0 6px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--company-primary);
    opacity: 1;
    width: 30px;
    border-radius: 6px;
}

/* مودال */
.company-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.company-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.company-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.company-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    padding: 45px 40px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.company-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.company-modal-close:hover {
    background: #fee;
    color: #e53e3e;
    transform: rotate(90deg);
}

.company-modal-body {
    text-align: center;
}

.company-modal-logo {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--company-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.company-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-modal-logo-placeholder {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--company-primary), var(--company-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: 700;
    color: #ffffff;
}

.company-modal-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--company-text);
    margin: 0 0 15px;
}

.company-modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin: 0 0 25px;
    text-align: justify;
}

.company-modal-link {
    display: inline-block;
    padding: 14px 45px;
    background: linear-gradient(135deg, var(--company-primary), var(--company-secondary));
    color: #ffffff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.company-modal-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

/* انیمیشن‌ها */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .companies-swiper {
        padding: 20px 20px;
    }
}

@media (max-width: 768px) {
    .companies-wrapper {
        padding: 20px 0;
    }
    
    .companies-swiper {
        padding: 15px 10px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .company-card {
        padding: 20px 15px;
        min-height: 200px;
    }
    
    .company-logo,
    .company-logo-placeholder {
        width: 90px;
        height: 90px;
        margin-bottom: 15px;
    }
    
    .company-name {
        font-size: 15px;
    }
    
    /* علامت مثبت در موبایل - بزرگتر و مشخص‌تر */
    .company-hover-icon {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        opacity: 0.8;
        transform: scale(0.95);
    }
    
    .company-hover-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .company-modal-content {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .company-modal-name {
        font-size: 24px;
    }
    
    .company-modal-description {
        font-size: 14px;
    }
    
    /* فاصله نقطه‌ها در موبایل */
    .swiper-pagination {
        margin-top: 25px !important;
    }
}

@media (max-width: 480px) {
    .company-card {
        padding: 15px 10px;
        min-height: 170px;
    }
    
    .company-logo,
    .company-logo-placeholder {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }
    
    .company-name {
        font-size: 13px;
    }
    
    .company-hover-icon {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
        opacity: 0.9;
        transform: scale(1);
    }
    
    .company-hover-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .company-modal-content {
        padding: 25px 15px;
    }
    
    .company-modal-logo,
    .company-modal-logo-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .company-modal-name {
        font-size: 20px;
    }
    
    .swiper-pagination {
        margin-top: 20px !important;
    }
    
    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 5px !important;
    }
    
    .swiper-pagination-bullet-active {
        width: 25px;
    }
}