/* ========== متغيرات الألوان الأساسية ========== */
:root {

    --fontcolor: #ffffff; /* افتراضي للخطوط على خلفية داكنة */
    --footer-bg: #0a1f0e;
    --footer-text: #e0f0e0;
    --footer-border: rgba(82, 190, 60, 0.2);
}

/* ========== تذييل الصفحة ========== */
.research-footer {
    background: linear-gradient(145deg, #0a1f0e 0%, #071a0b 100%);
    color: var(--footer-text);
    position: relative;
    padding-top: 3rem;
    margin-top: auto; /* للـ sticky footer */
}

/* الموجة العلوية */
.footer-wave-top {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}
.footer-wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.wave-fill {
    fill: var(--maincolor);
    fill-opacity: 0.3;
}

/* الحاوية الرئيسية */
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
    position: relative;
    z-index: 2;
}

/* شبكة الفوتر (5 أعمدة على الكبير، تتكدس على الصغير) */

.footer-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.8fr) repeat(4, 1fr);
    gap: 2rem;
}


/* الأعمدة */
.footer-col {
    transition: transform 0.2s;
}
.footer-col:hover {
    transform: translateY(-3px);
}

/* العلامة التجارية */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.footer-logo {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.footer-site-name {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--secondcolor));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* وصف المركز */
.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

/* أيقونات التواصل الاجتماعي */
.footer-social {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(82, 190, 60, 0.15);
    border-radius: 50%;
    color: var(--secondcolor);
    font-size: 1.1rem;
    transition: all 0.25s;
}
.social-icon:hover {
    background: var(--maincolor);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(10, 148, 33, 0.3);
}

/* عناوين الأقسام */
.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
    color: white;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--maincolor), var(--thirdcolor));
    border-radius: 3px;
}

/* قوائم الروابط */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-list li {
    margin-bottom: 0.6rem;
}
.footer-link {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}
.footer-link::before {
    content: '▹';
    color: var(--secondcolor);
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.footer-link:hover {
    color: var(--thirdcolor);
    transform: translateX(5px);
}
.footer-link:hover::before {
    transform: translateX(3px);
    color: var(--thirdcolor);
}

/* قائمة المجلات */
.journals-list li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.journals-list .footer-link::before {
    font-size: 1.3rem;
     content: '\f3d9';
    color: var(--thirdcolor);
}

/* معلومات الاتصال */
.contact-info {
    list-style: none;
    padding: 0;
}
.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.contact-info li i {
    width: 28px;
    color: var(--secondcolor);
    font-size: 1.1rem;
}
.contact-info li span {
    flex: 1;
    word-break: break-word;
}

/* أسفل الفوتر */
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.8rem;
    text-align: center;
}
.footer-copyright {
    opacity: 0.7;
}
.credit-link {
    color: var(--secondcolor);
    text-decoration: none;
    font-weight: 500;
}
.credit-link:hover {
    color: var(--thirdcolor);
    text-decoration: underline;
}

/* ========== زر العودة للأعلى (حديث) ========== */
.back-to-top {
    /* position: fixed; */
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--maincolor);
    color: white;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--secondcolor);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(10, 148, 33, 0.4);
}
.back-to-top i {
    font-size: 1.4rem;
}
.back-tooltip {
    position: absolute;
    right: 58px;
    background: #1e2a1a;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
}
.back-to-top:hover .back-tooltip {
    opacity: 1;
    right: 68px;
}

/* ========== التجاوب مع الشاشات الصغيرة ========== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);

    }

    .about-col {
        grid-column: span 2;
    }
}
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .about-col {
        grid-column: auto;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}
