/* =========================================
   ALWALID HUMANITARIAN STYLE SYSTEM
   Mobile First & Luxury UX
========================================= */

/* Google Fonts
   IBM Plex Sans + IBM Plex Sans Arabic
*/
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --green: #00833D;
    --green-dark: #006B32;
    --white: #FFFFFF;
    --gray: #CCCCCC;
    --text: #161616;
    --light-bg: #F7F8F7;
    --border: #E5E5E5;

    /* Warning Colors */
    --warning-bg: #FFEBEE;
    --warning-border: #FF2D55;
    --warning-text: #D32F2F;

    /* Shadows */
    --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
    --shadow-card: 0 20px 50px rgba(0,0,0,.10);
    --shadow-header: 0 4px 20px rgba(0,0,0,.05);

    /* Radius */
    --radius: 18px;

    /* Animation */
    --transition: .4s cubic-bezier(.16, 1, .3, 1);
}

/* =========================
 RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
    background: var(--white);
    color: var(--text);
    direction: rtl;
    line-height: 1.8;
    text-align: right; /* محاذاة عامة للنصوص من اليمين إلى اليسار */
}

/* ضبط عرض الصور لتبقى كما هي بدون نقص أو قص */
img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(100% - 40px, 1200px);
    margin-inline: auto;
}

.section {
    padding: 70px 0;
}

/* محاذاة العناوين الرئيسية دائماً في المنتصف */
h1, .section-heading, .form-header, .complaints-box h2 {
    text-align: center;
}

/* =========================
 HEADER (شفافية فاخرة)
========================= */
.header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.45); /* شفافية عالية فاخرة */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.75);
    border-color: var(--border);
    box-shadow: var(--shadow-header);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    width: 120px;
    display: flex;
    justify-content: flex-start;
}

.brand-logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.header-cta {
    background: var(--green);
    color: var(--white);
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    transition: var(--transition);
}

.header-cta:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 131, 61, 0.3);
}

/* =========================
 HERO
========================= */
.hero {
    padding-top: 130px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8f7 100%);
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.hero-content {
    text-align: right;
}

.hero-tag {
    display: inline-block;
    color: var(--green);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.5px;
    text-align: right;
}

.hero p {
    margin-top: 20px;
    font-size: 18px;
    color: #555;
    text-align: right;
}

.hero-buttons {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Buttons */
.primary-button,
.outline-button {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    transition: var(--transition);
}

.primary-button {
    background: var(--green);
    color: white;
    box-shadow: 0 12px 25px rgba(0,131,61,.25);
}

.primary-button:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
}

.outline-button {
    border: 1.5px solid var(--green);
    color: var(--green);
}

.outline-button:hover {
    background: var(--green);
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #fff;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
}

/* =========================
 SECTION HEADINGS
========================= */
.section-heading {
    max-width: 720px;
    margin: 0 auto 45px auto;
    text-align: center;
}

.section-heading span,
.legacy-text span,
.form-header span {
    color: var(--green);
    font-weight: 700;
    font-size: 16px;
}

.section-heading h2,
.legacy-text h2,
.form-header h2 {
    margin-top: 12px;
    font-size: 34px;
    line-height: 1.4;
    font-weight: 700;
}

.section-heading p,
.form-header p {
    margin-top: 18px;
    color: #666;
    font-size: 17px;
}

/* =========================
 PROGRAMS / SERVICES (اللون الأخضر والنصوص باللون الأبيض)
========================= */
.programs {
    background: var(--green);
    color: var(--white);
}

.programs .section-heading span {
    color: #A3E6B1;
}

.programs .section-heading h2,
.programs .section-heading p {
    color: var(--white);
}

.program-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.program-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.15);
}

.program-image {
    height: auto;
    max-height: 260px;
    overflow: hidden;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .6s ease;
}

.program-card:hover img {
    transform: scale(1.03);
}

.program-content {
    padding: 25px;
    text-align: right;
}

/* أسماء الخدمات وأسماء أعضاء الفريق في المنتصف وباللون الأبيض */
.program-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--white) !important;
    text-align: center;
}

.program-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px;
    text-align: right;
}

/* =========================
 LEGACY
========================= */
.legacy {
    background: var(--light-bg);
}

.legacy-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.legacy-text {
    text-align: right;
}

.legacy-text p {
    margin-top: 20px;
    color: #444;
}

.legacy-text ul {
    margin-top: 25px;
    list-style: none;
}

.legacy-text li {
    margin-bottom: 14px;
    font-weight: 500;
}

.legacy-image {
    border-radius: var(--radius);
    overflow: hidden;
}

.legacy-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* =========================
 PROCESS STEPS
========================= */
.process {
    background: white;
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.step {
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: var(--radius);
    background: white;
    text-align: right;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 22px;
    margin-bottom: 10px;
    text-align: center;
}

.step p {
    color: #555;
}

/* =========================
 FORM
========================= */
.application {
    background: var(--light-bg);
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.tally-container {
    width: 100%;
    min-height: 750px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.tally-container iframe {
    width: 100%;
    height: 100%;
    min-height: 750px;
    border: 0;
}

/* =========================
 NOTICE & WARNING (قسم التحذير باللون الأحمر)
========================= */
.notice-box {
    background: #F2F8F4;
    border-right: 5px solid var(--green);
    padding: 30px;
    border-radius: 14px;
    text-align: right;
}

.notice-box h2 {
    color: var(--green);
    margin-bottom: 10px;
    text-align: right;
}

/* قسم التحذير باللون الأحمر الداكن والواضح */
.warning-section {
    background-color: var(--warning-bg) !important;
    border-bottom: 3px solid var(--warning-border) !important;
    padding: 40px 0;
}

.warning-section h2 {
    color: var(--warning-text) !important;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.warning-section p {
    color: var(--warning-text) !important;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    text-align: right;
}

.warning-section img {
    max-width: 300px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 12px;
}

/* =========================
 COMPLAINTS
========================= */
.complaints {
    background: white;
}

.complaints-box {
    text-align: center;
    padding: 45px 20px;
    background: var(--light-bg);
    border-radius: 20px;
}

.complaints-box h2 {
    font-size: 32px;
}

.complaints-box p {
    color: #666;
    margin: 15px 0 30px;
    text-align: center;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 0 35px;
    background: #25D366;
    color: white;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
}

.whatsapp-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

/* =========================
 FOOTER (محاذاة اللوجو لليسار)
========================= */
.footer {
    background: #111;
    color: white;
    padding: 50px 0 20px;
    text-align: right;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* محاذاة اللوجو في الفوتر إلى اليسار */
.footer-brand img {
    width: 130px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: 0;
}

.footer-brand p {
    color: #bbb;
    text-align: right;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: right;
}

.footer-links h3 {
    margin-bottom: 10px;
    text-align: right;
}

.footer-links a {
    color: #ddd;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--green);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 35px;
    padding-top: 20px;
    color: #aaa;
}

/* =========================
 SCROLL ANIMATION (ظهور واختفاء تدريجي فاخر)
========================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
 TABLET + DESKTOP RESPONSIVE
========================= */
@media(min-width: 768px){
    .hero-grid {
        flex-direction: row;
        align-items: center;
    }

    .hero-content {
        width: 50%;
    }

    .hero-image {
        width: 50%;
    }

    .hero h1 {
        font-size: 56px;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .primary-button,
    .outline-button {
        width: 210px;
    }

    .program-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .legacy-grid {
        flex-direction: row;
        align-items: center;
    }

    .legacy-text,
    .legacy-image {
        width: 50%;
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        flex-direction: row;
        justify-content: space-between;
    }

    /* محاذاة اللوجو في الديسكتاوب لليسار بوضوح */
    .footer-brand img {
        margin-left: 0;
        margin-right: auto;
    }
}