@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');
:root {
    --bg-main: #020202;
    --bg-section: #070707;
    --bg-card: #101010;
    --bg-card-alt: #141414;
    --text-main: #f5f5f5;
    --text-muted: #a5a5a5;
    --border-subtle: #262626;
    --accent: #ffffff;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 0 35px rgba(255, 255, 255, 0.03);
    --transition-fast: 0.25s ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: "Cairo", sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
}

body.body-dark {
    background:
        radial-gradient(circle at top, #202020 0, #000000 55%);
    color: var(--text-main);
    direction: rtl;
}

/* LINKS */
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}

/* HEADER */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(0, 0, 0, 0.88);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 7vw;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav a {
    margin-left: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 4px;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0%;
    background: var(--accent);
    transition: width var(--transition-fast);
}
.main-nav a:hover {
    color: var(--text-main);
}
.main-nav a:hover::after {
    width: 100%;
}

/* PAGE WRAPPER */
.page-wrapper {
    padding: 26px 7vw 70px;
}

/* HERO – FULL WIDTH SECTION */
.hero-full {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 40px 30px 50px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top right, #181818 0, #050505 55%);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
}

.hero-left h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin: 0 0 12px;
}
.hero-left p {
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.hero-right img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border-subtle);
}

/* GENERIC SECTION */
.section-full {
    width: 100%;
    padding: 40px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-title,
.page-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.section-description,
.page-desc {
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* ABOUT CARDS */
.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.about-card {
    background: radial-gradient(circle at top, #1b1b1b 0, #090909 55%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.about-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}
.about-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.about-card:hover {
    transform: translateY(-4px);
    border-color: #e0e0e0;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.06);
}

/* PROJECT SHOWCASE */
.project-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: center;
    margin-top: 18px;
}

.project-img img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    object-fit: cover;
}

.project-data h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}
.project-data p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* TRIPLE GRID (news/research/articles) */
.triple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.triple-block {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
}

.sub-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.mini-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.mini-item:last-child {
    border-bottom: none;
}
.mini-item h4 {
    margin: 0 0 4px;
    font-size: 0.96rem;
}
.mini-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* CARDS LIST / GRID */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.card-item:hover {
    transform: translateY(-4px);
    border-color: #e0e0e0;
    box-shadow: 0 0 32px rgba(255, 255, 255, 0.06);
}

.card-img {
    width: 100%;
    height: 90px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.card-content h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.card-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* PROJECTS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.project-card-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.project-card-item:hover {
    transform: translateY(-5px);
    border-color: #e0e0e0;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.06);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-info {
    padding: 12px 14px 14px;
}
.project-info h3 {
    margin: 0 0 6px;
}
.project-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* MEMBERS */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.member-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 16px 16px 18px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.member-item:hover {
    transform: translateY(-4px);
    border-color: #e0e0e0;
    box-shadow: 0 0 32px rgba(255, 255, 255, 0.05);
}

.member-photo,
.member-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    background: #151515;
    font-size: 1.4rem;
}
.member-photo {
    object-fit: cover;
    padding: 0;
}
.member-placeholder {
    color: var(--text-main);
}

.member-item h3 {
    margin: 0 0 4px;
}
.member-item .role {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.member-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* POST PAGE */
.post-page {
    max-width: 780px;
    margin: 0 auto;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.post-img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin: 16px 0;
    object-fit: cover;
    max-height: 380px;
}

.post-desc {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.post-content {
    line-height: 1.9;
    margin-bottom: 18px;
}

/* BUTTONS */
.btn-main,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-main {
    background: #ffffff;
    color: #000000;
}
.btn-main:hover {
    background: #e6e6e6;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: #e0e0e0;
    transform: translateY(-1px);
}

/* FORMS */
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
textarea {
    width: 100%;
    padding: 9px 11px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: #020202;
    color: var(--text-main);
    font-size: 0.94rem;
}
input:focus,
textarea:focus {
    outline: none;
    border-color: #e0e0e0;
}
input::placeholder,
textarea::placeholder {
    color: #555555; /* placeholder رمادي أغمق */
}

.contact-form {
    max-width: 540px;
}

/* ALERTS */
.alert {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 14px;
}
.alert.success {
    background: #0c2f16;
    border: 1px solid #1f6b30;
}
.alert.error {
    background: #3a1515;
    border: 1px solid #7b2e2e;
}

/* FOOTER */
.main-footer {
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    padding: 12px 7vw 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ADMIN STYLES */
.admin-body {
    background: radial-gradient(circle at top, #191919 0, #020202 65%);
    color: var(--text-main);
}

.admin-header {
    background: #000000;
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 7vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-header .logo {
    font-size: 1rem;
}
.admin-header nav a {
    margin-left: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.admin-header nav a:hover {
    color: var(--text-main);
}

.admin-wrapper {
    padding: 20px 7vw 40px;
}

.admin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 6px;
}

.admin-table th {
    text-align: right;
    color: var(--text-muted);
}

.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1c1c1c 0, #000 70%);
}
.admin-login-form {
    width: 320px;
    padding: 20px 18px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: #050505;
    box-shadow: var(--shadow-soft);
}
/* زر القائمة للموبايل */
.mobile-menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-main);
}

/* القائمة المنسدلة */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #000000f2;
    width: 100%;
    position: absolute;
    top: 56px;
    right: 0;
    padding: 14px 0;
    border-top: 1px solid var(--border-subtle);
}

.mobile-nav a {
    padding: 10px 20px;
    font-size: 1rem;
    color: var(--text-main);
}
.mobile-nav a:hover {
    background: #111;
}

/* إظهار الزر وإخفاء قائمة الديسكتوب */
@media (max-width: 768px) {
    .main-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block !important;
    }
}


@media (max-width: 768px) {
    .hero-full {
        grid-template-columns: 1fr !important;
        padding: 20px 16px !important;
        gap: 20px !important;
        text-align: center;
    }

    .hero-left h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    .hero-left p {
        font-size: 1rem !important;
        line-height: 1.7;
        margin: 0 auto;
        max-width: 100% !important;
    }

    .hero-right img {
        width: 100% !important;
        max-height: 260px !important;
        object-fit: cover;
        border-radius: 14px;
    }
}

/* تحسين card-item على الموبايل */
@media (max-width: 768px) {
    .card-item {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding: 16px !important;
    }

    .card-img {
        width: 100% !important;
        height: 180px !important;
        border-radius: var(--radius-md);
        object-fit: cover;
        margin-bottom: 12px;
    }

    .card-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 6px;
    }

    .card-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* تحسين project grid على الموبايل */
@media (max-width: 768px) {
    .project-card-item {
        padding-bottom: 10px !important;
    }

    .project-img {
        height: 200px !important;
        object-fit: cover;
    }

    .project-info h3 {
        text-align: center;
        font-size: 1.15rem !important;
    }

    .project-info p {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: center;
    }
}

/* تحسين member-item على الجوال */
@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    .member-item {
        padding: 14px !important;
    }

    .member-photo,
    .member-placeholder {
        width: 90px !important;
        height: 90px !important;
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .member-item h3 {
        font-size: 1rem !important;
    }

    .member-item .role {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .member-item p {
        font-size: 0.86rem;
    }
}

/* تحسين الحواف والمسافات العامة على الجوال */
@media (max-width: 768px) {
    .page-wrapper {
        padding-inline: 16px !important;
    }

    .section-full {
        padding: 30px 0 !important;
    }
}






