/* ========= ألوان هادئة وعصرية ========= */
:root{
  --bg: #F7FAFC;            /* خلفية فاتحة مريحة */
  --surface: #FFFFFF;       /* بطاقات بيضاء */
  --primary: #4F8CCB;       /* أزرق باهت مائل للرمادي */
  --primary-600:#3E79B5;
  --primary-050:#EAF2FA;
  --muted: #6B7280;         /* رمادي نصوص */
  --soft: #F1F5F9;          /* رمادي فاتح للأقسام */
  --border:#E5E7EB;
  --shadow: 0 6px 20px rgba(17,24,39,.09);
  --radius: 16px;
}

html,body{background: var(--bg); color:#111827;}
.app-bg{background: radial-gradient(1200px 600px at 80% -10%, var(--primary-050), transparent), var(--bg);}

/* ====== عام ====== */
.brand-text{color:#0F172A;}
.nav-link{color:#334155;}
.nav-link:hover{color:var(--primary-600);}

.btn-primary{
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-600);
  --bs-btn-hover-border-color: var(--primary-600);
  --bs-btn-focus-shadow-rgb: 79,140,203;
  border-radius: 12px;
  padding-inline: 18px;
}
.btn-outline-secondary{
  border-radius: 12px;
  padding-inline: 18px;
}

/* ====== Hero ====== */
.hero-section{
  padding: 72px 0 48px;
}

/* Drag & drop upload */
.dnd-zone{border:1px dashed #ced4da; background:#fffbe6; display:flex; align-items:center; justify-content:center; min-height:48px; padding:6px 10px; border-radius:.375rem}
.dnd-zone.dnd-over{border-color:#17c1cc; background:#ecfeff}
.soft-badge{
  background: var(--soft)!important;
  color: #334155!important;
  border: 1px solid var(--border);
}
.hero-card{
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ====== أقسام ====== */
.section-pad{padding: 64px 0;}
.bg-soft{background: var(--soft);}

/* ====== روابط مهمة ====== */
.soft-link{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.soft-link:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d1d5db;
}

/* ====== أكورديون الأسئلة ====== */
.accordion-item{
  border-radius: 12px!important;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  background: var(--surface);
}
.accordion-button{
  background: var(--surface);
  color:#111827;
}
.accordion-button:not(.collapsed){
  color:#0F172A;
  background: #F8FAFC;
  box-shadow: inset 0 -1px 0 var(--border);
}
.accordion-body{color:#334155;}

/* ====== Footer ====== */
.footer{
  background: linear-gradient(0deg, #F8FAFC, #FFFFFF);
  border-top: 1px solid var(--border);
}
.footer .link-body-emphasis{color:#334155;text-decoration:none;}
.footer .link-body-emphasis:hover{color:var(--primary-600);text-decoration:underline;}

/* ====== تحسينات صغيرة ====== */
.card{border-radius: var(--radius); box-shadow: var(--shadow);}
.shadow-sm{box-shadow: var(--shadow)!important;}

.card-dashboard {
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Styles moved from index.php */
.hero-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
    background-image: url('assets/img/header.svg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 400px;
}
.hero-section .container {
    width: 100%;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
}
.hero-section .sub-heading {
    font-size: 1.5rem;
}
.hero-section .description {
    max-width: 600px;
}
.about-section {
    background-color: #fff;
    border-radius: 15px;
    padding: 4rem;
    margin-top: -80px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow); /* Updated to use var(--shadow) */
}
.about-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1.5rem;
}
.about-quote-text {
    font-size: 1.25rem;
    line-height: 1.8;
    position: relative;
    padding: 0 2.5rem;
}
.quote-mark {
    position: absolute;
    font-size: 2rem;
    color: #007bff;
    opacity: 0.3;
}
.quote-mark-open {
    top: -0.5rem;
    right: 0;
}
.quote-mark-close {
    bottom: -0.5rem;
    left: 0;
}
.about-box {
    background-color: #fff;
    border-radius: 15px;
    padding: 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}
.services-section {
    padding: 5rem 0;
}
.service-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow); /* Updated to use var(--shadow) */
}
.service-card .icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1.5rem;
}
.why-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.why-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.why-card .badge {
    background-color: #007bff;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.faq-section {
    padding: 5rem 0;
}
.social-icons a {
    color: #6c757d;
    font-size: 1.5rem;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: #0dcaf0;
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .services-section, .why-section, .faq-section {
        padding: 3rem 0;
    }
}

.animate-fade {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-fill-mode: both;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

.animate-onload {
    animation: fadeInUp 0.8s ease-out 0.5s;
    animation-fill-mode: both;
}

/* Styles for content-card (Terms, Privacy) */
.content-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 3rem;
}

.content-card h1, .content-card h2, .content-card h3 {
    margin-top: 2.5rem; /* More space above headings */
    margin-bottom: 1rem;
    color: #111827; /* Darker color for headings */
    font-weight: 700;
}

.content-card h2 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border); /* Subtle underline for main sections */
}

.content-card h3 {
    color: #334155; /* Slightly lighter for subheadings */
}

.content-card p {
    margin-bottom: 1rem;
    line-height: 1.8; /* Improved line height for readability */
    color: #334155;
}

.content-card ul {
    margin-bottom: 1rem;
    padding-right: 1.5rem; /* For RTL support */
    list-style-type: disc;
    color: #334155;
}

.content-card ul li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.content-card strong {
    color: #000;
}

/* Table of Contents (TOC) styles */
.toc-container {
    background-color: var(--soft); /* Light background for TOC */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-container h5 {
    color: #111827;
    font-weight: 700;
    margin-bottom: 1rem;
}

.toc-list {
    padding-right: 0;
}

.toc-list li a {
    display: block;
    padding: 0.3rem 0;
    color: #334155;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-list li a:hover {
    color: var(--primary);
}

.toc-list ul {
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    padding-right: 1rem;
}

.toc-list ul li a {
    font-size: 0.95rem;
    color: #4B5563;
}

/* Navbar shadow moved from header.php */
.navbar { box-shadow: var(--shadow); }
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-dashboard .nav-pills .nav-link { border-radius: 10px; }
.card-dashboard .nav-pills .nav-link.active { background: #0d6efd; box-shadow: 0 6px 20px rgba(13,110,253,.25); }

.toc-container.card{border:1px solid var(--border);box-shadow:var(--shadow);border-radius:var(--radius);background:var(--surface)}
.toc-container .toc-title{font-weight:700;color:#0F172A}
.toc-list a{color:#334155;text-decoration:none;display:block;padding:.25rem 0;border-radius:8px}
.toc-list a:hover{color:var(--primary-600)}
.toc-list a.active{color:var(--primary);font-weight:600}
.content-card h2,.content-card h3{scroll-margin-top:100px}
@media (min-width:992px){.toc-container{position:sticky;top:6rem}}

/* ============ Mobile Optimizations ============ */