/* ============================================
   CSS Reset & Base Styles
============================================ */
:root {
    /* Color System */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #00D4AA;
    --accent: #FF6B9D;
    --success: #16a34a;
    --warning: #FFC107;
    --danger: #ef4444;
    --dark: #1A1B3A;
    --dark-secondary: #4b5563;
    --light: #F8F9FF;
    --gray: #E8EBF7;
    --gray-200: #E5E7EB;
    --white: #FFFFFF;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(37, 99, 235, 0.12);
    --shadow-md: 0 6px 20px rgba(37, 99, 235, 0.18);
    --shadow-lg: 0 10px 35px rgba(37, 99, 235, 0.25);
    --shadow-hover: 0 14px 45px rgba(37, 99, 235, 0.3);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Typography */
    --font-cairo: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-cairo);
    direction: rtl;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.7;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Layout Utilities
============================================ */
.container {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ============================================
   Typography
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: 1em;
}

.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-dark { color: var(--dark); }
.text-light { color: var(--light); }
.text-gray { color: var(--dark-secondary); }

/* ============================================
   Header & Navigation
============================================ */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(91, 108, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(91, 108, 255, 0.1);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.8rem;
    position: relative;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Atom Logo */
.atom-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.nucleus {
    position: absolute;
    width: 12%;
    height: 12%;
    background: #2D3561;
    border: 2px solid #1A1F3A;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 12px rgba(45, 53, 97, 0.5);
}

.orbit {
    position: absolute;
    border: 2.8px solid #D4AF37;
    border-radius: 50%;
    background: transparent;
}

.orbit-1 {
    width: 88%;
    height: 88%;
    top: 6%;
    left: 6%;
}

.orbit-2 {
    width: 85%;
    height: 36%;
    top: 32%;
    left: 7.5%;
    transform: rotateX(70deg) rotateZ(45deg);
}

.orbit-3 {
    width: 85%;
    height: 36%;
    top: 32%;
    left: 7.5%;
    transform: rotateX(70deg) rotateZ(-45deg);
}

.orbit-4 {
    width: 36%;
    height: 85%;
    top: 7.5%;
    left: 32%;
    transform: rotateY(70deg);
}

.electron {
    position: absolute;
    width: 7%;
    height: 7%;
    background: #D4AF37;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
    top: 6%;
    left: 46.5%;
    z-index: 5;
}

@media (hover: hover) and (pointer: fine) {
    .logo-container:hover .electron {
        animation: orbitElectron 2s linear infinite;
    }
}

@keyframes orbitElectron {
    0%   { top: 6%;   left: 46.5%; }
    25%  { top: 46.5%; left: 86%;  }
    50%  { top: 86%;  left: 46.5%; }
    75%  { top: 46.5%; left: 6%;   }
    100% { top: 6%;   left: 46.5%; }
}

.logo-text h1 {
    font-size: 1.6rem;
    color: var(--dark);
    font-weight: 800;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #2D3561 0%, #5B6CFF 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--primary);
    margin: 4px 0 0 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.language-switcher a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--gray-200);
}

.language-switcher a.active {
    background: linear-gradient(135deg, #5B6CFF, #00B4D8);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.25rem;
    border-radius: var(--radius-full);
    background: rgba(248, 249, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.nav-menu a {
    position: relative;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.nav-menu a i {
    font-size: 0.8rem;
}

.nav-menu a.active,
.nav-menu a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(0, 180, 216, 0.08));
    color: #111827;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger-menu span {
    width: 18px;
    height: 2px;
    border-radius: var(--radius-full);
    background: #1f2937;
    transition: all 0.25s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* ============================================
   Hero Section
============================================ */
.hero {
    padding: 2.4rem 0 2.2rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    gap: 2rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.6rem;
}

.hero p {
    color: var(--dark-secondary);
    font-size: 0.98rem;
    margin-bottom: 1.4rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.4rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.78rem;
    color: #64748b;
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-meta-bullet {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--success);
}

/* Hero Panel */
.hero-panel {
    background: #1A1B3A;
    color: #E5E7F9;
    border-radius: 24px;
    padding: 1.4rem 1.3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle at 10% 0%, rgba(91, 108, 255, 0.5), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(212, 175, 55, 0.4), transparent 55%);
    opacity: 0.8;
}

.hero-panel-inner {
    position: relative;
    z-index: 1;
}

.hero-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.hero-panel-sub {
    font-size: 0.8rem;
    color: #c7d2fe;
    margin-bottom: 0.9rem;
}

.hero-panel-list {
    list-style: none;
    margin-bottom: 1rem;
}

.hero-panel-list li {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-panel-list li i {
    color: #A5B4FC;
    font-size: 0.75rem;
}

/* ============================================
   Buttons
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: var(--shadow-sm);
}

/* Button Variants */
.btn-secondary {
    background: #ffffff;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: #f0f7ff;
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn-ghost {
    background: transparent;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding-inline: 1.1rem;
    padding-block: 0.45rem;
    box-shadow: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.btn-ghost:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-panel .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* ============================================
   Main Content
============================================ */
.layout-main {
    padding-bottom: 3.5rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1.4fr);
    gap: 2rem;
    align-items: flex-start;
}

.section {
    margin-bottom: 2.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.section-title-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: #EEF2FF;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.section-title-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 0.88rem;
    color: var(--dark-secondary);
    margin-bottom: 1.1rem;
}

.section-cta {
    margin-top: 1.4rem;
    text-align: center;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 1.05rem 1.1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(232, 235, 247, 0.95);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.card-badge {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: #F8F9FF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.card-title {
    font-size: 0.96rem;
    font-weight: 700;
}

.card-body {
    font-size: 0.84rem;
    color: var(--dark-secondary);
    flex: 1;
}

.card-footer {
    margin-top: 0.3rem;
}

/* ============================================
   Sidebar
============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.sidebar-block {
    background: #fff;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(232, 235, 247, 0.95);
}

.sidebar-block-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

/* Ads */
.ad-banner {
    border-radius: 16px;
    overflow: hidden;
    background: #0F172A;
    color: #E5E7EB;
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.ad-banner:hover {
    transform: translateY(-5px);
}

.ad-banner img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.ad-inner {
    padding: 0.65rem 0.8rem 0.9rem;
}

.ad-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    opacity: 0.9;
    margin-bottom: 0.2rem;
}

.ad-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.ad-description {
    font-size: 0.78rem;
    color: #CBD5F5;
    margin-bottom: 0.5rem;
}

.ad-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.ad-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Researcher Programs
============================================ */
.researcher-programs {
    padding: 2.5rem 0 3.2rem;
}

.research-tools-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.program-card {
    background: #0F172A;
    border-radius: 20px;
    color: #E5E7EB;
    padding: 0.9rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.9);
}

.program-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: rgba(148, 163, 184, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.program-name {
    font-size: 0.94rem;
    font-weight: 700;
}

.program-description {
    font-size: 0.8rem;
    color: #cbd5f5;
}

.affiliate-badge {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    display: inline-block;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.program-card:hover .affiliate-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ============================================
   Footer
============================================ */
footer {
    background: linear-gradient(135deg, #1a1b3a 0%, #2d2e5f 100%);
    color: var(--white);
    padding: 2.8rem 0 1.8rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
    gap: 1.8rem;
    margin-bottom: 1.6rem;
}

.footer-logo-block h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.footer-logo-block p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer-col-title {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.84rem;
}

.footer-links li + li {
    margin-top: 0.35rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    border-top: 1px solid rgba(139, 149, 255, 0.25);
    padding-top: 0.9rem;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    text-align: center;
}

.donate-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.78rem;
}

.donate-heart-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 10px 22px;
    border-radius: 25px;
    margin-top: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.donate-heart-small:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ============================================
   Responsive Design
============================================ */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .layout-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .research-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .top-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }

    .logo-container {
        margin: 0 auto;
    }

    .language-switcher {
        order: 3;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        margin-top: 0.4rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 0 1rem;
        max-height: 0;
        overflow: hidden;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 10px 30px rgba(91, 108, 255, 0.15);
    }

    .nav-menu a {
        padding: 0.6rem 0.3rem;
    }

    .nav-menu.open {
        max-height: 350px;
        padding-top: 0.5rem;
        padding-bottom: 0.8rem;
    }

    .cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .research-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .logo-text h1 {
        font-size: 1.3rem;
    }

    .logo-text p {
        font-size: 0.65rem;
    }

    .atom-logo {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .research-tools-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .logo-text p {
        font-size: 0.6rem;
    }

    .atom-logo {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   Theme Toggle Styles (Light/Dark Mode)
============================================ */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(248, 249, 255, 0.96);
    border: 1px solid var(--gray-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--dark);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(15deg);
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --dark: #f8fafc;
    --light: #1e293b;
    --white: #0f172a;
    --gray: #334155;
    --dark-secondary: #cbd5e1;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--dark);
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

[data-theme="dark"] .card,
[data-theme="dark"] .sidebar-block {
    background: #1e293b;
    border-color: rgba(100, 116, 139, 0.3);
    color: #cbd5e1;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .section-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .nav-menu {
    background: rgba(30, 41, 59, 0.96);
}

[data-theme="dark"] .hamburger-menu {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .hamburger-menu span {
    background: #f1f5f9;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(30, 41, 59, 0.96);
    color: #f1f5f9;
    border-color: #475569;
}

/* ============================================
   Partnership Page Specific Styles
============================================ */

.partnership-page .page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.partnership-page .page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.partnership-page .page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Benefits List */
.benefits-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    min-width: 180px;
}

.benefit-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.benefit-badge i {
    font-size: 1.5rem;
    color: white;
}

.benefit-badge span {
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

/* Form Section */
.order-form-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.form-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    color: var(--dark-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form Styles */
.order-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.form-group {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 250px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.required {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    color: var(--dark-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: block;
}

.form-hint i {
    margin-left: 0.25rem;
}

/* Checkbox Grid */
.services-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--light);
    border: 2px solid var(--gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.checkbox-item input[type="checkbox"] {
    margin-left: 0.75rem;
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    font-weight: 500;
    color: var(--dark);
}

.checkbox-label i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Other Service Input */
.other-service-input {
    display: none;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Submit */
.form-submit {
    flex: 1 1 100%;
    text-align: center;
    margin-top: 2rem;
}

.form-submit .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    min-width: 250px;
}

/* Responsive Design for Partnership Page */
@media (max-width: 768px) {
    .partnership-page .page-header {
        padding: 3rem 0 2rem;
    }
    
    .partnership-page .page-header h1 {
        font-size: 2rem;
    }
    
    .benefits-list {
        gap: 1rem;
    }
    
    .benefit-badge {
        min-width: 140px;
        padding: 0.75rem 1rem;
    }
    
    .order-form-section {
        padding: 1.5rem;
    }
    
    .form-group {
        flex: 1 1 100%;
    }
    
    .services-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .form-submit .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .partnership-page .page-header h1 {
        font-size: 1.7rem;
    }
    
    .benefit-badge {
        min-width: 100%;
    }
    
    .order-form-section {
        padding: 1rem;
    }
}

/* =========================================================
   SERVICES PAGE (RTL) 
   Applies to <body class="services-page">
   Single LIGHT theme (no dark / night mode)
   ========================================================= */

.services-page {
    background: linear-gradient(135deg, #f3f4ff 0%, #e5edff 40%, #f9fafb 100%);
}

/* Page header / intro */
.services-page .page-header {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(0, 212, 170, 0.06));
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.services-page .page-header .container {
    text-align: center;
}

.services-page .page-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    margin-bottom: 0.75rem;
    color: #111827;
    font-weight: 800;
}

.services-page .page-header p {
    max-width: 46rem;
    margin: 0 auto;
    color: #4b5563;
    font-size: 0.98rem;
}

/* Main layout: services + sidebar */
.services-page .content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* RTL: services on right, sidebar on left */
    gap: 1.75rem;
    align-items: flex-start;
    padding: 2.5rem 0 3rem;
}

.services-page .main-content {
    flex: 3;
}

.services-page .services-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Sidebar (ads, testimonials, payment info) */
.services-page .ad-sidebar {
    flex: 1.6;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    position: sticky;
    top: 6rem; /* below header */
}

/* Sidebar cards */
.services-page .ad-banner,
.services-page .testimonials-section,
.services-page .payment-info-sidebar {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem 1.3rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

/* Ad banner */
.services-page .ad-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(234, 179, 8, 0.15);
    color: #92400e;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
}

.services-page .ad-banner img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 0.4rem 0 0.7rem;
    display: block;
}

.services-page .ad-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #111827;
}

.services-page .ad-description {
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.services-page .ad-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.services-page .ad-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Testimonials */
.services-page .testimonials-title {
    font-size: 1rem;
    margin-bottom: 0.7rem;
    color: #111827;
}

.services-page .testimonial-item {
    border-radius: 0.8rem;
    padding: 0.75rem 0.8rem;
    background: #f9fafb;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.services-page .testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.services-page .testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}

.services-page .testimonial-stars i {
    color: #facc15;
    font-size: 0.82rem;
}

.services-page .testimonial-text {
    font-size: 0.84rem;
    color: #4b5563;
}

/* Payment info */
.services-page .payment-info-sidebar h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.96rem;
    margin-bottom: 0.6rem;
    color: #111827;
}

.services-page .payment-info-sidebar h4 i {
    color: var(--primary);
}

.services-page .payment-info-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-page .payment-info-sidebar li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #4b5563;
    padding: 0.25rem 0;
}

.services-page .payment-info-sidebar li i {
    color: #16a34a;
    font-size: 0.85rem;
}

/* =========================================================
   SERVICE CARDS / ACCORDION
   ========================================================= */

.services-page .service-item {
    background: #ffffff;
    border-radius: 1.1rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.18s ease,
        background 0.24s ease;
    position: relative;
}

.services-page .service-item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
    opacity: 0;
    transform: scaleY(0.6);
    transform-origin: top;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.services-page .service-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.services-page .service-item.active,
.services-page .service-item.selected {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), #ffffff);
}

.services-page .service-item.active::before,
.services-page .service-item.selected::before {
    opacity: 1;
    transform: scaleY(1);
}

/* Header row (clickable accordion title) */
.services-page .service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.35rem;
    cursor: pointer;
    gap: 1rem;
}

.services-page .service-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.services-page .service-icon {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 1.1rem;
}

.services-page .service-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Toggle chevron */
.services-page .service-toggle {
    font-size: 0.9rem;
    color: #6b7280;
    transition: transform 0.25s ease, color 0.2s ease;
}

.services-page .service-item.active .service-toggle {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Accordion content */
.services-page .service-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.services-page .service-item.active .service-content {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px; /* large enough for content */
}

.services-page .service-body {
    padding: 0 1.35rem 1.1rem;
}

.services-page .service-description {
    font-size: 0.9rem;
    line-height: 1.9;
    color: #374151;
    margin-bottom: 0.9rem;
}

/* Footer inside each service card */
.services-page .service-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.1rem;
    justify-content: space-between;
    align-items: flex-start;
}

.services-page .service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.services-page .feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    background: #f9fafb;
    border: 1px solid rgba(156, 163, 175, 0.6);
    font-size: 0.78rem;
    color: #111827;
}

.services-page .feature-badge i {
    font-size: 0.8rem;
    color: #16a34a;
}

/* Actions (order + read more) */
.services-page .service-actions {
    display: flex;
    flex-wrap: wrap-reverse;
    gap: 0.5rem;
    align-items: center;
}

.services-page .btn.btn-order {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    font-weight: 800;
    border-radius: var(--radius-full);
    padding-inline: 1.1rem;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.35);
}

.services-page .btn.btn-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(34, 197, 94, 0.5);
}

.services-page .btn.btn-order i {
    font-size: 0.85rem;
}

/* Secondary button (اقرأ المزيد) uses global .btn, just size tune */
.services-page .service-actions .btn:not(.btn-order) {
    font-size: 0.82rem;
    padding-inline: 0.9rem;
}

/* =========================================================
   ORDER FORM SECTION ENHANCEMENTS
   ========================================================= */

.services-page .order-form-section {
    margin: 0 auto 3.25rem;
    margin-top: 0.5rem;
    max-width: 960px;
}

.services-page .order-form-section .form-title {
    text-align: center;
    margin-bottom: 0.3rem;
}

.services-page .order-form-section .form-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Highlight animation when a service is selected */
.services-page .order-form-section.highlight {
    animation: orderFormPulse 1.2s ease-out;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.9),
                0 0 0 8px rgba(37, 99, 235, 0.12);
    border-radius: 1.2rem;
}

@keyframes orderFormPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    }
    100% {
        box-shadow: 0 0 0 16px rgba(37, 99, 235, 0);
    }
}

/* =========================================================
   SCROLL TO TOP BUTTON (shared)
   ========================================================= */

.scroll-top {
    position: fixed;
    inset-inline-start: 1.35rem;
    inset-block-end: 1.35rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    z-index: 20;
}

.scroll-top i {
    font-size: 0.9rem;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */

@media (max-width: 1024px) {
    .services-page .content-wrapper {
        flex-direction: column;
    }

    .services-page .ad-sidebar {
        position: static;
        width: 100%;
        order: -1; /* sidebar above services if desired */
    }

    .services-page .service-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .services-page .service-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .services-page .page-header {
        padding-block: 2.2rem 1.4rem;
    }

    .services-page .page-header h1 {
        font-size: 1.5rem;
    }

    .services-page .page-header p {
        font-size: 0.9rem;
    }

    .services-page .content-wrapper {
        padding-block: 1.8rem 2.4rem;
    }

    .services-page .service-header {
        padding-inline: 1rem;
    }

    .services-page .service-body {
        padding-inline: 1rem;
    }

    .scroll-top {
        inset-inline-start: 1rem;
        inset-block-end: 1rem;
    }
}

/* ============================================
   صفحة المصادر الأكاديمية (resources-page)
============================================ */

.resources-page main {
    padding-bottom: 3rem;
}

/* ترويسة الصفحة */
.resources-page .page-header {
    padding: 3rem 0 2.4rem;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.08),
        rgba(0, 212, 170, 0.12)
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    text-align: center;
}

.resources-page .page-header .page-eyebrow {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem); /* مساوية للعنوان */
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
    display: block;
}

.resources-page .page-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem); /* نفس الحجم */
    color: var(--dark);
    font-weight: 800;
    margin-bottom: 0.75rem;
}



.resources-page .page-header p {
    max-width: 46rem;
    margin: 0 auto;
    color: #4b5563;
    font-size: 0.98rem;
    line-height: 1.8;
}

/* روابط سريعة للأقسام */
.resources-page .resources-quick-links {
    padding: 2.2rem 0 0.5rem;
}

.resources-page .section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.resources-page .section-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.resources-page .resources-quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.resources-page .quick-link-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.resources-page .quick-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
    flex-shrink: 0;
}

.resources-page .quick-link-icon i {
    font-size: 1.1rem;
}

.resources-page .quick-link-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.resources-page .quick-link-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.resources-page .quick-link-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

@media (hover: hover) and (pointer: fine) {
    .resources-page .quick-link-card:hover {
        transform: translateY(-2px);
        border-color: var(--primary-light);
        box-shadow: var(--shadow-md);
    }
}

/* تخطيط المحتوى الرئيسي + الشريط الجانبي */
.resources-page .resources-layout {
    padding: 2.5rem 0 0;
}

.resources-page .content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* محتوى على اليمين، شريط جانبي على اليسار مع RTL */
    gap: 1.75rem;
    align-items: flex-start;
}

.resources-page .main-content {
    flex: 3;
    min-width: 0;
}

.resources-page .resources-sidebar {
    flex: 1.3;
    min-width: 260px;
}

/* ====== Resources pages: main + sidebar layout ====== */
.resources-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.resources-main {
    flex: 1 1 auto;
    min-width: 0;
}

.resources-sidebar {
    flex: 0 0 280px;
}

/* أقسام المصادر */
.resources-page .resource-section {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.6rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .resources-page .resource-section:hover {
        transform: translateY(-2px);
        border-color: var(--primary-light);
        box-shadow: var(--shadow-md);
    }
}

.resources-page .resource-section-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--dark);
}

.resources-page .resource-section-header p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.1rem;
    line-height: 1.7;
}

.resources-page .resource-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resources-page .resource-item {
    display: flex;
    gap: 1rem;
    padding: 0.95rem 0.4rem 0.95rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    background: linear-gradient(
        135deg,
        rgba(248, 249, 255, 0.95),
        rgba(230, 235, 255, 0.9)
    );
}

.resources-page .resource-item-main {
    flex: 1;
    min-width: 0;
}

.resources-page .resource-name {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.resources-page .resource-description {
    font-size: 0.86rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 0.45rem;
}

.resources-page .resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.resources-page .resource-tag {
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
}

/* أزرار الروابط */
.resources-page .resource-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.resources-page .resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.resources-page .resource-link i {
    font-size: 0.8rem;
}

/* ===== Resources Page (resources.html) ===== */

.resources-page main {
    padding: 40px 0;
}

/* قسم عام لكل فئة */
.resource-section {
    margin-bottom: 40px;
}

/* عنوان الفئة + الأيقونة */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.section-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(91, 108, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.section-description {
    font-size: 0.9rem;
    color: var(--dark-secondary);
    margin-bottom: 18px;
}


/* الشبكة العامة للكروت - 3 أعمدة على الشاشات الكبيرة */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 أعمدة */
    gap: 15px;
    margin-bottom: 15px;
}

/* استجابة الشاشات المتوسطة والصغيرة */
@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* عمودان */
    }
}

@media (max-width: 640px) {
    .resources-grid {
        grid-template-columns: 1fr; /* عمود واحد */
    }
}


/* الكارت */
.resource-card {
    background: var(--light);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(91, 108, 255, 0.08);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .resource-card:hover {
        background: rgba(91, 108, 255, 0.04);
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }
}

.resource-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-card-icon {
    width: 34px;
    height: 34px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ألوان الأيقونات حسب النوع */
.resource-card-icon.database { color: #5B6CFF; }
.resource-card-icon.journal  { color: #00D4AA; }
.resource-card-icon.conference { color: #FF6B9D; }
.resource-card-icon.book     { color: #FFC107; }
.resource-card-icon.youtube  { color: #FF0000; }
.resource-card-icon.course   { color: #764ba2; }
.resource-card-icon.tool     { color: #00C896; }
.resource-card-icon.writing  { color: #FF5757; }
.resource-card-icon.viz      { color: #9C27B0; }

/* اسم الموقع (بالإنجليزي) */
.resource-card-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
}

/* الوصف العربي */
.resource-card-description {
    font-size: 0.85rem;
    color: var(--dark-secondary);
}

/* رابط "زيارة الموقع" / "زيارة القناة" */
.resource-card-link {
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e88e5; /* أزرق */
    text-decoration: none;
    align-self: flex-start;
}

.resource-card-link:hover {
    text-decoration: underline;
}

/* زر "اكتشف المزيد" (للصفحات الفرعية) */
.discover-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.discover-more-btn i {
    font-size: 0.75rem;
}

/* الشريط الجانبي للمصادر */
.resources-page .resources-sidebar .sidebar-block {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.3rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.45);
    margin-bottom: 1.1rem;
}

.resources-page .resources-sidebar .sidebar-title {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.resources-page .resources-sidebar .sidebar-title i {
    color: var(--secondary);
}

.resources-page .resources-sidebar .sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.resources-page .resources-sidebar .sidebar-list li {
    font-size: 0.86rem;
    color: #4b5563;
    padding: 0.25rem 0;
}

.resources-page .resources-sidebar .sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.resources-page .resources-sidebar .sidebar-links li + li {
    margin-top: 0.25rem;
}

.resources-page .resources-sidebar .sidebar-links a {
    font-size: 0.86rem;
    color: var(--primary-dark);
    text-decoration: none;
}

.resources-page .resources-sidebar .sidebar-links a:hover {
    text-decoration: underline;
}

/* كتل الإعلانات في الشريط الجانبي */
.resources-page .ads-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.resources-page .ad-item {
    border-radius: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: linear-gradient(
        135deg,
        rgba(251, 191, 36, 0.12),
        rgba(245, 158, 11, 0.06)
    );
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.resources-page .ad-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 0.15rem;
}

.resources-page .ad-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.resources-page .ad-desc {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 0.4rem;
}

.resources-page .ad-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e88e5;
    text-decoration: none;
}

.resources-page .ad-cta:hover {
    text-decoration: underline;
}
/* كل إعلان: مساحة مرنة تستوعب نص + بانر (إن وُجد) */
.resources-page .ad-item {
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(
        135deg,
        rgba(251, 191, 36, 0.18),
        rgba(245, 158, 11, 0.08)
    );
    border: 1px solid rgba(245, 158, 11, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.35rem; /* مسافة متناسقة بين عناصر الإعلان */
}

/* حاوية صورة البانر داخل الإعلان (اختيارية) */
.resources-page .ad-media {
    border-radius: 0.6rem;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.resources-page .ad-media img {
    display: block;
    width: 100%;
    height: auto; /* ارتفاع مرن حسب أبعاد الصورة */
}

/* شارة نوع الإعلان (مثل: إعلان مميز / دورة مدفوعة) */
.resources-page .ad-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
}

/* عنوان الإعلان */
.resources-page .ad-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}

/* وصف مختصر للإعلان */
.resources-page .ad-desc {
    font-size: 0.8rem;
    color: #4b5563;
}

/* زر الدعوة لاتخاذ إجراء (CTA) */
.resources-page .ad-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 0.34rem 0.95rem;

    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8); /* زر أزرق */
    color: #ffffff; /* نص أبيض واضح فوق الأزرق */
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

/* لتجربة نص أصفر بدلاً من الأبيض:
   .resources-page .ad-cta { color: #facc15; } */

.resources-page .ad-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
    opacity: 0.95;
}


/* استجابة الشاشات الصغيرة */
@media (max-width: 1024px) {
    .resources-page .content-wrapper {
        flex-direction: column;
    }

    .resources-page .resources-sidebar {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .resources-page .page-header {
        padding: 2.2rem 0 1.4rem;
    }

    .resources-page .page-header h1 {
        font-size: 1.6rem;
    }

    .resources-page .resources-layout {
        padding-top: 1.8rem;
    }

    .resources-page .resource-section {
        padding-inline: 1.1rem;
    }

    .resources-page .resource-item {
        flex-direction: column;
        padding-inline: 0.7rem;
    }

    .resources-page .resource-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .resources-layout {
        flex-direction: column-reverse; /* المحتوى أولاً ثم الشريط تحت */
    }

    .resources-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
}


/* ============================================
   صفحة الأدوات الأكاديمية (tools-page)
============================================ */

.tools-page main {
    padding-bottom: 3rem;
}

.tools-page .page-header {
    padding: 3rem 0 2.2rem;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.08),
        rgba(255, 107, 157, 0.08)
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    text-align: center;
}

.tools-page .page-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.7rem;
}

.tools-page .page-header p {
    max-width: 42rem;
    margin: 0 auto;
    font-size: 0.96rem;
    color: #4b5563;
    line-height: 1.8;
}

.tools-page .tools-layout {
    padding: 2.3rem 0 0;
}

.tools-page .content-wrapper {
    display: flex;
    flex-direction: row-reverse; /* محتوى على اليمين، شريط جانبي يسار مع RTL */
    gap: 1.75rem;
    align-items: flex-start;
}

.tools-page .main-content {
    flex: 3;
    min-width: 0;
}

.tools-page .tools-sidebar {
    flex: 1.3;
    min-width: 260px;
}

/* شبكة الأدوات */
.tools-page .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.3rem;
    margin-top: 1.2rem;
}

.tools-page .tool-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.3rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .tools-page .tool-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-light);
    }
}

.tools-page .tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.tools-page .tool-name-en {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tools-page .tool-name-ar {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
}

.tools-page .tool-description {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.8;
}

.tools-page .tool-btn {
    margin-top: 0.5rem;
    align-self: flex-start;
    font-size: 0.85rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
}

/* الشريط الجانبي للأدوات */
.tools-page .tools-sidebar .widget,
.tools-page .tools-sidebar .info-box {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.2rem 1.1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.4);
    margin-bottom: 1rem;
}

.tools-page .tools-sidebar .widget-title {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
}

.tools-page .tools-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tools-page .tools-sidebar li {
    font-size: 0.86rem;
    color: #4b5563;
    padding: 0.25rem 0;
}

.tools-page .tools-sidebar li i {
    color: var(--success);
    margin-left: 0.3rem;
}

.tools-page .info-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tools-page .info-box p {
    font-size: 0.86rem;
    color: #4b5563;
    line-height: 1.7;
}

/* قسم البرامج المساندة */
.tools-page .programs-section {
    margin-top: 2.2rem;
}

.tools-page .programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tools-page .program-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    background: var(--white);
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-sm);
    color: var(--dark);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .tools-page .program-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--secondary);
    }
}

.tools-page .program-icon {
    font-size: 1.4rem;
}

.tools-page .program-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.tools-page .program-description {
    font-size: 0.82rem;
    color: #6b7280;
}

.tools-page .affiliate-badge {
    align-self: flex-start;
    margin-top: 0.1rem;
    font-size: 0.7rem;
    padding: 0.08rem 0.55rem;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.12);
    color: #b45309;
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 1024px) {
    .tools-page .content-wrapper {
        flex-direction: column;
    }

    .tools-page .tools-sidebar {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .tools-page .page-header {
        padding: 2.2rem 0 1.4rem;
    }

    .tools-page .page-header h1 {
        font-size: 1.6rem;
    }

    .tools-page .tools-layout {
        padding-top: 1.8rem;
    }
}


/* ============================================
   صفحة الفرص (opportunities-page)
============================================ */

.opportunities-page main {
    padding-bottom: 3rem;
}

.opportunities-page .page-header {
    padding: 3rem 0 2.2rem;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.08),
        rgba(0, 212, 170, 0.08)
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    text-align: center;
}

.opportunities-page .page-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.7rem;
}

.opportunities-page .page-header p {
    max-width: 44rem;
    margin: 0 auto;
    font-size: 0.96rem;
    color: #4b5563;
    line-height: 1.8;
}

/* شريط الروابط السريعة */
.opportunities-page .opportunities-quick-links {
    padding: 1.6rem 0 0.5rem;
}

.opportunities-page .quick-links-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.opportunities-page .quick-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: var(--dark);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.opportunities-page .quick-link-chip i {
    color: var(--primary);
}

@media (hover: hover) and (pointer: fine) {
    .opportunities-page .quick-link-chip:hover {
        background: rgba(37, 99, 235, 0.05);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}

/* تخطيط المحتوى */
.opportunities-page .opportunities-layout {
    padding: 2.2rem 0 0;
}

.opportunities-page .content-wrapper {
    display: flex;
    flex-direction: row-reverse;
    gap: 1.9rem;
    align-items: flex-start;
}

.opportunities-page .main-content {
    flex: 3;
    min-width: 0;
}

.opportunities-page .opportunities-sidebar {
    flex: 1.3;
    min-width: 260px;
}

/* أقسام الفرص */
.opportunities-page .opportunity-section {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem 1.4rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.opportunities-page .section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.opportunities-page .section-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 1rem;
}

.opportunities-page .section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
}

.opportunities-page .section-description {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.9rem;
    line-height: 1.7;
}

/* نفترض أن .resources-grid و .resource-card لها ستايل عام مسبق */
/* نضيف فقط بعض التحسينات البسيطة هنا إن لزم */
.opportunities-page .resources-grid {
    margin-top: 0.2rem;
}

/* الشريط الجانبي */
.opportunities-page .opportunities-sidebar .sidebar-block {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.2rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.1rem;
}

.opportunities-page .opportunities-sidebar .sidebar-title {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.opportunities-page .opportunities-sidebar .sidebar-title i {
    color: var(--secondary);
}

.opportunities-page .opportunities-sidebar .sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.opportunities-page .opportunities-sidebar .sidebar-list li {
    font-size: 0.86rem;
    color: #4b5563;
    padding: 0.25rem 0;
}

.opportunities-page .opportunities-sidebar .sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.opportunities-page .opportunities-sidebar .sidebar-links li + li {
    margin-top: 0.25rem;
}

.opportunities-page .opportunities-sidebar .sidebar-links a {
    font-size: 0.86rem;
    color: var(--primary-dark);
    text-decoration: none;
}

.opportunities-page .opportunities-sidebar .sidebar-links a:hover {
    text-decoration: underline;
}

/* ====== Layout for content + sidebar ====== */
.content-wrapper {
    display: flex;
    gap: 2rem;
}

/* For RTL sites, sidebar on the left visually while still logical */
.resources-sidebar {
    flex: 0 0 280px;
}

/* Stack content on small screens */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column-reverse;
    }

    .resources-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* ====== Generic sidebar styles ====== */

.resources-sidebar {
    /* remove inline width and flex; controlled here */
    display: flex;
    flex-direction: column;
}

.sidebar-block {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
}

.sidebar-title i {
    color: #0b7285;
    font-size: 1rem;
}

/* ====== Opportunities sub-navigation ====== */

.opportunities-subnav .subnav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.opportunities-subnav .subnav-list li + li {
    margin-top: 0.25rem;
}

.opportunities-subnav .subnav-list a {
    display: block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px; /* pill shape */
    text-decoration: none;
    font-size: 0.9rem;
    color: #374151;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.opportunities-subnav .subnav-list a:hover {
    background-color: #e3fafc;
    color: #0b7285;
    transform: translateX(-2px); /* for RTL, shift slightly to the right visually; adjust if needed */
}

/* Active page link */
.opportunities-subnav .subnav-list a.active {
    background-color: #0b7285;
    color: #ffffff;
    font-weight: 600;
}

/* ====== (Optional) ads styling if not already defined ====== */

.ads-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ad-item + .ad-item {
    margin-top: 0.75rem;
}

.ad-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: #f97316;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.25rem;
}

.ad-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #111827;
}

.ad-desc {
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.ad-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0b7285;
    text-decoration: none;
}

.ad-cta:hover {
    text-decoration: underline;
}


/* استجابة */
@media (max-width: 1024px) {
    .opportunities-page .content-wrapper {
        flex-direction: column;
    }

    .opportunities-page .opportunities-sidebar {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .opportunities-page .page-header {
        padding: 2.2rem 0 1.4rem;
    }

    .opportunities-page .page-header h1 {
        font-size: 1.6rem;
    }

    .opportunities-page .opportunities-layout {
        padding-top: 1.8rem;
    }

    .opportunities-page .opportunity-section {
        padding-inline: 1.1rem;
    }
}


/* ================================
   صفحة الفرص الأكاديمية (opportunities)
   ================================ */

.opportunities-page .content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1fr);
    gap: 2rem;
    align-items: flex-start;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

@media (max-width: 992px) {
    .opportunities-page .content-wrapper {
        grid-template-columns: 1fr;
    }

    .opportunities-page .ad-sidebar {
        position: static;
        top: auto;
    }
}

.opportunities-page .main-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* أقسام الفرص */
.opportunities-page .opportunity-section {
    background-color: #f9fafb;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem 1.5rem 1.75rem;
}

.opportunities-page .opportunity-section + .opportunity-section {
    margin-top: 0.5rem;
}

.opportunities-page .section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.opportunities-page .section-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.2rem;
}

.opportunities-page .section-title {
    font-size: 1.25rem;
    margin: 0;
}

.opportunities-page .section-description {
    margin: 0 0 1.25rem;
    color: #4b5563;
    font-size: 0.95rem;
}

/* شبكة الكروت */
.opportunities-page .resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.opportunities-page .resource-card {
    background-color: #ffffff;
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.opportunities-page .resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    border-color: #4f46e5;
}

.opportunities-page .resource-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.opportunities-page .resource-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}

/* ألوان الأيقونات حسب النوع */
.resource-card-icon.academic {
    background: #4f46e5;
}

.resource-card-icon.research {
    background: #0ea5e9;
}

.resource-card-icon.global {
    background: #10b981;
}

.resource-card-icon.university {
    background: #f97316;
}

.resource-card-icon.tech {
    background: #6366f1;
}

.resource-card-icon.government {
    background: #b91c1c;
}

.resource-card-icon.nonprofit {
    background: #0f766e;
}

.opportunities-page .resource-card-name {
    font-weight: 600;
    font-size: 0.98rem;
    color: #111827;
}

.opportunities-page .resource-card-description {
    font-size: 0.9rem;
    color: #4b5563;
    flex: 1 1 auto;
}

.opportunities-page .resource-card-link {
    align-self: flex-start;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.opportunities-page .resource-card-link::before {
    content: "\f08e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
}

.opportunities-page .resource-card-link:hover {
    text-decoration: underline;
}

/* زر "اكتشف المزيد" */
.opportunities-page .discover-more-btn {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #4f46e5;
    color: #4f46e5;
    background-color: #eef2ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.opportunities-page .discover-more-btn i {
    font-size: 0.85rem;
}

.opportunities-page .discover-more-btn:hover {
    background-color: #4f46e5;
    color: #ffffff;
    transform: translateY(-1px);
}

/* الشريط الجانبي */
.opportunities-page .ad-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.opportunities-page .quick-tips,
.opportunities-page .ad-banner,
.opportunities-page .important-info {
    background-color: #ffffff;
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.opportunities-page .quick-tips h3,
.opportunities-page .important-info h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #111827;
}

.opportunities-page .quick-tips ul,
.opportunities-page .important-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.opportunities-page .quick-tips li i,
.opportunities-page .important-info li i {
    color: #10b981;
    margin-left: 0.35rem;
}

.opportunities-page .ad-banner .ad-label {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background-color: #fee2e2;
    color: #b91c1c;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.opportunities-page .ad-banner img {
    width: 100%;
    border-radius: 0.65rem;
    margin-bottom: 0.65rem;
}

.opportunities-page .ad-banner .ad-title {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    font-weight: 600;
}

.opportunities-page .ad-banner .ad-description {
    margin: 0 0 0.7rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.opportunities-page .ad-banner .ad-cta {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background-color: #4f46e5;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.opportunities-page .ad-banner .ad-cta:hover {
    background-color: #4338ca;
}
/* اجعل عناوين الفئات في صفحة الفرص مثل عناوين الموارد */
.resources-page .group-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.resources-page .group-title i {
    color: var(--secondary);
    font-size: 1.1rem;
}

.resources-page .group-intro {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}


/* ========== PROMOTION TABLE STYLES ========== */
/* Responsive promotion table for service providers directory */
.providers-directory-promo {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333333;
}

.providers-directory-promo h2 {
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.4;
}

.providers-directory-promo h3 {
    color: #34495e;
    font-weight: 600;
}

.providers-directory-promo p {
    color: #4a5568;
    line-height: 1.6;
}

/* Table Styles */
.promotion-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.promotion-table th {
    background-color: #2c5282;
    color: white !important;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    border: none;
}

.promotion-table td {
    padding: 1rem;
    text-align: right;
    border: 1px solid #e2e8f0;
    color: #2d3748 !important;
    line-height: 1.7;
}

.promotion-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.promotion-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.promotion-table tbody tr:hover {
    background-color: #edf2f7 !important;
    transition: background-color 0.2s ease;
}

/* Platform icons styling */
.promotion-table .fab, 
.promotion-table .fas {
    vertical-align: middle;
}

/* Specific icon colors */
.promotion-table .fa-youtube { color: #ff0000; }
.promotion-table .fa-x-twitter { color: #000000; }
.promotion-table .fa-whatsapp { color: #25d366; }
.promotion-table .fa-telegram { color: #0088cc; }
.promotion-table .fa-facebook { color: #1877f2; }
.promotion-table .fa-instagram { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.promotion-table .fa-snapchat { 
    color: #fffc00;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Category badges */
.promotion-table td span[style*="background-color"] {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* Social icons row */
.social-icons-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.social-icons-row span {
    color: white;
    font-weight: 600;
    margin-left: 0.75rem;
}

.social-icons-row i {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    margin: 0 0.35rem;
    transition: all 0.3s ease;
}

.social-icons-row i:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Important notes section */
.important-notes {
    background-color: #fff9db;
    border-right: 4px solid #f59f00;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.important-notes h3 {
    color: #d9480f !important;
    margin-bottom: 0.75rem;
}

.important-notes ul {
    margin-bottom: 0;
    padding-right: 1.5rem;
}

.important-notes li {
    color: #5c3c00 !important;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.cta-section h3 {
    color: white !important;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.cta-section a {
    display: inline-block;
    background-color: white;
    color: #667eea !important;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-section a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .promotion-table {
        overflow-x: auto;
    }
    
    .promotion-table table {
        min-width: 700px;
    }
    
    .social-icons-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .social-icons-row i {
        margin: 0.25rem;
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 1rem;
    }
    
    .cta-section a {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .providers-directory-promo h2 {
        font-size: 1.2rem;
    }
    
    .promotion-table th,
    .promotion-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .cta-section {
        padding: 1.25rem;
    }
    
    .cta-section h3 {
        font-size: 1.3rem;
    }
}

/* Channel Cards Hover Effects */
.channel-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
        gap: 0.75rem !important;
    }
    
    .channel-card {
        padding: 1rem 0.5rem !important;
    }
    
    .channel-card i {
        font-size: 2rem !important;
    }
    
    .header-content {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .benefit-box {
        min-width: 100% !important;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* Stagger the animations */
.channel-card:nth-child(1) { animation-delay: 0.1s; }
.channel-card:nth-child(2) { animation-delay: 0.2s; }
.channel-card:nth-child(3) { animation-delay: 0.3s; }
.channel-card:nth-child(4) { animation-delay: 0.4s; }
.channel-card:nth-child(5) { animation-delay: 0.5s; }
.channel-card:nth-child(6) { animation-delay: 0.6s; }
.channel-card:nth-child(7) { animation-delay: 0.7s; }
.channel-card:nth-child(8) { animation-delay: 0.8s; }