:root {
    --font-ar: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Q. AL-ZAHRA Brand Palette */
    --primary-forest: #043830;
    --primary-forest-dark: #032822;
    --primary-forest-light: #0a5c4e;
    --emerald-green: #0a5c4e;
    --emerald-dark: #043830;
    --emerald-tint: #e8f3f1;
    
    --accent-rose: #fd7591;
    --accent-rose-hover: #e85a76;
    --accent-rose-light: #fda8b8;
    --rose-tint: #fff1f4;
    
    --dark-midnight: #043830;
    --dark-forest: #032c26;
    --dark-slate: #032822;
    --slate-900: #043830;
    --slate-800: #032c26;
    --slate-100: #eef4f3;
    --slate-50: #f4f8f7;
    
    --primary-gradient: linear-gradient(135deg, #043830 0%, #0a5c4e 100%);
    --creative-gradient: linear-gradient(135deg, #043830 0%, #fd7591 100%);
    --rose-gradient: linear-gradient(135deg, #fd7591 0%, #e85a76 100%);
    --orange-gradient: linear-gradient(135deg, #fd7591 0%, #e85a76 100%);
    --emerald-gradient: linear-gradient(135deg, #043830 0%, #0a5c4e 100%);
    --dark-gradient: linear-gradient(135deg, #043830 0%, #032822 100%);
}

body {
    font-family: var(--font-ar);
    background-color: var(--slate-50);
    color: #1a2e26;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[lang="en"] body {
    font-family: var(--font-en);
}

footer {
    margin-top: auto;
}

/* Gradients & Backgrounds */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.bg-gradient-orange,
.bg-gradient-rose {
    background: var(--rose-gradient) !important;
}

.bg-gradient-emerald {
    background: var(--emerald-gradient) !important;
}

.bg-gradient-dark {
    background: var(--dark-gradient) !important;
}

/* Navbar */
.glass-navbar {
    background: rgba(4, 56, 48, 0.96) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-icon {
    background: var(--primary-gradient);
    box-shadow: 0 4px 14px rgba(4, 56, 48, 0.4);
}

/* Hero Section */
.hero-section {
    background: var(--dark-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-glow {
    position: absolute;
    top: -20%;
    left: 25%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(10, 92, 78, 0.28) 0%, rgba(253, 117, 145, 0.18) 40%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(65px);
    pointer-events: none;
}

.pass-preview-glow {
    position: absolute;
    inset: -12px;
    background: linear-gradient(135deg, rgba(4, 56, 48, 0.6), rgba(253, 117, 145, 0.4));
    border-radius: 28px;
    filter: blur(18px);
    z-index: 0;
}

.lecturer-portrait-wrap {
    display: inline-block;
}

.lecturer-portrait {
    width: 168px;
    height: 210px;
    object-fit: cover;
    object-position: center 12%;
    border-radius: 18px;
    border: 3px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    background: #0a5c4e;
}

/* Buttons */
.btn-primary {
    background: var(--primary-forest);
    border-color: var(--primary-forest);
    color: #ffffff;
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-forest-light);
    border-color: var(--primary-forest-light);
    color: #ffffff;
}

.btn-accent-orange,
.btn-accent-rose {
    background: var(--rose-gradient);
    border: none;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(253, 117, 145, 0.35);
}

.btn-accent-orange:hover,
.btn-accent-rose:hover {
    background: var(--accent-rose-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(253, 117, 145, 0.45);
}

/* Cards & Interaction */
.workshop-card {
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.workshop-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(4, 56, 48, 0.15) !important;
    border-color: rgba(253, 117, 145, 0.4) !important;
}

.feature-box {
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(4, 56, 48, 0.08);
}

.badge-edu-track {
    background-color: var(--emerald-tint);
    color: var(--primary-forest);
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
}

.badge-cert {
    background-color: var(--rose-tint);
    color: var(--accent-rose);
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
}

.hover-white:hover {
    color: #ffffff !important;
}

.hover-primary:hover {
    color: #fd7591 !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

/* Scanner Reticle & Laser */
.scanner-laser-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fd7591, transparent);
    box-shadow: 0 0 15px #fd7591;
    animation: scanLaser 2s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanLaser {
    0% { top: 18%; }
    100% { top: 82%; }
}

.fw-extrabold { font-weight: 800 !important; }
.tracking-tight { letter-spacing: -0.03em; }
.line-height-tight { line-height: 1.15; }
.max-w-700 { max-width: 700px; }
.transition-all { transition: all 0.22s ease; }

.admin-sidebar {
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-sidebar-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-inline-end: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.55) transparent;
}

.admin-sidebar-scroll::-webkit-scrollbar { width: 6px; }
.admin-sidebar-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 10px; }
.admin-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 10px;
}

@media (min-width: 992px) {
    .admin-sidebar-col {
        position: sticky;
        top: 85px;
        height: calc(100vh - 105px);
        max-height: calc(100vh - 105px);
        align-self: flex-start;
        flex: 0 0 280px !important;
        max-width: 280px !important;
        width: 280px !important;
        overflow: hidden;
    }
    .admin-sidebar {
        height: 100%;
        max-height: 100%;
        min-height: 0;
    }
    .row > .admin-sidebar-col + [class*="col-"] {
        flex: 1 1 0 !important;
        max-width: calc(100% - 280px) !important;
        width: auto !important;
    }
}

.sidebar-nav .nav-link {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.84rem;
    line-height: 1.35;
    margin-bottom: 1px;
    white-space: nowrap;
    padding-top: 0.42rem !important;
    padding-bottom: 0.42rem !important;
    padding-inline: 0.7rem !important;
}

.sidebar-nav .nav-link i {
    font-size: 1rem !important;
    flex-shrink: 0;
    margin-inline-end: 0.45rem !important;
}

.sidebar-nav .nav-link > div {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-nav .nav-link span:not(.badge) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav .nav-link .badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    padding: 0.18rem 0.45rem;
}

.text-accent-rose {
    color: var(--accent-rose) !important;
}

.bg-accent-rose {
    background-color: var(--accent-rose) !important;
}

/* Admin sidebar */
.sidebar-nav .nav-link:hover {
    color: #ffffff !important;
}

.sidebar-nav .nav-link.active {
    background: var(--rose-gradient) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(253, 117, 145, 0.4) !important;
}

.pulse-warning {
    animation: pulseWarning 1.8s infinite;
}

@keyframes pulseWarning {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 117, 145, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(253, 117, 145, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 117, 145, 0); }
}

.hover-lift {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(4, 56, 48, 0.1) !important;
}

.dashboard-search-input {
    background: #f4f8f7;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.1rem;
    transition: all 0.2s ease;
}

.dashboard-search-input:focus {
    background: #ffffff;
    border-color: var(--primary-forest-light);
    box-shadow: 0 0 0 3px rgba(4, 56, 48, 0.18);
}

/* Site ads — featured banners */
.site-ads-section {
    background: linear-gradient(180deg, #043830 0%, #032822 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-ads-section .site-ads-kicker {
    letter-spacing: 0.08em;
}

.site-ad-banner {
    display: block;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    text-decoration: none;
    color: inherit;
}

.site-ad-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 2.25rem 2rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(253, 117, 145, 0.16), transparent 42%),
        linear-gradient(135deg, #043830 0%, #032c26 100%);
}

.site-ad-visual img {
    max-width: min(520px, 88%);
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25));
    transition: transform 0.35s ease;
}

.site-ad-banner:hover .site-ad-visual img {
    transform: scale(1.04);
}

.site-ad-banner-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid rgba(4, 56, 48, 0.08);
}

.site-ad-banner-copy h3 {
    color: #043830;
    font-weight: 800;
    margin: 0;
}

.site-ads-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.site-ads-carousel .carousel-indicators .active {
    background: #fd7591;
}

.site-ads-carousel .carousel-control-prev,
.site-ads-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    border-radius: 50%;
    background: rgba(4, 56, 48, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.site-ads-carousel .carousel-control-prev { inset-inline-start: 12px; }
.site-ads-carousel .carousel-control-next { inset-inline-end: 12px; }

/* Sponsors — logo trust strip */
.site-sponsors-section {
    background: #f4f8f7;
    border-top: 1px solid rgba(4, 56, 48, 0.06);
}

.site-sponsors-heading {
    position: relative;
}

.site-sponsors-heading::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #043830, #fd7591);
}

.sponsor-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 2.25rem 1.75rem 1.75rem;
    background: #ffffff;
    border: 1px solid rgba(4, 56, 48, 0.08);
    border-radius: 28px;
    box-shadow: 0 10px 28px rgba(4, 56, 48, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sponsor-logo-card img {
    max-width: 86%;
    height: 150px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.78;
    transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.sponsor-logo-card:hover {
    transform: translateY(-4px);
    border-color: rgba(4, 56, 48, 0.2);
    box-shadow: 0 16px 34px rgba(4, 56, 48, 0.1);
}

.sponsor-logo-card:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.04);
}

.sponsor-logo-card span {
    margin-top: 1.15rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #043830;
    text-align: center;
}

.text-primary { color: #043830 !important; }
.bg-primary { background-color: #043830 !important; }
.border-primary { border-color: #043830 !important; }
.link-primary, a.text-primary { color: #043830 !important; }

/* Bill-reference payment */
.billpay-page {
    background:
        radial-gradient(1200px 400px at 100% -10%, rgba(253, 117, 145, 0.12), transparent 50%),
        radial-gradient(900px 360px at -10% 110%, rgba(4, 56, 48, 0.08), transparent 46%),
        var(--slate-50);
    padding: 2rem 0 4rem;
}
.billpay-shell { max-width: 560px; margin: 0 auto; }
.billpay-card {
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(4, 56, 48, 0.1);
    overflow: hidden;
}
.billpay-hero {
    background: var(--primary-gradient);
    color: #fff;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
}
.billpay-hero::after {
    content: '';
    position: absolute;
    inset: auto -20% -40px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
}
.billpay-wait {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    margin-bottom: 0.85rem;
}
.billpay-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #86efac;
    animation: billpay-pulse 1.6s ease-in-out infinite;
}
@keyframes billpay-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.billpay-ref {
    font-family: ui-monospace, 'Courier New', monospace;
    font-size: clamp(1.55rem, 6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #fde68a;
    direction: ltr;
    word-break: break-all;
    margin: 0.35rem 0 1rem;
}
.billpay-copy {
    background: #fff;
    color: #043830;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    padding: 0.55rem 1.35rem;
    position: relative;
    z-index: 1;
}
.billpay-copy.copied { background: #fd7591; color: #fff; }
.billpay-body { padding: 1.5rem 1.4rem 1.75rem; }
.billpay-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--emerald-tint);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.15rem;
}
.billpay-steps { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.billpay-steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.7rem 0;
    border-bottom: 1px dashed #e6eeec;
    color: #24443c;
}
.billpay-steps li:last-child { border-bottom: 0; }
.billpay-steps span {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}
.billpay-check {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--rose-gradient);
    color: #fff;
    font-weight: 800;
    padding: 0.95rem 1.25rem;
    box-shadow: 0 10px 24px rgba(253, 117, 145, 0.32);
}
.billpay-check:disabled { opacity: 0.7; }
.checkout-bill-preview {
    background: var(--primary-gradient);
    border-radius: 22px;
    color: #fff;
    padding: 1.4rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .site-ad-banner {
        border-radius: 20px;
    }
    .site-ad-visual {
        min-height: 200px;
        padding: 1.5rem 1.15rem;
    }
    .site-ad-visual img {
        max-height: 120px;
    }
    .site-ad-banner-copy {
        flex-direction: column;
        align-items: flex-start;
    }
    .sponsor-logo-card {
        min-height: 220px;
        padding: 1.75rem 1.25rem 1.4rem;
    }
    .sponsor-logo-card img {
        height: 110px;
    }
}
