/* ============================================= */
/* 1. Global Styles & Variables                  */
/* ============================================= */
:root {
    --primary-color: #1a2a45;
    --secondary-color: #bfa06a;
    --background-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #343a40;
    --light-text-color: #f1f1f1; 
    --border-radius: 15px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --footer-bg-color: #1a2a45; 
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; } 

/* ============================================= */
/* 2. Top Info Bar (Fixed, One Line, Clean)    */
/* ============================================= */
.top-info-bar {
    background: linear-gradient(90deg, #121f33 0%, #2c3e50 100%);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--secondary-color);
    width: 100%;
    position: relative; 
    z-index: 1100;
}

.info-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .top-info-bar { padding: 6px 0; font-size: 0.7rem; }
    .info-bar-content { gap: 10px; padding: 0 10px; justify-content: space-between; }
    .info-item { gap: 4px; }
    .info-item i { font-size: 0.85rem; }
    .hide-mobile { display: none; }
}

/* ============================================= */
/* 3. Navigation Bar (MOBILE-FIRST)            */
/* ============================================= */
.main-nav-wrapper { display: none; } 
.mobile-header { display: block;
    background-color: var(--surface-color);
    padding: 0.8rem 0; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.mobile-header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative;
    padding-left: 20px; 
    padding-right: 20px; 
}
.nav-logo { 
    font-size: 1.4rem; 
    font-weight: 800; 
    color: var(--primary-color); 
    text-decoration: none; 
    display: flex;
    align-items: center;
}
.menu-toggle { 
    display: block; 
    font-size: 1.6rem; 
    color: var(--primary-color); 
    background: none; 
    border: none; 
    cursor: pointer; 
}

#mobile-nav-links { 
    position: fixed; top: 0; right: 0; width: 280px; max-width: 80%; height: 100vh; padding-top: 60px; 
    background-color: var(--surface-color); box-shadow: -5px 0 25px rgba(0,0,0,0.1); z-index: 1002; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); transform: translateX(100%); visibility: hidden; 
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; 
}
#mobile-nav-links.active { transform: translateX(0); visibility: visible; }
#mobile-nav-links li { opacity: 0; transform: translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; width: 100%; text-align: center; }
#mobile-nav-links.active li { opacity: 1; transform: translateY(0); }

#mobile-nav-links a { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 2rem; 
    color: var(--text-color); 
    text-decoration: none; 
    font-weight: 600; 
    border-bottom: 1px solid rgba(0,0,0,0.03); 
} 
#mobile-nav-links a:hover, #mobile-nav-links a.active { color: var(--secondary-color); background-color: #fcfcfc; }

.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1001; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.nav-overlay.active { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------ */
/* تنسيق رابط المساعد الأكاديمي والايقونة (جديد)   */
/* ------------------------------------------------ */
a.acdemc {
    display: flex;
    align-items: center;
    gap: 8px; /* مسافة بين النص والايقونة */
}
/* إجبار ظهور الأيقونة باستخدام CSS Content */
.acdemc .fa-layer-group::before {
    content: "\f5fd"; /* كود أيقونة الطبقات FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
}
/* ------------------------------------------------ */

@media (min-width: 993px) {
    .mobile-header { display: none; }
    .main-nav-wrapper { 
        display: flex; 
        position: sticky; 
        top: 0; 
        z-index: 1000; 
        width: 100%; 
        justify-content: center; 
        transition: top 0.3s ease;
        /* background-color: #162541; */
        margin-top: 0px; 
    }
    .main-nav-wrapper.scrolled { margin-top: 0; } 
    
    .main-nav-wrapper .nav-links { 
        display: flex; 
        flex-direction: row; 
        align-items: center; 
        position: relative; 
        gap: 25px; 
        padding: 10px 30px; 
        background: rgba(255, 255, 255, 0.6); 
        backdrop-filter: blur(12px); 
        -webkit-backdrop-filter: blur(12px); 
        border-radius: 50px; 
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1); 
        border: 1px solid rgba(255, 255, 255, 0.2);
        list-style: none; 
        margin: 0;  
    }
     .main-nav-wrapper .nav-links li { padding: 0; margin: 0; line-height: 1; }
     .main-nav-wrapper .nav-links .nav-logo-li img { height: 40px; width: auto; vertical-align: middle; margin-left: 20px; }
    .main-nav-wrapper .nav-links::before { 
        content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50px; 
        background: radial-gradient( 200px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(191, 160, 106, 0.3), transparent 80% ); 
        opacity: 0; transition: opacity 0.4s ease-out; z-index: 0; 
    }
    .main-nav-wrapper:hover .nav-links::before { opacity: 1; }
    .main-nav-wrapper .nav-links a { 
        position: relative; z-index: 1; padding: 10px 0; color: var(--text-color); text-decoration: none; font-weight: 600; transition: color 0.3s ease;
    }
     .main-nav-wrapper .nav-links li:not(.nav-logo-li):not(.search-li) a::after { 
        content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 2px; background-color: var(--secondary-color); transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
     }
    .main-nav-wrapper .nav-links a:hover, .main-nav-wrapper .nav-links a.active { color: var(--secondary-color); }
     .main-nav-wrapper .nav-links li:not(.nav-logo-li):not(.search-li) a:hover::after, 
     .main-nav-wrapper .nav-links li:not(.nav-logo-li):not(.search-li) a.active::after { width: 100%; left: 0; right: auto; }
}

/* --- Notification Bell --- */
@keyframes bell-shake { 0% { transform: rotate(0); } 15% { transform: rotate(15deg); } 30% { transform: rotate(-15deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-10deg); } 75% { transform: rotate(5deg); } 85% { transform: rotate(-5deg); } 95% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes pulse-red-glow { 0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }
#fixed-notification-bell {
    position: fixed; top: 120px; 
    left: 3px; width: 40px; height: 40px; background-color: transparent; color: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; text-decoration: none; box-shadow: none; z-index: 990; transition: all 0.3s ease; animation: bell-shake 2s cubic-bezier(.36,.07,.19,.97) 1s infinite; border: none; 
}
#fixed-notification-bell.notify { color: #e74c3c; animation: bell-shake 2s cubic-bezier(.36,.07,.19,.97) 1s infinite, pulse-red-glow 1.5s infinite; }
#fixed-notification-bell i { transition: all 0.3s ease; text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.7), 1px -1px 0 rgba(255, 255, 255, 0.7), -1px  1px 0 rgba(255, 255, 255, 0.7), 1px  1px 0 rgba(255, 255, 255, 0.7); }
#fixed-notification-bell:hover { color: var(--secondary-color); transform: scale(1.1); animation: none; background-color: transparent; border: none; }
#fixed-notification-bell.notify:hover { color: #e74c3c; transform: scale(1.1); animation: none; }
@media (min-width: 993px) { #fixed-notification-bell { top: 125px; left: 35px; } }

/* --- Hero Section --- */
.hero-section { background: linear-gradient(rgba(26, 42, 69, 0.75), rgba(44, 62, 80, 0.75)), url('https://mir-s3-cdn-cf.behance.net/project_modules/1400/b519a5112830393.60508a3cb34ed.gif'); background-size: cover; background-position: center center; background-attachment: fixed; color: var(--light-text-color); padding: 150px 0; text-align: center; position: relative; z-index: 0; }
.hero-content { position: relative; z-index: 2; padding-top: 20px; }
.hero-section h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; margin: 0 0 15px; text-shadow: 2px 2px 8px rgba(0,0,0,0.3); }
.hero-section p { font-size: clamp(1.1rem, 2.5vw, 1.3rem); max-width: 700px; margin: 0 auto 30px; color: rgba(255, 255, 255, 0.9); }
.btn { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; padding: 14px 35px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1.1rem; transition: all 0.3s ease; display: inline-block; border: none; cursor: pointer; z-index: 1; }
.btn span { pointer-events: none; }
.btn-primary { background-color: var(--secondary-color); color: var(--primary-color); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(191, 160, 106, 0.4); }
.btn-secondary { background-color: var(--surface-color); color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: var(--surface-color); box-shadow: 0 10px 20px rgba(26, 42, 69, 0.2); }
.btn .ripple, .btn .gavel-strike { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0; border-radius: 50%; }
.btn .ripple { width: 100%; height: 100%; background-color: var(--secondary-color); transform: translate(-50%, -50%) scale(0); }
.btn .gavel-strike { color: var(--primary-color); font-size: 1.8em; }
.btn:hover .ripple { animation: ripple-hover-effect 0.8s ease-out; }
.btn:hover .gavel-strike { animation: gavel-hover-effect 0.7s ease-out; }
@keyframes ripple-hover-effect { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0.6; } 100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; } }
@keyframes gavel-hover-effect { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(40deg) scale(0.5); } 30% { transform: translate(-50%, -50%) rotate(-15deg) scale(1.2); } 50% { transform: translate(-50%, -50%) rotate(0deg) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(5deg) scale(1.5); } }

/* --- Content Sections --- */
.content-section { padding: 80px 0; position: relative; } 
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--primary-color); margin: 0 0 10px; font-weight: 700; }
.section-header p { font-size: 1.1rem; color: #6c757d; max-width: 600px; margin: 0 auto; }
.bg-light { background-color: #f0f2f5; }
.goals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
@media (min-width: 1200px) { .goals-grid { grid-template-columns: repeat(4, 1fr); } }
.goal-card { background: var(--surface-color); padding: 35px; border-radius: var(--border-radius); box-shadow: var(--box-shadow); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; border-top: 4px solid var(--secondary-color); display: flex; flex-direction: column; }
.goal-card p { flex-grow: 1; font-size: clamp(0.9rem, 2.5vw, 1rem); }
.goal-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }
.goal-card .icon { font-size: 1rem; color: var(--primary-color); margin-bottom: 20px; }
.goal-card h3 { margin: 0 0 10px; color: var(--primary-color); font-size: clamp(1.2rem, 4vw, 1.5rem); }
.about-layout { display: flex; align-items: center; gap: 50px; }
.about-text { flex: 1; }
.about-image { flex: 1; text-align: center; }
.about-image img { max-width: 100%; border-radius: var(--border-radius); box-shadow: var(--box-shadow); }

.goal-card-btn { display: inline-block; margin-top: 15px; padding: 8px 18px; font-size: 0.9rem; font-weight: 700; text-decoration: none; color: var(--primary-color); background-color: transparent; border: 2px solid var(--secondary-color); border-radius: 50px; transition: all 0.3s ease; cursor: pointer; }
.goal-card-btn i { margin-left: 5px; transition: transform 0.3s ease; }
.goal-card-btn:hover { background-color: var(--secondary-color); color: var(--surface-color); border-color: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(191, 160, 106, 0.3); }
.goal-card-btn:hover i { transform: translateX(-3px); }

/* --- News Card Styles & Slider --- */
.news-card { background: var(--surface-color); border-radius: var(--border-radius); box-shadow: var(--box-shadow); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; width: 100%; height: 100%; }
.news-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }
.news-card-image { height: 200px; background-color: var(--primary-color); color: var(--secondary-color); display: flex; align-items: center; justify-content: center; font-size: 4rem; flex-shrink: 0; }
.news-card .news-card-img-top { width: 100%; height: 200px; object-fit: cover; cursor: pointer; transition: opacity 0.3s ease; flex-shrink: 0; }
.news-card .news-card-img-top:hover { opacity: 0.8; }
.news-card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.news-card-content h3 { margin: 0 0 10px; font-size: 1.4rem; }
.news-card-content p { margin: 0 0 10px; color: #6c757d; flex-grow: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; text-overflow: ellipsis; }
.news-card-content a { color: var(--primary-color); font-weight: 700; text-decoration: none; align-self: flex-start; margin-top: 10px;} 
.news-card-content h3 a { color: var(--primary-color); text-decoration: none; transition: color 0.3s; margin-top: 0 !important; align-self: auto !important; display: inline !important; }
.news-card-content h3 a:hover { color: var(--secondary-color); }
.post-date-line { font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; line-height: 1.4; }
.publish-date { color: var(--secondary-color); }
.event-date { color: #1a2a45; }
#news-slider { width: 100%; padding-top: 10px; padding-bottom: 50px; position: relative; overflow: hidden; }
.swiper-slide { height: auto; display: flex; justify-content: center; align-items: stretch; padding: 5px; box-sizing: border-box; }
.swiper-button-next, .swiper-button-prev { color: var(--primary-color); width: 50px; height: 50px; background: rgba(255, 255, 255, 0.9); border-radius: 50%; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: all 0.3s ease; }
@media (max-width: 600px) { .swiper-button-next, .swiper-button-prev { display: none; } }
.swiper-button-next:hover, .swiper-button-prev:hover { background: var(--surface-color); color: var(--secondary-color); }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.5rem; font-weight: 800; }
.swiper-pagination-bullet { background: var(--primary-color); opacity: 0.6; }
.swiper-pagination-bullet-active { background: var(--secondary-color); opacity: 1; }
.all-news-link-wrapper { text-align: center; margin-top: 20px; }

/* --- FAQ Accordion Style (NEW) --- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.faq-question:hover { background-color: #f9f9f9; }

.faq-question .icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-question.active .icon { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
}

.faq-answer p {
    padding: 0 20px 20px 20px;
    margin: 0;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}


/* --- Modal & Footer --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }
.modal-content { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.close-btn { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.close-btn:hover, .close-btn:focus { color: #bbb; text-decoration: none; }
footer { background-color: var(--footer-bg-color); color: #bdc3c7; padding: 40px 0; text-align: center; margin-top: auto; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.social-links a { color: var(--light-text-color); font-size: 1.5rem; margin: 0 10px; transition: color 0.3s ease; }
.social-links a:hover { color: var(--secondary-color); }

.floating-btn, #admin-fab, #suggestion-fab { position: fixed; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; text-decoration: none; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: all 0.3s ease; z-index: 998; background-color: var(--primary-color); color: white; border: none; cursor: pointer; }
.floating-btn:hover, #admin-fab:hover, #suggestion-fab:hover { background-color: var(--secondary-color); transform: scale(1.1); color: var(--primary-color); }
.floating-btn { bottom: 25px; left: 25px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } 
#admin-fab { bottom: 25px; right: 25px; } 
#suggestion-fab { bottom: 90px; right: 25px; }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.goal-card:nth-child(2) { transition-delay: 0.2s; }
.goal-card:nth-child(3) { transition-delay: 0.4s; }
@media (max-width: 768px) { .hero-section { padding: 80px 0; background-attachment: scroll; margin-top: 0; } }
@media (max-width: 992px) { .about-layout { flex-direction: column-reverse; text-align: center; } }

/* --- Mobile Fixes --- */
@media (max-width: 767px) {
    #goals.content-section { padding-top: 50px; padding-bottom: 50px; }
    .goals-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
    .goal-card { padding: 20px 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; margin: 0; }
    .goal-card .icon { font-size: 1.8rem; margin-bottom: 5px; }
    .goal-card h3 { margin: 0 0 3px; line-height: 1.1; }
    .goal-card p { line-height: 1.3; margin-bottom: 0; }
    .goal-card-btn { margin-top: 10px; padding: 5px 12px; font-size: 0.7rem; }
    #visitor-count-display { font-size: 1.5rem !important; margin-top: 5px !important; line-height: 1 !important; white-space: nowrap; }
    #visitor-count-display i { font-size: 0.8em !important; margin-left: 5px !important; margin-right: 5px !important; }
    /* إصلاح للهيدر في الجوال */
    .mobile-header { margin-top: 0; }
}

/* --- Navbar Effects --- */
#about-nav-link-desktop, #news-nav-link-desktop, #library-nav-link-desktop, #members-nav-link-desktop, #profs-nav-link-desktop, #game-nav-link-desktop,
#about-nav-link-mobile, #news-nav-link-mobile, #library-nav-link-mobile, #members-nav-link-mobile, #profs-nav-link-mobile, #game-nav-link-mobile {
    position: relative; transition: transform 0.2s ease-out; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; 
}
#about-nav-link-desktop:hover, #news-nav-link-desktop:hover, #library-nav-link-desktop:hover, #members-nav-link-desktop:hover, #profs-nav-link-desktop:hover, #game-nav-link-desktop:hover,
#about-nav-link-mobile:hover, #news-nav-link-mobile:hover, #library-nav-link-mobile:hover, #members-nav-link-mobile:hover, #profs-nav-link-mobile:hover, #game-nav-link-mobile:hover {
    transform: scale(1.15); 
}
.nav-particle { position: absolute; font-size: 1rem; opacity: 1; pointer-events: none; z-index: 1050; animation: burst-out-nav 1s ease-out forwards; }
@keyframes burst-out-nav { 0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); } 100% { opacity: 0; transform: translate(var(--tx, -50%), var(--ty, -50%)) scale(0); } }

/* --- New Indicator --- */
@keyframes pulse-red { 0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(231, 76, 60, 0); } 100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }
.new-indicator { display: none; width: 8px; height: 8px; background-color: #e74c3c; border-radius: 50%; margin-left: 6px; margin-right: 0; display: inline-block; vertical-align: middle; box-shadow: 0 0 8px rgba(231, 76, 60, 0.8); animation: pulse-red 1.5s infinite; opacity: 0; transition: opacity 0.3s; }
.nav-link-with-indicator.show-new .new-indicator { display: inline-block; opacity: 1; }
.nav-link-with-indicator .new-indicator { display: none; }
#mobile-nav-links .new-indicator { margin-left: 5px; margin-right: 0; }

/* --- Floating Cloud Notification --- */
.floating-cloud { position: fixed; bottom: 90px; right: 25px; left: auto; background-color: var(--surface-color); color: var(--text-color); padding: 15px 20px 15px 40px; border-radius: var(--border-radius); box-shadow: var(--box-shadow); max-width: 300px; z-index: 999; border: 1px solid rgba(0,0,0,0.1); opacity: 0; transform: translateY(20px); animation: cloud-fade-in 0.5s ease-out 0.5s forwards; }
#floating-notification-2 { right: auto; left: 25px; bottom: 90px; }
@keyframes cloud-fade-in { to { opacity: 1; transform: translateY(0); } }
.floating-cloud p { margin: 0 0 5px 0; font-size: 0.9em; line-height: 1.6; overflow-wrap: break-word; word-wrap: break-word; white-space: normal; max-height: 4.8em; overflow: hidden; position: relative; transition: max-height 0.3s ease-out; }
.floating-cloud.expanded p { max-height: 1000px; overflow: visible; }
.close-notification-btn { position: absolute; top: 5px; left: 8px; right: auto; background: none; border: none; font-size: 1.8rem; color: var(--text-color); cursor: pointer; padding: 0 5px; line-height: 1; opacity: 0.5; transition: opacity 0.2s ease; }
.close-notification-btn:hover { opacity: 1; }
.show-all-btn { display: none; background: none; border: none; color: var(--primary-color); font-weight: bold; cursor: pointer; font-size: 0.8em; padding: 0; margin-top: 5px; text-decoration: underline; }
.show-all-btn:hover { color: var(--secondary-color); }

/* --- Contact Modal --- */
.contact-modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.contact-modal.show { display: flex; opacity: 1; }
.contact-modal-content { background: var(--surface-color); border-radius: var(--border-radius); box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 90%; max-width: 450px; text-align: center; position: relative; padding: 2.5rem; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.contact-modal.show .contact-modal-content { transform: scale(1); }
.contact-close-btn { position: absolute; top: 10px; left: 15px; background: none; border: none; font-size: 2.5rem; color: #aaa; cursor: pointer; line-height: 1; padding: 0; transition: color 0.2s ease; }
.contact-close-btn:hover { color: var(--text-color); }
.contact-modal-header { margin-bottom: 2rem; }
.contact-modal-header i { font-size: 3.5rem; color: var(--secondary-color); margin-bottom: 1rem; }
.contact-modal-header h2 { color: var(--primary-color); font-size: 1.8rem; margin: 0 0 10px 0; }
.contact-modal-header p { font-size: 1.1rem; color: #6c757d; margin: 0; }
.contact-modal-body { display: flex; flex-direction: column; gap: 1rem; }
.contact-link { display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid #eee; border-radius: 10px; text-decoration: none; color: var(--text-color); font-weight: 600; font-size: 1.1rem; transition: background-color 0.2s ease, border-color 0.2s ease; direction: ltr; }
.contact-link:hover { background-color: #f8f9fa; border-color: #ddd; }
.contact-link i { margin-right: 10px; color: var(--primary-color); font-size: 1.2rem; }
#visitor-count-display i { font-size: 1.8rem; vertical-align: middle; margin-left: 5px !important; margin-right: 5px !important; }

/* --- OneSignal iOS Style --- */
#onesignal-slidedown-container #onesignal-slidedown-dialog { background-color: rgba(255, 255, 255, 0.65) !important; backdrop-filter: blur(20px) saturate(180%) !important; -webkit-backdrop-filter: blur(20px) saturate(180%) !important; border: 1px solid rgba(255, 255, 255, 0.5) !important; border-radius: 22px !important; box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15) !important; color: #1a2a45 !important; font-family: 'Cairo', sans-serif !important; max-width: 90% !important; margin: 0 auto !important; bottom: 20px !important; }
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message { color: #343a40 !important; font-weight: 600 !important; font-size: 1rem !important; }
#onesignal-slidedown-container #onesignal-slidedown-allow-button { background-color: #007AFF !important; color: white !important; border-radius: 12px !important; font-weight: bold !important; box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3) !important; transition: transform 0.2s ease !important; }
#onesignal-slidedown-container #onesignal-slidedown-allow-button:active { transform: scale(0.96) !important; }
#onesignal-slidedown-container #onesignal-slidedown-cancel-button { color: #8e8e93 !important; font-weight: 600 !important; background: transparent !important; border: none !important; }
@media (prefers-color-scheme: dark) {
    #onesignal-slidedown-container #onesignal-slidedown-dialog { background-color: rgba(30, 30, 30, 0.70) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; color: white !important; }
    #onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message { color: #f1f1f1 !important; }
}

/* ========================================================= */
/* ====  ستايل البحث (تصميم الكبسولة العربي المحسن)      ==== */
/* ========================================================= */
.search-box-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* لضمان البدء من اليسار في الوضع العادي */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* الحاوية النشطة (الكبسولة) */
.search-box-container.active {
    background-color: var(--surface-color);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding-left: 5px; /* مسافة للزر */
}

/* زر البحث (الأيقونة) */
.search-btn-expandable {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
}

.search-box-container.active .search-btn-expandable {
    background-color: var(--secondary-color);
    color: #fff;
    transform: scale(0.9); /* تصغير بسيط للجمالية */
}

/* حقل الإدخال */
.search-input-expandable {
    height: 40px;
    width: 0;
    opacity: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    transition: all 0.4s ease;
    text-align: right;
    direction: rtl;
}

.search-box-container.active .search-input-expandable {
    width: 220px;
    opacity: 1;
    padding: 0 15px 0 10px; /* مسافة للنص */
}

/* قائمة النتائج */
.search-dropdown-results {
    position: absolute;
    top: 55px;
    left: 0; 
    width: 100%; 
    min-width: 260px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 1100;
    direction: rtl;
    text-align: right;
}

.search-dropdown-results.has-results {
    max-height: 400px;
    opacity: 1;
    padding: 10px 0;
    border: 1px solid rgba(0,0,0,0.05);
}

.dropdown-item {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background-color: #f0f7ff; }
.dropdown-item strong { display: block; color: var(--primary-color); margin-bottom: 2px; }
.dropdown-item span { font-size: 0.8em; color: #888; }

/* تخصيص للجوال */
@media (max-width: 992px) {
    .mobile-search-wrapper {
        position: absolute;
        left: 60px; 
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }
    .search-box-container.active .search-input-expandable {
        width: 160px; /* أصغر للجوال */
        background: #fff; /* خلفية بيضاء واضحة */
    }
    .search-dropdown-results {
        width: 90vw;
        left: -60px; /* ضبط الموضع */
        right: auto;
        min-width: unset;
    }
}

/* === ستايل القسم التفاعلي في الفوتر (المحسن والمدمج) === */
/* --- الأساسي (للابتوب) --- */
.footer-interactive-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* مسافة نظيفة بدلاً من الخط */
    width: 100%;
    max-width: 800px; /* تحديد العرض لكي لا يتباعدوا جداً */
    margin: 30px auto; /* توسيط الكتلة */
    flex-wrap: wrap;
    position: relative;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03); /* خلفية خفيفة جداً لتوحيدهم */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* البطاقات العامة */
.interactive-card {
    flex: 1 1 280px; /* خاصية فليكس: يتمدد، ينكمش، العرض الأساسي 280 */
    height: 90px;
    border-radius: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 280px; /* ضمان عدم انكماش الكرت في الشاشات الصغيرة جدا */
    max-width: 400px; /* ضمان عدم كبر الكرت بشكل مبالغ فيه */
}

/* بطاقة التحديات (اليمين) */
.game-card {
    background: linear-gradient(135deg, #1a2a45, #bfa06a);
    color: #fff;
    border: 2px solid #2c3e50;
}

/* بطاقة العضوية (اليسار) */
.membership-card {
    background: linear-gradient(135deg, #1a2a45, #bfa06a);
    color: #fff;
    border: 2px solid #2c3e50;
}

/* الأيقونات الخلفية الكبيرة */
.card-bg-icon {
    position: absolute;
    font-size: 5rem;
    opacity: 0.1;
    right: -10px;
    bottom: -10px;
    transition: transform 0.4s ease;
}

/* محتوى البطاقة */
.card-content {
    z-index: 2;
    text-align: right;
}
.card-content h3 { margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.2; }
.card-content span { font-size: 0.85rem; opacity: 0.85; display: block; margin-top: 3px; }

.card-action-icon {
    z-index: 2;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.15);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* تأثيرات الهوفر */
.interactive-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    z-index: 5; /* يرتفع فوق العنصر الآخر عند الهوفر */
}
.interactive-card:hover .card-bg-icon { transform: rotate(-15deg) scale(1.2); opacity: 0.15; }
.interactive-card:hover .card-action-icon { transform: rotate(360deg) scale(1.1); background: #fff; }
.game-card:hover .card-action-icon { color: #1a2a45; }
.membership-card:hover .card-action-icon { color: #bfa06a; }

/* لمعان (Shine Effect) */
.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.interactive-card:hover::before { left: 100%; }

/* --- تخصيص دقيق للجوال (لحل مشكلة الحجم) --- */
@media (max-width: 768px) {
    .footer-interactive-zone { 
        flex-direction: column; /* ترتيب عمودي */
        gap: 10px; /* مسافة صغيرة */
        margin: 15px auto; /* تقليل الهوامش */
        padding: 0;
        border: none;
        background: none; /* إزالة الخلفية */
        width: 100%;
    }

    .interactive-card {
        width: 90%; /* عرض مناسب وليس كاملاً */
        max-width: 350px; /* منع التمدد الزائد في الأجهزة اللوحية */
        height: 60px !important; /* إجبار الارتفاع ليكون صغيراً */
        min-height: 60px; /* منع الانهيار */
        flex: none; /* إلغاء التمدد المرن الذي كان يسبب المشكلة */
        margin: 0 auto; /* توسيط */
        border-radius: 12px;
    }

    /* تصغير النصوص */
    .card-content h3 {
        font-size: 0.95rem; /* خط أصغر للعناوين */
        margin: 0;
    }
    .card-content span {
        display: none; /* إخفاء النص الفرعي تماماً لتوفير المساحة */
    }
    
    /* تصغير الأيقونات */
    .card-action-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .card-bg-icon {
        font-size: 3rem; /* تصغير أيقونة الخلفية */
        opacity: 0.1;
    }
}

/* --- Mu'in Chat Widget --- */
#muin-fab {
    bottom: 90px;
    left: 25px;
    background: linear-gradient(135deg, #1a2a45, #bfa06a);
    z-index: 998;
    color: white;
    font-size: 1.5rem;
    display: flex;
}

#muin-chat-widget {
    position: fixed;
    bottom: 160px;
    left: 25px;
    width: 360px;
    height: 550px;
    max-width: 90vw;
    max-height: 65vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow: hidden;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#muin-chat-widget.active {
    display: flex;
    animation: slideUpWidget 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#muin-chat-widget.maximized {
    bottom: 5vh !important;
    left: 5vw !important;
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 15px;
}

@keyframes slideUpWidget {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-widget-header {
    background: var(--primary-color);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--secondary-color);
}

.chat-widget-controls button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
    transition: color 0.2s;
}

.chat-widget-controls button:hover {
    color: var(--secondary-color);
}

.chat-iframe-container {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    background: #f4f4f4;
    position: relative;
}

.chat-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}