/* Modern Theme for Almarifa - Premium Knowledge Portal */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --primary-color: #1B4D3E;
    /* Deep Emerald */
    --primary-light: #2E7D62;
    --primary-dark: #12352A;
    --accent-color: #D4AF37;
    /* Premium Gold */
    --accent-hover: #C5A028;
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #5F7181;
    --success: #27AE60;
    --warning: #F39C12;
    --error: #E74C3C;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* Spacing & Layout */
    --navbar-height: 80px;

    /* Extended Variables for Compatibility */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: #e2e8f0;
    --text-light: #64748b;
    --secondary-color: var(--accent-color);
    --success-color: var(--success);
    --danger-color: var(--error);
}

/* Global Typography */
body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

.brand-subtitle {
    font-family: 'Amiri', serif;
}

/* Modern Navbar */
.modern-navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.modern-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.modern-brand:hover .brand-logo img {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1.2;
}

.brand-subtitle {
    color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Nav items */
.modern-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-nav .nav-link:hover,
.modern-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 10px rgba(27, 77, 62, 0.2);
    transform: translateY(-2px);
}

.modern-nav .nav-icon {
    font-size: 1.1rem;
}

/* Buttons */
.btn-primary-theme {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(27, 77, 62, 0.3);
}

.btn-accent-theme {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ========================================
   ENHANCED TOP HEADER BAR
   Override legacy styles with !important
   ======================================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%) !important;
    color: white !important;
    padding: 10px 0 !important;
    font-size: 0.85rem !important;
    position: relative !important;
    overflow: hidden !important;
}

.site-header::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 200% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent) !important;
    animation: shimmer 4s infinite linear !important;
}

@keyframes shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.site-header p,
.site-header p a,
.site-header a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
}

.site-header a:hover {
    color: var(--accent-color) !important;
    text-decoration: none !important;
}

.site-header i {
    color: var(--accent-color) !important;
    font-size: 0.95rem !important;
}

.site-header .social-icon {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 0.4rem !important;
    text-align: right !important;
}

.site-header .social-icon-item {
    list-style: none !important;
}

.site-header .social-icon-link {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 0.8rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    line-height: 1 !important;
    margin-right: 0 !important;
}

.site-header .social-icon-link:hover {
    background: var(--accent-color) !important;
    color: var(--primary-dark) !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35) !important;
}

/* ========================================
   ENHANCED MODERN NAVBAR
   ======================================== */
.modern-navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(27, 77, 62, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.modern-navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.modern-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    padding: 0.5rem 0;
}

.brand-logo {
    position: relative;
}

.brand-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.modern-brand:hover .brand-logo::after {
    width: 100%;
}

.brand-logo img {
    height: 55px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(27, 77, 62, 0.15));
}

.modern-brand:hover .brand-logo img {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 4px 12px rgba(27, 77, 62, 0.25));
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Mobile Toggle - Override all conflicting styles */
/* Hide on desktop (992px and above) */
@media (min-width: 992px) {
    .navbar-toggler.modern-toggler,
    .modern-toggler {
        display: none !important;
    }
}

/* Show on mobile (below 992px) */
@media (max-width: 991.98px) {
    .navbar-toggler.modern-toggler,
    .modern-toggler {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        border: none !important;
        padding: 10px !important;
        background: rgba(27, 77, 62, 0.1) !important;
        cursor: pointer !important;
        border-radius: 8px !important;
        z-index: 1001 !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }
}

/* Override Bootstrap navbar-toggler-icon */
.modern-toggler .navbar-toggler-icon {
    display: none !important;
}

.modern-toggler:focus {
    outline: none !important;
    box-shadow: none !important;
}

.toggler-icon,
.modern-toggler .toggler-icon {
    display: block !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 3px !important;
    min-height: 3px !important;
    background-color: #1b4d3e !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.modern-toggler:hover {
    background: rgba(27, 77, 62, 0.15) !important;
}

.modern-toggler:hover .toggler-icon {
    background: var(--accent-color) !important;
}

.modern-toggler[aria-expanded="true"] .toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
}

.modern-toggler[aria-expanded="true"] .toggler-icon:nth-child(2) {
    opacity: 0 !important;
}

.modern-toggler[aria-expanded="true"] .toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px) !important;
}

/* Nav Items */
.modern-nav {
    gap: 0.25rem;
}

.modern-nav .nav-item {
    position: relative;
}

.modern-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* Hover effect - underline */
.modern-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px 3px 0 0;
    transition: width 0.3s ease;
}

/* Only show underline on hover, not active */
.modern-nav .nav-link:hover::before {
    width: 70%;
}

/* Active state - different style */
.modern-nav .nav-link.active::before {
    width: 80%;
    background: var(--accent-color);
}

/* Hover state - subtle background */
.modern-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(27, 77, 62, 0.06);
}

/* Active state - more prominent */
.modern-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(27, 77, 62, 0.1);
}

.modern-nav .nav-icon {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-nav .nav-link:hover .nav-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* ========================================
   ENHANCED FOOTER
   ======================================== */
.site-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a1f18 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding-top: 35px;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-light), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.site-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.footer-logo-box {
    text-align: center;
    margin-bottom: 1.5rem;
}

.footer-logo-box img {
    max-width: 100px;
    filter: brightness(1.1) drop-shadow(0 4px 20px rgba(212, 175, 55, 0.3));
    transition: all 0.3s ease;
}

.footer-logo-box:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2) drop-shadow(0 8px 30px rgba(212, 175, 55, 0.5));
}

.site-footer-title {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem !important;
    position: relative;
    padding-bottom: 10px;
}

.site-footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 3px;
}

[dir="rtl"] .site-footer-title::after {
    left: auto;
    right: 0;
    background: linear-gradient(90deg, transparent, var(--accent-color));
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-item {
    margin-bottom: 0.5rem;
}

.footer-menu-link {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-menu-link::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

[dir="rtl"] .footer-menu-link::before {
    content: '←';
    transform: translateX(10px);
}

.footer-menu-link:hover {
    color: var(--accent-color) !important;
    padding-left: 8px;
}

[dir="rtl"] .footer-menu-link:hover {
    padding-left: 0;
    padding-right: 8px;
}

.footer-menu-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.site-footer-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.site-footer-link:hover {
    color: var(--accent-color) !important;
}

.site-footer .text-white {
    font-size: 0.95rem;
    line-height: 1.6;
}

.site-footer .text-white i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 24px;
}

/* Footer Bottom */
.site-footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 18px 0;
    margin-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.copyright-text strong {
    color: var(--accent-color);
    font-weight: 700;
}

.copyright-text small {
    color: rgba(255, 255, 255, 0.5);
}

.site-footer-bottom .social-icon {
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer-bottom .social-icon-item {
    list-style: none;
}

.site-footer-bottom .social-icon-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white !important;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.site-footer-bottom .social-icon-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
}

.site-footer-bottom .social-icon-link:hover::before {
    width: 100%;
    height: 100%;
}

.site-footer-bottom .social-icon-link:hover {
    color: var(--primary-dark) !important;
    border-color: var(--accent-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rtl-dir {
    direction: rtl;
    text-align: right;
}

.rtl-dir .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.rtl-dir .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* ========================================
   COMPACT HERO SECTION FOR SUB-PAGES
   ======================================== */
.compact-hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 60px 0 40px;
    overflow: hidden;
}

.compact-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.compact-hero-bg .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.compact-hero-bg .hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.compact-hero-section .container {
    position: relative;
    z-index: 2;
}

.compact-hero-content {
    text-align: center;
}

.hero-breadcrumb {
    margin-bottom: 1rem;
}

.hero-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.hero-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-breadcrumb .breadcrumb-item a:hover {
    color: var(--accent-color);
}

.hero-breadcrumb .breadcrumb-item.active {
    color: white;
}

.hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.compact-hero-title {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.compact-hero-title i {
    color: var(--accent-color);
}

.compact-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin: 0;
}

/* ========================================
   UNIFIED SECTION STYLES
   ======================================== */
.section-padding {
    padding: 80px 0;
}

.section-bg {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.section-title {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* ========================================
   UNIFIED CARD STYLES
   ======================================== */
.service-card,
.value-card,
.program-card,
.vision-mission-card,
.facility-card-large,
.admin-card,
.testimonial-item,
.partner-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.service-card .service-icon,
.value-card .value-icon,
.program-card .program-icon,
.vision-mission-card .card-icon,
.facility-card-large .facility-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(27, 77, 62, 0.25);
}

.service-card .service-icon i,
.value-card .value-icon i,
.program-card .program-icon i,
.vision-mission-card .card-icon i,
.facility-card-large .facility-icon i {
    font-size: 1.8rem;
    color: white;
}

.service-card h5,
.value-card h4,
.program-card h4,
.vision-mission-card h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p,
.value-card p,
.program-card p,
.vision-mission-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Admin Cards */
.admin-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: start;
}

.admin-card.director-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.admin-card.director-card h3,
.admin-card.director-card h4 {
    color: white;
}

.admin-card.director-card p {
    color: rgba(255, 255, 255, 0.85);
}

.admin-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-avatar i {
    font-size: 2rem;
    color: white;
}

.admin-avatar .admin-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.director-card .admin-avatar {
    width: 120px;
    height: 120px;
    border: 4px solid var(--accent-color);
}

.admin-info h3,
.admin-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.admin-name {
    font-weight: 600;
    color: var(--accent-color) !important;
    margin-bottom: 0.5rem !important;
}

.admin-contact {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-color);
}

.director-card .contact-link {
    color: rgba(255, 255, 255, 0.9);
}

.director-card .contact-link:hover {
    color: var(--accent-color);
}

/* ========================================
   PARTNERS MARQUEE - Moving Row (Seamless)
   ======================================== */
.partnerships-section {
    overflow: hidden;
}

.partners-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    background: linear-gradient(180deg, rgba(27, 77, 62, 0.03) 0%, transparent 50%, rgba(27, 77, 62, 0.03) 100%);
}

.partners-marquee {
    display: flex;
    gap: 20px;
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* Fade edges */
.partners-marquee::before,
.partners-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.partners-marquee::before {
    left: 0;
    background: linear-gradient(to right, white 0%, transparent 100%);
}

.partners-marquee::after {
    right: 0;
    background: linear-gradient(to left, white 0%, transparent 100%);
}

.partners-track {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
    animation: infiniteScroll 30s linear infinite;
}

.partners-marquee:hover .partners-track {
    animation-play-state: paused;
}

.partner-slide {
    flex-shrink: 0;
    width: 260px;
}

/* Seamless infinite scroll - each track moves 100% of its width */
@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* RTL Support */
[dir="rtl"] .partners-track {
    animation-name: infiniteScrollRTL;
}

@keyframes infiniteScrollRTL {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

.partner-card-marquee {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(27, 77, 62, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.partner-card-marquee:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(27, 77, 62, 0.15);
    border-color: var(--primary-color);
}

.partner-logo-marquee {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), rgba(27, 77, 62, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.partner-logo-marquee img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
}

.partner-logo-marquee i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.partner-card-marquee h5 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.partner-type-badge {
    display: inline-block;
    background: rgba(27, 77, 62, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Marquee */
@media (max-width: 768px) {
    .partner-slide {
        width: 200px;
    }
    
    .partner-card-marquee {
        padding: 1rem;
    }
    
    .partner-logo-marquee {
        width: 60px;
        height: 60px;
    }
    
    .partner-logo-marquee img {
        width: 50px;
        height: 50px;
    }
    
    .partner-logo-marquee i {
        font-size: 2rem;
    }
    
    .partner-card-marquee h5 {
        font-size: 0.9rem;
    }
}

/* Timeline - Legacy */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.timeline-marker {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid var(--surface-color);
    box-shadow: var(--shadow);
    z-index: 2;
}

.timeline-content {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin-left: 2rem;
}

.timeline-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   MODERN TIMELINE - History Section
   ======================================== */
.history-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.history-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231b4d3e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(27, 77, 62, 0.25);
}

.section-badge i {
    font-size: 1rem;
}

.timeline-modern {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color), var(--primary-light));
    transform: translateX(-50%);
    border-radius: 4px;
}

.timeline-item-modern {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    padding-left: 55%;
}

.timeline-item-modern.alt {
    flex-direction: row-reverse;
    padding-left: 0;
    padding-right: 55%;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(27, 77, 62, 0.35);
    z-index: 3;
    border: 4px solid white;
    transition: all 0.3s ease;
}

.timeline-item-modern:hover .timeline-icon {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(27, 77, 62, 0.45);
}

.timeline-year {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -25px;
    background: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    z-index: 4;
}

.timeline-card {
    background: white;
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(27, 77, 62, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.timeline-item-modern:hover .timeline-card::before {
    transform: scaleX(1);
}

.timeline-item-modern:hover .timeline-card {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.timeline-card-header {
    margin-bottom: 0.75rem;
}

.timeline-date {
    display: inline-block;
    background: rgba(27, 77, 62, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.timeline-card h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* RTL Support for Timeline */
[dir="rtl"] .timeline-item-modern {
    padding-left: 0;
    padding-right: 55%;
}

[dir="rtl"] .timeline-item-modern.alt {
    padding-right: 0;
    padding-left: 55%;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item-modern,
    .timeline-item-modern.alt {
        padding-left: 80px;
        padding-right: 0;
        flex-direction: row;
    }
    
    .timeline-icon {
        left: 30px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-year {
        left: 30px;
        font-size: 0.75rem;
    }
    
    .timeline-card {
        padding: 1.25rem;
    }
    
    .timeline-card h4 {
        font-size: 1.1rem;
    }
    
    [dir="rtl"] .timeline-line {
        left: auto;
        right: 30px;
    }
    
    [dir="rtl"] .timeline-item-modern,
    [dir="rtl"] .timeline-item-modern.alt {
        padding-left: 0;
        padding-right: 80px;
    }
    
    [dir="rtl"] .timeline-icon,
    [dir="rtl"] .timeline-year {
        left: auto;
        right: 30px;
    }
}

/* Feature Tags */
.feature-tag {
    display: inline-block;
    background: rgba(27, 77, 62, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.25rem;
}

/* Language Selector */
.language-selector {
    background: var(--surface-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector:hover,
.language-selector:focus {
    background: var(--primary-color);
    color: white;
    outline: none;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .site-header .row {
        text-align: center;
    }
    
    .site-header .col-lg-8 {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .site-header .social-icon {
        justify-content: center;
    }
    
    .modern-navbar {
        padding: 0.5rem 0;
    }
    
    /* Ensure toggler is visible on mobile */
    .modern-toggler,
    .navbar-toggler.modern-toggler {
        display: flex !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .toggler-icon {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .modern-brand {
        gap: 10px;
    }
    
    .brand-logo img {
        height: 45px;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.65rem;
    }
    
    .modern-nav {
        padding: 1rem 0;
        background: white;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }
    
    .modern-nav .nav-link {
        justify-content: center;
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .modern-nav .nav-link::before {
        display: none;
    }
    
    .modern-nav .nav-link:hover,
    .modern-nav .nav-link.active {
        background: var(--primary-color);
        color: white !important;
    }
    
    .modern-nav .nav-link:hover .nav-icon {
        color: white;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 0;
        font-size: 0.8rem;
    }
    
    .site-header p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem !important;
    }
    
    .site-header .social-icon-link {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .compact-hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .site-footer {
        padding-top: 50px;
    }
    
    .site-footer-title {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .site-footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    [dir="rtl"] .site-footer-title::after {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }
    
    .footer-menu {
        text-align: center;
    }
    
    .footer-menu-link {
        justify-content: center;
    }
    
    .footer-menu-link::before {
        display: none;
    }
    
    .site-footer .text-white {
        justify-content: center;
        text-align: center;
    }
    
    .site-footer-bottom {
        text-align: center;
        padding: 20px 0;
    }
    
    .site-footer-bottom .social-icon {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .site-footer-bottom .social-icon-link {
        width: 36px;
        height: 36px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        justify-content: flex-start;
        padding-left: 40px;
    }
    
    .timeline-marker {
        position: absolute;
        left: 10px;
    }
    
    .timeline-content {
        margin-left: 0;
    }
    
    .admin-card {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-avatar {
        margin: 0 auto;
    }
    
    .admin-contact {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .site-header .col-lg-8 {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .site-header p {
        font-size: 0.75rem;
    }
    
    .brand-text {
        display: none;
    }
    
    .brand-logo img {
        height: 50px;
    }
    
    .site-footer {
        padding-top: 40px;
    }
    
    .footer-logo-box img {
        max-width: 80px;
    }
    
    .site-footer-bottom .social-icon-link {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .copyright-text {
        font-size: 0.8rem;
    }
}

/* RTL Responsive Adjustments */
[dir="rtl"] .site-header .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .footer-menu-link:hover {
    padding-right: 8px;
    padding-left: 0;
}

/* Print Styles for Footer */
@media print {
    .site-header,
    .modern-navbar,
    .site-footer-bottom .social-icon {
        display: none;
    }
    
    .site-footer {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }
}

/* ========================================
   TRAINING CENTER - About Section
   ======================================== */
.about-image {
    position: relative;
    border-radius: 1rem;
    /* overflow: visible to show the floating badge */
    overflow: visible; 
}

.floating-badge {
    position: absolute;
    bottom: 30px;
    right: -20px; /* Aligns to right in LTR, needs flip for RTL */
    background: linear-gradient(135deg, var(--accent-color), #d4af37);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    border: 4px solid white;
    z-index: 2;
    transition: all 0.3s ease;
}

[dir="rtl"] .floating-badge {
    right: auto;
    left: -20px;
}

.floating-badge:hover {
    transform: translateY(-5px) scale(1.05);
}

.director-quote {
    position: relative;
    box-shadow: 0 10px 30px rgba(27, 77, 62, 0.05);
    background: #fff !important;
}

.director-quote blockquote p {
    color: var(--primary-dark);
}

@media (max-width: 991px) {
    .floating-badge {
        position: relative;
        right: auto !important;
        left: auto !important;
        bottom: auto;
        margin-top: -30px;
        margin-left: auto;
        margin-right: auto;
        max-width: 200px;
        transform: none !important;
    }
}

/* Custom Accordion */
.custom-accordion .accordion-button {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    box-shadow: none;
    padding: 1.25rem;
}

.custom-accordion .accordion-button:not(.collapsed) {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.custom-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

/* ========================================
   HOME PAGE - Testimonials Section (Redesign)
   ======================================== */
.testimonials-section {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
    padding: 5rem 0;
}

/* Background Pattern Decoration */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(#1B4D3E 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
}

.testimonial-item {
    padding: 3.5rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.05);
    margin: 1.5rem auto; /* extra margin for shadow */
    max-width: 850px;
    min-height: 480px; /* Increased height for better spacing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: none;
    z-index: 1;
}

/* Huge Quote Icon Background */
.quote-icon {
    font-size: 4rem;
    color: var(--primary-light);
    opacity: 0.3;
    margin-bottom: 1rem;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.35rem; /* Larger font */
    line-height: 1.8;
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 2.5rem;
    font-style: normal; /* Cleaner look */
    max-width: 700px; /* Optimal reading width */
}

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: right;
    background: rgba(var(--primary-rgb), 0.03);
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.03);
}

[dir="rtl"] .testimonial-meta {
    text-align: right;
}

.testimonial-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.testimonial-name {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.testimonial-position {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.testimonial-rating {
    display: flex;
    gap: 3px;
    font-size: 0.8rem;
}

/* ---------- BUTTONS (High Visibility Fix) ---------- */
#testimonial-carousel .carousel-control-prev,
#testimonial-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: #1B4D3E !important; /* Force Dark Green */
    border-radius: 50%;
    opacity: 1 !important; /* No transparency */
    z-index: 100 !important; /* Force on top */
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 4px solid white; /* White border for contrast */
    box-shadow: 0 10px 25px rgba(27, 77, 62, 0.25);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Icons inside buttons */
#testimonial-carousel .carousel-control-prev i,
#testimonial-carousel .carousel-control-next i {
    color: #ffffff !important;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Hover Effects */
#testimonial-carousel .carousel-control-prev:hover,
#testimonial-carousel .carousel-control-next:hover {
    background-color: #143d30 !important;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 15px 35px rgba(27, 77, 62, 0.35);
}

/* Desktop Positioning */
@media (min-width: 992px) {
    #testimonial-carousel .carousel-control-prev {
        left: -80px;
    }
    #testimonial-carousel .carousel-control-next {
        right: -80px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .testimonial-item {
        padding: 2rem 1.5rem;
        min-height: auto; /* Allow flexible height on mobile */
    }
    
    .testimonial-text {
        font-size: 1.1rem;
    }
    
    .testimonial-meta {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1.5rem;
        border-radius: 16px;
        width: 100%;
    }
    
    .testimonial-info {
        align-items: center;
    }
    
    /* Move buttons to bottom on mobile so they don't cover text */
    #testimonial-carousel .carousel-controls-wrapper {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 20px;
    }
    
    #testimonial-carousel .carousel-control-prev,
    #testimonial-carousel .carousel-control-next {
        position: absolute;
        top: auto;
        bottom: -30px; /* Hang slightly below */
        transform: none;
        width: 50px;
        height: 50px;
    }

    #testimonial-carousel .carousel-control-prev {
        left: 0;
    }

    #testimonial-carousel .carousel-control-next {
        right: 0;
    }
}

.testimonial-position {
    color: var(--text-secondary);
    font-weight: 500;
}