:root {
    --bg: #ffffff;
    --bg-alt: #f4f5f7;
    --primary: #b30017;
    --primary-soft: rgba(179, 0, 23, 0.1);
    --black: #111827;
    --text: #111827;
    --muted: #6b7280;
    --border: #d1d5db;
    --error: #e11d48;
    --radius-lg: 14px;
    --radius-xl: 22px;
    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 16px 30px rgba(15, 23, 42, 0.12);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    background: radial-gradient(circle at top, #f9fafb 0, #e5e7eb 40%, #d1d5db 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language handling */

.lang-ar {
    display: none;
}

body.lang-ar .lang-en {
    display: none !important;
}

body.lang-ar .lang-ar {
    display: inline;
}

.lang-block.lang-ar {
    direction: rtl;
    text-align: right;
}

.lang-block.lang-en {
    direction: ltr;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(22px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(209, 213, 219, 0.9);
}

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

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

.logo-img {
    height: 46px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 600;
    letter-spacing: 0.12em;
    font-size: 16px;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.main-nav {
    display: flex;
    gap: 18px;
    font-size: 14px;
}

.main-nav a {
    padding: 6px 0;
    color: #374151;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.18s ease-out;
}

.main-nav a:hover::after {
    width: 100%;
}

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

/* Language Switch */

.lang-switch {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    padding: 2px;
    background: #f9fafb;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--primary);
    color: #ffffff;
}

/* Buttons */

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(180, 0, 23, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(180, 0, 23, 0.45);
}

.btn-secondary {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.btn-secondary:hover {
    background: #000000;
}

.btn-outline {
    background: transparent;
    border-color: rgba(55, 65, 81, 0.4);
    color: #111827;
}

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

.btn-block {
    width: 100%;
}

/* Hero */

.hero {
    padding: 50px 0 40px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
}

.hero-text h1 {
    font-size: clamp(30px, 3vw, 36px);
    line-height: 1.1;
    margin: 0 0 14px;
}

.hero-text p {
    margin: 0 0 18px;
    font-size: 15px;
    color: #4b5563;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.meta-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* Hero Card */

.hero-card {
    border-radius: var(--radius-xl);
    padding: 20px 20px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-soft);
}

.hero-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.form-note {
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
}

/* Sections */

.section {
    padding: 38px 0;
}

.section-muted {
    padding: 38px 0;
    background: #f9fafb;
}

.section-title {
    font-size: 22px;
    margin: 0 0 8px;
    text-align: center;
}

.section-intro {
    max-width: 640px;
    margin: 0 auto 22px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 28px;
}

/* Cards */

.feature-card {
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-card);
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-size: 14px;
}

.checklist li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 7px;
    color: #374151;
}

.checklist.lang-ar li {
    padding-left: 0;
    padding-right: 18px;
}

.checklist li::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 10px;
    color: var(--primary);
}

.checklist.lang-ar li::before {
    left: auto;
    right: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.card {
    border-radius: var(--radius-lg);
    padding: 16px 16px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-card);
}

.card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

/* Metrics */

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
}

.metric {
    border-radius: 14px;
    padding: 12px 12px 10px;
    background: #ffffff;
    border: 1px solid rgba(179, 0, 23, 0.18);
}

.metric-number {
    display: block;
    font-weight: 600;
    font-size: 15px;
}

.metric-label {
    font-size: 12px;
    color: var(--muted);
}

/* Contact */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.95fr);
    gap: 24px;
    align-items: flex-start;
}

.contact-main {
    border-radius: var(--radius-lg);
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-card);
}

.contact-sidebar {
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    background: #111827;
    border: 1px solid #111827;
    color: #e5e7eb;
}

.contact-sidebar p {
    margin-top: 0;
    font-size: 14px;
    color: #e5e7eb;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 10px 0 6px;
}

.social-links li {
    margin-bottom: 6px;
}

.social-links a {
    font-size: 14px;
    color: #f9fafb;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}

.social-links a:hover {
    border-bottom-color: #f97316;
}

.contact-note {
    font-size: 12px;
    color: #e5e7eb;
}

/* Forms */

.contact-form {
    display: grid;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-size: 13px;
    color: #374151;
    display: flex;
    justify-content: space-between;
}

body.lang-ar label {
    flex-direction: row-reverse;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    background: #f9fafb;
    color: #111827;
    font-size: 14px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(179, 0, 23, 0.5);
    background: #ffffff;
}

/* Alerts */

.alert {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.7);
    color: #047857;
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.95);
    color: #b91c1c;
}

/* Footer */

.site-footer {
    padding: 18px 0 24px;
    border-top: 1px solid rgba(209, 213, 219, 0.9);
    background: #ffffff;
    margin-top: 24px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 12px;
    color: var(--muted);
}

.footer-logo {
    font-weight: 600;
    color: #111827;
}

.footer-tagline {
    margin-left: 8px;
}

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

/* Admin / Auth */

.auth-body,
.admin-body {
    background: #f3f4f6;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.auth-card {
    width: 100%;
    max-width: 360px;
    border-radius: var(--radius-xl);
    padding: 24px 22px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-soft);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin-bottom: 10px;
}

.auth-note {
    font-size: 11px;
    color: var(--muted);
}

.auth-back-link {
    margin-top: 8px;
    font-size: 12px;
}

.admin-header {
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.admin-header h1 {
    font-size: 18px;
    margin: 0;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
}

.admin-main {
    padding: 24px 20px 30px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.data-table th,
.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.data-table th {
    text-align: left;
    background: #f9fafb;
    font-weight: 500;
}

.data-table tr:nth-child(even) td {
    background: #fcfcfd;
}

.col-message {
    max-width: 260px;
}

/* Utilities */

code {
    font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    background: #f3f4f6;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Responsive */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-card {
        order: -1;
    }
    .two-col {
        grid-template-columns: minmax(0, 1fr);
    }
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0 8px;
    }
    .main-nav {
        display: none;
    }
    .hero {
        padding-top: 26px;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
