* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- توحيد الخطوط --- */
h1, h2, h3, h4, h5, h6, .navbar-brand, .halaqa-title, .article-title, .footer-brand, .hero-title, .section-title-new { font-family: "Amiri", serif; }
body, p, li, a, span, input, select, textarea, button, .lead { font-family: "Cairo", sans-serif; }
body {
    background-color: #fdfdfd;
    color: #343a40;
    line-height: 1.8;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

/* --- كود جديد: للحفاظ على شكل الروابط بعد إزالة href --- */
a:not([href]) {
    cursor: pointer;
    color: inherit; /* يرث اللون من العنصر الأب */
}

body.is-transitioning {
    opacity: 0;
    filter: blur(2px);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.navbar-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.navbar-main.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-main .logo span { color: #fff; transition: color 0.3s; }
.navbar-main.scrolled .logo span { color: var(--primary-color); }
.navbar-main.scrolled .logo-icon { stroke: var(--primary-color); }

.navbar-main .navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.navbar-main.scrolled .nav-links a { color: #343a40; }
.navbar-main.scrolled .nav-links a:hover { color: var(--primary-color); }

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}
.btn-outline-light:hover {
    background-color: #fff;
    color: var(--primary-color);
}

.navbar .navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
}
.student-nav {
    display: flex;
    gap: 20px;
}
.student-nav .nav-item {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.3s;
    /* --- جديد: منع تحديد النص عند الضغط على الروابط في الهاتف --- */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard */
}
.student-nav .nav-item:hover, .student-nav .nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
}
.student-nav .logout {
    background-color: #c7a25e;
    color: var(--primary-color);
    font-weight: 600;
}

.logo-icon {
    stroke: #fff;
}

.hero {
    position: relative;
    background: url('./kab.png') center center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 200px 20px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 75, 51, 0.8), rgba(12, 75, 51, 0.4));
}

.islamic-pattern-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: auto;
}

.hero-title {
    font-family: "Amiri", serif;
    font-size: 4rem;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.dashboard-header {
    background: #f8f9fa;
    padding: 40px 20px;
    text-align: center;
}
.dashboard-header .hero-title {
    color: var(--primary-color);
}
.dashboard-header .hero-description {
    color: #333;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.teacher-grid {
    grid-template-columns: 1fr 2fr;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.dashboard-card .card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f9fafb;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.dashboard-card .card-icon {
    font-size: 1.6rem;
    color: var(--primary-color);
}
.dashboard-card .card-content {
    padding: 20px;
}
.dashboard-card .status-text {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.roles-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--primary-color);
}

.section-header {
    margin-bottom: 50px;
}

.section-title {
    font-family: "Amiri", serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-description {
    color: #555;
    font-size: 1.1rem;
}
.roles-section .section-title,
.roles-section .section-description {
    color: #fff;
}


.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.role-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 25px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background-color 0.3s;
}

.role-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.role-icon {
    font-size: 2.5rem;
    color: #c7a25e;
    margin-bottom: 10px;
}

.role-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
}

.role-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    min-height: 45px;
}

.btn {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px; /* زيادة حجم الزر قليلاً لجعله أكثر بروزاً */
    transition: 0.3s;
    /* --- جديد: منع تحديد النص عند الضغط على الأزرار في الهاتف --- */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE 10+ */
    user-select: none;         /* Standard */
}

/* primary button styles defined later; this empty rule removed */

.btn-hero {
    background: #c7a25e;
    color: var(--primary-color);
    padding: 14px 35px;
    font-size: 1.1rem;
    margin-top: 20px;
    border-radius: 50px;
}
.btn-hero:hover {
    background: #d4b17a;
    box-shadow: 0 5px 15px rgba(212, 177, 122, 0.3);
    transform: translateY(-2px);
}
.btn-hero i {
    transition:  0.3s ease-in-out;
}
.btn-hero:hover i {
    transform: translateX(-5px);
}

.btn-full {
    width: 100%;
}

.dashboard-card .btn.disabled,
.dashboard-card .btn.disabled:hover { /* تطبيق نفس الأنماط على hover للزر المعطل */
    background-color: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

.features-section {
    background: #f8f9fa;
    padding: 80px 20px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #eee;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease-in-out, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 2.2rem;
    color: #c7a25e;
    margin-bottom: 15px;
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.dialog-overlay.visible {
    display: flex;
    opacity: 1;
}

.dialog {
    display: flex;
    background: #fff;
    border-radius: 15px;
    width: 90%;
    max-width: 750px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    overflow: hidden;
}

.dialog-overlay.visible .dialog {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.dialog-image-section {
    flex-basis: 45%;
    background-color: var(--primary-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dialog-image-section::before {
    content: '';
    position: absolute;
    inset: 0;
}

.dialog-image-content {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.dialog-image-content h3 {
    font-family: "Amiri", serif;
    font-size: 1.8rem;
    color: #fff;
}
.dialog-image-content p {
    color: rgba(255,255,255,0.8);
}

.dialog-form-section {
    flex-basis: 55%;
    padding: 40px;
    position: relative;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    color: #aaa;
    transition: color 0.2s;
}

.dialog-close:hover {
    color: #333;
}

.dialog-form-section .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
}

.dialog-form-section .form-control:focus {
    border-color: #c7a25e;
    box-shadow: 0 0 0 0.25rem rgba(199, 162, 94, 0.25);
}
.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.progress-bar-wrapper {
    flex-grow: 1;
    background-color: #e9ecef;
    border-radius: 50px;
    height: 15px;
}
.progress-bar-inner {
    background-color: #c7a25e;
    height: 100%;
    border-radius: 50px;
}

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.page-transition-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

.stats-section {
    background: var(--primary-color);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    position: relative;
}
.stats-section .section-title,
.stats-section .section-description {
    color: #fff;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #c7a25e;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
}

.methodology-section {
    padding: 80px 20px;
    background: #fff;
}
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: #fff;
    border-radius: 15px;
    padding: 20px;
}
.method-item {
    text-align: center;
    padding: 20px;
}
.method-icon {
    font-size: 2.5rem;
    color: #c7a25e;
    margin-bottom: 15px;
}
.method-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.method-text {
    color: #555;
}

.footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 20px 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
}
.footer-section p { margin-bottom: 10px; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 8px; }
.footer-section a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.3s; }
.footer-section a:hover { color: #c7a25e; }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .navbar .navbar-content {
        flex-direction: column;
        gap: 15px;
    }
    .navbar-main .navbar-content {
        flex-direction: row;
    }
    .nav-links, .btn-outline-light { display: none; }

    .student-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero {
        padding: 100px 20px;
    }
    .hero-title {
        font-size: 2.5rem;
    }

    .teacher-grid {
        grid-template-columns: 1fr;
    }

    .dialog {
        flex-direction: column;
        max-width: 350px;
    }
    .dialog-image-section { display: none; }
    .dialog-form-section { flex-basis: 100%; }
}

.table {
    border-collapse: separate; /* فصل الحدود */
    border-spacing: 0 8px; /* إضافة مسافة رأسية بين الصفوف */
    margin-top: -8px; /* إزالة المسافة العلوية الزائدة */
}

.table th,
.table td {
    padding: 1rem;
    vertical-align: middle;
    border: none; /* إزالة كل الحدود الافتراضية */
}

.table th {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.table tbody tr {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border-radius: 8px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.table tbody td:first-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.table tbody td:last-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }

/* --- Chat Interface Styles --- */
.chat-container {
    display: flex;
    height: 75vh;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.chat-list {
    flex-basis: 30%;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.chat-list-body {
    overflow-y: auto;
    flex-grow: 1;
}

.chat-contact {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

.chat-contact:hover {
    background-color: #f8f9fa;
}

.chat-contact.active {
    background-color: #e9ecef;
}

.contact-info {
    flex-grow: 1;
}

.contact-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-last-msg {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-meta {
    text-align: left;
    font-size: 0.8rem;
    color: #6c757d;
}

.chat-area {
    flex-basis: 70%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.contact-status {
    font-size: 0.85rem;
    color: #28a745;
}

.chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.message { margin-bottom: 15px; }
.message-bubble {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 70%;
    display: inline-block;
}
.message-time { font-size: 0.75rem; color: #6c757d; margin-top: 5px; }

.message.received .message-bubble { background-color: #e9ecef; border-top-right-radius: 5px; }
.message.sent { text-align: left; }
.message.sent .message-bubble { background-color: #c7a25e; color: var(--primary-color); border-top-left-radius: 5px; }
.message.sent .message-time { text-align: left; }

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}
.chat-footer .form-control {
    flex-grow: 1;
}
.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0; /* منع الزر من التقلص */
}



.form-select, .form-control {
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    background-color: #f9fafb;
}

/*
================================
=== NEW HOMEPAGE STYLES 2025 ===
================================
*/

:root {
    --primary-color: #0c4b33; /* أخضر زيتوني داكن */
    --secondary-color: #c7a25e; /* ذهبي فاتح */
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
}

/* 1. الهيدر الجديد */
.main-navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background-color: #fff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}
.navbar-brand {
    font-family: 'Amiri', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}
.logo-icon-main {
    color: var(--secondary-color);
    margin-left: 8px;
}
.main-navbar .nav-link {
    font-weight: 600;
    color: var(--dark-text);
    transition: color 0.3s;
}
.main-navbar .nav-link:hover, .main-navbar .nav-link.active {
    color: var(--secondary-color);
}
.main-navbar .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.main-navbar .btn-primary:hover {
    background-color: #083a27;
    border-color: #083a27;
}
.main-navbar .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.main-navbar .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 2. السلايدر الرئيسي */
#main-slider {
    margin-top: 80px; /* لإعطاء مساحة للهيدر الثابت */
    overflow: hidden; /* مهم جداً لإخفاء الشرائح الخارجة عن الإطار */
}

/* --- تصميم البانر الجديد --- */
.carousel-item {
    height: 80vh;
    min-height: 600px;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 55%, #f6f9f7 100%);
}


.hero-banner-text {
    color: var(--dark-text);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 560px;
}
.hero-banner-text h2 {
    font-family: 'Amiri', serif;
    color: var(--primary-color);
}
.hero-banner-text .btn {
    border-radius: 50px;
    padding: 12px 30px;
}
.hero-banner-img-container { display: block; }
/* --- التصميم الجديد للصورة المربعة --- */
.hero-banner-img-square {
    width: 80%;
    height: auto;
    aspect-ratio: 1 / 1; /* يجعل العنصر مربعاً دائماً */
    object-fit: cover; /* يضمن ملء الصورة للمربع دون تشويه */
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    margin: 0 auto; /* لتوسيط الصورة داخل العمود */
    display: block;
    animation: float-in 0.8s ease-out both;
}
.hero-banner-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

@media (max-width: 991.98px) {
    .carousel-item {
        height: auto;
        min-height: unset;
    }
    .hero-banner-img-container {
        height: 40vh;
        clip-path: none;
    }
    .hero-banner-text {
        text-align: center;
        background: rgba(255,255,255,0.9);
        border-radius: 14px;
        padding: 24px !important;
        margin: 0 12px;
    }
}

/* Mobile refinements */
@media (max-width: 768px) {
    .section-title-new { font-size: 2.2rem; } /* تصغير العناوين الرئيسية في الهاتف */
    #main-slider .row.g-0.h-100 { gap: 12px; }
    .hero-banner-text h2 { font-size: 2rem; } /* تعديل: تصغير حجم خط السلايدر قليلاً */
    .hero-banner-text .btn { width: 100%; }
    .hero-banner-img-square { width: 90%; border-radius: 24px; }
    .carousel-indicators { display: none; }
    .feature-circle { width: 80px; height: 80px; } /* تعديل: تصغير حجم دوائر المميزات */
    .feature-circle i { font-size: 2rem; } /* تعديل: تصغير حجم أيقونات المميزات */
    .halaqa-title { font-size: 1.2rem; } /* تعديل: تصغير حجم عنوان الحلقة */
    .article-card { margin-bottom: 1rem; } /* تعديل: إضافة مسافة بين بطاقات المقالات */
}

@media (max-width: 576px) {
    .hero-banner-text { padding: 18px !important; }
    .hero-banner-text h2 { font-size: 1.5rem; }
    .hero-banner-text .lead { font-size: 0.95rem; }
    .hero-banner-img-square { width: 100%; border-radius: 20px; }
    .article-card { margin-bottom: 1rem; } /* التأكد من وجود المسافة على الشاشات الأصغر أيضاً */
}

/* Subtle float-in for banner image */
@keyframes float-in {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Smoother fade duration for carousel */
.carousel.carousel-fade .carousel-item { transition: opacity 0.8s ease; }

/* Hero button polish */
.hero-banner-text .btn {
    box-shadow: 0 10px 20px rgba(12,75,51,0.12);
}
.hero-banner-text .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(12,75,51,0.18);
}

/* تأثيرات الحركة للنصوص */
.carousel-item .animated-caption {
    opacity: 0;
    transform: translateY(20px);
}
.carousel-item.active .animated-caption {
    animation: caption-fade-in 0.8s forwards;
}
.carousel-item.active .hero-banner-text h2 { animation-delay: 0.4s; }
.carousel-item.active .hero-banner-text p { animation-delay: 0.7s; }
.carousel-item.active .hero-banner-text a { animation-delay: 1s; }

@keyframes caption-fade-in {
    to { opacity: 1; transform: translateY(0); }
}

/* تصميم مؤشرات وأزرار التحكم */
.carousel-indicators [data-bs-target] {
    width: 12px; height: 12px; border-radius: 50%; background-color: var(--primary-color); opacity: 0.4;
}
.carousel-indicators .active { opacity: 1; background-color: var(--secondary-color); }

.carousel-control-prev, .carousel-control-next { width: 5%; }
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(12, 75, 51, 0.3); /* لون زيتوني شفاف */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-size: 50% 50%;
}
/* إخفاء أسهم التحكم في السلايدر */
.carousel-control-prev, .carousel-control-next {
    display: none;
}

/* 3. قسم المميزات (الدوائر) */
.features-section-new {
    background-color: #fff;
}
.feature-circle-item {
    padding: 20px;
}
.feature-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--light-bg);
    border: 3px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    transition: all 0.4s ease;
}
.feature-circle i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.4s ease;
}
.feature-circle-item:hover .feature-circle {
    background-color: var(--primary-color);
    border-color: var(--secondary-color);
    transform: scale(1.1) rotate(10deg);
}
.feature-circle-item:hover .feature-circle i {
    color: #fff;
}
.feature-circle-item h6 {
    font-weight: 700;
    color: var(--dark-text);
}
.feature-circle-item p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 4. قسم الحلقات */
.section-title-new {
    font-family: 'Amiri', serif;
    color: var(--primary-color);
    font-size: 2.8rem;
}
.halaqa-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}
.halaqa-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.halaqa-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.halaqa-icon-wrapper i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.halaqa-title { font-weight: 700; color: var(--primary-color); }
.halaqa-desc { color: #6c757d; min-height: 70px; }
.halaqa-details {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: right;
}
.halaqa-details li { margin-bottom: 8px; color: var(--dark-text); }
.halaqa-details i { color: var(--secondary-color); margin-left: 8px; }
.halaqa-card .btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
}

/* 5. الفوتر الجديد */
.footer { background-color: var(--primary-color); }
.footer-brand { font-family: 'Amiri', serif; font-size: 1.8rem; color: #fff; }

/*
================================
=== UNIFY DASHBOARD STYLES ===
================================
*/
.navbar { background-color: var(--primary-color); }
.navbar .logo span { color: #fff; }
.navbar .logo .logo-icon { stroke: #fff; }

.dashboard-header { background-color: var(--light-bg); }
.dashboard-header .hero-title { color: var(--primary-color); }
.dashboard-header .hero-description { color: #555; }
.dashboard-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), #083a27);
    color: #fff;
    border-bottom: 3px solid var(--secondary-color);
}
.dashboard-card .card-header .card-icon { color: var(--secondary-color); }

/* توحيد لون الأزرار الأساسية في كل الصفحات الداخلية */
.btn-primary {
    background-color: var(--primary-color) !important; /* توحيد اللون الأخضر للزر الرئيسي */
    border-color: var(--primary-color) !important;
    color: #fff !important;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.btn-primary:hover {
    background-color: #083a27 !important; /* لون أغمق عند المرور */
    border-color: #083a27 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* قسم "عن المركز" */
.about-section {
    background-color: var(--primary-color);
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.about-content {
    padding: 2rem;
}
.about-section .section-title-new {
    color: #fff;
}
.about-section .btn-outline-light {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
}

/* قسم "المقالات" */
.article-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    position: relative;
    border-right: 5px solid var(--primary-color);
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.article-card-body {
    padding: 25px;
}
.article-title {
    font-family: 'Amiri', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.article-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
}
.article-card .stretched-link {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}
.article-card .stretched-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
}
