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

:root {
    /* Light Mode (Default) */
    --primary: #2563eb;
    /* Brand Color - Vibrant Blue */
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #2563eb;

    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #f1f5f9;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --radius: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    --bg-navbar: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    /* Dark Mode */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #f8fafc;
    --accent: #3b82f6;

    --bg: #0f172a;
    --bg-subtle: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-muted: #334155;
    --bg-navbar: rgba(15, 23, 42, 0.9);

    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --border: #334155;
    --border-strong: #475569;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    font-size: 16px;
    overflow-x: hidden;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.2));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(37, 99, 235, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.2));
    }
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    height: 80px;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.logo img {
    height: 48px;
    /* Larger logo */
    width: auto;
    transition: transform 0.3s ease;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    /* Pill shape */
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.nav-cta:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text);
    transition: 0.3s ease;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .navbar {
        padding: 0 24px;
        height: 70px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background-color: var(--bg);
        flex-direction: column;
        padding: 100px 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary svg,
.btn-secondary svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.btn-primary:hover svg,
.btn-secondary:hover svg {
    transform: scale(1.2);
}

.theme-toggle {
    background: var(--bg-muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--border) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text);
    background-color: var(--bg-muted);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: radial-gradient(circle at top right, var(--bg-muted) 0%, transparent 40%),
        radial-gradient(circle at bottom left, var(--bg-subtle) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-logo-anim {
    width: 120px;
    height: auto;
    margin-bottom: 32px;
    animation: float 6s ease-in-out infinite, fadeIn 1s ease-out;
}

.hero-logo-main {
    width: 450px;
    height: auto;
    max-width: 90vw;
    margin-bottom: 40px;
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.25));
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.hero-logo-main:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 30px 60px rgba(37, 99, 235, 0.4));
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Section Styling */
section {
    padding: 100px 0;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 16px;
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 16px;
    letter-spacing: -0.02em;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

/* Value Grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

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

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background-color: var(--bg-subtle);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 24px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 32px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Statutes / Articles Styles */
.statutes-container {
    max-width: 900px;
    margin: 0 auto;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.article-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-number {
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.article-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-content ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 12px;
}

.article-content li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.article-content li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 8px;
    font-weight: bold;
}

/* PDF Viewer & Other components from original CSS preserved/enhanced */
.pdf-viewer-modern {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.pdf-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
}

.pdf-viewer-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
}

.pdf-viewer-controls {
    display: flex;
    gap: 8px;
}

.pdf-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.btn-primary svg,
.btn-secondary svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.btn-primary:hover svg,
.btn-secondary:hover svg {
    transform: scale(1.2);
}

.theme-toggle {
    background: var(--bg-muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--border) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pdf-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pdf-viewer-frame {
    height: 700px;
    background: #525659;
}

.pdf-viewer-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Offer Cards */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.offer-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.offer-card.featured {
    border: 2px solid var(--primary);
    position: relative;
}

.offer-header {
    margin-bottom: 16px;
}

.offer-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.offer-duration {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-muted);
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-block;
    margin-top: 8px;
}

.offer-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.offer-details {
    list-style: none;
    margin-bottom: 24px;
}

.offer-details li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .offers-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero.animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Stages & PFE Page Styles */

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.project-header {
    padding: 32px;
    background: linear-gradient(to right, var(--bg-subtle), var(--bg-card));
    border-bottom: 1px solid var(--border);
}

.project-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-tag {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-duration {
    background-color: var(--bg-muted);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.project-ref-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 8px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.project-card:hover .project-ref-link {
    opacity: 1;
    color: var(--primary);
}

.project-ref-link:hover {
    transform: scale(1.2);
}



.project-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.project-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.project-body {
    padding: 32px;
}

.project-section {
    margin-bottom: 32px;
}

.project-section:last-child {
    margin-bottom: 0;
}

.project-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-section h4 svg {
    color: var(--primary);
}

.project-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-section ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.project-section ul li {
    position: relative;
    padding-left: 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-section ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.missions-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
}

.project-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

@media (max-width: 768px) {
    .project-footer {
        grid-template-columns: 1fr;
    }

    .project-header h3 {
        font-size: 1.5rem;
    }
}

/* Apply Section */
.apply-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.apply-box h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text);
}

.apply-steps {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 200px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}