@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-VariableFont_slnt,wght.ttf') format('truetype');
    font-weight: 200 900;
    font-style: normal;
}

/* =========================================
   Base CSS - الكلية التربوية المفتوحة
   ========================================= */

/* CSS Variables */
:root {
    /* الألوان الأساسية */
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --primary-dark: #152a45;
    --secondary: #d4a017;
    --secondary-light: #f4c430;
    --secondary-dark: #b8860b;
    --accent: #059669;
    --accent-light: #10b981;

    /* الخلفيات */
    --bg-primary: #ffffff;
    --bg-secondary: #edf1f5;
    --bg-tertiary: #e2e8f0;

    /* النصوص */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #ffffff;

    /* الحدود */
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-lg: 16px;

    /* الظلال */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* الانتقالات */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* المسافات */
    --container-max: 1400px;
    --header-height: 80px;
    --nav-height: 60px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body.rtl {
    direction: rtl;
}

body.ltr {
    direction: ltr;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 95%;
    /* Fluid width */
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   Buttons - الأزرار
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 160, 23, 0.4);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-3px);
}

/* =========================================
   Top Bar - الشريط العلوي
   ========================================= */

.top-bar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--text-light);
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-light);
}

.quick-links {
    display: flex;
    gap: 20px;
}

.quick-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.quick-links a:hover {
    color: var(--secondary-light);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px) rotate(360deg);
}

.social-links a.facebook:hover {
    background: #1877f2;
    transform: translateY(-3px) rotate(360deg);
}

.social-links a.twitter:hover {
    background: #1da1f2;
    transform: translateY(-3px) rotate(360deg);
}

.social-links a.youtube:hover {
    background: #ff0000;
    transform: translateY(-3px) rotate(360deg);
}

.social-links a.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    transform: translateY(-3px) rotate(360deg);
}

.social-links a.telegram:hover {
    background: #0088cc;
    transform: translateY(-3px) rotate(360deg);
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: rotate(360deg);
}

.search-box {
    position: relative;
}

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    width: 180px;
    padding: 8px 40px 8px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.rtl .search-box input {
    padding: 8px 15px 8px 40px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box input:focus {
    width: 220px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.rtl .search-box button {
    right: auto;
    left: 10px;
}

.search-box button:hover {
    color: var(--secondary);
}

/* =========================================
   Header - الترويسة
   ========================================= */

.header {
    background: var(--bg-primary);
    background-size: 100% 100%;
    background-position: top center;
    background-repeat: no-repeat;
    padding: 0;
    position: relative;
    min-height: 180px;
    height: 180px;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.header .container {
    position: relative;
    z-index: 2;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    height: 80px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-text span {
    font-size: 1.1rem;
    color: var(--secondary-light);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* =========================================
   News Ticker - شريط الأخبار المتحرك
   ========================================= */

.news-ticker {
    background: linear-gradient(135deg, var(--primary-dark), #0d1f33);
    padding: 0;
    overflow: hidden;
    margin-top: 0;
    /* Ensuring no overlap with header */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.news-ticker .container {
    padding: 0;
    max-width: 100%;
}

.ticker-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 45px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #c9302c, #e74c3c);
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

.ticker-label::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    border-style: solid;
    border-width: 22.5px 0 22.5px 15px;
    border-color: transparent transparent transparent #e74c3c;
}

.rtl .ticker-label::after {
    left: auto;
    right: 100%;
    border-width: 22.5px 15px 22.5px 0;
    border-color: transparent #e74c3c transparent transparent;
}

.ticker-label i {
    font-size: 1.1rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.ticker-scroll {
    display: flex;
    gap: 0;
    animation: ticker-scroll 120s linear infinite;
    white-space: nowrap;
}

.ticker-content:hover .ticker-scroll {
    animation-play-state: paused;
}

.rtl .ticker-scroll {
    animation: ticker-scroll-rtl 120s linear infinite;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes ticker-scroll-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
    padding: 0 40px;
    /* Replaces gap with padding for seamless loop */
}

.ticker-item:hover {
    color: var(--secondary-light);
}

.ticker-item i.fa-circle {
    font-size: 6px;
    color: var(--secondary);
}

/* =========================================
   Navigation - التنقل
   ========================================= */

.main-nav {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.nav-menu>li {
    position: relative;
}

.nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 20px;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-menu>li>a:hover::after,
.nav-menu>li>a.active::after {
    width: 80%;
}

.nav-menu>li>a:hover,
.nav-menu>li>a.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu>li>a i.fa-chevron-down {
    font-size: 0.7rem;
    transition: var(--transition);
}

.nav-menu>li:hover>a i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.ltr .dropdown {
    right: auto;
    left: 0;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.dropdown li:last-child a {
    border-bottom: none;
}

.dropdown li a:hover {
    background: var(--primary);
    color: var(--text-light);
    padding-right: 25px;
}

.ltr .dropdown li a:hover {
    padding-right: 20px;
    padding-left: 25px;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 600px;
    background: var(--bg-primary);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    padding: 25px;
    /* Scroll fix */
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) var(--bg-primary);
}

.mega-menu::-webkit-scrollbar {
    width: 6px;
}

.mega-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.mega-menu::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 3px;
}

.ltr .mega-menu {
    right: auto;
    left: 0;
}

.mega-menu-wide {
    min-width: 800px;
    right: 50%;
    transform: translateX(50%) translateY(10px);
}

.ltr .mega-menu-wide {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-mega-menu:hover .mega-menu-wide {
    transform: translateX(50%) translateY(0);
}

.ltr .has-mega-menu:hover .mega-menu-wide {
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.mega-col h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
}

.mega-col h4 a {
    color: var(--primary);
}

.mega-col h4 a:hover {
    color: var(--secondary-dark);
}

.mega-col a {
    display: block;
    padding: 8px 0;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.mega-col a::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.ltr .mega-col a::before {
    right: auto;
    left: -10px;
}

.mega-col a:hover {
    color: var(--primary);
    padding-right: 15px;
}

.ltr .mega-col a:hover {
    padding-right: 0;
    padding-left: 15px;
}

.mega-col a:hover::before {
    width: 8px;
}

/* Centers Grid */
.centers-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

.center-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
}

.center-link:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.center-link i {
    color: var(--secondary);
    font-size: 1.1rem;
}

.center-link:hover i {
    color: var(--text-light);
}

/* Branch Dropdown */
.center-branches-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 200;
    border: 1px solid var(--border-color);
}

.ltr .center-branches-dropdown {
    right: auto;
    left: 0;
}

.center-menu-item:hover .center-branches-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.branch-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.branch-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
    padding-right: 20px;
}

.ltr .branch-link:hover {
    padding-right: 15px;
    padding-left: 20px;
}

.branch-link i {
    font-size: 0.8rem;
    color: var(--secondary-dark);
}

/* =========================================
   Breaking News - الأخبار العاجلة
   ========================================= */

.breaking-news {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
    padding: 10px 0;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 20px;
    font-weight: 700;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.breaking-content {
    flex: 1;
    overflow: hidden;
}

.breaking-slider {
    display: flex;
    animation: breaking-scroll 15s linear infinite;
}

.breaking-slider a {
    white-space: nowrap;
    padding: 0 50px;
    color: var(--primary-dark);
    font-weight: 600;
}

.breaking-slider a:hover {
    color: var(--primary);
}

@keyframes breaking-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.rtl .breaking-slider {
    animation: breaking-scroll-rtl 15s linear infinite;
}

@keyframes breaking-scroll-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* =========================================
   Main Content - المحتوى الرئيسي
   ========================================= */

.main-content {
    min-height: 60vh;
    padding: 40px 0;
}

/* =========================================
   Cards - البطاقات
   ========================================= */

.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    max-width: 100%;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    background: var(--secondary);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.ltr .card-category {
    right: auto;
    left: 15px;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   Section Headers - عناوين الأقسام
   ========================================= */

.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-color);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.ltr .section-header::after {
    right: auto;
    left: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.section-title i {
    color: var(--secondary);
}

.section-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.section-link:hover {
    color: var(--secondary);
    transform: translateX(-5px);
}

.ltr .section-link:hover {
    transform: translateX(5px);
}

/* =========================================
   Footer - التذييل
   ========================================= */

.footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--text-light);
    margin-top: 50px;
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.footer-logo i {
    font-size: 4rem;
    color: var(--secondary);
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-light);
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-light);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary-light);
    transform: translateX(-5px);
}

.ltr .footer-col ul li a:hover {
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-info li i {
    color: var(--secondary);
    margin-top: 5px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-btn:hover {
    transform: translateY(-5px) rotate(360deg);
}

.social-btn.facebook:hover {
    background: #1877f2;
}

.social-btn.facebook:hover {
    background: #1877f2;
}

.social-btn.twitter:hover {
    background: #1da1f2;
}

.social-btn.youtube:hover {
    background: #ff0000;
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.telegram:hover {
    background: #0088cc;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   Back to Top - العودة للأعلى
   ========================================= */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.ltr .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* =========================================
   Responsive - التجاوب
   ========================================= */

/* === Large Desktop (< 1200px) === */
@media (max-width: 1200px) {
    .container {
        width: 96%;
    }

    .nav-menu>li>a {
        padding: 18px 14px;
        font-size: 0.9rem;
    }

    .mega-menu {
        min-width: 500px;
    }

    .mega-menu-wide {
        min-width: 650px;
    }

    .centers-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* === Tablet Landscape (< 992px) === */
@media (max-width: 992px) {

    .top-bar-left,
    .quick-links {
        display: none;
    }

    .top-bar-content {
        justify-content: center;
    }

    .header {
        min-height: 140px;
        height: 140px;
    }

    .logo-img {
        height: 65px;
    }

    .logo-text h1 {
        font-size: 1.6rem;
    }

    .logo-text span {
        font-size: 0.95rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 60px;
        padding-bottom: 30px;
        transition: var(--transition);
        overflow-y: auto;
        z-index: 1001;
    }

    .ltr .nav-menu {
        right: auto;
        left: -100%;
    }

    .nav-menu.active {
        right: 0;
    }

    .ltr .nav-menu.active {
        right: auto;
        left: 0;
    }

    .nav-menu>li>a {
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 20px;
    }

    .mega-menu,
    .dropdown {
        position: static;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        padding: 10px 20px;
        max-height: none;
    }

    .has-mega-menu:hover .mega-menu,
    .has-dropdown:hover .dropdown {
        display: none;
    }

    .has-mega-menu.open > .mega-menu,
    .has-dropdown.open > .dropdown {
        display: block;
        transform: none;
    }

    .has-mega-menu:hover .mega-menu-wide,
    .ltr .has-mega-menu:hover .mega-menu-wide {
        transform: none;
    }

    .has-mega-menu.open > .mega-menu-wide,
    .ltr .has-mega-menu.open > .mega-menu-wide {
        transform: none;
    }

    .mega-menu-wide,
    .ltr .mega-menu-wide {
        transform: none;
        right: auto;
        left: auto;
        min-width: 100%;
    }

    .center-branches-dropdown {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: rgba(0, 0, 0, 0.1);
        border-radius: var(--border-radius);
        padding: 5px 15px;
        border: none;
        margin-top: 5px;
    }

    .center-menu-item:hover .center-branches-dropdown {
        display: none;
    }

    .center-menu-item.open .center-branches-dropdown {
        display: block;
        transform: none;
    }

    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mega-col h4,
    .mega-col h4 a,
    .mega-col a,
    .dropdown li a {
        color: var(--text-light);
        font-weight: 400;
    }

    .mega-col h4,
    .mega-col h4 a {
        font-size: 0.95rem;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .mega-col a,
    .dropdown li a {
        font-size: 0.85rem;
    }

    .mega-col h4 a:hover,
    .mega-col a:hover {
        color: var(--secondary);
    }

    .dropdown li a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .centers-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .main-content {
        padding: 30px 0;
    }

    .section {
        margin-bottom: 35px;
    }
}

/* === Tablet Portrait (< 768px) === */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 12px;
    }

    .header {
        min-height: 120px;
        height: 120px;
    }

    .logo-img {
        height: 55px;
    }

    .logo-text h1 {
        font-size: 1.3rem;
    }

    .logo-text span {
        font-size: 0.85rem;
    }

    .logo {
        gap: 12px;
    }

    /* تذييل */
    .footer-top {
        padding: 40px 0 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }

    .footer-col ul li a {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-col h3 {
        font-size: 1.3rem;
    }

    .footer-col h4 {
        font-size: 1.1rem;
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
        text-align: center;
    }

    /* عناوين الأقسام */
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .section-header::after {
        right: 50%;
        transform: translateX(50%);
    }

    .ltr .section-header::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .section-title {
        font-size: 1.2rem;
        justify-content: center;
    }

    /* بطاقات */
    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 1rem;
    }

    /* شريط الأخبار */
    .ticker-label {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .ticker-item {
        font-size: 0.85rem;
        padding: 0 25px;
    }

    /* أزرار */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Mega Menu في الموبايل */
    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .centers-grid {
        grid-template-columns: 1fr !important;
    }

    /* شريط الأخبار العاجلة */
    .breaking-news .container {
        gap: 10px;
    }

    .breaking-label {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 20px 0;
    }

    .section {
        margin-bottom: 30px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }

    .ltr .back-to-top {
        right: auto;
        left: 20px;
    }
}

/* === Mobile Landscape (< 576px) === */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .top-bar {
        padding: 5px 0;
        font-size: 0.8rem;
    }

    .social-links {
        gap: 8px;
    }

    .social-links a {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .controls {
        gap: 8px;
    }

    .lang-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .search-box input {
        width: 120px;
        padding: 6px 32px 6px 10px;
        font-size: 0.8rem;
    }

    .rtl .search-box input {
        padding: 6px 10px 6px 32px;
    }

    .search-box input:focus {
        width: 150px;
    }

    .header {
        min-height: 100px;
        height: 100px;
    }

    .logo-img,
    .logo img {
        height: 45px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .logo-text span {
        font-size: 0.75rem;
    }

    .logo {
        gap: 10px;
    }

    .logo-placeholder {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .nav-menu {
        width: 85%;
        max-width: 300px;
    }

    /* تذييل */
    .footer-top {
        padding: 30px 0 20px;
    }

    .footer-grid {
        gap: 20px;
    }

    .footer-col h3 {
        font-size: 1.15rem;
    }

    .footer-col h4 {
        font-size: 1rem;
    }

    .footer-logo img {
        height: 70px;
    }

    .social-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .footer-bottom {
        padding: 15px 0;
        font-size: 0.85rem;
    }

    /* عناوين */
    .section-title {
        font-size: 1.1rem;
        gap: 8px;
    }

    .section-link {
        font-size: 0.85rem;
    }

    /* بطاقات */
    .card:hover {
        transform: translateY(-3px);
    }

    .card-meta {
        font-size: 0.8rem;
        gap: 10px;
    }

    /* أزرار */
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        gap: 5px;
    }

    .back-to-top {
        width: 38px;
        height: 38px;
        bottom: 15px;
        right: 15px;
        font-size: 0.9rem;
    }

    .ltr .back-to-top {
        right: auto;
        left: 15px;
    }
}

/* === Small Mobile (< 480px) === */
@media (max-width: 480px) {
    .header {
        min-height: 85px;
        height: 85px;
    }

    .logo-img,
    .logo img {
        height: 38px;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    .logo-text span {
        font-size: 0.7rem;
    }

    .logo {
        gap: 8px;
    }

    .ticker-wrapper {
        min-height: 38px;
    }

    .ticker-label {
        padding: 8px 10px;
        font-size: 0.78rem;
        gap: 5px;
    }

    .ticker-label::after {
        border-width: 19px 0 19px 10px;
    }

    .rtl .ticker-label::after {
        border-width: 19px 10px 19px 0;
    }

    .ticker-item {
        font-size: 0.8rem;
        padding: 0 20px;
    }

    .section-header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-excerpt {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 15px 0;
    }

    .section {
        margin-bottom: 25px;
    }

    .footer-col p {
        font-size: 0.9rem;
    }

    .footer-col ul li a {
        font-size: 0.9rem;
    }

    .breaking-label {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .breaking-slider a {
        padding: 0 25px;
        font-size: 0.85rem;
    }
}

/* =========================================
   Animations - الحركات
   ========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease forwards;
}

/* Stagger Animation */
.stagger>* {
    opacity: 0;
}

.stagger.animated>*:nth-child(1) {
    animation: fadeIn 0.5s ease 0.1s forwards;
}

.stagger.animated>*:nth-child(2) {
    animation: fadeIn 0.5s ease 0.2s forwards;
}

.stagger.animated>*:nth-child(3) {
    animation: fadeIn 0.5s ease 0.3s forwards;
}

.stagger.animated>*:nth-child(4) {
    animation: fadeIn 0.5s ease 0.4s forwards;
}

.stagger.animated>*:nth-child(5) {
    animation: fadeIn 0.5s ease 0.5s forwards;
}

.stagger.animated>*:nth-child(6) {
    animation: fadeIn 0.5s ease 0.6s forwards;
}

.stagger.animated>*:nth-child(7) {
    animation: fadeIn 0.5s ease 0.7s forwards;
}

.stagger.animated>*:nth-child(8) {
    animation: fadeIn 0.5s ease 0.8s forwards;
}

.stagger.animated>*:nth-child(9) {
    animation: fadeIn 0.5s ease 0.9s forwards;
}

.stagger.animated>*:nth-child(10) {
    animation: fadeIn 0.5s ease 1.0s forwards;
}

.stagger.animated>*:nth-child(11) {
    animation: fadeIn 0.5s ease 1.1s forwards;
}

.stagger.animated>*:nth-child(12) {
    animation: fadeIn 0.5s ease 1.2s forwards;
}

/* Catch all for remaining items to ensure visibility */
.stagger.animated>*:nth-child(n+13) {
    animation: fadeIn 0.5s ease 1.3s forwards;
}

/* =========================================
   Utilities - الخدمات
   ========================================= */

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

.mt-3 {
    margin-top: 30px;
}