/* =============================================
   agroleb.css - ملف الأنماط الموحد
   لكل نطاقات منصة agroleb.com
   ============================================= */

/* =============================================
   CSS Variables - الألوان الأساسية
   ============================================= */
:root {
    --primary: #1b7f4b;
    --primary-dark: #14633a;
    --primary-light: #e9f9ef;
    --primary-hover: #148a4e;
    --primary-gradient: linear-gradient(135deg, #1b7f4b, #14633a);
    --white: #ffffff;
    --gray-light: #f5f7f9;
    --gray: #888888;
    --gray-dark: #333333;
    --shadow: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 35px rgba(27, 127, 75, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --font-family: 'Tahoma', 'Segoe UI', Arial, sans-serif;
}

/* =============================================
   Reset & Base
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #eef7f1, #f6f6f6);
    color: var(--gray-dark);
    direction: rtl;
    min-height: 100vh;
    padding-top: 70px;
}

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

/* =============================================
   Scrollbar Styling
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =============================================
   Topbar - موحد لكل الصفحات
   ============================================= */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.topbar-logo {
    color: white;
    font-size: 18px;
    font-weight: bold;
}
.topbar-logo span {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.8;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-actions .user-name {
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.btn-topbar {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}
.btn-topbar-login {
    background: rgba(255,255,255,0.2);
}
.btn-topbar-login:hover {
    background: rgba(255,255,255,0.3);
}
.btn-topbar-register {
    background: white;
    color: var(--primary);
}
.btn-topbar-register:hover {
    background: #f0f7f3;
}
.btn-topbar-dashboard {
    background: rgba(255,255,255,0.2);
}
.btn-topbar-dashboard:hover {
    background: rgba(255,255,255,0.3);
}
.btn-topbar-logout {
    background: rgba(255,0,0,0.2);
}
.btn-topbar-logout:hover {
    background: rgba(255,0,0,0.3);
}

/* =============================================
   Menu Button (للجوال)
   ============================================= */
.menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: 0.2s;
    z-index: 1001;
    position: relative;
    display: none;
}
.menu-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* =============================================
   Side Menu - القائمة الجانبية
   ============================================= */
.overlay-dark {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -75%;
    width: 75%;
    max-width: 280px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
    direction: rtl;
}
.side-menu.open {
    right: 0;
}
.side-menu-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}
.side-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--gray-dark);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: 0.2s;
    font-size: 15px;
    text-align: right;
}
.side-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
    padding-right: 25px;
}

body.menu-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   Page Wrapper
   ============================================= */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* =============================================
   Box / Card System
   ============================================= */
.box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 25px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid transparent;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

/* =============================================
   Grid System
   ============================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

/* =============================================
   Stat Card
   ============================================= */
.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}
.stat-card .label {
    font-size: 13px;
    color: var(--gray);
    margin-top: 5px;
}
.stat-card .icon-box {
    font-size: 22px;
    margin-bottom: 5px;
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    background: var(--primary-gradient);
    border-radius: var(--radius);
    padding: 40px 30px;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}
.hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
}
.hero h1 span {
    display: block;
    font-size: 18px;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 5px;
}
.hero h2 {
    font-size: 28px;
}
.hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 10px auto;
    line-height: 1.8;
}

/* =============================================
   الأزرار - جميع الأزرار باللون الأخضر الموحد
   ============================================= */

/* الزر الأساسي - أخضر */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(27, 127, 75, 0.2);
}
.btn:hover {
    background: var(--primary-dark) !important;
    opacity: 0.9;
    box-shadow: 0 6px 12px rgba(27, 127, 75, 0.3);
}

/* زر النجاح - أخضر */
.btn-success {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(27, 127, 75, 0.2);
}
.btn-success:hover {
    background: var(--primary-dark) !important;
    opacity: 0.9;
    box-shadow: 0 6px 12px rgba(27, 127, 75, 0.3);
}

/* الزر الثانوي - أخضر (نفس اللون) */
.btn-secondary {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(27, 127, 75, 0.2);
}
.btn-secondary:hover {
    background: var(--primary-dark) !important;
    opacity: 0.9;
    box-shadow: 0 6px 12px rgba(27, 127, 75, 0.3);
}

/* زر البطاقة - أخضر */
.btn-card {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary) !important;
    color: white !important;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.btn-card:hover {
    background: var(--primary-dark) !important;
    transform: scale(1.02);
}

/* زر البطاقة - مخطط */
.btn-card-outline {
    background: transparent !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
    padding: 8px 23px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}
.btn-card-outline:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* زر أخضر مخصص */
.btn-green {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 4px 6px rgba(27, 127, 75, 0.2);
}
.btn-green:hover {
    background: var(--primary-dark) !important;
    opacity: 0.9;
    box-shadow: 0 6px 12px rgba(27, 127, 75, 0.3);
}

/* =============================================
   الأزرار ذات الألوان الخاصة (تستخدم في حالات محددة)
   ============================================= */

/* زر الخطر - أحمر */
.btn-danger {
    background: #b10000 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-danger:hover {
    background: #8a0000 !important;
    opacity: 0.9;
}

/* زر التحذير - برتقالي */
.btn-warning {
    background: #f39c12 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-warning:hover {
    background: #d68910 !important;
    opacity: 0.9;
}

/* زر الحساب - برتقالي غامق (يستخدم في go.php) */
.btn-calc {
    background: #e67e22 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-calc:hover {
    background: #d35400 !important;
    opacity: 0.9;
}

/* زر البريميوم - برتقالي */
.btn-premium {
    background: #f39c12 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-premium:hover {
    background: #d68910 !important;
    opacity: 0.9;
}

/* زر الصفحة الرئيسية */
.btn-primary {
    background: white !important;
    color: var(--primary) !important;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* =============================================
   حاوية الأزرار
   ============================================= */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.actions .btn,
.actions .btn-success,
.actions .btn-secondary,
.actions .btn-danger,
.actions .btn-warning,
.actions .btn-calc,
.actions .btn-green,
.actions .btn-premium {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

@media (max-width: 600px) {
    .actions {
        flex-direction: column;
    }
    .actions .btn,
    .actions .btn-success,
    .actions .btn-secondary,
    .actions .btn-danger,
    .actions .btn-warning,
    .actions .btn-calc,
    .actions .btn-green,
    .actions .btn-premium {
        flex: none;
        width: 100%;
    }
}

/* =============================================
   Forms
   ============================================= */
.input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    box-sizing: border-box;
}
.input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 127, 75, 0.1);
}

input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.phone-row {
    display: flex;
    gap: 10px;
}
.phone-row select {
    width: 40%;
    min-width: 120px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
}
.phone-row input {
    width: 60%;
}

/* =============================================
   Tables
   ============================================= */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}
td, th {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

/* =============================================
   Messages
   ============================================= */
.msg {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    text-align: center;
}
.msg-error {
    background: #ffe9e9;
    color: #b10000;
    border: 1px solid #ffcccc;
}
.msg-success {
    background: #d7ffe1;
    color: #0d6a32;
    border: 1px solid #9fd8ad;
}
.msg-warning {
    background: #fff6e5;
    color: #b8860b;
    border: 1px solid #f0d5a0;
}

/* =============================================
   Notes
   ============================================= */
.note {
    background: #f4f7f2;
    border-right: 4px solid #5f8f52;
    padding: 14px;
    border-radius: var(--radius-sm);
    margin: 15px 0;
    line-height: 1.9;
    font-size: 15px;
    color: #355;
}
.note b {
    color: #274e13;
    font-size: 16px;
}

/* =============================================
   Quality Badge
   ============================================= */
.quality {
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    margin: 10px 0;
}
.quality.good {
    background: #e9f9ef;
    color: var(--primary);
}
.quality.medium {
    background: #fff6e5;
    color: #b8860b;
}
.quality.bad {
    background: #ffe9e9;
    color: #b10000;
}

/* =============================================
   Auth Pages
   ============================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.auth-box {
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-box input,
.auth-box select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.link, .forgot {
    text-align: center;
    margin-top: 15px;
}
.link a, .forgot a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}
.link a:hover, .forgot a:hover {
    text-decoration: underline;
}

/* =============================================
   App Header
   ============================================= */
.app-header {
    text-align: center;
    margin-bottom: 20px;
}
.app-title {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary);
}
.app-subtitle {
    font-size: 18px;
    font-weight: bold;
    color: #555;
    margin-top: 5px;
}

/* =============================================
   Section Title
   ============================================= */
.section-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 25px;
}

/* =============================================
   Badges
   ============================================= */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}
.badge-success {
    background: var(--primary-light);
    color: var(--primary);
}
.badge-warning {
    background: #fff6e5;
    color: #b8860b;
}
.badge-danger {
    background: #ffe9e9;
    color: #b10000;
}
.badge-premium {
    background: var(--primary);
    color: white;
}
.badge-trial {
    background: #fff6e5;
    color: #b8860b;
}

.card .badge {
    margin-bottom: 10px;
}
.card.featured {
    border: 2px solid var(--primary);
    position: relative;
}
.card.featured::before {
    content: "⭐ مميز";
    position: absolute;
    top: -10px;
    right: 20px;
    background: #f39c12;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}
/* =============================================
   بادج الحافة (مثل "⭐ مميز")
   ============================================= */

/* بادج الحافة العلوية اليمنى */
.card-edge-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-edge-paid {
    background: #f39c12;
    color: white;
}

.badge-edge-free {
    background: #1b7f4b;
    color: white;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    text-align: center;
    padding: 25px 20px;
    color: var(--gray);
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
    margin-top: 30px;
}
.footer a {
    color: var(--primary);
}
.footer a:hover {
    text-decoration: underline;
}
.footer .social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}
.footer .social a {
    font-size: 20px;
    transition: var(--transition);
}
.footer .social a:hover {
    transform: scale(1.1);
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease both;
}
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }

/* =============================================
   Mobile Responsive
   ============================================= */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .topbar-logo {
        font-size: 15px;
    }
    .topbar-logo span {
        font-size: 11px;
    }
    .topbar-actions .user-name {
        display: none;
    }
    .btn-topbar {
        padding: 6px 12px;
        font-size: 12px;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        padding: 30px 20px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .hero h1 span {
        font-size: 15px;
    }
    .hero p {
        font-size: 14px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page {
        padding: 15px;
    }
    .box {
        padding: 15px;
    }

    .hero-buttons .btn,
    .btn {
        width: 100%;
        display: block;
    }
    .actions {
        flex-direction: column;
    }
    .actions .btn,
    .actions .btn-success,
    .actions .btn-secondary,
    .actions .btn-danger,
    .actions .btn-warning,
    .actions .btn-calc,
    .actions .btn-green,
    .actions .btn-premium {
        flex: none;
        width: 100%;
    }

    .phone-row {
        flex-direction: column;
    }
    .phone-row select {
        width: 100%;
    }
    .phone-row input {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card .number {
        font-size: 24px;
    }
    .topbar-actions {
        gap: 5px;
    }
    .btn-topbar {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (min-width: 769px) {
    .menu-btn {
         display: flex !important;
    }
}

/* =============================================
   أنماط الفصول التعليمية (academy)
   ============================================= */

/* =============================================
   المحتوى العام
   ============================================= */
.chapter-content {
    line-height: 2;
    font-size: 16px;
}

/* =============================================
   العناوين
   ============================================= */
.chapter-content h3 {
    color: #1b7f4b;
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 22px;
    border-right: 4px solid #1b7f4b;
    padding-right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chapter-content h3 .fa-icon {
    color: #1b7f4b;
    font-size: 20px;
}
.chapter-content h4 {
    color: #1b7f4b;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chapter-content h4 .fa-icon {
    color: #1b7f4b;
    font-size: 16px;
}
.chapter-content p {
    margin-bottom: 12px;
    color: #444;
}
.chapter-content ul, .chapter-content ol {
    padding-right: 25px;
    margin: 12px 0;
}
.chapter-content li {
    margin-bottom: 8px;
    color: #444;
}
.chapter-content li .fa-icon {
    color: #1b7f4b;
    margin-left: 8px;
    font-size: 14px;
}

/* =============================================
   الصناديق المميزة
   ============================================= */
.chapter-content .highlight-box {
    background: linear-gradient(135deg, #e9f9ef, #d4edda);
    border-right: 4px solid #1b7f4b;
    padding: 18px 22px;
    border-radius: 12px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(27, 127, 75, 0.1);
}
.chapter-content .highlight-box .fa-icon {
    color: #1b7f4b;
    font-size: 18px;
    margin-left: 10px;
}
.chapter-content .highlight-box b {
    color: #1b7f4b;
}

.chapter-content .task-box {
    background: linear-gradient(135deg, #fff6e5, #fef0d5);
    border-right: 4px solid #f39c12;
    padding: 18px 22px;
    border-radius: 12px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}
.chapter-content .task-box .fa-icon {
    color: #f39c12;
    font-size: 18px;
    margin-left: 10px;
}
.chapter-content .task-box b {
    color: #b8860b;
}

.chapter-content .homework-box {
    background: linear-gradient(135deg, #f0f4f8, #e3ecf5);
    border-right: 4px solid #3498db;
    padding: 18px 22px;
    border-radius: 12px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}
.chapter-content .homework-box .fa-icon {
    color: #3498db;
    font-size: 18px;
    margin-left: 10px;
}
.chapter-content .homework-box b {
    color: #2980b9;
}

/* =============================================
   بطاقات الأنظمة
   ============================================= */
.chapter-content .system-card {
    background: #ffffff;
    border: 1px solid #e5efe8;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 18px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.chapter-content .system-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(27, 127, 75, 0.12);
    border-color: #1b7f4b;
}
.chapter-content .system-card .system-number {
    display: inline-block;
    background: #1b7f4b;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    font-size: 14px;
    margin-left: 10px;
}
.chapter-content .system-card h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.chapter-content .system-card h4 .system-en {
    color: #888;
    font-size: 14px;
    font-weight: normal;
}
.chapter-content .system-card .system-icon {
    font-size: 28px;
    color: #1b7f4b;
    margin-left: 12px;
    width: 40px;
    text-align: center;
}
.chapter-content .system-card .system-tag {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    background: #e9f9ef;
    color: #1b7f4b;
    margin-right: 8px;
}
.chapter-content .system-card .system-tag.passive {
    background: #fff6e5;
    color: #f39c12;
}
.chapter-content .system-card .system-tag.active {
    background: #e3ecf5;
    color: #2980b9;
}
.chapter-content .system-card .system-tag.commercial {
    background: #fce4ec;
    color: #c62828;
}

/* =============================================
   الصور
   ============================================= */
.chapter-content .chapter-image {
    margin: 20px 0;
    text-align: center;
}
.chapter-content .chapter-image img {
    max-width: 60%;
    height: 300px;
    border-radius: 12px;
	 object-fit: cover; /* قص الصورة للحفاظ على النسبة */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5efe8;
}
.chapter-content .chapter-image .image-caption {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
}
.chapter-content .image-placeholder {
    background: linear-gradient(135deg, #f5f7f9, #eef1f4);
    border: 2px dashed #c5cdd5;
    border-radius: 14px;
    padding: 35px 20px;
    text-align: center;
    color: #999;
    margin: 20px 0;
    transition: 0.3s ease;
}
.chapter-content .image-placeholder:hover {
    border-color: #1b7f4b;
    background: linear-gradient(135deg, #f0f7f3, #e5efe8);
}
.chapter-content .image-placeholder .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    color: #1b7f4b;
}
.chapter-content .image-placeholder .icon i {
    font-size: 48px;
    color: #1b7f4b;
}
.chapter-content .image-placeholder .image-label {
    font-size: 13px;
    color: #aaa;
}

/* =============================================
   الجداول
   ============================================= */
.chapter-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.chapter-content table thead th {
    background: #1b7f4b;
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: bold;
}
.chapter-content table thead th i {
    margin-left: 6px;
}
.chapter-content table tbody td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}
.chapter-content table tbody tr:nth-child(even) {
    background: #f8faf8;
}
.chapter-content table tbody tr:hover {
    background: #e9f9ef;
}

/* =============================================
   التنقل السريع بين الفصول
   ============================================= */
.chapter-content .mini-chapters-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8faf8;
    border-radius: 12px;
    border: 1px solid #e5efe8;
}
.chapter-content .mini-chapters-nav a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1b7f4b;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
}
.chapter-content .mini-chapters-nav a:hover {
    background: #e9f9ef;
    border-color: #1b7f4b;
}
.chapter-content .mini-chapters-nav a.active {
    background: #1b7f4b;
    color: white;
    border-color: #1b7f4b;
}
.chapter-content .mini-chapters-nav a.locked {
    color: #ccc;
    cursor: not-allowed;
}
.chapter-content .mini-chapters-nav a.locked:hover {
    background: none;
    border-color: transparent;
}

/* =============================================
   أزرار التنقل
   ============================================= */
.chapter-content .chapter-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.chapter-content .chapter-nav .btn {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    text-align: center;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.chapter-content .chapter-nav .btn i {
    font-size: 18px;
}
.chapter-content .chapter-nav .btn-complete {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}
.chapter-content .chapter-nav .btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}
.chapter-content .chapter-nav .btn-complete.completed {
    background: #999;
    cursor: not-allowed;
    box-shadow: none;
}
.chapter-content .chapter-nav .btn-complete.completed:hover {
    transform: none;
}
.chapter-content .chapter-nav .btn-back {
    background: #f5f5f5;
    color: #666;
}
.chapter-content .chapter-nav .btn-back:hover {
    background: #e5e5e5;
    transform: translateY(-2px);
}

/* =============================================
   نص حقوق الملكية في الطباعة
   ============================================= */
.print-footer {
    display: none;
}
@media print {
    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent !important;  /* ← شفافة */
        padding: 10px 20px;
   
        z-index: 9999;
        text-align: center;
        font-size: 11px;
        color: #999;
        direction: rtl;
    }
    .print-footer a {
        color: #1b7f4b;
        text-decoration: none;
    }
    .print-footer hr {
        display: block !important;
        border: none;
      
        margin: 8px 0;
    }
    .topbar, .topbar-spacer, .chapter-nav, .actions, .print-btn, .no-print {
        display: none !important;
    }
    body {
        padding-top: 0 !important;
        background: white;
    }
    .box {
        box-shadow: none !important;
        border: 1px solid #ddd;
        border-radius: 0 !important;
        padding: 20px 20px 200px 20px !important; /* أعلى، يمين، أسفل، يسار */
    }
}

/* =============================================
   استجابة للشاشات الصغيرة
   ============================================= */
@media (max-width: 600px) {
    .chapter-content {
        font-size: 15px;
    }
    .chapter-content h3 {
        font-size: 20px;
    }
    .chapter-content h4 {
        font-size: 17px;
    }
    .chapter-content .chapter-nav .btn {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
    .chapter-content table {
        font-size: 12px;
    }
    .chapter-content table thead th,
    .chapter-content table tbody td {
        padding: 6px 4px;
    }
    .chapter-content .system-card {
        padding: 15px;
    }
    .chapter-content .system-card .system-icon {
        font-size: 22px;
        width: 30px;
    }
}

/* =============================================
   أزرار التنقل في الفصول التعليمية
   ============================================= */
.chapter-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.chapter-nav .btn,
.chapter-nav .btn-complete,
.chapter-nav .btn-back {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    text-align: center;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.chapter-nav .btn-complete {
    background: #f39c12;
    color: white;
}
.chapter-nav .btn-complete:hover {
    background: #d68910;
}
.chapter-nav .btn-complete.completed {
    background: #999;
    cursor: not-allowed;
}
.chapter-nav .btn-back {
    background: #f5f5f5;
    color: #666;
}
.chapter-nav .btn-back:hover {
    background: #e5e5e5;
}
.chapter-nav form {
    flex: 1;
    max-width: 280px;
    margin: 0;
}
@media (max-width: 600px) {
    .chapter-nav .btn,
    .chapter-nav .btn-complete,
    .chapter-nav .btn-back,
    .chapter-nav form {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
}



