@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&family=Noto+Sans+Arabic:wght@300;400;600;800&display=swap');

:root {
    --bg: #fdfcfc;
    --text: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.3);
    --divider: rgba(0, 0, 0, 0.05);
    --surface: #f1f5f9;
    --primary: #6366f1; /* Indigo 500 */
    --primary-dark: #4f46e5;
    --on-primary: #ffffff;
    --accent: #10b981; /* Emerald 500 */
    --accent-glow: rgba(16, 185, 129, 0.3);
    --message-bot-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --error: #ef4444;
    --brand: #6366f1;
    --brand-hover: #818cf8;
    --muted: #64748b;
    --blue: #3b82f6;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 12px;
}

/* Advanced Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blurIn {
    from { filter: blur(20px); opacity: 0; transform: scale(0.9); }
    to { filter: blur(0); opacity: 1; transform: scale(1); }
}

@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.6); }
    100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.2); }
}

.animate-fade {
    animation: fadeIn var(--transition-slow) forwards;
}

.animate-blur {
    animation: blurIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-blob {
    animation: blob 7s infinite alternate;
}

.gradient-text {
    background: linear-gradient(-45deg, #6366f1, #10b981, #3b82f6, #6366f1);
    background-size: 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 8s ease infinite;
    font-weight: 800;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Dark mode Overrides */
[data-theme="dark"] {
    --bg: #020617; /* Slate 950 */
    --text: #f8fafc;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --surface: #0f172a;
    --divider: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --muted: #94a3b8;
}

/* Button & UI Overhaul */
button, .btn {
    border-radius: var(--radius-full);
    padding: 12px 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary, #portal-btn, #apply-btn, .computer-btn, .btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.39);
}

.btn-primary:hover, #portal-btn:hover, #apply-btn:hover, .btn:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--divider);
}

.btn-secondary:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#theme-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

#lang-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-weight: 700;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.1), transparent),
                radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.1), transparent);
}

/* Floating Blobs (Background) */
.blob-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    animation: blob 10s infinite alternate;
}

.blob-1 { top: -100px; left: -100px; animation-delay: 0s; }
.blob-2 { bottom: -150px; right: -100px; animation-delay: -2s; background: var(--blue); }
.blob-3 { top: 40%; left: 60%; width: 300px; height: 300px; background: var(--accent); opacity: 0.1; }

/* Tier Cards */
.tier {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.tier-image img {
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.tier:hover .tier-image img {
    transform: scale(1.1) rotate(1deg);
}

.computer-btn {
    width: 100%;
    border-radius: 0;
    padding: 2rem 1.5rem;
    background: transparent;
    color: var(--text);
    display: block;
    box-shadow: none;
}

.computer-btn h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.computer-btn p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-card {
    border-radius: var(--radius-md);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.news-video {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.media-card:hover .card-video {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.media-card:hover .video-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.news-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-body {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

.news-tag {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Typography */
body {
    font-family: 'Poppins', 'Noto Sans Arabic', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    letter-spacing: -0.03em;
}

p {
    color: var(--muted);
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    font-weight: 600;
    color: var(--text);
    transition: transform 0.3s ease;
}

.feature-list li:hover {
    transform: translateX(10px);
    background: white;
}

.section-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-link {
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--primary);
    color: white;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.1s linear;
    stroke-dasharray: 138.23; /* 2 * PI * r */
    stroke-dashoffset: 138.23;
}

.back-to-top .arrow {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Typewriter Effect */
.typewriter-text {
    display: inline-block;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    width: 0;
    animation: typing 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

/* Floating Particles */
.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0.2;
    animation: float-particle 15s infinite linear;
}

@keyframes float-particle {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.2; }
    90% { opacity: 0.2; }
    100% { transform: translate(var(--x), var(--y)) rotate(360deg); opacity: 0; }
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 99999;
}

[data-theme="dark"] body::before {
    opacity: 0.04;
}

/* Floating Glass Shapes */
.glass-shape {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    pointer-events: none;
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.shape-1 { width: 100px; height: 100px; top: 10%; left: 10%; animation-delay: 0s; transform: rotate(15deg); }
.shape-2 { width: 150px; height: 150px; bottom: 20%; right: 15%; animation-delay: -3s; transform: rotate(-20deg); border-radius: 50%; }
.shape-3 { width: 80px; height: 80px; top: 40%; right: 20%; animation-delay: -6s; transform: rotate(45deg); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Announcement Marquee */
.marquee-container {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    z-index: 1002;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    padding: 0 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Card Shine Effect */
.glass-card {
    position: relative;
    overflow: hidden;
}

.card-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 100px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.2), transparent 80%);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-card:hover .card-shine {
    opacity: 1;
}

/* Background Grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(var(--divider) 1px, transparent 1px),
                      linear-gradient(90deg, var(--divider) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    opacity: 0.3;
    pointer-events: none;
}

/* Magnetic Text */
.magnetic-text {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Interactive Background Particles */
.interactive-particle {
    position: fixed;
    pointer-events: none;
    background: radial-gradient(circle, var(--primary), transparent);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
    transition: transform 0.1s ease-out;
}

/* Infinite Logo Slider */
.logo-slider {
    padding: 4rem 0;
    background: var(--surface);
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}

.logo-track {
    display: flex;
    width: calc(250px * 12);
    animation: scroll-logos 30s linear infinite;
}

.logo-item {
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.logo-item:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

.logo-item span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--muted);
}

@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 6)); }
}

/* Glass Morphism Navigation Scroll Effect */
.nav-scrolled {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 10px 0 !important;
}

/* Cursor Trail Dots */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease-out, opacity 0.3s ease-out;
    opacity: 0.5;
}

/* Floating Tech Icons */
.floating-icon {
    position: fixed;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
    transition: transform 0.2s ease-out;
}

/* Futuristic Footer */
.futuristic-footer {
    background: var(--surface);
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--divider);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
}

.footer-section h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--divider);
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

/* Spotlight Effect Overlay */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle 150px at var(--x) var(--y), rgba(99, 102, 241, 0.08), transparent 80%);
}

/* Button Glow on Active */
button:active, .btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px var(--primary);
}

/* Magnetic Button Wrapper */
.magnetic-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Page Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.loader-circle {
    width: 80px;
    height: 80px;
    border: 4px solid var(--divider);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1.5s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Mouse Cursor */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100000;
    transition: transform 0.1s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100001;
    transform: translate(-50%, -50%);
}

.custom-cursor.active {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
}

/* Hide default cursor on desktop */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    a, button, .nav-link, .tier, .news-card {
        cursor: none;
    }
}

/* Dynamic Blob Colors */
.blob.cs-hover { background: #3b82f6; filter: blur(60px); opacity: 0.3; }
.blob.admin-hover { background: #8b5cf6; filter: blur(60px); opacity: 0.3; }
.blob.biz-hover { background: #f59e0b; filter: blur(60px); opacity: 0.3; }

/* 3D Tilt Effect on Cards */
.tier, .news-card, .portal-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.tier:hover, .news-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* Sidebar & Portal Updates */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
}

.nav-item {
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.portal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stat-value.big {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    z-index: 10001;
    transition: width 0.1s ease-out;
}

/* Stats Section Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stat-item {
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--muted);
}

/* Custom Context Menu Styles */
.context-menu {
    position: fixed;
    display: none;
    z-index: 1000000;
    min-width: 220px;
    padding: 10px;
    border-radius: var(--radius-md);
    animation: contextFadeIn 0.2s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes contextFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.context-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.context-divider {
    height: 1px;
    background: var(--divider);
    margin: 8px 5px;
}

/* Social Sidebar Styles */
.social-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Click Ripple Effect */
.ripple {
    position: fixed;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    animation: rippleEffect 0.8s ease-out forwards;
}

@keyframes rippleEffect {
    0% { width: 0; height: 0; opacity: 1; border: 2px solid var(--primary); }
    100% { width: 150px; height: 150px; opacity: 0; border: 1px solid var(--accent); }
}

/* Text Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
    5% { clip: rect(70px, 9999px, 71px, 0); transform: skew(0.12deg); }
    /* ... more frames ... */
    100% { clip: rect(67px, 9999px, 62px, 0); transform: skew(0.2deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); transform: skew(0.1deg); }
    5% { clip: rect(52px, 9999px, 15px, 0); transform: skew(0.95deg); }
    /* ... more frames ... */
    100% { clip: rect(13px, 9999px, 50px, 0); transform: skew(0.4deg); }
}

/* Simplified glitch for better performance */
.glitch-simple:hover {
    animation: glitch-simple-anim 0.3s cubic-bezier(.25,.46,.45,.94) both infinite;
}

@keyframes glitch-simple-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Section Transitions */
.section {
    transition: transform 1s cubic-bezier(0.2, 1, 0.3, 1), opacity 1s ease;
}

.section-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 1rem;
}

/* Parallax Background Blob Enhancement */
.blob {
    transition: transform 0.2s ease-out;
}

/* General Reset and Base Styles */
#lang-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    text-transform: uppercase;
}

.flag-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 64px;
    height: 44px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadow-color);
    overflow: hidden;
}

.flag-btn svg {
    display: block;
    width: 100%;
    height: 100%;
}

.flag-btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

body {
    font-family: 'Poppins', 'Noto Sans Arabic', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
}

/* Marketing Section Styles */
.hero {
     background: url('viber_image_2022-11-30_11-55-37-844-e1670156336633.jpg');
  background-repeat: no-repeat;
    background-size: cover; 
  background-position: center; 
  
    color: var(--text);
    padding: 100px 5%;
    text-align: center;
}
.hero h1 {
    font-size: 2.5em;
}
.hero button {
    padding: 12px 25px;
    background-color: var(--accent);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
}
#theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 10px 14px;
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.95em;
    box-shadow: 0 2px 6px var(--shadow-color);
    z-index: 1001;
}
.hero-title {
    display: block;
}
.hero-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.hero #lang-toggle {
    position: static;
    display: inline-block;
    margin-top: 0;
    padding: 10px 14px;
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.95em;
    box-shadow: 0 2px 6px var(--shadow-color);
}
/* Login Section */
.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 4px 8px var(--shadow-color);
}
.login-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.login-controls input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text);
}
.login-button {
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    cursor: pointer;
}
.login-message {
    margin-top: 12px;
    font-weight: 600;
}
.login-message.success {
    color: var(--accent);
}
.login-message.error {
    color: var(--error);
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px var(--shadow-color);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}
.auth-media {
    position: relative;
    background: radial-gradient(1000px 1000px at 0% 100%, #fb923c 0%, transparent 50%), radial-gradient(800px 800px at 100% 0%, #fdba74 0%, transparent 50%), linear-gradient(135deg, var(--brand) 0%, #fb923c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-media img {
    max-width: 80%;
    border-radius: var(--radius-md);
}
.auth-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-logo {
    font-weight: 800;
    color: var(--brand);
}
.auth-title {
    margin: 0;
    font-size: 1.75rem;
}
.muted {
    color: var(--muted);
}
.small {
    font-size: 0.9rem;
}
.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text);
}
.auth-form .field {
    margin-bottom: 12px;
}
.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 16px;
}
.link {
    color: var(--brand);
    text-decoration: none;
}
.btn-primary {
    background: var(--brand);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--brand-hover);
}
.btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
.shake {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}
.btn-google {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    cursor: pointer;
}
.full {
    width: 100%;
}
@media (max-width: 900px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-media { min-height: 220px; }
}
[data-theme="light"] .hero h1,
[data-theme="light"] .hero p {
    color: var(--blue);
}
[data-theme="light"] .hero button:not(#theme-toggle) {
    color: var(--blue);
}
[data-theme="light"] #theme-toggle {
    color: var(--blue);
}
.section {
    padding: 50px 5%;
    text-align: center;
}
.tier-grid {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}
.tier, .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 0;
    text-align: left;
    transition: all var(--transition-slow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tier {
    width: 30%;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
}

.tier-image, .card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-image {
    height: 150px;
}

.tier-image img, .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tier:hover .tier-image img, .card:hover .card-image img {
    transform: scale(1.1);
}

.tier .computer-btn, .card-content {
    padding: 20px;
    flex-grow: 1;
}

.tier .computer-btn {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.tier h3, .card h3 {
    margin: 0 0 10px 0;
    color: var(--primary);
}

.tier p, .card p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.tier:hover, .card:hover {
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--accent);
}

.tier::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.tier:hover::before {
    left: 100%;
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 400px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px var(--shadow-color);
    background: var(--card-bg);
    display: none; /* Starts hidden, activated by button */
    flex-direction: column;
    z-index: 1000;
}
.chatbot-header {
    background-color: var(--primary);
    color: var(--on-primary);
    padding: 10px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}
.close-btn {
    cursor: pointer;
    font-size: 1.2em;
}
.chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: var(--surface);
}
.message {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    max-width: 80%;
}
.user-message {
    background-color: var(--primary);
    color: var(--on-primary);
    margin-left: auto;
    text-align: right;
}
.bot-message {
    background-color: var(--message-bot-bg);
    color: var(--text);
    text-align: left;
}
.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--divider);
}
.chat-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-full);
    margin-right: 10px;
    background: var(--input-bg);
    color: var(--text);
}
.chat-input button {
    background-color: var(--accent);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 15px;
    cursor: pointer;
}

/* News & Events Section */
.news-section {
    padding: 60px 20px;
    background: var(--bg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.news-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: var(--on-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.news-tag.event {
    background: #e91e63;
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-body h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: var(--text);
}

.news-body p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    margin-top: auto;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 10px;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Portal Specific Variables */
:root {
    --portal-sidebar-width: 280px;
    --portal-header-height: 80px;
    --portal-bg: #f8fafc;
    --portal-card-bg: #ffffff;
    --portal-primary: #4f46e5;
    --portal-secondary: #64748b;
    --portal-accent: #10b981;
    --portal-warning: #f59e0b;
    --portal-danger: #ef4444;
    --portal-border: #e2e8f0;
    --portal-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --portal-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --portal-bg: #0f172a;
    --portal-card-bg: #1e293b;
    --portal-primary: #818cf8;
    --portal-secondary: #94a3b8;
    --portal-border: #334155;
}

/* PDF Section & Cards */
.pdf-section {
    padding: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.badge {
    background: var(--portal-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pdf-card {
    background: var(--portal-bg);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pdf-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--portal-shadow);
    border-color: var(--portal-primary);
    background: white;
}

.pdf-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--portal-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdf-details {
    flex-grow: 1;
    overflow: hidden;
}

.pdf-details h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--portal-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 50%;
}

.pdf-download-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-secondary);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pdf-download-btn:hover {
    background: var(--portal-primary);
    color: white;
}

/* Dark mode overrides for PDF cards */
[data-theme="dark"] .pdf-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .pdf-card:hover {
    background: #1e293b;
    border-color: var(--portal-primary);
}

[data-theme="dark"] .pdf-details h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .pdf-meta {
    color: #64748b;
}

@media (max-width: 640px) {
    .pdf-grid {
        grid-template-columns: 1fr;
    }
}

/* Portal Layout Overhaul */
.portal-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--portal-bg);
    color: var(--text);
    overflow-x: hidden;
}

.sidebar {
    width: var(--portal-sidebar-width);
    background: var(--portal-card-bg);
    border-right: 1px solid var(--portal-border);
    padding: 32px 24px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--portal-shadow);
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--portal-primary);
    text-decoration: none;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--portal-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background: var(--portal-bg);
    color: var(--portal-primary);
}

.nav-item:hover svg {
    transform: scale(1.1);
}

.nav-item.active {
    background: var(--portal-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.main-portal {
    margin-left: var(--portal-sidebar-width);
    flex: 1;
    padding: 40px;
    width: calc(100% - var(--portal-sidebar-width));
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    animation: fadeIn 0.6s ease-out;
}

.portal-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--portal-card-bg);
    border-radius: 16px;
    border: 1px solid var(--portal-border);
    box-shadow: var(--portal-shadow);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--portal-primary), #a78bfa);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.portal-card {
    background: var(--portal-card-bg);
    border: 1px solid var(--portal-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--portal-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--portal-shadow-lg);
    border-color: var(--portal-primary);
}

.portal-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--portal-secondary);
    margin-bottom: 16px;
}

.stat-value.big {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 8px 0;
    letter-spacing: -2px;
}

.schedule-table {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    margin-top: 24px;
}

.schedule-table th {
    background: var(--portal-bg);
    padding: 20px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--portal-secondary);
}

.schedule-table td {
    padding: 20px;
    background: var(--portal-card-bg);
    border-bottom: 1px solid var(--portal-border);
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-table tr:hover td {
    background: rgba(79, 70, 229, 0.05);
}

.download-item {
    background: var(--portal-bg);
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.download-item:hover {
    border-color: var(--portal-primary);
    background: var(--portal-card-bg);
    transform: scale(1.02);
}

.progress-bar {
    height: 10px;
    background: var(--portal-border);
    border-radius: 10px;
    margin: 12px 0;
}

.progress-fill {
    background: linear-gradient(90deg, var(--portal-primary), #a78bfa);
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 32px 16px; }
    .sidebar-logo span, .nav-item span { display: none; }
    .main-portal { margin-left: 80px; width: calc(100% - 80px); }
}

@media (max-width: 768px) {
    .portal-header { flex-direction: column; gap: 24px; }
    .main-portal { padding: 24px; }
}

/* Department Pages Styling */
.dept-header {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dept-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
}

.dept-header * {
    position: relative;
    z-index: 1;
}

.dept-header h1 {
    font-size: 2.5em;
    margin: 0;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.dept-header p {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.95;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.nav-bar {
    background-color: var(--card-bg);
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--divider);
}

.nav-bar a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-bar a:hover {
    background-color: var(--primary);
    color: var(--on-primary);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 10px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
    border-color: var(--primary);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 10px;
}

.card p {
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

.course-list {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.course-item {
    padding: 15px;
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
}

.course-item h4 {
    margin: 0 0 8px 0;
    color: var(--primary);
}

.course-item p {
    margin: 0;
    font-size: 0.95em;
}

.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.instructor-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.instructor-card h4 {
    color: var(--primary);
    margin: 10px 0;
}

.instructor-card p {
    color: var(--text);
    font-size: 0.9em;
    margin: 5px 0;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--primary);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--accent);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.stat-box h3 {
    margin: 0;
    font-size: 2.5em;
}

.stat-box p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.back-btn:hover {
    background-color: var(--accent);
}

@media (max-width: 768px) {
    .dept-header h1 {
        font-size: 1.8em;
    }

    .nav-bar {
        flex-direction: column;
    }

    .nav-bar a {
        width: 100%;
        text-align: center;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

.computer-page .dept-header { background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80'); }
.account-page .dept-header { background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1600&q=80'); }
.business-page .dept-header { background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1600&q=80'); }
