/* SRIF 2026 - Professional Design System */
:root {
    --primary-dark: #0a0f1a;
    --primary: #0f172a;
    --secondary: #00d4ff;
    --accent: #7c3aed;
    --research-color: #00d4ff;
    --innovation-color: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --gold: #fbbf24;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-research: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 100%);
    --gradient-innovation: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    --gradient-dark: linear-gradient(135deg, #0a0f1a 0%, #1e293b 100%);
    --shadow-glow-blue: 0 0 40px rgba(0, 212, 255, 0.4);
    --shadow-glow-orange: 0 0 40px rgba(245, 158, 11, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Science Background - Restored */
.science-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: var(--gradient-dark);
}

#scienceCanvas {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header.scrolled {
    padding: 12px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-main {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-year {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 3px;
}

/* Navigation Container */
.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 10px 18px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-500);
    border-radius: var(--radius-full);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.1);
}

.nav-link.active {
    color: var(--white);
    background: var(--gradient-primary);
}

/* Mobile Toggle - Improved Click Area */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    /* Ensure above menu overlay */
    position: relative;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 140px 0 120px;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 24px;
}

.gradient-text {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-theme {
    margin-bottom: 32px;
}

.theme-quote {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.theme-en {
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    color: var(--white);
    margin-bottom: 4px;
}

.theme-ar {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.4rem;
    color: var(--gold);
    direction: rtl;
}

.deadline-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.deadline-date {
    font-size: 1.25rem;
    color: var(--gold);
}

.deadline-timer {
    display: flex;
    gap: 12px;
}

.timer-item {
    text-align: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    min-width: 60px;
}

.timer-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.timer-item small {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray-400);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-blue);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sections Common */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--gray-500);
    font-size: 1.1rem;
}

/* About Cards */
.about {
    background: var(--gray-50);
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
}

/* Tracks */
.tracks {
    background: var(--gradient-dark);
}

.tracks-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.track-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: 0.3s;
}

.track-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.track-title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 12px;
}

.track-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    line-height: 1.7;
}

.track-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.track-features i {
    color: var(--success);
}

/* Timeline */
.timeline-section {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--secondary), var(--accent));
    transform: translateX(-50%);
    border-radius: var(--radius-full);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    padding-right: 60px;
    padding-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-left: 60px;
}

.timeline-dot {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: var(--shadow-glow-blue);
}

.timeline-content h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

/* Stats */
.stats-section {
    background: var(--gradient-primary);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-card {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

/* Contact */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.contact-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* Form Styles */
.page-header {
    background: var(--gradient-dark);
    padding: 140px 0 80px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.form-section {
    padding: 80px 0;
    background: var(--gray-50);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    margin-top: 24px;
}

/* ------------------------------------------------------------------ */
/* RESPONSIVE DESIGN - OPTIMIZED FOR MOBILE & ARABIC */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-visual {
        display: none;
    }

    .hero-cta {
        justify-content: center;
    }

    .deadline-banner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .about-cards,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .tracks-wrapper,
    .contact-cards,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {

    /* Mobile Menu - Full Screen Overlay */
    .nav {
        justify-content: flex-end;
    }

    .mobile-toggle {
        display: flex;
        margin-left: 15px;
    }

    body.rtl .mobile-toggle {
        margin-left: 0;
        margin-right: 15px;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding: 40px 20px;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out;
        box-shadow: none;
        border: none;
        height: 100vh;
        width: 100vw;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateY(0);
        display: flex !important;
    }

    .nav-link {
        font-size: 1.4rem;
        padding: 12px 24px;
        width: 100%;
        max-width: 300px;
        text-align: center;
        background: transparent;
        color: var(--gray-800);
    }

    .nav-link:hover {
        background: var(--gray-50);
        transform: translateY(-2px);
        color: var(--primary);
    }

    body.rtl .nav-link {
        text-align: center;
        padding: 12px 24px;
    }

    /* Hamburger Animation to X */
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero Section Mobile */
    .hero-content {
        padding: 110px 0 60px;
    }

    .hero-title {
        font-size: 2.2rem !important;
    }

    .hero-grid {
        gap: 30px;
    }

    .deadline-timer {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .timer-item {
        min-width: 70px;
        padding: 12px;
    }

    /* Timeline Mobile */
    .timeline-track {
        left: 20px !important;
    }

    .timeline-item {
        flex-direction: row !important;
        text-align: left !important;
        margin-bottom: 30px;
        align-items: flex-start;
    }

    body.rtl .timeline-item {
        text-align: right !important;
        flex-direction: row-reverse !important;
    }

    .timeline-item .timeline-content {
        padding-left: 50px !important;
        padding-right: 0 !important;
        width: 100%;
    }

    body.rtl .timeline-item .timeline-content {
        padding-right: 50px !important;
        padding-left: 0 !important;
    }

    .timeline-dot {
        width: 35px;
        height: 35px;
        left: 2px !important;
        top: 0;
        position: absolute;
    }

    body.rtl .timeline-dot {
        right: 2px !important;
        left: auto !important;
    }

    /* General Layouts */
    .about-cards,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        gap: 40px;
        text-align: center;
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem !important;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .logo-main {
        font-size: 1.3rem;
    }

    .logo-year {
        display: none;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}