:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --cyan: #06b6d4;
    --ink: #17233c;
    --muted: #68778e;
    --bg: #f7f9fd;
    --border: #e8edf5;
    --white: #fff;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.container {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.site-main { min-height: 65vh; }

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.nav-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -.7px;
    flex-shrink: 0;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 13px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.logo-mark svg { width: 23px; height: 23px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 23px;
}

.nav-links a {
    color: #59677d;
    font-size: 13px;
    font-weight: 700;
}

.nav-links a:hover { color: var(--primary); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.nav-logout { margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 0;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 7px 18px rgba(37,99,235,.15);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border);
    background: white;
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn svg { width: 16px; height: 16px; }

.site-footer {
    padding: 27px 0;
    background: white;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.footer-copy {
    color: #8996a9;
    font-size: 11px;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    direction: ltr;
    color: var(--muted);
    font-size: 12px;
}

.footer-email svg { width: 15px; height: 15px; }

/* صفحات الحساب */
.auth-container {
    width: min(100% - 30px, 520px);
    margin: 55px auto;
    padding: 15px 0;
}

.auth-card {
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: white;
    box-shadow: 0 18px 55px rgba(30,64,120,.07);
}

.auth-brand {
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
    direction: ltr;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.auth-card h1 {
    text-align: center;
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 5px;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 25px;
}

.auth-field { margin-bottom: 17px; }

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #dce4f0;
    border-radius: 10px;
    outline: none;
    background: #fbfcff;
    color: var(--ink);
    direction: rtl;
}

.auth-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}

.auth-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

.auth-button:hover { background: var(--primary-dark); }

.auth-message {
    padding: 11px 14px;
    margin-bottom: 18px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 13px;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.auth-footer a, .auth-link {
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 850px) {
    .nav-links { display: none; }
}

@media (max-width: 600px) {
    .container { width: min(100% - 28px, 1160px); }
    .nav-inner { min-height: 68px; gap: 8px; }
    .logo { font-size: 21px; }
    .logo-mark { width: 38px; height: 38px; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn { padding: 8px 10px; font-size: 10px; }
    .nav-actions .btn svg { display: none; }
    .footer-inner { flex-direction: column; text-align: center; }
    .auth-container { margin: 30px auto; }
    .auth-card { padding: 25px 20px; }
    .auth-card h1 { font-size: 22px; }
}

/* =====================================
   CODEVIA PROFESSIONAL FOOTER
===================================== */
.site-footer {
    display: block;
    padding: 65px 0 20px;
    background: #101b32;
    color: #fff;
    border-top: 0;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 42px;
    padding-bottom: 45px;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 18px;
}

.footer-brand p {
    max-width: 310px;
    color: #aab6ca;
    font-size: 13px;
    line-height: 2;
    margin: 0 0 20px;
}

.footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    direction: ltr;
    color: #dce8ff;
    font-size: 13px;
}

.footer-contact svg {
    width: 17px;
    color: #38bdf8;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
}

.footer-column h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    margin: 5px 0 9px;
}

.footer-column a {
    color: #aab6ca;
    font-size: 13px;
    transition: .2s;
}

.footer-column a:hover,
.footer-bottom a:hover {
    color: #38bdf8;
}

.footer-certificate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 25px;
    margin-bottom: 28px;
    border: 1px solid rgba(148, 180, 230, .2);
    border-radius: 17px;
    background: rgba(37, 99, 235, .12);
}

.footer-certificate-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-certificate-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    color: #67e8f9;
    background: rgba(6, 182, 212, .13);
}

.footer-certificate-icon svg {
    width: 25px;
    height: 25px;
}

.footer-certificate-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-certificate-info p {
    color: #aab6ca;
    font-size: 12px;
    margin: 0;
}

.footer-certificate .btn {
    white-space: nowrap;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 180, 230, .16);
    color: #8493aa;
    font-size: 11px;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom a {
    color: #aab6ca;
}

.footer-made {
    color: #8493aa;
}

/* صفحات المعلومات */
.content-page {
    min-height: 55vh;
    padding: 65px 0 80px;
    background: #f8faff;
}

.content-card {
    max-width: 900px;
    margin: auto;
    padding: 38px;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(30, 64, 120, .05);
}

.content-card h1 {
    color: #17243b;
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 12px;
}

.content-card h2 {
    color: #1e40af;
    font-size: 18px;
    margin: 28px 0 9px;
}

.content-card p,
.content-card li {
    color: #64748b;
    font-size: 14px;
    line-height: 2.1;
}

.content-card ul {
    padding-right: 22px;
}

.page-intro {
    color: #64748b;
    margin-bottom: 28px;
    line-height: 2;
}

/* التحقق من الشهادة */
.certificate-form {
    display: flex;
    gap: 10px;
    margin: 25px 0;
}

.certificate-form input {
    flex: 1;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid #dbe3ef;
    border-radius: 11px;
    font: inherit;
    outline: none;
}

.certificate-form input:focus {
    border-color: #2563eb;
}

.certificate-result {
    padding: 22px;
    margin-top: 22px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: #f0fdf4;
}

.certificate-result h2 {
    color: #166534;
    margin-top: 0;
}

.certificate-result p {
    margin: 8px 0;
}

.certificate-not-found {
    padding: 18px;
    margin-top: 20px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 850px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px 25px;
    }
}

@media (max-width: 580px) {
    .site-footer {
        padding-top: 42px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px 18px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-certificate {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .footer-certificate .btn {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-page {
        padding: 35px 0 50px;
    }

    .content-card {
        padding: 24px 18px;
    }

    .content-card h1 {
        font-size: 24px;
    }

    .certificate-form {
        flex-direction: column;
    }
}

/* ==========================================
   CODEVIA INNER PAGES - MODERN EDTECH UI
========================================== */
.inner-page {
    min-height: 60vh;
    padding: 54px 0 90px;
    background:
        radial-gradient(ellipse at 90% 0%, rgba(37,99,235,.07), transparent 34%),
        #f5f8fe;
    overflow: hidden;
}
.inner-page .container { position: relative; }

.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 68px 64px;
    margin-bottom: 62px;
    border: 1px solid #e6edfb;
    border-radius: 28px;
    background: linear-gradient(120deg, #10234b 0%, #1d4ed8 62%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(37,99,235,.14);
}
.page-hero > *:not(.hero-decoration) { position: relative; z-index: 1; }
.page-hero .eyebrow {
    color: #dbeafe;
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.16);
}
.page-hero h1 {
    max-width: 760px;
    margin: 22px 0 15px;
    color: #fff;
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.8px;
}
.page-hero h1 span { color: #8be9ff; }
.page-hero > p {
    max-width: 650px;
    margin: 0 0 27px;
    color: #dce8ff;
    font-size: 15px;
    line-height: 2.1;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid #dbeafe;
    border-radius: 30px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}
.eyebrow svg { width: 15px; height: 15px; }
.hero-decoration {
    position: absolute;
    z-index: 0;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    pointer-events: none;
}
.hero-decoration-one {
    width: 380px; height: 380px;
    left: -90px; top: -190px;
    box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 75px rgba(255,255,255,.02);
}
.hero-decoration-two {
    width: 220px; height: 220px;
    left: 25%; bottom: -175px;
    background: rgba(255,255,255,.04);
}
.compact-hero { padding: 52px 56px; margin-bottom: 42px; }
.compact-hero h1 { font-size: clamp(29px, 4vw, 42px); }
.compact-hero > p { margin-bottom: 0; }
.section-heading { margin: 0 0 28px; }
.section-heading h2, .split-panel h2 {
    margin: 13px 0 8px;
    color: #14213b;
    font-size: 26px;
    font-weight: 900;
}
.section-heading > p, .split-panel p {
    color: #718096;
    font-size: 14px;
    line-height: 2;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}
.feature-card {
    padding: 27px;
    border: 1px solid #e7edf6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(26,54,93,.035);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 35px rgba(37,99,235,.10);
}
.feature-icon {
    display: inline-grid;
    width: 48px; height: 48px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.blue { color: #2563eb; background: #eaf1ff; }
.feature-icon.purple { color: #9333ea; background: #f4eaff; }
.feature-icon.cyan { color: #0891b2; background: #e3f9fd; }
.feature-card h3 { margin: 20px 0 9px; color: #18243b; font-size: 17px; }
.feature-card p { min-height: 55px; color: #718096; font-size: 13px; line-height: 2; }
.feature-card > a {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 12px; color: #2563eb; font-size: 12px; font-weight: 800;
}
.feature-card > a svg { width: 15px; }
.split-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 38px;
    margin-top: 55px;
    border: 1px solid #e7edf6;
    border-radius: 24px;
    background: #fff;
}
.learning-options { display: grid; gap: 13px; }
.learning-options > div {
    display: flex; align-items: center; gap: 14px;
    padding: 17px; border: 1px solid #edf1f7; border-radius: 15px;
}
.learning-options strong, .learning-options small { display: block; }
.learning-options strong { color: #1e293b; font-size: 14px; }
.learning-options small { margin-top: 5px; color: #7b8799; font-size: 12px; }
.closing-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 32px 38px; margin-top: 25px;
    border-radius: 22px;
    background: linear-gradient(110deg,#1d4ed8,#0891b2);
    color: #fff;
}
.closing-cta h2 { margin: 0 0 7px; color: #fff; font-size: 22px; }
.closing-cta p { margin: 0; color: #dbeafe; font-size: 13px; }
.btn-light {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 19px; border-radius: 11px;
    background: #fff; color: #1d4ed8; font-weight: 800; white-space: nowrap;
}
.btn-light svg { width: 17px; }

/* Contact */
.contact-layout {
    display: grid; grid-template-columns: .9fr 1.1fr;
    gap: 25px; align-items: start;
}
.contact-side, .contact-form-card {
    padding: 32px;
    border: 1px solid #e7edf6;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(26,54,93,.04);
}
.contact-side h2, .contact-form-card h2 {
    margin: 17px 0 9px; color: #17243b; font-size: 22px; font-weight: 900;
}
.contact-side > p, .contact-form-card > p {
    color: #718096; font-size: 13px; line-height: 2;
}
.contact-method {
    display: flex; align-items: center; gap: 13px;
    padding: 17px; margin-top: 28px;
    border: 1px solid #e8eef8; border-radius: 15px;
    transition: .2s;
}
.contact-method:hover { border-color: #93c5fd; background: #f8fbff; }
.contact-method > span:nth-child(2) { flex: 1; min-width: 0; }
.contact-method small, .contact-method strong { display: block; }
.contact-method small { margin-bottom: 5px; color: #8290a4; font-size: 11px; }
.contact-method strong { color: #1e40af; font-size: 13px; direction: ltr; text-align: right; }
.contact-method > svg { width: 17px; color: #94a3b8; }
.contact-note {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 15px; margin-top: 20px;
    border-radius: 13px; background: #eff6ff; color: #47617f;
}
.contact-note svg { width: 18px; flex: 0 0 auto; color: #2563eb; }
.contact-note p { margin: 0; font-size: 12px; line-height: 1.9; }
.modern-form { display: grid; gap: 10px; margin-top: 22px; }
.modern-form label { margin-top: 5px; color: #344256; font-size: 12px; font-weight: 800; }
.modern-form input, .modern-form select, .modern-form textarea {
    width: 100%; min-height: 48px; padding: 12px 14px;
    border: 1px solid #dfe7f1; border-radius: 11px;
    background: #fbfdff; color: #1e293b; font: inherit; font-size: 13px;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.modern-form textarea { resize: vertical; min-height: 125px; }
.modern-form input:focus, .modern-form select:focus, .modern-form textarea:focus {
    border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}
.modern-form button { margin-top: 8px; min-height: 48px; }
.form-feedback { min-height: 20px; color: #087e66; font-size: 12px; }

/* FAQ */
.faq-hero { text-align: center; }
.faq-hero h1, .faq-hero > p { margin-inline: auto; }
.faq-search {
    display: flex; align-items: center; gap: 12px;
    max-width: 590px; margin: 27px auto 0; padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.35); border-radius: 13px;
    background: #fff; color: #64748b; text-align: right;
    box-shadow: 0 10px 30px rgba(10,30,70,.12);
}
.faq-search > svg { width: 19px; color: #2563eb; }
.faq-search input { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; color: #1e293b; font: inherit; font-size: 13px; }
.faq-search kbd { padding: 5px 9px; border-radius: 7px; background: #eff6ff; color: #2563eb; font-size: 10px; }
.faq-content { max-width: 850px; margin: auto; }
.faq-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.faq-heading h2 { margin: 10px 0 0; color: #17243b; font-size: 23px; font-weight: 900; }
.faq-count { padding: 7px 12px; border-radius: 20px; background: #eaf1ff; color: #2563eb; font-size: 11px; font-weight: 800; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
    overflow: hidden; border: 1px solid #e5ebf4; border-radius: 15px;
    background: #fff; transition: border-color .2s, box-shadow .2s;
}
.faq-item[open] { border-color: #bfdbfe; box-shadow: 0 8px 22px rgba(37,99,235,.06); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 15px;
    padding: 20px 22px; cursor: pointer; list-style: none;
    color: #24324a; font-size: 14px; font-weight: 800;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { width: 19px; color: #2563eb; transition: transform .2s; }
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-answer { padding: 0 22px 21px; color: #6b7b91; font-size: 13px; line-height: 2.1; }
.faq-answer a { color: #2563eb; font-weight: 800; }
.faq-empty { padding: 25px; text-align: center; color: #718096; }
.faq-help {
    display: flex; align-items: center; gap: 15px;
    padding: 20px; margin-top: 25px; border: 1px solid #e5ebf4;
    border-radius: 17px; background: #fff;
}
.faq-help > div { flex: 1; }
.faq-help strong { color: #24324a; font-size: 13px; }
.faq-help p { margin: 5px 0 0; color: #718096; font-size: 12px; }
.faq-help .btn { white-space: nowrap; }

/* Certificate verification */
.verification-page { background: radial-gradient(ellipse at 50% 0%,#e6f2ff,#f5f8fe 58%); }
.verification-hero { text-align: center; }
.verification-hero h1, .verification-hero > p { margin-inline: auto; }
.verification-card {
    max-width: 790px; margin: -3px auto 0; padding: 34px;
    border: 1px solid #e3eaf5; border-radius: 23px; background: #fff;
    box-shadow: 0 20px 55px rgba(30,64,120,.09);
}
.verification-card-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; }
.verification-symbol {
    display: grid; width: 55px; height: 55px; place-items: center;
    border-radius: 16px; background: #eaf1ff; color: #2563eb;
}
.verification-symbol svg { width: 27px; height: 27px; }
.verification-card-heading h2 { margin: 0 0 5px; color: #17243b; font-size: 19px; }
.verification-card-heading p { margin: 0; color: #8190a4; font-size: 12px; }
.verification-form label { display: block; margin-bottom: 9px; color: #344256; font-size: 12px; font-weight: 800; }
.verification-input-row { display: flex; gap: 10px; }
.verification-input-row input {
    flex: 1; min-width: 0; height: 52px; padding: 0 15px;
    border: 1px solid #dce5f1; border-radius: 11px; background: #fbfdff;
    font: inherit; font-size: 13px; outline: 0;
}
.verification-input-row input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.verification-input-row button { min-width: 145px; }
.verification-status {
    display: flex; align-items: flex-start; gap: 13px;
    padding: 18px; margin-top: 25px; border: 1px solid; border-radius: 14px;
}
.verification-status > svg { width: 23px; height: 23px; flex: 0 0 auto; }
.verification-status strong { display: block; margin-bottom: 5px; font-size: 14px; }
.verification-status p { margin: 0; font-size: 12px; line-height: 1.9; }
.verification-status.success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.verification-status.error { color: #991b1b; background: #fff5f5; border-color: #fecaca; }
.certificate-details {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    margin-top: 15px; overflow: hidden; border: 1px solid #e7edf6; border-radius: 14px;
}
.certificate-details > div { padding: 17px; border-bottom: 1px solid #edf1f7; }
.certificate-details > div:nth-child(odd) { border-left: 1px solid #edf1f7; }
.certificate-details span, .certificate-details strong { display: block; }
.certificate-details span { margin-bottom: 7px; color: #8390a3; font-size: 11px; }
.certificate-details strong { color: #25334a; font-size: 13px; overflow-wrap: anywhere; }
.verification-disclaimer {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 14px; margin-top: 23px; border-radius: 12px;
    background: #f5f8fc; color: #748399;
}
.verification-disclaimer svg { width: 17px; flex: 0 0 auto; color: #64748b; }
.verification-disclaimer p { margin: 0; font-size: 11px; line-height: 1.9; }

/* Legal pages */
.legal-hero { margin-bottom: 35px; }
.legal-layout { display: grid; grid-template-columns: 225px minmax(0,1fr); gap: 22px; align-items: start; }
.legal-toc {
    position: sticky; top: 20px; display: grid; gap: 7px;
    padding: 20px; border: 1px solid #e5ebf4; border-radius: 17px;
    background: #fff;
}
.legal-toc strong { margin-bottom: 8px; color: #25334a; font-size: 13px; }
.legal-toc a { padding: 9px 10px; border-radius: 8px; color: #718096; font-size: 12px; transition: .2s; }
.legal-toc a:hover { background: #eff6ff; color: #2563eb; }
.legal-content {
    padding: 32px 38px; border: 1px solid #e5ebf4; border-radius: 19px;
    background: #fff; box-shadow: 0 8px 25px rgba(26,54,93,.035);
}
.legal-notice {
    display: flex; align-items: center; gap: 10px; padding: 14px;
    margin-bottom: 28px; border: 1px solid #bfdbfe; border-radius: 11px;
    background: #eff6ff; color: #315b91; font-size: 12px; line-height: 1.8;
}
.legal-notice svg { width: 18px; flex: 0 0 auto; }
.legal-content section { position: relative; padding: 22px 0; border-bottom: 1px solid #edf1f6; scroll-margin-top: 25px; }
.legal-content section:last-child { border-bottom: 0; }
.legal-number { color: #2563eb; font-size: 11px; font-weight: 900; }
.legal-content h2 { margin: 7px 0 10px; color: #1e2d45; font-size: 17px; }
.legal-content p { margin: 0; color: #6b7b91; font-size: 13px; line-height: 2.2; }
.legal-content a { color: #2563eb; font-weight: 800; }

/* Motion and accessibility */
@media (prefers-reduced-motion: reduce) {
    .inner-page *, .inner-page *::before, .inner-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 850px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .legal-toc strong { grid-column: 1/-1; }
}
@media (max-width: 600px) {
    .inner-page { padding: 25px 0 55px; }
    .page-hero, .compact-hero { padding: 35px 22px; margin-bottom: 30px; border-radius: 20px; }
    .page-hero h1 { font-size: 29px; }
    .page-hero > p { font-size: 13px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card p { min-height: 0; }
    .split-panel { grid-template-columns: 1fr; gap: 20px; padding: 23px; margin-top: 30px; }
    .closing-cta { align-items: flex-start; flex-direction: column; padding: 25px; }
    .contact-side, .contact-form-card { padding: 23px 19px; }
    .contact-method strong { font-size: 11px; }
    .faq-heading { align-items: flex-start; flex-direction: column; }
    .faq-item summary { padding: 17px; font-size: 13px; }
    .faq-answer { padding: 0 17px 18px; }
    .faq-help { align-items: flex-start; flex-wrap: wrap; }
    .faq-help > div { min-width: calc(100% - 70px); }
    .faq-help .btn { width: 100%; }
    .verification-card { padding: 22px 17px; }
    .verification-input-row { flex-direction: column; }
    .verification-input-row button { width: 100%; min-height: 48px; }
    .certificate-details { grid-template-columns: 1fr; }
    .certificate-details > div:nth-child(odd) { border-left: 0; }
    .legal-content { padding: 22px 18px; }
    .legal-toc { grid-template-columns: 1fr 1fr; }
}

/* Contact page: single-line heading */
.contact-heading {
    white-space: nowrap;
    font-size: clamp(18px, 3.2vw, 40px);
    line-height: 1.5;
    display: block;
}

.contact-heading span {
    display: inline;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .contact-heading {
        font-size: clamp(17px, 5vw, 23px);
        letter-spacing: -0.5px;
    }
}

/* =========================================
   CODEVIA RESPONSIVE IMPROVEMENTS
   Mobile / Tablet / Desktop
========================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
iframe,
svg {
    max-width: 100%;
}

.container {
    width: min(1160px, calc(100% - 40px));
}

/* Header */
.nav-inner {
    min-width: 0;
}

.nav-links {
    min-width: 0;
}

.nav-actions {
    flex-shrink: 0;
}

.nav-actions form {
    margin: 0;
}

/* Tablet */
@media (max-width: 850px) {
    .nav-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-block: 10px;
        gap: 8px 12px;
    }

    .logo {
        order: 1;
    }

    .nav-actions {
        order: 2;
        margin-inline-start: auto;
    }

    .nav-links {
        display: flex;
        order: 3;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 22px;
        padding: 8px 2px 5px;
        white-space: nowrap;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links a {
        flex: 0 0 auto;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        width: calc(100% - 28px);
    }

    .nav-inner {
        min-height: auto;
        gap: 8px;
    }

    .logo {
        font-size: 20px;
        gap: 7px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .nav-actions {
        gap: 5px;
    }

    .nav-actions .btn {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 10px;
        white-space: nowrap;
    }

    .nav-actions .btn svg {
        display: none;
    }

    .nav-links {
        gap: 18px;
        padding: 8px 0;
    }

    .nav-links a {
        font-size: 12px;
    }

    .auth-container {
        width: calc(100% - 28px);
        margin: 25px auto;
        padding: 8px 0;
    }

    .auth-card {
        padding: 25px 18px;
        border-radius: 17px;
    }

    .auth-card h1 {
        font-size: clamp(19px, 5vw, 23px);
        overflow-wrap: anywhere;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .auth-field input,
    .auth-button {
        min-height: 48px;
        font-size: 14px;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 15px;
    }

    .footer-certificate {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-certificate .btn {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .container {
        width: calc(100% - 22px);
    }

    .nav-inner {
        gap: 7px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 33px;
        height: 33px;
    }

    .nav-actions {
        gap: 4px;
    }

    .nav-actions .btn {
        padding: 6px 7px;
        font-size: 9px;
    }

    .auth-container {
        width: calc(100% - 22px);
    }

    .auth-card {
        padding: 22px 15px;
    }

    .footer-main {
        gap: 22px 12px;
    }
}

/* Dashboard and account content */
.auth-card,
.auth-container,
.footer-main > *,
.footer-certificate > * {
    min-width: 0;
}

.auth-card p {
    overflow-wrap: anywhere;
}

.auth-card strong {
    overflow-wrap: anywhere;
}

/* Prevent long content from breaking mobile layout */
table {
    max-width: 100%;
}

pre,
code {
    overflow-wrap: anywhere;
}



/* ==========================================
   CODEVIA - MOBILE NAVIGATION
========================================== */
.mobile-menu-toggle,
.mobile-nav {
    display: none;
}

@media (max-width: 850px) {
    .navbar {
        position: relative;
        z-index: 100;
    }

    .nav-inner {
        position: relative;
        min-height: 68px;
        justify-content: space-between;
    }

    .nav-links,
    .nav-actions {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
        color: var(--ink);
        cursor: pointer;
    }

    .mobile-menu-toggle svg {
        width: 23px;
        height: 23px;
    }

    .mobile-nav {
        position: absolute;
        display: flex;
        flex-direction: column;
        gap: 5px;
        top: calc(100% + 8px);
        inset-inline: 0;
        z-index: 200;
        padding: 14px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: 0 14px 35px rgba(23, 35, 60, .14);
    }

    .mobile-nav[hidden] {
        display: none !important;
    }

    .mobile-nav > a {
        display: block;
        padding: 12px 14px;
        color: var(--ink);
        text-decoration: none;
        font-size: 14px;
        font-weight: 700;
        border-radius: 10px;
    }

    .mobile-nav > a:hover {
        background: #f3f6fc;
    }

    .mobile-nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
        padding-top: 12px;
        margin-top: 7px;
        border-top: 1px solid var(--border);
    }

    .mobile-nav-actions > a,
    .mobile-nav-actions form,
    .mobile-nav-actions button {
        width: 100%;
        min-width: 0;
    }

    .mobile-nav-actions .btn {
        min-height: 44px;
        padding: 10px 8px;
        font-size: 12px;
        white-space: normal;
    }

    .mobile-nav-actions form {
        margin: 0;
    }
}

@media (min-width: 851px) {
    .mobile-menu-toggle,
    .mobile-nav {
        display: none !important;
    }
}
