:root {
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-darker: #082F66;
    --primary-light: #E3F2FD;
    --accent: #00ACC1;
    --text: #1F2933;
    --text-muted: #52606D;
    --bg: #FFFFFF;
    --bg-alt: #F4F8FC;
    --surface: #FFFFFF;
    --header-bg: rgba(255, 255, 255, 0.94);
    --border: #DBE4EE;
    --radius: 14px;
    --shadow-sm: 0 2px 8px rgba(13, 71, 161, 0.08);
    --shadow-md: 0 12px 32px rgba(13, 71, 161, 0.14);
    --container: 1120px;
    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / Navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

.logo {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--primary-dark);
    white-space: nowrap;
}

.logo-accent {
    color: var(--accent);
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.97rem;
    padding: 8px 2px;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

.login-btn {
    border: 1.5px solid var(--primary);
    color: var(--primary) !important;
    border-radius: 999px;
    padding: 7px 20px !important;
}

.login-btn::after {
    display: none;
}

.login-btn:hover {
    background: var(--primary);
    color: #fff !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--primary-dark);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: #fff;
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.btn-solid {
    background: var(--primary);
    color: #fff;
}

.btn-solid:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ---------- Sections ---------- */

.section {
    padding: 92px 0;
}

.alt-bg {
    background: var(--bg-alt);
}

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.kicker {
    display: inline-block;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-head h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.35rem);
    color: var(--primary-dark);
    line-height: 1.25;
}

.section-head p {
    margin-top: 14px;
    color: var(--text-muted);
}

.page-banner {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #fff;
    padding: 84px 24px;
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 40%, var(--primary) 75%, var(--accent) 130%);
}

.page-banner::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    left: -160px;
    top: -160px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.14), transparent 65%);
}

.page-banner::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -200px;
    bottom: -260px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 65%);
}

.page-banner-inner {
    position: relative;
    z-index: 1;
}

.page-banner .kicker {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.page-banner h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.1rem);
    font-weight: 800;
    letter-spacing: 1px;
}

.page-banner p {
    max-width: 640px;
    margin: 16px auto 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.06rem;
}

/* ---------- Cards ---------- */

.card,
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(21, 101, 192, 0.35);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 22px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.card h3,
.feature-card h3 {
    font-size: 1.13rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.card p,
.feature-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
}

/* ---------- Layout helpers ---------- */

.split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.split-text > p {
    color: var(--text-muted);
    margin-bottom: 22px;
}

.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 12px;
    font-weight: 500;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231565C0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat {
    background: linear-gradient(150deg, var(--primary-dark), var(--primary));
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.stat-label {
    display: block;
    margin-top: 6px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.82);
}

/* ---------- Call to action band ---------- */

.cta {
    padding: 88px 24px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--accent) 140%);
}

.cta h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.25;
}

.cta p {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.cta .btn-outline {
    border-color: rgba(255, 255, 255, 0.7);
}

/* ---------- Flash messages ---------- */

.flash-stack {
    margin-top: 24px;
}

.flash {
    border-radius: var(--radius);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.flash-success {
    background: #E8F5E9;
    color: #1B5E20;
    border-color: #A5D6A7;
}

.flash-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: #90CAF9;
}

.flash-error {
    background: #FFEBEE;
    color: #B71C1C;
    border-color: #EF9A9A;
}

/* ---------- Forms ---------- */

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 38px 34px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.93rem;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--text);
    background: var(--bg-alt);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-hint {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--primary-darker);
    color: #B9CBE8;
    padding: 64px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand p {
    margin-top: 16px;
    max-width: 340px;
    font-size: 0.94rem;
}

.logo-light {
    color: #fff;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    letter-spacing: 0.4px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #B9CBE8;
    text-decoration: none;
    font-size: 0.94rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    text-align: center;
    font-size: 0.88rem;
    color: #8FA8CC;
}

/* ---------- Reveal animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .split {
        grid-template-columns: 1fr;
        gap: 44px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        opacity: 0;
        transform: scaleY(0.95);
        transform-origin: top;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease;
    }

    .site-nav.open {
        opacity: 1;
        transform: scaleY(1);
        pointer-events: auto;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px 20px 20px;
    }

    .site-nav a {
        display: flex;
        justify-content: space-between;
        padding: 12px 8px;
    }

    .site-nav a::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 70px 0;
    }

    .page-banner {
        padding: 64px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* ---------- Language switcher ---------- */

.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.lang-option {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.lang-option:hover {
    color: var(--primary);
}

.lang-active {
    color: var(--primary);
}

.lang-sep {
    margin: 0 8px;
    color: var(--border);
}

/* ---------- RTL support (Arabic) ---------- */

[dir="rtl"] .site-nav ul {
    direction: rtl;
}

[dir="rtl"] .footer-grid,
[dir="rtl"] .header-inner {
    direction: rtl;
}

/* ---------- Dark theme ---------- */

[data-theme="dark"] {
    color-scheme: dark;
    --primary-light: #16283F;
    --text: #E6EDF6;
    --text-muted: #9DAFC4;
    --bg: #0E1621;
    --bg-alt: #17222F;
    --surface: #1B2735;
    --header-bg: rgba(23, 34, 47, 0.95);
    --border: #2A3B50;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .site-footer {
    background: #0B1119;
    color: #9DAFC4;
}

[data-theme="dark"] .footer-col a {
    color: #9DAFC4;
}

[data-theme="dark"] .footer-col a:hover,
[data-theme="dark"] .logo-light,
[data-theme="dark"] .footer-col h4 {
    color: #E6EDF6;
}

[data-theme="dark"] .footer-bottom {
    color: #7A8CA3;
}

[data-theme="dark"] .logo,
[data-theme="dark"] .section-head h2,
[data-theme="dark"] .card h3,
[data-theme="dark"] .feature-card h3,
[data-theme="dark"] .panel-head h2,
[data-theme="dark"] .pf-card h3,
[data-theme="dark"] .drop-zone-text strong,
[data-theme="dark"] .btn-outline-dark {
    color: #8AB8F5;
}

[data-theme="dark"] .kicker,
[data-theme="dark"] .card-icon,
[data-theme="dark"] .drop-zone-icon,
[data-theme="dark"] .site-nav a:hover,
[data-theme="dark"] .site-nav a.active,
[data-theme="dark"] .pill,
[data-theme="dark"] .action-link,
[data-theme="dark"] .pf-link,
[data-theme="dark"] .read-more {
    color: #6EA8FE;
}

[data-theme="dark"] .login-btn {
    border-color: #6EA8FE;
}

[data-theme="dark"] .login-btn:not(:hover) {
    color: #6EA8FE !important;
}

[data-theme="dark"] .action-danger,
[data-theme="dark"] .pf-danger,
[data-theme="dark"] .remove-image {
    color: #FF8A80;
}
