/*الاكاديمي*/
:root {
    --primary: var(--qc-primary);
    --secondary: var(--qc-secondary);
    --deep: var(--qc-deep);
    --dark: var(--qc-dark);
    --navy: var(--qc-deep);
    --text: var(--qc-text);
    --muted: var(--qc-muted);
    --bg: #f4f8fc;
    --soft: rgba(79,172,254,0.1);
    --soft-blue: rgba(79,172,254,.12);
    --card: rgba(255,255,255,0.94);
    --line: var(--qc-line);
    --line-blue: var(--qc-line);
    --success: var(--qc-success);
    --warning: var(--qc-warning);
    --danger: var(--qc-danger);
    --shadow: 0 16px 42px rgba(36,56,75,0.1);
    --shadow-lg: 0 26px 70px rgba(36,56,75,0.15);
    --glow: 0 18px 45px rgba(79,172,254,0.28);
    --radius: 26px;
    --radius-lg: 34px;
}

* {
    box-sizing: border-box;
    font-family: "Cairo", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 84% 9%, rgba(79,172,254,0.2), transparent 28%), radial-gradient(circle at 12% 16%, rgba(0,242,254,0.14), transparent 26%), radial-gradient(circle at 14% 88%, rgba(36,73,102,0.1), transparent 30%), linear-gradient(180deg, #fff 0%, rgba(79,172,254,0.1) 44%, rgba(0,242,254,0.1) 100%);
    overflow-x: hidden;
    line-height: 1.7;
    min-height: 100vh;
}

    body::before,
    body::after {
        content: "";
        position: fixed;
        width: 580px;
        height: 580px;
        border-radius: 999px;
        z-index: -1;
        pointer-events: none;
        filter: blur(8px);
    }

    body::before {
        top: -300px;
        right: -220px;
        background: radial-gradient(circle, rgba(79,172,254,0.16), transparent 68%);
    }

    body::after {
        bottom: -320px;
        left: -240px;
        background: radial-gradient(circle, rgba(0,242,254,0.14), transparent 68%);
    }

a {
    text-decoration: none;
}

button,
input,
textarea,
a {
    -webkit-tap-highlight-color: transparent;
}

    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    a:focus-visible {
        outline: 3px solid rgba(79,172,254,0.24);
        outline-offset: 3px;
    }

.container-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(79,172,254,0.14);
    transition: all .25s ease;
}

    .site-header.scrolled {
        padding: 9px 0;
        background: rgba(255,255,255,0.96);
        box-shadow: 0 12px 34px rgba(36,56,75,0.08);
    }

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    font-weight: 900;
}

.brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 23px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 28px rgba(79,172,254,0.28);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

    .brand-icon::after {
        content: "";
        position: absolute;
        width: 82px;
        height: 82px;
        background: rgba(255,255,255,0.18);
        border-radius: 999px;
        top: -43px;
        left: -43px;
    }


    .brand-icon.has-logo {
        width: 58px;
        height: 58px;
        background: #fff;
        padding: 4px;
        border: 1px solid rgba(79,172,254,0.18);
        box-shadow: 0 12px 28px rgba(79,172,254,0.18);
    }

        .brand-icon.has-logo::after {
            display: none;
        }

        .brand-icon.has-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 14px;
            display: block;
        }

.brand-text strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--deep), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-top: 2px;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .main-menu a {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--dark);
        font-weight: 800;
        padding: 10px 13px;
        border-radius: 999px;
        transition: all .22s ease;
        white-space: nowrap;
    }

        .main-menu a:hover,
        .main-menu a.active {
            color: var(--primary);
            background: rgba(79,172,254,0.1);
        }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-main,
.btn-soft,
.btn-white,
.btn-dark-gradient,
.menu-toggle,
.semantic-search-btn,
.semantic-clear-btn,
.like-btn,
.load-comments-btn {
    border: 0;
    min-height: 46px;
    border-radius: 999px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease, opacity .25s ease;
    white-space: nowrap;
}

.btn-main,
.semantic-search-btn {
    color: #fff !important;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.26), transparent 34%), linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 26px rgba(79,172,254,0.25);
}

    .btn-main:hover,
    .semantic-search-btn:hover,
    .btn-soft:hover,
    .btn-white:hover,
    .btn-dark-gradient:hover,
    .semantic-clear-btn:hover,
    .load-comments-btn:hover {
        transform: translateY(-2px);
    }

    .btn-main:hover,
    .semantic-search-btn:hover {
        box-shadow: 0 16px 36px rgba(79,172,254,0.36);
    }

.btn-soft,
.semantic-clear-btn {
    color: var(--deep) !important;
    background: rgba(79,172,254,0.1);
    border: 1px solid rgba(79,172,254,0.18);
}

    .btn-soft:hover,
    .semantic-clear-btn:hover {
        background: #fff;
        border-color: rgba(79,172,254,0.32);
        box-shadow: 0 10px 26px rgba(36,56,75,0.08);
    }

.btn-white {
    color: var(--deep) !important;
    background: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 10px 26px rgba(36,56,75,0.08);
}

.btn-dark-gradient {
    color: #fff !important;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 34%), linear-gradient(135deg, var(--deep), var(--dark));
    box-shadow: 0 12px 26px rgba(36,56,75,0.18);
}

    .btn-dark-gradient:hover {
        box-shadow: 0 16px 36px rgba(36,56,75,0.26);
    }

.menu-toggle {
    display: none;
    width: 48px;
    padding: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.notification-link {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -7px;
    left: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 2px solid #fff;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(79,172,254,0.24);
}

.permission-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    background: rgba(79,172,254,0.08);
    border: 1px solid rgba(79,172,254,0.16);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 900;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 88px;
    background: radial-gradient(circle at 78% 14%, rgba(79,172,254,0.28), transparent 30%), radial-gradient(circle at 22% 82%, rgba(0,242,254,0.18), transparent 28%), linear-gradient(135deg, rgba(0,242,254,0.1) 0%, rgba(79,172,254,0.1) 52%, #fff 100%);
}

    .hero::before,
    .hero::after {
        content: "";
        position: absolute;
        border-radius: 999px;
        background: linear-gradient(135deg, rgba(79,172,254,0.12), rgba(0,242,254,0.08));
        pointer-events: none;
    }

    .hero::before {
        width: 290px;
        height: 290px;
        top: 118px;
        right: -100px;
    }

    .hero::after {
        width: 370px;
        height: 370px;
        bottom: -138px;
        left: -116px;
    }

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    gap: 42px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--deep);
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(36,56,75,0.06);
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 18px;
    color: var(--dark);
    font-size: clamp(2.2rem, 4vw, 4.05rem);
    font-weight: 900;
    line-height: 1.23;
    letter-spacing: -.8px;
}

    .hero h1 span {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.hero p {
    margin: 0;
    color: #244966;
    font-size: 1.08rem;
    line-height: 2;
    font-weight: 700;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.hero-point {
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(79,172,254,0.14);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(36,56,75,0.06);
    color: var(--dark);
    font-size: 13px;
    font-weight: 900;
}

    .hero-point i {
        color: var(--primary);
        margin-left: 7px;
    }

.hero-visual {
    position: relative;
    min-height: 520px;
}

.academic-mockup {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: rgba(255,255,255,0.84);
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 34px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

    .academic-mockup::before {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        border-radius: 999px;
        top: -90px;
        left: -90px;
        background: radial-gradient(circle, rgba(79,172,254,0.16), transparent 68%);
    }

.mockup-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 12px 18px;
}

.dots {
    display: flex;
    gap: 7px;
}

    .dots span {
        width: 11px;
        height: 11px;
        border-radius: 50%;
        display: inline-block;
        background: rgba(79,172,254,0.16);
    }

        .dots span:nth-child(1) {
            background: #dc3545;
        }

        .dots span:nth-child(2) {
            background: #ffc107;
        }

        .dots span:nth-child(3) {
            background: #28a745;
        }

.mockup-search {
    flex: 1;
    height: 36px;
    border-radius: 999px;
    background: #f4f8fc;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mockup-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
}

.mock-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mock-stat,
.mock-card,
.floating-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(36,56,75,0.06);
}

    .mock-stat i {
        color: var(--primary);
        font-size: 22px;
    }

    .mock-stat strong {
        display: block;
        color: var(--dark);
        margin-top: 10px;
        font-size: 1.15rem;
        font-weight: 900;
    }

    .mock-stat span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

.mock-project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mock-card-head {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79,172,254,0.18), rgba(0,242,254,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 12px;
}

.mock-line {
    height: 10px;
    border-radius: 999px;
    background: rgba(79,172,254,0.1);
    margin-bottom: 8px;
}

    .mock-line.short {
        width: 64%;
    }

.floating-card {
    position: absolute;
    z-index: 3;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(79,172,254,0.16);
    border-radius: 22px;
    padding: 14px 16px;
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: float 6s ease-in-out infinite;
}

    .floating-card i {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: #fff;
    }

    .floating-card strong {
        display: block;
        color: var(--dark);
        font-weight: 900;
        white-space: nowrap;
    }

    .floating-card span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

.float-one {
    top: 84px;
    left: -22px;
}

.float-two {
    right: -18px;
    bottom: 92px;
    animation-delay: -2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

.summary-section {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.summary-card {
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(79,172,254,0.14);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 118px;
    transition: all .25s ease;
    overflow: hidden;
    position: relative;
}

    .summary-card::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg, var(--primary), var(--secondary));
    }

    .summary-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(79,172,254,0.32);
    }

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79,172,254,0.16), rgba(0,242,254,0.09));
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.summary-card h5 {
    margin: 0;
    color: var(--dark);
    font-size: 1.18rem;
    font-weight: 900;
}

.summary-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
}

.search-section {
    padding: 46px 0 0;
}

.search-panel {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(79,172,254,0.15);
    border-radius: 30px;
    padding: 24px;
    box-shadow: var(--shadow);
}

    .search-panel::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, var(--primary), var(--secondary));
    }

.search-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: rgba(79,172,254,0.1);
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 900;
    margin-bottom: 9px;
}

.search-head h2 {
    margin: 0;
    color: var(--dark);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.5;
}

.search-head p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.9;
    font-weight: 700;
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

    .search-box i {
        position: absolute;
        top: 50%;
        right: 19px;
        transform: translateY(-50%);
        color: var(--primary);
        font-size: 18px;
        z-index: 1;
    }

    .search-box input {
        width: 100%;
        border: 2px solid rgba(79,172,254,0.18);
        border-radius: 999px;
        padding: 16px 54px 16px 20px;
        font-weight: 800;
        color: var(--dark);
        outline: none;
        transition: all .25s ease;
        background: linear-gradient(135deg, rgba(79,172,254,0.05), #fff);
        min-height: 54px;
    }

        .search-box input::placeholder {
            color: #4facfe;
        }

        .search-box input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 .22rem rgba(79,172,254,0.14);
        }

.semantic-search-mode {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(79,172,254,0.1);
    color: var(--primary);
    border: 1px solid rgba(79,172,254,0.16);
    font-size: 12px;
    font-weight: 900;
}

.search-helper {
    color: var(--muted);
    font-size: 14px;
    margin-top: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.projects-section {
    padding: 46px 0 76px;
}

.projects-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

    .projects-heading h2 {
        margin: 0;
        color: var(--dark);
        font-size: clamp(1.6rem, 3vw, 2.35rem);
        font-weight: 900;
        line-height: 1.4;
    }

    .projects-heading p {
        margin: 5px 0 0;
        color: var(--muted);
        font-weight: 700;
        line-height: 1.9;
    }

.project-item {
    margin-bottom: 24px;
}

.project-card {
    position: relative;
    height: 100%;
    min-height: 100%;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(79,172,254,0.14);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all .28s ease;
    display: flex;
    flex-direction: column;
}

    .project-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 6px;
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        transform: scaleX(.30);
        transform-origin: right;
        opacity: .8;
        transition: transform .28s ease, opacity .28s ease;
    }

    .project-card::after {
        content: "";
        position: absolute;
        width: 170px;
        height: 170px;
        border-radius: 999px;
        left: -80px;
        top: -90px;
        background: radial-gradient(circle, rgba(79,172,254,0.1), transparent 65%);
        pointer-events: none;
    }

    .project-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(79,172,254,0.34);
    }

        .project-card:hover::before {
            transform: scaleX(1);
            opacity: 1;
        }

.project-header {
    position: relative;
    z-index: 1;
    padding: 26px 24px 16px;
    background: linear-gradient(135deg, rgba(79,172,254,0.06), transparent);
    border-bottom: 1px solid rgba(79,172,254,0.1);
}

.project-title {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: 1.26rem;
    font-weight: 900;
    line-height: 1.6;
}

    .project-title a {
        color: inherit;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        transition: color .22s ease;
    }

        .project-title a:hover {
            color: var(--primary);
        }

    .project-title i {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 12px 24px rgba(79,172,254,0.2);
    }

.project-meta {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    flex-wrap: wrap;
}

    .project-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(255,255,255,0.74);
        border: 1px solid rgba(79,172,254,0.1);
        font-weight: 800;
    }

    .project-meta i {
        color: var(--primary);
    }

.project-body {
    position: relative;
    z-index: 1;
    padding: 20px 24px 0;
    flex: 1;
}

.project-description {
    color: #244966;
    line-height: 1.9;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 700;
    min-height: 86px;
}

.project-info-box {
    background: linear-gradient(135deg, rgba(79,172,254,0.07), #fff);
    border: 1px solid rgba(79,172,254,0.14);
    border-radius: 19px;
    padding: 14px;
    margin: 15px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.info-label {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    border: 1px solid rgba(79,172,254,0.2);
}

.status-active {
    color: var(--primary);
    background: rgba(79,172,254,0.1);
}

.status-inactive {
    color: var(--dark);
    background: rgba(79,172,254,0.1);
    border-color: rgba(79,172,254,0.16);
}

.project-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 0 18px;
    border-top: 1px solid rgba(79,172,254,0.1);
    flex-wrap: nowrap;
}

.stat-item,
.like-btn {
    min-height: 40px;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 900;
    padding: 7px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(79,172,254,0.08), rgba(0,242,254,0.04));
    border: 1px solid rgba(79,172,254,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    white-space: nowrap;
}

.interaction-icon {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    flex: 0 0 auto;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(79,172,254,0.13), rgba(0,242,254,0.07));
    border: 1px solid rgba(79,172,254,0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 7px 14px rgba(79,172,254,0.1);
}

    .interaction-icon i {
        line-height: 1;
    }

.view-icon,
.comment-icon,
.rating-icon,
.like-icon {
    color: var(--primary);
}

.like-btn.liked .interaction-icon {
    color: #fff;
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.28);
}

.stat-item strong,
.like-btn strong {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.like-btn {
    cursor: pointer;
}

    .like-btn:hover {
        background: rgba(79,172,254,0.15);
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(79,172,254,0.16);
    }

    .like-btn.liked {
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(79,172,254,0.24);
    }

        .like-btn.liked strong {
            color: #fff;
        }

.project-footer {
    position: relative;
    z-index: 1;
    padding: 18px 24px 22px;
    background: linear-gradient(180deg, rgba(79,172,254,0.64), rgba(244,248,252,0.95));
    border-top: 1px solid rgba(79,172,254,0.1);
}

.project-tags {
    display: flex;
    gap: 9px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag-badge {
    background: linear-gradient(135deg, rgba(79,172,254,0.1), rgba(0,242,254,0.05));
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(79,172,254,0.16);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .tag-badge i {
        color: var(--primary);
    }

.project-actions,
.project-actions-bottom {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-actions {
    margin-bottom: 10px;
}

    .project-actions .btn,
    .project-actions-bottom .btn {
        flex: 1;
        min-width: 126px;
        border-radius: 999px;
        font-weight: 900;
        padding: 10px 13px;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

.btn-academic,
.btn-download {
    color: #fff !important;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 34%), linear-gradient(135deg, var(--primary), var(--secondary));
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 24px rgba(79,172,254,0.24);
}

    .btn-academic:hover,
    .btn-download:hover {
        color: #fff !important;
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(79,172,254,0.34);
    }

.btn-outline-academic {
    color: var(--primary) !important;
    background: rgba(79,172,254,0.08);
    border: 1.5px solid rgba(79,172,254,0.28);
}

    .btn-outline-academic:hover {
        color: #fff !important;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border-color: transparent;
        transform: translateY(-2px);
    }

.btn-soft-ghost {
    color: var(--deep) !important;
    background: rgba(79,172,254,0.08);
    border: 1px solid rgba(79,172,254,0.18);
}

    .btn-soft-ghost:hover {
        color: #fff !important;
        background: linear-gradient(135deg, var(--deep), var(--primary));
    }

.rating-control {
    flex: 1;
    min-width: 190px;
    background: #fff;
    border: 1px solid rgba(79,172,254,0.16);
    border-radius: 22px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.rating-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--deep);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 7px;
}

    .rating-label i {
        color: var(--primary);
    }

.stars {
    display: flex;
    gap: 6px;
    direction: ltr;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.star-icon {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #4facfe;
    background: rgba(79,172,254,0.07);
    border: 1px solid rgba(79,172,254,0.12);
    cursor: pointer;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    transition: all .2s ease;
}

    .star-icon:hover,
    .star-icon.active {
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border-color: transparent;
        transform: translateY(-2px) scale(1.06);
        box-shadow: 0 9px 18px rgba(79,172,254,0.22);
    }

.comment-box {
    margin: 0 20px 18px;
    padding: 18px;
    background: linear-gradient(135deg, #fff, rgba(79,172,254,0.1));
    border-radius: 22px;
    border: 1px solid rgba(79,172,254,0.13);
    display: none;
    animation: fadeIn .28s ease;
    box-shadow: 0 12px 30px rgba(36,56,75,0.06);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(79,172,254,0.12);
}

    .comments-header h6 {
        margin: 0;
        color: var(--dark);
        font-weight: 900;
        display: flex;
        align-items: center;
        gap: 9px;
    }

        .comments-header h6 i {
            width: 34px;
            height: 34px;
            border-radius: 13px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            background: linear-gradient(135deg, rgba(79,172,254,0.16), rgba(0,242,254,0.1));
        }

.load-comments-btn {
    min-height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 7px 13px;
    font-size: 12px;
    box-shadow: 0 8px 18px rgba(79,172,254,0.22);
}

.comments-list {
    display: grid;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px 8px;
    margin-bottom: 15px;
    border-radius: 18px;
}

    .comments-list::-webkit-scrollbar {
        width: 8px;
    }

    .comments-list::-webkit-scrollbar-track {
        background: rgba(79,172,254,0.08);
        border-radius: 999px;
    }

    .comments-list::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--primary), var(--secondary));
        border-radius: 999px;
    }

.comment-item {
    background: #fff;
    border: 1px solid rgba(79,172,254,0.12);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 22px rgba(36,56,75,0.04);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    flex: 0 0 auto;
    font-size: 1.05rem;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(79,172,254,0.16), rgba(0,242,254,0.1));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(79,172,254,0.08);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-user {
    color: var(--dark);
    font-weight: 900;
}

.comment-date {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.comment-content {
    color: #2f3b4a;
    line-height: 1.9;
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
    white-space: pre-wrap;
}

.empty-comment-state {
    text-align: center;
    padding: 26px 16px;
    color: var(--muted);
    background: linear-gradient(135deg, #fff, rgba(79,172,254,0.1));
    border: 1px dashed rgba(79,172,254,0.22);
    border-radius: 20px;
    font-weight: 800;
}

    .empty-comment-state i {
        width: 56px;
        height: 56px;
        margin: 0 auto 12px;
        border-radius: 18px;
        color: var(--primary);
        background: linear-gradient(135deg, rgba(79,172,254,0.16), rgba(0,242,254,0.1));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.45rem;
    }

.comment-form textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1.7px solid rgba(79,172,254,0.18);
    border-radius: 18px;
    resize: vertical;
    margin-bottom: 12px;
    font-size: 14px;
    transition: all .25s ease;
    min-height: 112px;
    outline: none;
    font-weight: 700;
    line-height: 1.8;
    color: var(--text);
    background: rgba(255,255,255,0.98);
}

    .comment-form textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 .23rem rgba(79,172,254,0.12);
    }

.comment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-hint {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}


/* نافذة التعليقات المنبثقة: خارج كروت المشاريع حتى لا يتغير ارتفاع الشبكة */
.comments-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(36,56,75,0.46);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

    .comments-modal-overlay.show {
        display: flex;
        animation: fadeIn .22s ease;
    }

.comments-modal {
    width: min(760px, 100%);
    max-height: min(86vh, 760px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(36,56,75,0.28);
    animation: modalPop .24s ease;
}

.comments-modal-header {
    position: relative;
    padding: 22px 24px 18px;
    background: radial-gradient(circle at top right, rgba(79,172,254,0.16), transparent 32%), linear-gradient(135deg, #fff, rgba(0,242,254,0.1));
    border-bottom: 1px solid rgba(79,172,254,0.13);
}

.comments-modal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.comments-modal-title-wrap {
    min-width: 0;
}

.comments-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: rgba(79,172,254,0.1);
    border: 1px solid rgba(79,172,254,0.16);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 10px;
}

.comments-modal-title {
    margin: 0;
    color: var(--dark);
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.6;
    word-break: break-word;
}

.comments-modal-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--deep);
    background: #fff;
    box-shadow: 0 10px 22px rgba(36,56,75,0.08);
    cursor: pointer;
    transition: all .22s ease;
    flex: 0 0 auto;
}

    .comments-modal-close:hover {
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        transform: translateY(-2px);
    }

.comments-modal-tabs {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.comments-modal-tab {
    min-height: 40px;
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 999px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--deep);
    background: rgba(255,255,255,0.82);
    font-weight: 900;
    cursor: default;
}

    .comments-modal-tab.active {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        box-shadow: 0 10px 24px rgba(79,172,254,0.22);
    }

.comments-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff, rgba(79,172,254,0.1));
}

    .comments-modal-body .comments-list {
        max-height: 330px;
        margin-bottom: 16px;
    }

.comments-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

    .comments-modal-actions .load-comments-btn {
        min-height: 40px;
    }

.modal-login-box {
    text-align: center;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff, rgba(79,172,254,0.1));
    border: 1px dashed rgba(79,172,254,0.22);
}

body.comments-modal-open {
    overflow: hidden;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notification {
    position: fixed;
    top: 102px;
    right: 30px;
    z-index: 9999;
    animation: slideInRight .3s ease-out;
    min-width: 300px;
    max-width: min(420px, calc(100% - 36px));
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(79,172,254,0.18);
    overflow: hidden;
    background: rgba(255,255,255,0.96);
    color: var(--dark);
    padding: 14px 18px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.empty-state,
.no-results {
    text-align: center;
    padding: 76px 20px;
    background: rgba(255,255,255,0.94);
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79,172,254,0.14);
}

    .empty-state i,
    .no-results i {
        width: 86px;
        height: 86px;
        margin: 0 auto 18px;
        border-radius: 28px;
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.3rem;
        box-shadow: var(--glow);
    }

    .empty-state h3,
    .no-results h3 {
        color: var(--dark);
        margin-bottom: 12px;
        font-weight: 900;
    }

    .empty-state p,
    .no-results p {
        color: var(--muted);
        margin-bottom: 28px;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        font-weight: 700;
        line-height: 1.9;
    }

.no-results {
    display: none;
}

.site-footer {
    color: #fff;
    background: radial-gradient(circle at top right, rgba(79,172,254,0.2), transparent 26%), linear-gradient(135deg, #24384b, #24384b);
    padding: 70px 0 24px;
    position: relative;
    overflow: hidden;
}

    .site-footer::before {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        border-radius: 999px;
        top: -150px;
        left: -80px;
        background: rgba(0,242,254,0.08);
    }

.footer-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

    .footer-content h2 {
        margin: 0 0 10px;
        font-weight: 900;
        font-size: 2rem;
    }

    .footer-content p {
        margin: 0;
        color: rgba(255,255,255,0.74);
        line-height: 1.9;
        font-weight: 700;
    }

.footer-links {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .footer-links a {
        color: rgba(255,255,255,0.82);
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 999px;
        padding: 9px 13px;
        font-weight: 800;
        transition: all .22s ease;
    }

        .footer-links a:hover {
            color: var(--secondary);
            background: rgba(255,255,255,0.12);
            transform: translateY(-2px);
        }

.copyright {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.56);
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* تحسين عرض كروت المشاريع والتفاعلات */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
    gap: 22px;
    align-items: start;
}

.project-item {
    margin-bottom: 0;
    min-width: 0;
}

.project-card {
    height: auto;
    min-height: unset;
    border-radius: 24px;
}

.project-header {
    padding: 20px 20px 13px;
}

.project-title {
    font-size: 1.08rem;
    margin-bottom: 10px;
}

    .project-title i {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        font-size: 16px;
    }

.project-meta {
    gap: 8px;
}

    .project-meta span {
        padding: 5px 9px;
        font-size: 12px;
    }

.project-body {
    padding: 16px 20px 0;
}

.project-description {
    min-height: auto;
    height: 78px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 13px;
    font-size: 14px;
}

.project-info-box {
    padding: 12px;
    margin: 12px 0;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0 15px;
    border-top: 1px solid rgba(79,172,254,0.1);
}

.stat-item,
.like-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    flex: none;
    justify-content: flex-start;
    border-radius: 16px;
    padding: 8px 10px;
}

.interaction-icon {
    width: 32px;
    height: 32px;
    border-radius: 13px;
    font-size: 17px;
}

.emoji-icon {
    font-family: "Segoe UI Symbol", "Arial Unicode MS", "Cairo", sans-serif;
    line-height: 1;
    color: var(--primary);
    filter: none;
    text-shadow: 0 0 14px rgba(79,172,254,0.18);
}

.cyan-emoji {
    color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(79,172,254,0.16), rgba(0,242,254,0.1));
    border-color: rgba(79,172,254,0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 9px 18px rgba(79,172,254,0.12);
    font-family: "Segoe UI Symbol", "Arial Unicode MS", "Cairo", sans-serif;
    font-weight: 900;
}

.like-btn.liked .cyan-emoji {
    color: #fff !important;
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
    text-shadow: none;
}

.stat-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.1;
    min-width: 0;
}

    .stat-copy strong {
        color: var(--primary);
        font-size: 13px;
        font-weight: 900;
    }

    .stat-copy small {
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        white-space: nowrap;
    }

.like-btn.liked .stat-copy strong,
.like-btn.liked .stat-copy small {
    color: #fff;
}

.project-footer {
    padding: 15px 20px 18px;
}

.project-tags {
    gap: 7px;
    margin-bottom: 12px;
}

.tag-badge {
    padding: 5px 10px;
    font-size: 11px;
}

.project-actions,
.project-actions-bottom {
    gap: 9px;
}

    .project-actions .btn,
    .project-actions-bottom .btn {
        min-width: 0;
        padding: 9px 12px;
        font-size: 12px;
    }

.project-actions-bottom {
    flex-direction: column;
}

    .project-actions-bottom .btn,
    .rating-control {
        width: 100%;
        min-width: 0;
    }

.rating-control {
    padding: 9px 10px;
    border-radius: 18px;
}

.rating-label {
    margin-bottom: 6px;
}

.stars {
    gap: 5px;
}

.star-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 16px;
    color: var(--primary);
    filter: none;
    opacity: .92;
}

    .star-icon:hover,
    .star-icon.active {
        color: #fff;
        filter: none;
        opacity: 1;
    }

.btn .cyan-emoji {
    width: 24px;
    height: 24px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex: 0 0 auto;
}

@media(min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media(min-width: 1500px) {
    .container-page {
        width: min(1320px, calc(100% - 40px));
    }

    .projects-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media(max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: auto;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-menu {
        position: fixed;
        top: 82px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: rgba(255,255,255,0.98);
        border: 1px solid rgba(79,172,254,0.16);
        border-radius: 24px;
        padding: 18px;
        box-shadow: var(--shadow-lg);
    }

        .main-menu.show {
            display: flex;
        }

        .main-menu a {
            justify-content: center;
        }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-actions .btn-soft,
    .nav-actions .btn-main,
    .nav-actions .btn-dark-gradient {
        display: none;
    }
}

@media(max-width: 768px) {
    .container-page {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding: 126px 0 64px;
    }

        .hero h1 {
            font-size: 2.15rem;
        }

    .hero-points,
    .mock-stats,
    .mock-project-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: static;
        margin-top: 14px;
        animation: none;
    }

    .academic-mockup {
        min-height: auto;
    }

    .summary-section {
        margin-top: 22px;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .semantic-search-btn,
    .semantic-clear-btn {
        width: 100%;
    }

    .projects-heading {
        align-items: stretch;
    }

    .comments-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .comments-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 26px 26px 0 0;
    }

    .comments-modal-header,
    .comments-modal-body {
        padding: 18px;
    }

    .comments-modal-top,
    .comments-modal-actions,
    .comment-actions {
        align-items: stretch;
    }

        .comments-modal-close,
        .comments-modal-actions .load-comments-btn,
        .comment-actions .btn {
            width: 100%;
        }

    .project-actions,
    .project-actions-bottom {
        flex-direction: column;
    }

        .project-actions .btn,
        .project-actions-bottom .btn,
        .rating-control {
            width: 100%;
        }

    .brand-text span {
        display: none;
    }
}

@media(max-width: 680px) {
    .project-stats {
        flex-wrap: wrap;
    }

    .stat-item,
    .like-btn {
        flex: 1 1 calc(50% - 8px);
    }
}

@media(max-width: 576px) {
    .project-stats {
        flex-wrap: wrap;
    }

    .stat-item,
    .like-btn {
        min-height: 40px;
        flex: 1 1 calc(50% - 8px);
    }
}

@media(max-width: 520px) {
    .brand-text strong {
        font-size: 1.05rem;
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 1.86rem;
    }

    .hero p {
        font-size: .98rem;
    }

    .search-panel,
    .summary-card,
    .project-card {
        border-radius: 22px;
    }

    .project-header,
    .project-body,
    .project-footer {
        padding-inline: 18px;
    }

    .comment-box {
        margin-inline: 18px;
    }
}

@media print {
    .comments-modal-overlay {
        display: none !important;
    }
}


/* زر تسجيل الخروج بشكل احترافي ومتناسق مع هوية المنصة */
.logout-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.btn-logout {
    border: 1px solid rgba(79,172,254,0.24);
    min-height: 46px;
    border-radius: 999px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    color: var(--deep) !important;
    background: linear-gradient(135deg, #fff, rgba(79,172,254,0.1));
    box-shadow: 0 10px 26px rgba(36,56,75,0.08);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

    .btn-logout:hover {
        color: #fff !important;
        border-color: transparent;
        background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 34%), linear-gradient(135deg, var(--deep), var(--primary));
        box-shadow: 0 16px 36px rgba(36,73,102,0.22);
        transform: translateY(-2px);
    }

    .btn-logout i {
        color: inherit;
    }

@media(max-width: 1100px) {
    .nav-actions .logout-form {
        display: none;
    }
}

.server-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(145px, 1fr)) auto;
    gap: 12px;
    margin: 20px 0 8px;
    padding: 18px;
    border: 1px solid rgba(79,172,254,0.18);
    border-radius: 22px;
    background: rgba(255,255,255,0.78);
    box-shadow: 0 12px 30px rgba(36,56,75,0.07);
}

    .server-filter-form.commercial-filters {
        grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(130px, 1fr)) auto;
    }

.server-filter-control {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(79,172,254,0.16);
    border-radius: 14px;
    padding: 0 14px;
    color: #24384b;
    background: #fff;
    outline: none;
}

    .server-filter-control:focus {
        border-color: #4facfe;
        box-shadow: 0 0 0 4px rgba(79,172,254,0.12);
    }

.server-filter-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

    .server-filter-actions button,
    .server-filter-actions a {
        min-height: 48px;
        border: 0;
        border-radius: 14px;
        padding: 0 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
    }

    .server-filter-actions button {
        color: #fff;
        background: linear-gradient(135deg, #4facfe, #00f2fe);
    }

    .server-filter-actions a {
        color: #244966;
        background: rgba(79,172,254,0.1);
    }

.projects-scroll-shell {
    max-height: min(1420px, calc(100vh - 170px));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px 18px 4px;
    margin-top: 8px;
    border-radius: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(79,172,254,0.1);
    overscroll-behavior: contain;
}

    .projects-scroll-shell::-webkit-scrollbar {
        width: 10px;
    }

    .projects-scroll-shell::-webkit-scrollbar-track {
        background: rgba(79,172,254,0.08);
        border-radius: 999px;
    }

    .projects-scroll-shell::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--primary), var(--secondary));
        border-radius: 999px;
        border: 2px solid rgba(255,255,255,0.8);
    }

        .projects-scroll-shell::-webkit-scrollbar-thumb:hover {
            background: var(--primary);
        }

.scroll-list-note {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0 2px;
}

.btn-favorite-action {
    color: #00f2fe !important;
    border-color: rgba(79,172,254,0.3) !important;
    background: linear-gradient(135deg, rgba(0,242,254,0.1), rgba(0,242,254,0.1)) !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

    .btn-favorite-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(79,172,254,0.16);
    }

    .btn-favorite-action.active {
        color: #fff !important;
        border-color: transparent !important;
        background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
        box-shadow: 0 12px 26px rgba(79,172,254,0.28);
    }

    .btn-favorite-action:disabled {
        opacity: .65;
        cursor: wait;
    }

.btn-report-action {
    color: #dc3545 !important;
    border-color: rgba(255,193,7,0.16) !important;
    background: rgba(255,193,7,0.1) !important;
}

    .btn-report-action:hover {
        background: rgba(255,193,7,0.1) !important;
        transform: translateY(-1px);
    }

.comment-tools {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.comment-tool-btn {
    border: 1px solid rgba(79,172,254,0.2);
    background: rgba(79,172,254,0.1);
    color: #244966;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

    .comment-tool-btn:hover {
        background: rgba(79,172,254,0.1);
    }

    .comment-tool-btn.delete {
        color: #dc3545;
        border-color: rgba(220,53,69,0.16);
        background: rgba(220,53,69,0.1);
    }

    .comment-tool-btn.report {
        color: #dc3545;
        border-color: rgba(255,193,7,0.16);
        background: rgba(255,193,7,0.1);
    }

.content-report-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(36,56,75,0.58);
    backdrop-filter: blur(7px);
}

    .content-report-overlay.show {
        display: flex;
    }

.content-report-modal {
    width: min(560px,100%);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(36,56,75,0.28);
    overflow: hidden;
    border: 1px solid rgba(79,172,254,0.18);
}

.content-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(135deg,rgba(79,172,254,0.1),rgba(0,242,254,0.1));
    border-bottom: 1px solid rgba(79,172,254,0.15);
}

    .content-report-head h3 {
        margin: 0;
        color: var(--dark);
        font-size: 20px;
        font-weight: 900;
    }

.content-report-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #244966;
    cursor: pointer;
}

.content-report-body {
    padding: 20px;
}

.content-report-help {
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(255,193,7,0.1);
    color: #ffc107;
    margin-bottom: 14px;
    line-height: 1.7;
    font-size: 13px;
}

.content-report-field {
    margin-bottom: 14px;
}

    .content-report-field label {
        display: block;
        font-weight: 800;
        color: #244966;
        margin-bottom: 7px;
    }

    .content-report-field select, .content-report-field textarea {
        width: 100%;
        border: 1px solid rgba(79,172,254,0.16);
        border-radius: 12px;
        padding: 11px 12px;
        background: #fff;
        color: #24384b;
    }

    .content-report-field textarea {
        min-height: 125px;
        resize: vertical;
    }

.content-report-message {
    display: none;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
}

    .content-report-message.show {
        display: block;
    }

    .content-report-message.success {
        background: rgba(40,167,69,0.1);
        color: #28a745;
    }

    .content-report-message.error {
        background: rgba(220,53,69,0.1);
        color: #dc3545;
    }

.content-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

    .content-report-actions button {
        border: 0;
        border-radius: 11px;
        padding: 10px 16px;
        font-weight: 900;
        cursor: pointer;
    }

.content-report-cancel {
    background: rgba(79,172,254,0.1);
    color: #244966;
}

.content-report-submit {
    background: linear-gradient(135deg,#ffc107,#dc3545);
    color: #fff;
}

@media(max-width: 1180px) {
    .server-filter-form,
    .server-filter-form.commercial-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .server-filter-actions {
        grid-column: 1 / -1;
    }
}

@media(max-width: 640px) {
    .server-filter-form,
    .server-filter-form.commercial-filters {
        grid-template-columns: 1fr;
    }

    .server-filter-actions {
        grid-column: auto;
        flex-direction: column;
    }
}
/* =========================================================
   QudratCode Project Card Sync
   توحيد بطاقة المشاريع مع تصميم صفحة "مشاريعي"
   ========================================================= */

.project-card {
    background: #fff !important;
    border: 1px solid rgba(79,172,254,.13) !important;
    border-radius: 30px !important;
    box-shadow: 0 14px 34px rgba(36,56,75,.065) !important;
    overflow: hidden !important;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease !important;
}

    .project-card::before {
        height: 5px !important;
        background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .project-card::after {
        display: none !important;
    }

    .project-card:hover {
        transform: translateY(-4px) !important;
        border-color: rgba(79,172,254,.28) !important;
        box-shadow: 0 18px 48px rgba(36,56,75,.10) !important;
    }

.project-header {
    padding: 24px 24px 16px !important;
    background: radial-gradient(circle at 100% 0%, rgba(79,172,254,.11), transparent 34%), linear-gradient(135deg, #fff, rgba(79,172,254,.10)) !important;
    border-bottom: 1px solid rgba(79,172,254,.10) !important;
}

.project-title {
    margin: 0 0 14px !important;
    color: var(--dark) !important;
    font-size: 1.20rem !important;
    line-height: 1.7 !important;
    font-weight: 900 !important;
}

    .project-title i {
        width: 42px !important;
        height: 42px !important;
        border-radius: 16px !important;
        color: var(--primary) !important;
        background: linear-gradient(135deg, rgba(79,172,254,.14), rgba(0,242,254,.08)) !important;
        box-shadow: none !important;
    }

.project-meta {
    color: var(--muted) !important;
    font-size: .90rem !important;
    font-weight: 800 !important;
}

    .project-meta span {
        background: rgba(79,172,254,.045) !important;
        border: 1px solid rgba(79,172,254,.10) !important;
        color: var(--muted) !important;
    }

    .project-meta i {
        color: var(--primary) !important;
    }

.project-body {
    padding: 20px 24px 18px !important;
    background: #fff !important;
}

.project-description {
    color: #2f3b4a !important;
    line-height: 1.95 !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
}

.project-info-box {
    background: #fff !important;
    border: 1px solid rgba(79,172,254,.12) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(36,56,75,.035) !important;
}

.status-badge,
.tag-badge {
    background: rgba(79,172,254,.06) !important;
    border: 1px solid rgba(79,172,254,.13) !important;
    color: var(--primary) !important;
}

    .tag-badge i,
    .status-badge i {
        color: var(--primary) !important;
    }

.project-footer {
    padding: 18px 24px 24px !important;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%) !important;
    border-top: 1px solid rgba(79,172,254,.10) !important;
}

.project-actions .btn,
.project-actions-bottom .btn {
    min-height: 44px !important;
    border-radius: 999px !important;
    font-weight: 900 !important;
    box-shadow: none;
}

.btn-outline-academic,
.btn-outline-commercial,
.btn-soft-ghost {
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid rgba(79,172,254,.18) !important;
}

    .btn-outline-academic:hover,
    .btn-outline-commercial:hover,
    .btn-soft-ghost:hover {
        background: rgba(79,172,254,.07) !important;
        color: var(--primary) !important;
        border-color: rgba(79,172,254,.28) !important;
        box-shadow: 0 10px 24px rgba(79,172,254,.10) !important;
    }

.btn-academic,
.btn-download,
.btn-commercial,
.btn-buy {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border: 0 !important;
    box-shadow: 0 12px 28px rgba(79,172,254,.20) !important;
}

    .btn-academic:hover,
    .btn-download:hover,
    .btn-commercial:hover,
    .btn-buy:hover {
        color: #fff !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 16px 34px rgba(79,172,254,.24) !important;
    }

.rating-control {
    background: #fff !important;
    border: 1px solid rgba(79,172,254,.12) !important;
    box-shadow: none !important;
}

@media (max-width: 640px) {
    .project-card {
        border-radius: 24px !important;
    }

    .project-header {
        padding: 20px 18px 14px !important;
    }

    .project-body {
        padding: 18px 18px 16px !important;
    }

    .project-footer {
        padding: 16px 18px 20px !important;
    }
}


/* =========================================================
   QudratCode - Academic cards final correction
   Keep card layout aligned with Commercial cards
   ========================================================= */

/*
 * The commercial card naturally wraps the bottom area:
 * rating gets its own full row and the main CTA gets the next row.
 * Force the academic download button to follow the same behavior.
 */
.qc-projects-public-page .project-card .project-actions-bottom {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    align-items: stretch !important;
}

    .qc-projects-public-page .project-card .project-actions-bottom .rating-control {
        flex: 1 1 190px !important;
        min-width: 190px !important;
        width: auto !important;
    }

    .qc-projects-public-page .project-card .project-actions-bottom .btn-download {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        min-height: 44px !important;
        border-radius: 999px !important;
        padding: 10px 13px !important;
        font-size: 13px !important;
        font-weight: 900 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        color: #fff !important;
        background: radial-gradient( circle at top right, rgba(255,255,255,0.28), transparent 34% ), linear-gradient( 135deg, var(--primary), var(--secondary) ) !important;
        border: 1px solid rgba(255,255,255,0.30) !important;
        box-shadow: 0 10px 24px rgba(79,172,254,0.24) !important;
    }

        .qc-projects-public-page .project-card .project-actions-bottom .btn-download:hover {
            color: #fff !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 14px 30px rgba(79,172,254,0.34) !important;
        }

/*
 * IMPORTANT:
 * comments modal uses z-index: 5000.
 * The report modal must therefore be above it, not behind it.
 */
.content-report-overlay {
    z-index: 10000 !important;
    align-items: center !important;
    justify-content: center !important;
}

    .content-report-overlay.show {
        display: flex !important;
    }

.content-report-modal {
    position: relative !important;
    z-index: 10001 !important;
    width: min(560px, calc(100% - 24px)) !important;
    max-height: calc(100vh - 36px) !important;
    overflow-y: auto !important;
    box-shadow: 0 36px 110px rgba(20,45,68,0.36) !important;
}

/* Keep the comments window visible behind the report dialog,
   while preventing accidental clicks through the top modal. */
body.content-report-open .comments-modal-overlay.show {
    pointer-events: none !important;
}

body.content-report-open .content-report-overlay.show {
    pointer-events: auto !important;
}

/* Mobile: report remains centered and clearly above comments. */
@media (max-width: 640px) {
    .content-report-overlay {
        padding: 12px !important;
        align-items: center !important;
    }

    .content-report-modal {
        width: 100% !important;
        max-height: calc(100vh - 24px) !important;
        border-radius: 22px !important;
    }

    .qc-projects-public-page .project-card .project-actions-bottom .rating-control,
    .qc-projects-public-page .project-card .project-actions-bottom .btn-download {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }
}


/* =========================================================
   QudratCode - Final responsive mobile refinement
   Keeps cards compact and proportional while viewport shrinks
   ========================================================= */

@media (max-width: 768px) {
    .container-page,
    .container-custom {
        width: min(100% - 20px, 1180px) !important;
    }

    .hero {
        padding-top: 112px !important;
        padding-bottom: 48px !important;
    }

        .hero h1 {
            font-size: clamp(1.75rem, 8vw, 2.15rem) !important;
            line-height: 1.35 !important;
        }

        .hero p {
            font-size: .94rem !important;
            line-height: 1.85 !important;
        }

    .hero-actions {
        gap: 8px !important;
        margin-top: 20px !important;
    }

        .hero-actions .btn-main,
        .hero-actions .btn-soft,
        .hero-actions .btn-white,
        .hero-actions .btn-dark-gradient {
            min-height: 40px !important;
            padding: 8px 12px !important;
            font-size: .78rem !important;
            flex: 1 1 calc(50% - 4px);
        }

    /* Keep the small feature/stat cards compact instead of huge one-per-row cards. */
    .hero-points {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-top: 18px !important;
    }

    .hero-point {
        min-width: 0;
        padding: 10px 11px !important;
        border-radius: 15px !important;
        font-size: .72rem !important;
        line-height: 1.55 !important;
    }

    .mock-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .mock-stat {
        min-width: 0;
        min-height: 82px !important;
        padding: 9px 5px !important;
        border-radius: 13px !important;
        text-align: center;
    }

        .mock-stat i,
        .mock-stat .qc-icon {
            width: 17px !important;
            height: 17px !important;
            font-size: 17px !important;
        }

        .mock-stat strong {
            margin-top: 4px !important;
            font-size: .94rem !important;
            line-height: 1.25 !important;
            overflow-wrap: anywhere;
        }

        .mock-stat span {
            display: block;
            font-size: .61rem !important;
            line-height: 1.45 !important;
            overflow-wrap: anywhere;
        }

    .mock-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .mock-card {
        min-width: 0;
        min-height: 96px !important;
        padding: 9px !important;
        border-radius: 14px !important;
    }

    .mock-card-head {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        margin-bottom: 7px !important;
        font-size: 16px !important;
    }

    .mock-line {
        height: 6px !important;
        margin-bottom: 5px !important;
    }

    .floating-card {
        min-width: 0 !important;
        padding: 9px 10px !important;
        gap: 7px !important;
        border-radius: 14px !important;
    }

        .floating-card i,
        .floating-card .qc-icon {
            width: 31px !important;
            height: 31px !important;
            border-radius: 10px !important;
            font-size: 14px !important;
            flex: 0 0 31px !important;
        }

        .floating-card strong {
            font-size: .72rem !important;
            white-space: normal !important;
            line-height: 1.45 !important;
        }

        .floating-card span {
            font-size: .61rem !important;
            line-height: 1.4 !important;
        }

    /* Project interaction statistics stay 2-per-row and compact. */
    .project-stats {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
        padding: 9px 0 11px !important;
    }

    .stat-item,
    .like-btn {
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 6px 7px !important;
        border-radius: 12px !important;
        gap: 6px !important;
    }

    .interaction-icon {
        width: 27px !important;
        height: 27px !important;
        border-radius: 9px !important;
        font-size: 14px !important;
        flex: 0 0 27px !important;
    }

    .stat-copy strong,
    .stat-item strong,
    .like-btn strong {
        font-size: .70rem !important;
    }

    .stat-copy small {
        font-size: .59rem !important;
        line-height: 1.35 !important;
    }

    /* Summary cards: two columns on normal phones rather than giant full-width cards. */
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .summary-card {
        min-width: 0;
        padding: 13px !important;
        border-radius: 16px !important;
    }

    .section {
        padding-top: 58px !important;
        padding-bottom: 58px !important;
    }
}

@media (max-width: 480px) {
    .container-page,
    .container-custom {
        width: min(100% - 16px, 1180px) !important;
    }

    .hero {
        padding-top: 102px !important;
        padding-bottom: 38px !important;
    }

        .hero h1 {
            font-size: 1.68rem !important;
        }

        .hero p {
            font-size: .87rem !important;
        }

    .hero-actions .btn-main,
    .hero-actions .btn-soft,
    .hero-actions .btn-white,
    .hero-actions .btn-dark-gradient {
        min-height: 38px !important;
        padding: 7px 9px !important;
        font-size: .70rem !important;
    }

    .hero-points {
        gap: 6px !important;
    }

    .hero-point {
        padding: 8px !important;
        font-size: .65rem !important;
        border-radius: 13px !important;
    }

    .mock-stats {
        gap: 5px !important;
    }

    .mock-stat {
        min-height: 75px !important;
        padding: 7px 3px !important;
    }

        .mock-stat strong {
            font-size: .82rem !important;
        }

        .mock-stat span {
            font-size: .54rem !important;
        }

    .mock-project-grid {
        gap: 6px !important;
    }

    .mock-card {
        min-height: 88px !important;
        padding: 7px !important;
    }

    .project-stats {
        gap: 6px !important;
    }

    .stat-item,
    .like-btn {
        min-height: 37px !important;
        padding: 5px 6px !important;
    }

    .interaction-icon {
        width: 24px !important;
        height: 24px !important;
        flex-basis: 24px !important;
        font-size: 12px !important;
    }

    .summary-grid {
        gap: 7px !important;
    }

    .summary-card {
        padding: 10px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 340px) {
    .hero-points,
    .summary-grid,
    .project-stats {
        grid-template-columns: 1fr !important;
    }
}
