/* ============================================================
   خوارزميات — قسم «نبذة عنا» بهوية نسيج المعرفة
   لوحة بصرية مبنية بالكود + بطاقتا الرؤية والرسالة
   ============================================================ */

.khw-about { direction: rtl; }

/* ---------- اللوحة البصرية ---------- */
.khw-about__panelwrap {
    perspective: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
}

.khw-about__panel {
    position: relative;
    width: 100%;
    min-height: 480px;
    border-radius: 26px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 85% 70% at 75% 25%, rgba(15, 77, 51, 0.65) 0%, transparent 62%),
        radial-gradient(ellipse 60% 70% at 12% 80%, rgba(31, 64, 104, 0.4) 0%, transparent 65%),
        linear-gradient(160deg, #0a2e1f 0%, #04180f 100%);
    box-shadow: 0 30px 60px -20px rgba(6, 35, 26, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 44px;
    transform: rotateX(1.2deg) rotateY(-1.8deg);
    animation: khwAboutSway 10s ease-in-out infinite;
}

@keyframes khwAboutSway {
    0%, 100% { transform: rotateX(1.2deg) rotateY(-1.8deg); }
    50% { transform: rotateX(-1deg) rotateY(1.6deg); }
}

/* شبكة نقاط */
.khw-about__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(127, 227, 176, 0.15) 1.2px, transparent 1.2px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(ellipse 75% 85% at 35% 45%, #000 0%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 85% at 35% 45%, #000 0%, transparent 78%);
    pointer-events: none;
}

/* فينييت */
.khw-about__panel::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 90px 18px rgba(2, 12, 8, 0.45);
    border-radius: inherit;
    pointer-events: none;
}

/* علامة الاستفهام الشبحية — تحية للتصميم القديم بلغة الهوية */
.khw-about__q {
    position: absolute;
    top: -30px;
    left: 6px;
    font-family: "Tajawal", sans-serif;
    font-size: 300px;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(127, 227, 176, 0.18);
    user-select: none;
    pointer-events: none;
}

/* حلقة مدارية + كرتان */
.khw-about__orbit {
    position: absolute;
    top: 8%;
    right: -12%;
    width: 62%;
    aspect-ratio: 1;
    border: 1.4px dashed rgba(127, 227, 176, 0.25);
    border-radius: 50%;
    animation: khwAboutSpin 46s linear infinite;
    pointer-events: none;
}

.khw-about__orbit i {
    position: absolute;
    top: 12%;
    left: 4%;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff9f45;
    box-shadow: 0 0 14px 3px rgba(255, 159, 69, 0.5);
}

@keyframes khwAboutSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.khw-about__sphere {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.khw-about__sphere--navy {
    width: 34px;
    height: 34px;
    bottom: 24%;
    left: 10%;
    background: radial-gradient(circle at 32% 30%, #3d6ca3, #16324f);
    box-shadow: 0 12px 24px rgba(2, 12, 8, 0.5);
    animation: khwAboutFloat 8s ease-in-out infinite;
}

.khw-about__sphere--green {
    width: 18px;
    height: 18px;
    top: 18%;
    right: 14%;
    background: radial-gradient(circle at 32% 30%, #7fe3b0, #157f52);
    box-shadow: 0 0 18px rgba(127, 227, 176, 0.4);
    animation: khwAboutFloat 6.5s ease-in-out infinite reverse;
}

@keyframes khwAboutFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* بطاقة اللوجو العائمة */
.khw-about__logochip {
    position: absolute;
    top: 34px;
    right: 34px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
    padding: 12px 18px;
    box-shadow: 0 14px 30px rgba(2, 12, 8, 0.4);
    animation: khwAboutFloat 9s ease-in-out infinite;
}

.khw-about__logochip img { display: block; width: 132px; height: auto; }

/* نص اللوحة */
.khw-about__panel-content { position: relative; z-index: 2; }

.khw-about__whoword {
    font-family: "Tajawal", sans-serif;
    font-size: clamp(38px, 3.6vw, 54px);
    font-weight: 800;
    color: #f2fbf6;
    line-height: 1.2;
    margin: 0 0 6px;
    text-shadow: 0 0 26px rgba(46, 185, 126, 0.35);
}

.khw-about__whoword span { color: #7fe3b0; }

.khw-about__slogan {
    font-family: "Tajawal", sans-serif;
    font-size: 16.5px;
    font-weight: 400;
    color: #cfe9db;
    margin: 0 0 22px;
    max-width: 420px;
    line-height: 1.8;
}

.khw-about__chips { display: flex; flex-wrap: wrap; gap: 10px; }

.khw-about__chips span {
    font-family: "Tajawal", sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #d9f3e5;
    background: rgba(127, 227, 176, 0.1);
    border: 1px solid rgba(127, 227, 176, 0.28);
    border-radius: 999px;
    padding: 8px 18px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ---------- عمود النص ---------- */
.khw-about__kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #157f52;
    margin-bottom: 14px;
}

.khw-about__kicker::before {
    content: "";
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(270deg, #2eb97e, transparent);
}

.khw-about__title {
    font-family: "Tajawal", sans-serif;
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 800;
    color: #16324f;
    line-height: 1.35;
    margin-bottom: 34px;
}

.khw-about__title span {
    color: #157f52;
    position: relative;
    white-space: nowrap;
}

.khw-about__title span svg {
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 100%;
    height: 9px;
    overflow: visible;
}

.khw-about__title span svg path {
    fill: none;
    stroke: #ff9f45;
    stroke-width: 2.6;
    stroke-linecap: round;
}

/* بطاقتا الرؤية والرسالة */
.khw-about__cards { display: flex; flex-direction: column; gap: 18px; }

.khw-about__card {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid rgba(22, 50, 79, 0.09);
    border-radius: 20px;
    padding: 26px 26px;
    box-shadow: 0 2px 6px rgba(22, 50, 79, 0.05), 0 16px 36px -18px rgba(22, 50, 79, 0.15);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
}

/* خيط هوية جانبي يتلون عند المرور */
.khw-about__card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2eb97e, #16324f);
    opacity: 0.35;
    transition: opacity 0.35s ease, width 0.35s ease;
}

.khw-about__card:hover {
    transform: translateY(-5px);
    border-color: rgba(46, 185, 126, 0.35);
    box-shadow: 0 6px 14px rgba(22, 50, 79, 0.07), 0 28px 52px -18px rgba(6, 35, 26, 0.32);
}

.khw-about__card:hover::before { opacity: 1; width: 6px; }

.khw-about__icon {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #157f52;
    background: rgba(46, 185, 126, 0.1);
    border: 1px solid rgba(46, 185, 126, 0.25);
    transition: all 0.35s ease;
}

.khw-about__card--message .khw-about__icon {
    color: #16324f;
    background: rgba(22, 50, 79, 0.07);
    border-color: rgba(22, 50, 79, 0.2);
}

.khw-about__card:hover .khw-about__icon {
    background: linear-gradient(135deg, #7fe3b0, #2eb97e);
    color: #06231a;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(46, 185, 126, 0.35);
}

.khw-about__card--message:hover .khw-about__icon {
    background: linear-gradient(135deg, #3d6ca3, #16324f);
    color: #fff;
    box-shadow: 0 10px 22px rgba(22, 50, 79, 0.35);
}

.khw-about__card h3 {
    font-family: "Tajawal", sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #16324f;
    margin: 0 0 8px;
}

.khw-about__card h3 em {
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    color: #ff9f45;
    margin-right: 8px;
    letter-spacing: 0.04em;
}

.khw-about__card .khw-about__text {
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.9;
    color: #52666f;
}

.khw-about__text p { margin: 0; color: inherit; }

/* ---------- التجاوب ---------- */
@media (max-width: 991px) {
    .khw-about__panel { min-height: 380px; padding: 30px; margin-bottom: 10px; }
    .khw-about__q { font-size: 210px; }
    .khw-about__logochip img { width: 104px; }
}

@media (max-width: 575px) {
    .khw-about__panel { min-height: 330px; padding: 24px 20px; border-radius: 20px; }
    .khw-about__card { padding: 20px 18px; gap: 14px; }
    .khw-about__icon { width: 48px; height: 48px; font-size: 18px; border-radius: 13px; }
    .khw-about__logochip { top: 20px; right: 20px; padding: 9px 13px; }
    .khw-about__logochip img { width: 86px; }
}

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
    .khw-about__panel,
    .khw-about__orbit,
    .khw-about__sphere--navy,
    .khw-about__sphere--green,
    .khw-about__logochip { animation: none !important; }
    .khw-about__panel { transform: none; }
    .khw-about__card { transition: none; }
}
