/* ================================================
   AS | Ahmed Salah - Digital Solutions & Education
   Main Stylesheet - Clean Light Theme
   ================================================ */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Cairo:wght@300;400;600;700;900&display=swap');

/* ===== CSS Variables ===== */
:root {
    /* Backgrounds */
    --bg-primary:      #F4F7FC;
    --bg-secondary:    #FFFFFF;
    --bg-card:         #FFFFFF;
    --bg-dark:         #0A1628;
    --bg-dark2:        #0D2045;
    --bg-hero:         #0A1628;

    /* Brand */
    --color-primary:   #0A6CFF;
    --color-secondary: #1A85FF;
    --color-accent:    #00B4FF;
    --color-dark:      #0A1628;
    --color-success:   #10B981;
    --color-warning:   #F59E0B;
    --color-danger:    #EF4444;

    /* Text */
    --text-primary:    #0D1B2A;
    --text-secondary:  #4A5568;
    --text-muted:      #8896A5;
    --text-white:      #FFFFFF;
    --text-blue:       #0A6CFF;

    /* Borders */
    --border-color:    #DDE4EF;
    --border-blue:     rgba(10, 108, 255, 0.2);
    --border-focus:    rgba(10, 108, 255, 0.5);

    /* Shadows */
    --shadow-xs:       0 1px 3px rgba(13, 27, 42, 0.06);
    --shadow-sm:       0 2px 8px rgba(13, 27, 42, 0.08);
    --shadow-md:       0 4px 20px rgba(13, 27, 42, 0.10);
    --shadow-lg:       0 8px 40px rgba(13, 27, 42, 0.14);
    --shadow-blue:     0 4px 24px rgba(10, 108, 255, 0.18);
    --shadow-blue-lg:  0 8px 40px rgba(10, 108, 255, 0.25);

    /* Gradients */
    --gradient-primary:  linear-gradient(135deg, #0A6CFF 0%, #1A85FF 100%);
    --gradient-hero:     linear-gradient(135deg, #0A1628 0%, #0D2045 60%, #0A1628 100%);
    --gradient-light:    linear-gradient(135deg, #F4F7FC 0%, #EAF0FF 100%);
    --gradient-card:     linear-gradient(135deg, #FFFFFF 0%, #F0F5FF 100%);
    --gradient-section:  linear-gradient(180deg, #F4F7FC 0%, #EAF0FF 100%);

    /* Glow effects (subtle on light) */
    --glow-primary:    0 0 16px rgba(10, 108, 255, 0.25);
    --glow-secondary:  0 4px 20px rgba(10, 108, 255, 0.15);

    /* Misc */
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --transition:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================== RESET =================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body.ltr { direction: ltr; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* =================== SCROLLBAR =================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 3px; }

/* =================== NAVBAR =================== */
.navbar-as {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar-as.scrolled {
    padding: 6px 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand-as {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* Logo Image in navbar */
.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: none;
}

/* Fallback circle if logo fails */
.logo-circle {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
    box-shadow: var(--shadow-blue);
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; }

.brand-name {
    font-family: 'Cairo', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 10px;
    color: var(--color-primary);
    letter-spacing: 0.5px;
    font-weight: 500;
}

.nav-link-as {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-secondary) !important;
    font-size: 15px;
    font-weight: 500;
    padding: 7px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link-as:hover,
.nav-link-as.active {
    color: var(--color-primary) !important;
    background: rgba(10, 108, 255, 0.07);
}

.nav-link-as.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.btn-nav-primary {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: 25px;
    padding: 8px 22px !important;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-blue);
    transition: var(--transition);
}

.btn-nav-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue-lg);
    color: #fff !important;
}

.navbar-toggler-as {
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
}

.navbar-toggler-as span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* =================== HERO SECTION (Dark) =================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: var(--gradient-hero);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(10, 108, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(26, 133, 255, 0.12) 0%, transparent 50%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(10, 108, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 108, 255, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 108, 255, 0.2);
    border: 1px solid rgba(10, 108, 255, 0.4);
    border-radius: 25px;
    padding: 7px 18px;
    font-size: 13px;
    color: #8EC8FF;
    margin-bottom: 22px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #00D4FF;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(1.6); }
}

.hero-title {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #FFFFFF;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 34px;
    max-width: 580px;
    animation: fadeInUp 0.8s ease 0.4s both;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 46px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.stat-item { display: flex; flex-direction: column; }

.stat-number {
    font-family: 'Cairo', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease 0.4s both;
}

.hero-logo-center {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-logo-center img {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(10,108,255,0.5));
    animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

.hero-circle-outer {
    width: 380px;
    height: 380px;
    border: 1px solid rgba(10, 108, 255, 0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: rotate 22s linear infinite;
}

.hero-circle-inner {
    width: 270px;
    height: 270px;
    border: 1px solid rgba(26, 133, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: rotate 16s linear infinite reverse;
}

.orbit-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(10,108,255,0.6);
}

.orbit-dot:nth-child(1) { top: -5px; left: 50%; transform: translateX(-50%); }
.orbit-dot:nth-child(2) { bottom: -5px; left: 50%; transform: translateX(-50%); }
.orbit-dot:nth-child(3) { left: -5px; top: 50%; transform: translateY(-50%); }
.orbit-dot:nth-child(4) { right: -5px; top: 50%; transform: translateY(-50%); }

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =================== BUTTONS =================== */
.btn-primary-as {
    background: var(--gradient-primary);
    color: #fff;
    padding: 13px 30px;
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-blue);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary-as:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue-lg);
    color: #fff;
}

.btn-outline-as {
    background: transparent;
    color: var(--color-primary);
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-outline-as:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

/* On dark backgrounds */
.btn-outline-light {
    background: transparent;
    color: rgba(255,255,255,0.85);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
    transform: translateY(-2px);
}

/* =================== SECTIONS =================== */
section { padding: 80px 0; }

.section-bg-white { background: #FFFFFF; }
.section-bg-light { background: var(--bg-primary); }
.section-bg-blue  { background: var(--gradient-section); }

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 108, 255, 0.08);
    border: 1px solid var(--border-blue);
    color: var(--color-primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    font-family: 'Tajawal', sans-serif;
}

.section-title {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.section-title .accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.85;
}

.divider-as {
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
    margin: 18px auto 0;
}

/* =================== CARDS =================== */
.card-as {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.card-as:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-blue);
    transform: translateY(-3px);
}

/* =================== SERVICE CARDS =================== */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 22px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-xs);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
    border-radius: 3px 3px 0 0;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-blue);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #EAF2FF 0%, #D4E8FF 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 18px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-blue);
    transform: scale(1.08);
}

.service-title {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.service-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* =================== PORTFOLIO =================== */
.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-blue);
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img { transform: scale(1.04); }

/* Portfolio filter buttons */
.portfolio-filter-btn {
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.portfolio-filter-btn:hover,
.portfolio-filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-blue);
}

/* =================== TESTIMONIALS =================== */
.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
    height: 100%;
}

.testimonial-card:hover {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.testimonial-quote {
    font-size: 44px;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 14px;
    font-family: Georgia, serif;
    opacity: 0.4;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 22px;
    font-style: italic;
}

.testimonial-author { display: flex; align-items: center; gap: 14px; }

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.testimonial-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.testimonial-role {
    font-size: 13px;
    color: var(--text-muted);
}

.stars { color: #F59E0B; font-size: 13px; margin-bottom: 4px; }

/* =================== CONTACT =================== */
.contact-section { background: var(--gradient-section); }

.form-as label {
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 7px;
    display: block;
    font-weight: 600;
}

.form-as .form-control,
.form-as .form-select {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    box-shadow: none;
}

.form-as .form-control:focus,
.form-as .form-select:focus {
    background: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 108, 255, 0.12);
    color: var(--text-primary);
    outline: none;
}

.form-as .form-control::placeholder { color: #B0BBC8; }
.form-as textarea.form-control { min-height: 120px; resize: vertical; }

/* =================== CONTACT INFO =================== */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.contact-info-item:hover {
    border-color: var(--border-blue);
    box-shadow: var(--shadow-md);
    transform: translateX(-3px);
}

.contact-info-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #EAF2FF, #D4E8FF);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; font-weight: 500; }
.contact-info-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}
.contact-info-value:hover { color: var(--color-primary); }

/* =================== SOCIAL LINKS =================== */
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }

.social-link {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

/* =================== CERT CARDS =================== */
.cert-card {
    background: linear-gradient(135deg, #EAF2FF 0%, #F0F7FF 100%);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 22px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-blue);
    border-color: var(--color-primary);
}

.cert-icon { font-size: 36px; margin-bottom: 10px; }
.cert-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.cert-issuer { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* =================== ACHIEVEMENTS / STATS =================== */
.achievement-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-blue-lg);
}

.achievement-number {
    font-family: 'Cairo', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.achievement-label { font-size: 14px; opacity: 0.85; font-weight: 500; }

/* =================== FOOTER =================== */
.footer-as {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.85);
    padding: 64px 0 28px;
}

.footer-brand p {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.85;
    margin-top: 14px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-title {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.footer-links { list-style: none; padding: 0; }

.footer-links li { margin-bottom: 9px; }

.footer-links a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer-links a:hover {
    color: #fff;
    padding-right: 5px;
}

.footer-links a::before {
    content: '›';
    color: var(--color-primary);
    font-size: 17px;
    line-height: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 22px;
    margin-top: 40px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.footer-bottom .accent {
    color: var(--color-primary);
    font-weight: 600;
}

/* =================== ADMIN SIDEBAR =================== */
.admin-sidebar {
    background: #fff;
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    min-height: 100vh;
    width: 255px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 900;
    overflow-y: auto;
    transition: var(--transition);
}

.admin-sidebar.collapsed { width: 68px; }

.sidebar-header {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

/* Logo in sidebar */
.sidebar-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.sidebar-menu { padding: 12px 0; }

.sidebar-section-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px 18px 5px;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    border-radius: 0;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
}

.sidebar-link:hover {
    background: rgba(10, 108, 255, 0.07);
    color: var(--color-primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #EAF2FF, #D4E8FF);
    color: var(--color-primary);
    font-weight: 700;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0; bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 0 0 3px;
}

.sidebar-link .icon { font-size: 17px; min-width: 22px; text-align: center; }

.sidebar-badge {
    margin-right: auto;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.admin-main {
    margin-right: 255px;
    min-height: 100vh;
    background: var(--bg-primary);
    transition: var(--transition);
}

.admin-main.expanded { margin-right: 68px; }

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content { padding: 26px; }

/* =================== STAT CARDS (Admin) =================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-blue);
}

.stat-card-1 { border-top: 3px solid #0A6CFF; }
.stat-card-2 { border-top: 3px solid #06B6D4; }
.stat-card-3 { border-top: 3px solid #F59E0B; }
.stat-card-4 { border-top: 3px solid #10B981; }

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}

.icon-blue   { background: #EAF2FF; }
.icon-cyan   { background: #ECFEFF; }
.icon-yellow { background: #FFFBEB; }
.icon-green  { background: #ECFDF5; }

.stat-card-number {
    font-family: 'Cairo', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.change-up   { background: #ECFDF5; color: #059669; font-size: 12px; padding: 3px 10px; border-radius: 10px; font-weight: 700; }
.change-down { background: #FEF2F2; color: #DC2626; font-size: 12px; padding: 3px 10px; border-radius: 10px; font-weight: 700; }

/* =================== TABLES =================== */
.table-as { width: 100%; border-collapse: collapse; }

.table-as th {
    background: #F8FAFF;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 13px 16px;
    text-align: right;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-family: 'Cairo', sans-serif;
}

.table-as td {
    padding: 13px 16px;
    border-bottom: 1px solid #F0F4FA;
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

.table-as tbody tr { transition: var(--transition); }
.table-as tbody tr:hover { background: #F5F9FF; }
.table-as tbody tr:last-child td { border-bottom: none; }

.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.table-header-as {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: #FAFBFF;
}

/* =================== BADGES =================== */
.badge-as {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
}

.badge-success { background: #ECFDF5; color: #059669; }
.badge-warning { background: #FFFBEB; color: #D97706; }
.badge-danger  { background: #FEF2F2; color: #DC2626; }
.badge-info    { background: #EFF6FF; color: #2563EB; }
.badge-purple  { background: #F5F3FF; color: #7C3AED; }

/* =================== STUDENT PROFILE =================== */
.profile-header {
    background: linear-gradient(135deg, #fff 0%, #F0F5FF 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 34px;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    object-fit: cover;
    box-shadow: var(--shadow-blue);
    flex-shrink: 0;
}

.profile-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    border: 3px solid var(--color-primary);
    box-shadow: var(--shadow-blue);
    flex-shrink: 0;
}

.profile-reg-number {
    font-size: 13px;
    color: var(--color-primary);
    font-family: monospace;
    background: rgba(10,108,255,0.08);
    border: 1px solid var(--border-blue);
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
}

.profile-meta { display: flex; gap: 18px; flex-wrap: wrap; }

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* =================== QR CODE =================== */
.qr-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.qr-card img { width: 140px; height: 140px; }

/* =================== CERTIFICATE PAGE =================== */
.certificate-page {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.certificate-container { max-width: 820px; width: 100%; }

.certificate-card {
    background: #0A1A35;
    border: 2px solid rgba(10, 108, 255, 0.7);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(10,108,255,0.25);
}

.certificate-card::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(10,108,255,0.2);
    border-radius: 18px;
    pointer-events: none;
}

.certificate-main-title {
    font-family: 'Cairo', sans-serif;
    font-size: 42px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
}

.certificate-recipient {
    font-family: 'Cairo', sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 14px;
}

.certificate-course {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 36px;
    line-height: 1.6;
}

.certificate-divider {
    width: 90px;
    height: 2px;
    background: var(--gradient-primary);
    margin: 22px auto;
    border-radius: 2px;
}

.certificate-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 38px;
    flex-wrap: wrap;
    gap: 18px;
}

.certificate-number { font-size: 12px; color: rgba(255,255,255,0.5); font-family: monospace; }
.certificate-date   { font-size: 13px; color: rgba(255,255,255,0.6); }

.certificate-signature { text-align: center; }
.signature-line { width: 130px; height: 1px; background: rgba(255,255,255,0.25); margin: 0 auto 7px; }
.signature-name  { font-size: 14px; font-weight: 700; color: #fff; }
.signature-title { font-size: 12px; color: rgba(255,255,255,0.5); }

/* Certificate logo */
.certificate-logo-img {
    height: 56px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 28px;
    opacity: 0.9;
}

/* =================== VERIFY PAGE =================== */
.verify-card {
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.verify-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.verify-valid   { background: #ECFDF5; border: 2px solid #10B981; }
.verify-invalid { background: #FEF2F2; border: 2px solid #EF4444; }

/* =================== REGISTRATION FORM =================== */
.reg-form-section { padding: 80px 0; background: var(--bg-primary); }

.reg-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 38px;
    max-width: 880px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.form-step       { display: none; }
.form-step.active{ display: block; }

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 34px;
    flex-wrap: wrap;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F0F4FA;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}

.step-dot.active,
.step-dot.completed {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.step-connector {
    width: 48px;
    height: 2px;
    background: var(--border-color);
    align-self: center;
    border-radius: 2px;
    transition: var(--transition);
}

.step-connector.active { background: var(--gradient-primary); }

/* =================== ALERTS =================== */
.alert-as {
    padding: 13px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    font-family: 'Tajawal', sans-serif;
}

.alert-success-as { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.alert-error-as   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-info-as    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-warning-as { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }

/* =================== ANIMATIONS =================== */
@keyframes fadeInUp   { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-18px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInRight{ from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
@keyframes fadeIn     { from { opacity:0; } to { opacity:1; } }

.animate-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* =================== ABOUT SECTION =================== */
.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 26px;
}

.about-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Tajawal', sans-serif;
}

.about-feature-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #EAF2FF, #D4E8FF);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* =================== PROGRESS BARS =================== */
.progress-as {
    height: 7px;
    background: #EEF2F8;
    border-radius: 4px;
    overflow: visible;
    margin-top: 7px;
}

.progress-bar-as {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-bar-as::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 11px;
    height: 11px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: var(--shadow-blue);
}

/* =================== LOADING =================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
}

.loader-ring {
    width: 52px;
    height: 52px;
    border: 3px solid #EEF2F8;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =================== BACK TO TOP =================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    box-shadow: var(--shadow-blue);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    text-decoration: none;
    z-index: 500;
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover   { transform: translateY(-3px); color: #fff; box-shadow: var(--shadow-blue-lg); }

/* =================== RESPONSIVE =================== */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(100%);
        width: 255px !important;
    }
    .admin-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .admin-main { margin-right: 0 !important; }
    .hero-circle-outer { width: 280px; height: 280px; }
    .hero-circle-inner { width: 200px; height: 200px; }
    .hero-logo-center img { width: 110px; }
}

@media (max-width: 768px) {
    section { padding: 56px 0; }
    .hero-stats { gap: 22px; }
    .certificate-card { padding: 28px 18px; }
    .certificate-main-title { font-size: 28px; }
    .certificate-recipient { font-size: 24px; }
    .reg-form-card { padding: 22px 14px; }
    .profile-header { flex-direction: column; text-align: center; }
    .about-features { grid-template-columns: 1fr; }
    .admin-content { padding: 14px; }
    .certificate-meta { flex-direction: column; align-items: center; }
}

@media (max-width: 576px) {
    .hero-buttons { flex-direction: column; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.65rem; }
    .stat-number { font-size: 2rem; }
    .stat-card-number { font-size: 1.6rem; }
}

/* =================== UTILITIES =================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-card        { background: var(--bg-card); }
.bg-light-blue  { background: var(--gradient-light); }
.border-as      { border: 1px solid var(--border-color); }
.rounded-as     { border-radius: var(--radius-lg); }
.shadow-blue    { box-shadow: var(--shadow-blue); }

.btn-sm-as {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
}

.btn-edit   { background: #EFF6FF; color: #2563EB; }
.btn-delete { background: #FEF2F2; color: #DC2626; }
.btn-view   { background: #ECFDF5; color: #059669; }
.btn-print  { background: #FFFBEB; color: #D97706; }

.btn-sm-as:hover { filter: brightness(0.94); transform: translateY(-1px); }

.separator-as { border: none; height: 1px; background: var(--border-color); margin: 22px 0; }

/* Map */
.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.map-wrapper iframe { display: block; width: 100%; height: 340px; }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 54px;
    height: 54px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    transition: var(--transition);
    z-index: 500;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

/* Print Styles */
@media print {
    .navbar-as, .footer-as, .whatsapp-float, .back-to-top, .admin-sidebar, .admin-topbar { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
}
