/* ============================================================
   SUDAFAST — Main Stylesheet
   RTL-first (Arabic default), light modern design
   Sudan Academy for Aviation Science & Technology
   ============================================================ */

/* --- Font Face Declarations --- */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --c-primary: #1B4F8A;
    --c-primary-light: #2563A8;
    --c-primary-dark: #133C6B;
    --c-secondary: #00AEEF;
    --c-secondary-light: #33C1F5;
    --c-secondary-dark: #008EC4;
    --c-accent: #F5A623;
    --c-accent-light: #FFD073;
    --c-accent-dark: #D4891A;
    
    --c-bg: #F7F9FC;
    --c-surface: #FFFFFF;
    --c-surface-alt: #EBF5FF;
    --c-text: #2D3748;
    --c-text-secondary: #64748B;
    --c-text-light: #94A3B8;
    --c-border: #E2E8F0;
    --c-border-light: #F1F5F9;
    
    --c-success: #10B981;
    --c-error: #EF4444;
    --c-warning: #F59E0B;
    
    /* Footer */
    --c-footer-bg: #0F2B4E;
    --c-footer-text: #CBD5E1;
    
    /* Typography */
    --font-ar: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    --font-en: 'IBM Plex Sans', 'Segoe UI', Tahoma, sans-serif;
    --font-body: var(--font-ar);
    
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 1.875rem;
    --fs-3xl: 2.25rem;
    --fs-4xl: 3rem;
    
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    
    --lh-tight: 1.3;
    --lh-normal: 1.6;
    --lh-loose: 1.8;
    
    /* Spacing */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;
    --sp-4xl: 6rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --sidebar-width: 320px;
    --header-height: 72px;
    --topbar-height: 36px;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);
    
    /* Transitions */
    --t-fast: 150ms ease;
    --t-normal: 250ms ease;
    --t-slow: 400ms ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: var(--lh-normal);
    color: var(--c-text);
    background-color: var(--c-bg);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--c-secondary);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--sp-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* --- Authority Top Bar --- */
.topbar {
    background: var(--c-primary-dark);
    color: rgba(255,255,255,0.85);
    font-size: var(--fs-xs);
    line-height: var(--topbar-height);
    height: var(--topbar-height);
    overflow: hidden;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
}

.topbar__authority {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.topbar__authority img {
    height: 18px;
    width: auto;
    opacity: 0.85;
}

.topbar__flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topbar__flag svg {
    width: 20px;
    height: 14px;
    border-radius: 2px;
}

.topbar__license {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-weight: var(--fw-medium);
    color: var(--c-accent-light);
}

/* --- Site Header --- */
.header {
    background: var(--c-surface);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-normal);
}

.header--scrolled {
    box-shadow: var(--shadow-md);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--sp-lg);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-shrink: 0;
}

.header__logo img {
    height: 48px;
    width: auto;
}

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

.nav__item {
    position: relative;
}

.nav__link {
    display: block;
    padding: var(--sp-sm) var(--sp-md);
    color: var(--c-text);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    transition: color var(--t-fast), background var(--t-fast);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
    color: var(--c-primary);
    background: var(--c-surface-alt);
}

/* Dropdown */
.nav__dropdown {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 220px;
    background: var(--c-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
    z-index: 110;
}

.nav__item:hover .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown a {
    display: block;
    padding: var(--sp-sm) var(--sp-lg);
    color: var(--c-text);
    font-size: var(--fs-sm);
    transition: background var(--t-fast), color var(--t-fast);
}

.nav__dropdown a:hover {
    background: var(--c-surface-alt);
    color: var(--c-primary);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--sp-sm);
    color: var(--c-text);
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: transform var(--t-normal), opacity var(--t-normal);
    border-radius: 2px;
}

/* Language switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: 6px 14px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--c-primary);
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
}

.lang-switch:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary-dark) 100%);
}

.hero__video-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(27, 79, 138, 0.85) 0%,
        rgba(0, 174, 239, 0.7) 50%,
        rgba(27, 79, 138, 0.8) 100%
    );
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: var(--sp-3xl) var(--sp-lg);
    width: 100%;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    margin-block-end: var(--sp-lg);
    border: 1px solid rgba(255,255,255,0.2);
}

.hero__title {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-block-end: var(--sp-md);
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero__subtitle {
    font-size: var(--fs-lg);
    opacity: 0.9;
    max-width: 600px;
    margin-inline: auto;
    margin-block-end: var(--sp-xl);
    line-height: var(--lh-loose);
}

.hero__actions {
    display: flex;
    gap: var(--sp-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: 12px 28px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn--primary {
    background: var(--c-accent);
    color: var(--c-primary-dark);
    border-color: var(--c-accent);
}

.btn--primary:hover {
    background: var(--c-accent-dark);
    border-color: var(--c-accent-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}

.btn--outline {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.5);
}

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

.btn--secondary {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}

.btn--secondary:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 79, 138, 0.3);
}

.btn--sm {
    padding: 8px 18px;
    font-size: var(--fs-xs);
}

.btn--lg {
    padding: 16px 36px;
    font-size: var(--fs-base);
}

/* --- Section --- */
.section {
    padding-block: var(--sp-3xl);
}

.section--alt {
    background: var(--c-surface);
}

.section__header {
    text-align: center;
    margin-block-end: var(--sp-2xl);
}

.section__title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--c-primary);
    margin-block-end: var(--sp-sm);
}

.section__subtitle {
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
    max-width: 560px;
    margin-inline: auto;
}

.section__title-accent {
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--c-secondary), var(--c-accent));
    margin-inline: auto;
    margin-block-start: var(--sp-sm);
    border-radius: 2px;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-xl);
}

.card-grid--3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --- Card --- */
.card {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-normal), box-shadow var(--t-normal);
    border: 1px solid var(--c-border-light);
}

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

.card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--c-surface-alt);
}

.card__body {
    padding: var(--sp-lg);
}

.card__tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    background: var(--c-surface-alt);
    color: var(--c-primary);
    margin-block-end: var(--sp-sm);
}

.card__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    color: var(--c-text);
    margin-block-end: var(--sp-sm);
    line-height: var(--lh-tight);
}

.card__title a {
    color: inherit;
}

.card__title a:hover {
    color: var(--c-primary);
}

.card__text {
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    line-height: var(--lh-normal);
    margin-block-end: var(--sp-md);
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: var(--fs-xs);
    color: var(--c-text-light);
}

/* --- Trust Badges (SCAA, ICAO, SAC) --- */
.trust-badges {
    padding-block: var(--sp-2xl);
    background: var(--c-surface);
    border-block-start: 1px solid var(--c-border-light);
}

.trust-badges__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3xl);
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    filter: grayscale(60%);
    opacity: 0.7;
    transition: filter var(--t-normal), opacity var(--t-normal);
}

.trust-badge:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.trust-badge img {
    height: 48px;
    width: auto;
}

.trust-badge__text {
    font-size: var(--fs-xs);
    color: var(--c-text-secondary);
    max-width: 160px;
    line-height: var(--lh-tight);
}

/* --- Quick Links Bar --- */
.quick-links {
    background: var(--c-surface);
    padding-block: var(--sp-lg);
    border-block-end: 1px solid var(--c-border-light);
}

.quick-links__inner {
    display: flex;
    gap: var(--sp-md);
    overflow-x: auto;
    scrollbar-width: thin;
    padding-block: var(--sp-xs);
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 10px 20px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-primary);
    white-space: nowrap;
    transition: all var(--t-fast);
    text-decoration: none;
    flex-shrink: 0;
}

.quick-link:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
    transform: translateY(-1px);
}

.quick-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* --- Programs Section --- */
.program-card {
    position: relative;
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    padding: var(--sp-xl);
    border: 1px solid var(--c-border-light);
    transition: all var(--t-normal);
    box-shadow: var(--shadow-sm);
}

.program-card:hover {
    border-color: var(--c-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.program-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--c-secondary), var(--c-primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-block-end: var(--sp-md);
    color: white;
}

.program-card__degree {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--c-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-block-end: var(--sp-xs);
}

.program-card__name {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    color: var(--c-text);
    margin-block-end: var(--sp-sm);
    line-height: var(--lh-tight);
}

.program-card__name a {
    color: inherit;
}

.program-card__name a:hover {
    color: var(--c-primary);
}

.program-card__duration {
    font-size: var(--fs-xs);
    color: var(--c-text-light);
}

/* --- Footer --- */
.footer {
    background: var(--c-footer-bg);
    color: var(--c-footer-text);
    padding-block: var(--sp-3xl) var(--sp-xl);
}

.footer a {
    color: var(--c-footer-text);
    transition: color var(--t-fast);
}

.footer a:hover {
    color: white;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-2xl);
    margin-block-end: var(--sp-2xl);
}

.footer__about {
    max-width: 340px;
}

.footer__logo {
    height: 56px;
    width: auto;
    margin-block-end: var(--sp-md);
    filter: brightness(0) invert(1);
}

.footer__desc {
    font-size: var(--fs-sm);
    line-height: var(--lh-loose);
    opacity: 0.8;
    margin-block-end: var(--sp-lg);
}

.footer__heading {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: white;
    margin-block-end: var(--sp-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer__links li {
    margin-block-end: var(--sp-sm);
}

.footer__links a {
    font-size: var(--fs-sm);
    opacity: 0.8;
}

.footer__links a:hover {
    opacity: 1;
}

.footer__social {
    display: flex;
    gap: var(--sp-sm);
    margin-block-start: var(--sp-md);
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    transition: background var(--t-fast);
}

.footer__social a:hover {
    background: var(--c-secondary);
}

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

.footer__bottom {
    border-block-start: 1px solid rgba(255,255,255,0.1);
    padding-block-start: var(--sp-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-md);
    font-size: var(--fs-xs);
    opacity: 0.7;
}

.footer__sudanese {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.footer__sudanese svg {
    width: 24px;
    height: 16px;
}

/* --- Breadcrumb --- */
.breadcrumb {
    padding-block: var(--sp-md);
    font-size: var(--fs-sm);
    color: var(--c-text-light);
}

.breadcrumb a {
    color: var(--c-text-secondary);
}

.breadcrumb a:hover {
    color: var(--c-primary);
}

.breadcrumb__sep {
    margin-inline: var(--sp-sm);
    opacity: 0.5;
}

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary-dark));
    padding-block: var(--sp-2xl);
    color: white;
    text-align: center;
}

.page-header__title {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-xs);
    margin-block-start: var(--sp-2xl);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding-inline: var(--sp-sm);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    transition: all var(--t-fast);
}

.pagination a {
    color: var(--c-text-secondary);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
}

.pagination a:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}

.pagination__current {
    background: var(--c-primary) !important;
    color: white !important;
    border-color: var(--c-primary) !important;
}

/* --- Content Prose --- */
.prose {
    font-size: var(--fs-base);
    line-height: var(--lh-loose);
    color: var(--c-text);
}

.prose h2 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--c-primary);
    margin-block: var(--sp-xl) var(--sp-md);
}

.prose h3 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-block: var(--sp-lg) var(--sp-sm);
}

.prose p {
    margin-block-end: var(--sp-md);
}

.prose ul, .prose ol {
    padding-inline-start: var(--sp-xl);
    margin-block-end: var(--sp-md);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
    margin-block-end: var(--sp-xs);
}

.prose img {
    border-radius: var(--radius-md);
    margin-block: var(--sp-md);
}

.prose a {
    color: var(--c-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose blockquote {
    border-inline-start: 4px solid var(--c-secondary);
    padding-inline-start: var(--sp-lg);
    margin-block: var(--sp-lg);
    color: var(--c-text-secondary);
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-block: var(--sp-lg);
}

.prose th, .prose td {
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--c-border);
    text-align: inherit;
}

.prose th {
    background: var(--c-surface-alt);
    font-weight: var(--fw-semibold);
}

/* --- Utility classes --- */
.text-center { text-align: center; }
.text-start { text-align: start; }
.mt-0 { margin-block-start: 0; }
.mb-0 { margin-block-end: 0; }
.mb-sm { margin-block-end: var(--sp-sm); }
.mb-md { margin-block-end: var(--sp-md); }
.mb-lg { margin-block-end: var(--sp-lg); }
.mb-xl { margin-block-end: var(--sp-xl); }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* --- Lazy loading placeholder --- */
img[loading="lazy"] {
    background: var(--c-surface-alt);
}

/* --- Form styles --- */
.form-group {
    margin-block-end: var(--sp-lg);
}

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-text);
    margin-block-end: var(--sp-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--fs-base);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--c-secondary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Flash messages --- */
.flash {
    padding: var(--sp-md) var(--sp-lg);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    margin-block-end: var(--sp-lg);
}

.flash--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

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

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --fs-4xl: 2.25rem;
        --fs-3xl: 1.75rem;
        --fs-2xl: 1.5rem;
    }
    
    /* Mobile nav */
    .nav {
        position: fixed;
        inset: 0;
        inset-inline-start: auto;
        width: 280px;
        flex-direction: column;
        background: var(--c-surface);
        padding: var(--sp-xl) var(--sp-lg);
        transform: translateX(100%);
        transition: transform var(--t-slow);
        box-shadow: var(--shadow-xl);
        z-index: 200;
        gap: 0;
        overflow-y: auto;
    }
    
    /* RTL: slide from left */
    [dir="rtl"] .nav {
        inset-inline-start: 0;
        inset-inline-end: auto;
        transform: translateX(-100%);
    }
    
    .nav--open {
        transform: translateX(0) !important;
    }
    
    .nav__link {
        padding: var(--sp-md) var(--sp-sm);
        font-size: var(--fs-base);
        border-block-end: 1px solid var(--c-border-light);
    }
    
    .nav__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        padding-inline-start: var(--sp-lg);
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 190;
    }
    
    .nav-overlay--visible {
        display: block;
    }
    
    /* Hero */
    .hero {
        min-height: 400px;
    }
    
    .hero__title {
        font-size: var(--fs-2xl);
    }
    
    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--sp-xl);
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Topbar */
    .topbar__license {
        display: none;
    }
    
    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Trust badges */
    .trust-badges__inner {
        gap: var(--sp-xl);
    }
    
    .trust-badge img {
        height: 36px;
    }
}

@media (max-width: 480px) {
    :root {
        --fs-4xl: 1.75rem;
        --sp-3xl: 2.5rem;
    }
    
    .container {
        padding-inline: var(--sp-md);
    }
    
    .hero__actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn--lg {
        width: 100%;
    }
}
