:root {
    --primary-900: #0f4f2c;
    --primary-700: #1a7c42;
    --primary-600: #22954e;
    --primary-500: #2cb15b;
    --primary-100: #e8f7ed;
    --accent: #f3fcf6;
    --surface: #ffffff;
    --text-main: #163324;
    --text-soft: #5b6f62;
    --border: #d9e9df;
    --shadow: 0 16px 40px rgba(17, 79, 44, 0.12);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: all 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
    background: linear-gradient(180deg, #f8fdf9 0%, #ffffff 30%, #ffffff 100%);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    width: min(1120px, 92%);
    margin-inline: auto;
}

.section {
    padding: 80px 0;
}

.site-main {
    min-height: calc(100vh - 120px);
}

.section-kicker {
    color: var(--primary-700);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.section-kicker.light {
    color: #eafff0;
}

.section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    line-height: 1.35;
    margin-bottom: 14px;
}

.section-text {
    color: var(--text-soft);
    max-width: 700px;
}

.section-head {
    margin-bottom: 30px;
}

.section-action {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.muted {
    color: var(--text-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    color: #fff;
    box-shadow: 0 10px 24px rgba(17, 79, 44, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(17, 79, 44, 0.3);
}

.btn-outline {
    border-color: var(--primary-700);
    color: var(--primary-700);
    background: #fff;
}

.btn-outline:hover {
    background: var(--primary-700);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--primary-900);
}

.btn-light:hover {
    background: var(--primary-100);
}

.full-width {
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(34, 149, 78, 0.12);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 8px 20px rgba(22, 51, 36, 0.08);
}

.nav-wrapper {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(17, 79, 44, 0.12);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.05rem;
}

.brand-text small {
    font-size: 0.77rem;
    color: var(--text-soft);
}

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: #2f4d3d;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-100);
    color: var(--primary-900);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #eff8f2;
    cursor: pointer;
    place-items: center;
    gap: 4px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary-900);
    display: block;
    transition: var(--transition);
}

.hero {
    padding-top: 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-700);
    background: var(--primary-100);
    border: 1px solid #cde8d7;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.25;
    margin-bottom: 14px;
}

.hero-content p {
    color: var(--text-soft);
    max-width: 640px;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-card strong {
    display: block;
    color: var(--primary-700);
    font-size: 1.5rem;
    line-height: 1;
}

.stat-card span {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.hero-panel {
    background: linear-gradient(165deg, #ffffff, #ecf8f0);
    border: 1px solid #d4e9dc;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}

.hero-panel h3 {
    margin-bottom: 14px;
    font-size: 1.35rem;
}

.check-list li {
    position: relative;
    padding-right: 24px;
    margin-bottom: 10px;
    color: #2f4b3c;
}

.check-list li::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--primary-600);
    position: absolute;
    right: 0;
    top: 11px;
    box-shadow: 0 0 0 5px rgba(44, 177, 91, 0.16);
}

.text-link {
    margin-top: 8px;
    display: inline-flex;
    color: var(--primary-700);
    font-weight: 700;
}

.split-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
    align-items: start;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(17, 79, 44, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px rgba(17, 79, 44, 0.12);
    border-color: #b7ddc5;
}

.service-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(145deg, var(--primary-700), var(--primary-500));
    letter-spacing: 0.4px;
}

.service-card h2,
.service-card h3 {
    margin-bottom: 8px;
    line-height: 1.4;
}

.service-card p {
    color: var(--text-soft);
}

.service-card.large p:last-child {
    margin-top: 10px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(17, 79, 44, 0.13);
    border-color: #bcdfca;
}

.project-card figure {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.project-card img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
}

.project-content h2,
.project-content h3 {
    margin-bottom: 8px;
    line-height: 1.4;
}

.project-content p {
    color: var(--text-soft);
    margin-bottom: 8px;
}

.project-meta {
    color: var(--primary-700);
    font-weight: 700;
    font-size: 0.92rem;
}

.project-details {
    display: grid;
    gap: 6px;
    color: #355343;
    font-size: 0.95rem;
}

.contact-strip {
    background: linear-gradient(125deg, #0f4f2c, #1b7f43);
    color: #fff;
}

.contact-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.contact-strip h2 {
    margin-bottom: 8px;
}

.page-hero {
    padding-top: 56px;
    padding-bottom: 42px;
}

.page-title {
    font-size: clamp(1.95rem, 3.3vw, 2.65rem);
    line-height: 1.3;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-soft);
    max-width: 760px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.info-card {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
}

.info-card h2 {
    margin-bottom: 10px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.value-card {
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fff;
}

.value-card h3 {
    margin-bottom: 8px;
}

.value-card p {
    color: var(--text-soft);
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
}

.contact-info {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    padding: 24px;
}

.contact-info h2 {
    margin-bottom: 10px;
}

.contact-info li {
    margin-bottom: 9px;
    color: #3c5a4a;
}

.contact-form-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(17, 79, 44, 0.08);
}

.contact-form {
    display: grid;
    gap: 14px;
}

.form-group {
    display: grid;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid #ccded3;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text-main);
    background: #fff;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ab0a3;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(44, 177, 91, 0.15);
}

.form-group input.input-error,
.form-group textarea.input-error {
    border-color: #db3a3a;
    box-shadow: 0 0 0 4px rgba(219, 58, 58, 0.13);
}

.error-text {
    min-height: 1.2em;
    color: #c82c2c;
    font-size: 0.86rem;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 600;
}

.alert-success {
    background: #e5f8eb;
    border: 1px solid #b8e6c7;
    color: #1d6f39;
}

.alert-error {
    background: #fde8e8;
    border: 1px solid #f3bcbc;
    color: #a22a2a;
}

.site-footer {
    background: linear-gradient(180deg, #f3faf5, #e9f6ee);
    border-top: 1px solid #d6e9de;
}

.footer-grid {
    padding: 42px 0 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 10px;
    color: #174028;
}

.footer-col p,
.footer-col li {
    color: #4f6659;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--primary-700);
}

.footer-bottom {
    border-top: 1px solid #d5e8dc;
    padding: 12px 0;
    color: #476252;
    font-size: 0.95rem;
}

.back-to-top {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-700);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(16, 75, 42, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
