﻿/* ====== Clients & Testimonials (KSA-ready) ====== */
.sa-section {
    padding: 3.5rem 0;
}

.sa-title {
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .4rem;
}

.sa-subtitle {
    color: #475569;
    margin: 0 auto 1rem;
    max-width: 760px;
    font-size: 1.05rem;
}

/* KSA badge */
.sa-badge-ksa {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .25rem auto 0;
    padding: .35rem .7rem;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
}

    .sa-badge-ksa .fa-flag {
        font-size: .9rem
    }

/* ===== Logos strip ===== */
.sa-logos {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    gap: 16px;
    margin-top: 1.25rem;
}

.sa-logo-card {
    grid-column: span 3; /* 4 شعارات بالسطر على الشاشات الكبيرة */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(2,6,23,.05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .sa-logo-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(2,6,23,.10);
        border-color: #d1d5db;
    }

.sa-logo-img {
    max-width: 70%;
    max-height: 48px;
    object-fit: contain;
    filter: grayscale(15%); /* لمسة خفيفة */
}

/* ===== Testimonials ===== */
.sa-testimonials {
    margin-top: 2.25rem;
}

.sa-title-sm {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: .9rem;
}

.sa-t-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    gap: 16px;
}

.sa-t-card {
    grid-column: span 4; /* 3 بطاقات في السطر على الكبير */
    display: flex;
    flex-direction: column;
    gap: .75rem;
    background: linear-gradient(180deg,#ffffff 0%, #fbfbff 100%);
    border: 1px solid #e6e8ef;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 28px rgba(2,6,23,.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .sa-t-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 40px rgba(2,6,23,.12);
        border-color: #d1d5db;
    }

.sa-t-card__head {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.sa-t-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2ff;
}

.sa-t-name {
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.sa-t-role {
    color: #64748b;
    font-size: .9rem;
}

.sa-t-text {
    color: #334155;
    line-height: 1.7;
    margin: .25rem 0 .25rem;
}

.sa-t-rating {
    margin-top: auto;
    font-size: 1rem;
    letter-spacing: .05em;
}

.sa-star {
    color: #f59e0b;
}

.sa-star--off {
    color: #e5e7eb;
}

/* ===== RTL tweaks ===== */
html[dir="rtl"] .sa-logos,
html[dir="rtl"] .sa-t-grid {
    direction: rtl;
}

html[dir="rtl"] .sa-t-card__head {
    flex-direction: row-reverse;
    text-align: start;
}

    html[dir="rtl"] .sa-t-card__head > div {
        text-align: right;
    }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .sa-logo-card {
        grid-column: span 4;
    }
    /* 3 بالسطر */
    .sa-t-card {
        grid-column: span 6;
    }
    /* 2 بالسطر */
}

@media (max-width: 575.98px) {
    .sa-logo-card {
        grid-column: span 6;
    }
    /* 2 بالسطر */
    .sa-t-card {
        grid-column: span 12;
    }
    /* 1 بالسطر */
    .sa-logo-img {
        max-height: 42px;
    }
}

/* ===== Modern Apps Section ===== */
.modern-apps {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
}

.modern-apps::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatApps 20s ease-in-out infinite;
}

.modern-apps::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatApps 15s ease-in-out infinite reverse;
}

@keyframes floatApps {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

.modern-apps__header {
    max-width: 800px;
    margin: 0 auto 3.5rem;
    position: relative;
    z-index: 1;
}

.modern-apps__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--codeiks-dark-blue, #1e3a8a);
    margin: 0;
    background: linear-gradient(135deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out;
}

.modern-apps__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.modern-app-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2rem 1.75rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(2, 6, 23, 0.04);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeInUp 0.6s ease-out both;
}

.modern-app-card:nth-child(1) { animation-delay: 0.1s; }
.modern-app-card:nth-child(2) { animation-delay: 0.2s; }
.modern-app-card:nth-child(3) { animation-delay: 0.3s; }
.modern-app-card:nth-child(4) { animation-delay: 0.4s; }

.modern-app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-app-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-app-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 16px 48px rgba(30, 58, 138, 0.18);
    border-color: var(--codeiks-teal-light, #06b6d4);
    text-decoration: none;
    color: inherit;
}

.modern-app-card:hover::before {
    transform: scaleX(1);
}

.modern-app-card:hover::after {
    width: 300px;
    height: 300px;
}

.modern-app-card__icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 2rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modern-app-card__icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-app-card:hover .modern-app-card__icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.4);
}

.modern-app-card:hover .modern-app-card__icon::before {
    width: 120px;
    height: 120px;
}

.modern-app-card__icon i {
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-app-card:hover .modern-app-card__icon i {
    transform: scale(1.1);
}

.modern-app-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.modern-app-card__name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--codeiks-dark-blue, #1e3a8a);
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.modern-app-card:hover .modern-app-card__name {
    color: var(--codeiks-teal, #14b8a6);
}

.modern-app-card__desc {
    color: #64748b;
    font-size: 0.975rem;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.modern-app-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(20, 184, 166, 0.08) 100%);
    color: var(--codeiks-dark-blue, #1e3a8a);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.modern-app-card:hover .modern-app-card__badge {
    background: linear-gradient(135deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateX(4px);
}

.modern-app-card__badge i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.modern-app-card:hover .modern-app-card__badge i {
    transform: scale(1.15);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Support */
.rtl .modern-apps__grid {
    direction: rtl;
}

.rtl .modern-app-card::before {
    transform-origin: right;
}

.rtl .modern-app-card:hover .modern-app-card__badge {
    transform: translateX(-4px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .modern-apps {
        padding: 4rem 0;
    }
    
    .modern-apps__header {
        margin-bottom: 2.5rem;
    }
    
    .modern-apps__title {
        font-size: 2rem;
    }
    
    .modern-apps__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .modern-app-card {
        padding: 1.75rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .modern-apps {
        padding: 3.5rem 0;
    }
    
    .modern-apps__title {
        font-size: 1.75rem;
    }
    
    .modern-apps__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .modern-app-card {
        padding: 1.5rem 1.25rem;
    }
    
    .modern-app-card__icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
    
    .modern-app-card__name {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .modern-apps {
        padding: 3rem 0;
    }
    
    .modern-apps__title {
        font-size: 1.5rem;
    }
    
    .modern-app-card {
        padding: 1.25rem 1rem;
    }
    
    .modern-app-card__icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .modern-app-card__name {
        font-size: 1.1rem;
    }
    
    .modern-app-card__desc {
        font-size: 0.9rem;
    }
}