:root {
    --bg-color: #fbf9f4; /* لون الخلفية الفاتح */
    --text-main: #222222; /* لون النصوص الأساسي */
    --text-light: #666666; /* لون النصوص الثانوية */
    --accent-color: #efca73; /* اللون الذهبي المميز */
    --white: #ffffff;
    --footer-bg: #222222;
    --footer-text: #999999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header / Navbar --- */
.nav-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.header {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(251, 249, 244, 0.85); /* لون الخلفية شفاف قليلاً */
    backdrop-filter: blur(10px); /* تأثير ضبابي جميل (Glassmorphism) */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03); /* ظل خفيف جداً للفصل عن المحتوى */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    transition: all 0.3s;
    padding-bottom: 5px;
    border-bottom: 3px solid transparent; /* لمنع اهتزاز التصميم عند التحويم */
}

.nav-links a:hover {
    color: #926f2f;
    border-bottom: 3px solid #926f2f;
}

.nav-links a.active {
    color: #926f2f; /* لون مطابق للتصميم المرفق */
    border-bottom: 3px solid #926f2f;
}
/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    border-radius: 15px;
    padding: 3px 6px;
    font-size: 14px; /* حجم أصغر للعلم */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    text-decoration: none;
}

.lang-btn.active {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    opacity: 1;
}

.lang-btn:hover:not(.active) {
    opacity: 0.9;
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: flex-start; /* تم التعديل لرفع النص بمحاذاة الصورة */
    justify-content: space-between;
    gap: 50px;
    margin-top: 60px;
    margin-bottom: 120px;
}

.hero-content {
    flex: 1;
}

.yellow-badge {
    background-color: var(--accent-color);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-light);
    max-width: 90%;
    line-height: 1.8;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image {
    width: 100%;
    max-width: 450px;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative; /* لإحتواء الاسم */
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* يضمن ظهور الجزء العلوي (الوجه) عند قص الصورة في الشاشات الصغيرة */
 }

.author-name-tag {
    position: absolute;
    bottom: 20px;
    inset-inline-start: 20px; /* تضبط تلقائياً اليمين في العربي واليسار في الانجليزي */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 2;
    transition: all 0.3s ease;
}

.author-name-tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* --- Sections Common --- */
.section {
    margin-bottom: 80px;
    scroll-margin-top: 100px; /* لإعطاء مساحة فارغة من الأعلى عند النزول للقسم */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
}

.view-all {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all i {
    font-size: 12px;
}

.grid-3 {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* إخفاء شريط التمرير في فايرفوكس */
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.grid-3::-webkit-scrollbar {
    display: none; /* إخفاء شريط التمرير في كروم وسفاري */
}

.grid-3 > div {
    flex: 0 0 calc(33.333% - 20px);
    scroll-snap-align: start;
}

/* --- Post Card --- */
.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-img {
    height: 220px;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
 aspect-ratio: 4/3; }

.post-info {
    padding: 24px;
}

.post-category {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

/* --- Achievement Card --- */
.achieve-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.achieve-card:hover {
    transform: translateY(-5px);
}

.achieve-img {
    height: 180px;
    position: relative;
    border-bottom: 3px solid var(--white); /* مساحة صغيرة قبل الأيقونة */
}

.achieve-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
 aspect-ratio: 4/3; }

.icon-circle {
    position: absolute;
    bottom: -20px;
    right: 20px; /* تغيير لليمين ليتوافق مع اللغة العربية */
    width: 40px;
    height: 40px;
    background: var(--text-main);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 3px solid var(--white);
}

.achieve-info {
    padding: 35px 24px 24px;
}

.year-badge {
    background-color: var(--accent-color);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 15px;
}

.achieve-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.achieve-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Community Section --- */
.community-box {
    background: var(--white);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.community-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.community-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 50px;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.stat-card {
    flex: 1;
    max-width: 250px;
    padding: 35px 20px;
    border-radius: 16px;
    border: 1px solid #eeeeee;
    background: #fafafa;
    transition: all 0.3s;
}

.stat-card.active-stat {
    border-color: var(--accent-color);
    border-bottom: 4px solid var(--accent-color);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.stat-icon {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 20px;
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-card.active-stat .stat-icon {
    background: rgba(239, 202, 115, 0.2);
    color: #c99a2e;
}

.stat-num {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* --- Footer --- */
.footer {
    background: var(--footer-bg);
    padding: 40px 0;
    color: var(--footer-text);
    margin-top: 100px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: flex-start; /* ليكون في أقصى اليمين وكل واحدة تحت الأخرى */
}

.footer-links-container a {
    color: var(--footer-text);
    transition: color 0.3s;
    font-size: 14px;
}

.footer-links-container a:hover {
    color: var(--white);
}

.footer-copyright {
    font-size: 14px;
    text-align: center;
    width: 100%;
    margin-top: 15px;
    color: #888;
}

/* --- Responsive Design --- */
/* =======================================================
   RESPONSIVENESS (Tablets & Mobiles)
======================================================= */

/* --- Tablet / iPad (Landscape & Portrait up to 992px) --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 60px 20px 20px;
    }
    
    .hero-image-wrapper {
        justify-content: center;
        width: 100%;
    }
    
    .hero-desc {
        margin: 0 auto;
    }
    
    .grid-3 > div {
        flex: 0 0 calc(50% - 15px);
    }
    
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* --- Mobile / Small Tablet (up to 768px) --- */
@media (max-width: 768px) {
    .header {
        padding: 5px 0; /* تصغير التذييل الأعلى */
    }
    
    .nav-links {
        gap: 15px; /* زيادة بسيطة في المسافة بين الروابط */
    }

    .nav-links a {
        font-size: 13px; /* تصغير حجم خط القائمة */
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-desc {
        font-size: 16px;
    }
    
    .hero-image {
        height: 400px;
        max-width: 100%;
    }
    
    .author-name-tag {
        font-size: 16px;
        padding: 8px 16px;
        bottom: 15px;
    }

    .section-title {
        font-size: 24px;
    }
    
    .footer-content {
        gap: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links-container {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* --- Small Mobile Phones (up to 600px) --- */
@media (max-width: 600px) {
    .grid-3 > div {
        flex: 0 0 90%;
        scroll-snap-align: center;
    }
    
    .hero-image {
        height: 320px;
    }
    
    .stats-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 300px;
    }
    
    .author-name-tag {
        font-size: 14px;
        padding: 6px 12px;
        bottom: 10px;
        border-radius: 8px;
    }
    
    .nav-links {
        gap: 8px; /* تقريب الروابط لبعضها قليلاً لتتسع الشاشة */
    }

    .nav-links a {
        font-size: 11px; /* تصغير أكثر للهواتف الصغيرة جداً */
        padding-bottom: 2px;
    }
    
    .hero {
        padding: 80px 20px 20px; /* مسافة جيدة تحت القائمة (الهيدر) */
    }
    
    .lang-switcher {
        padding: 1px;
    }
}

/* --- Article Page Styles --- */
.article-container {
    max-width: 800px;
    margin: 40px auto 60px;
    background: var(--bg-color);
    padding: 0;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.article-meta span:not(:last-child)::after {
    content: "•";
    margin-right: 15px;
    color: var(--text-light);
}

.article-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 30px;
}

.article-main-image {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
}

.article-main-image img {
    width: 100%;
    height: auto;
    display: block;
 aspect-ratio: 16/9; }

.article-content {
    font-size: 18px;
    line-height: 2;
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 40px 0 20px;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 15px;
}

.article-quote {
    background: #fdfbf7;
    border-right: 4px solid var(--accent-color);
    padding: 30px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 40px 0;
    border-radius: 8px 0 0 8px;
    line-height: 1.6;
}

.article-content img {
    width: 100%;
    border-radius: 16px;
    margin: 30px 0;
}

.article-list {
    list-style: none;
    padding-right: 0;
    margin-bottom: 30px;
}

.article-list li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
}

.article-list li::before {
    content: "◆";
    position: absolute;
    right: 0;
    color: var(--accent-color);
    font-size: 14px;
    top: 5px;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-weight: 700;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: background 0.3s;
}

.share-icons a:hover {
    background: #e0e0e0;
}

.author-box {
    display: flex;
    gap: 20px;
    background: #f1efeb;
    padding: 30px;
    border-radius: 16px;
    margin-top: 40px;
    align-items: center;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
}

.author-info h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
}

.author-info p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.related-articles {
    margin-top: 80px;
}

.text-center {
    text-align: center;
    justify-content: center;
    width: 100%;
}

/* --- Achievement Page Styles --- */
.achieve-details-container {
    max-width: 900px;
    margin: 60px auto;
}

.achieve-header {
    margin-bottom: 40px;
}

.achieve-badge {
    background: #c3f0f0;
    color: #0b7a7a;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

.achieve-page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.achieve-date {
    color: #666;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.achieve-divider {
    height: 2px;
    background: var(--accent-color);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.achieve-gallery {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.gallery-main {
    background: #e6e6fa;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7aed;
    font-size: 50px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.achieve-content {
    font-size: 16px;
    line-height: 2;
    color: var(--text-main);
}

.achieve-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 30px 0 15px;
}

.achieve-content p {
    margin-bottom: 20px;
}

.achieve-list {
    list-style: none;
    padding-right: 0;
    margin-bottom: 30px;
}

.achieve-list li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 10px;
}

.achieve-list li::before {
    content: "♥️"; 
    color: var(--accent-color);
    position: absolute;
    right: 0;
    font-size: 12px;
    top: 5px;
}

.achieve-quote {
    background: #f1efeb;
    padding: 30px 40px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -15px;
    right: 30px;
    font-size: 40px;
    color: #e5e5e5;
}

/* Related Achievements */
.related-achievements {
    margin-bottom: 80px;
}

.related-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.related-card-horiz {
    background: var(--white);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    gap: 20px;
}

.related-card-horiz img {
    width: 100px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.r-card-info {
    flex: 1;
}

.r-cat {
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.r-card-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.r-date {
    font-size: 13px;
    color: var(--text-light);
}
