/* =====================================================
   نلعب للعافية - التنسيق العام
   ألوان:  فاتح + أزرق سماوي/ركوازي + أبيض + ص داكن هادئ
   ===================================================== */

:root {
    --color-primary: #2FBF71;      /* أض فاتح */
    --color-secondary: #2CC9C9;    /* تركوازي/سماوي */
    --color-bg: #FBFDFC;
    --color-white: #FFFFFF;
    --color-text: #2B3A3A;         /* داكن ائ */
    --color-text-light: #6B7B7B;
    --color-border: #E3ECEA;
    --color-danger: #D64545;
    --color-success: #2FBF71;
    --radius: 14px;
    --shadow: 0 4px 16px rgba(43, 58, 58, 0.06);
    --max-width: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== الهيدر ===== */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

@media (min-width: 601px) {
    .site-header { padding: 8px 0; }
    .brand img { height: 32px; }
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
}

.brand img { height: 40px; width: auto; }

.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }

/* ===== زر ائة الجوال (يظهر فق على شاشات الصغيرة) ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    margin: 0 auto;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 32px 16px 40px;
    background: linear-gradient(180deg, rgba(47,191,113,0.08), rgba(44,201,201,0.05));
    position: relative;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo {
    width: 170px;
    height: auto;
    margin: 0 0 14px;
    display: block;
}

.hero h1 {
    font-size: 2rem;
    margin: 12px 0 6px;
    color: var(--color-text);
}

.hero .tagline {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 18px;
}

.desc {
    max-width: 640px;
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: 1.02rem;
    text-align: center;
}

.intro-section { padding-top: 8px; }

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-hint {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    animation: scrollHintBounce 1.8s ease-in-out infinite;
}

.scroll-hint:hover { opacity: 0.85; }

@keyframes scrollHintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

/* ===== أزرار ===== */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 6px 16px rgba(47,191,113,0.28);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-small { padding: 8px 18px; font-size: 0.9rem; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }

/* ===== أقسام عاة ===== */
section { padding: 40px 0; }

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.section-sub {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

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

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; font-size: 1.05rem; }
.card-centered { text-align: center; }
.card p { color: var(--color-text-light); font-size: 0.95rem; margin-bottom: 0; }
.card .icon { font-size: 1.8rem; margin-bottom: 10px; }

.philosophy-box {
    background: var(--color-white);
    border: 1px dashed var(--color-secondary);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.tag-pill {
    background: rgba(47,191,113,0.1);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* ===== نماذج ===== */
.form-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    max-width: 640px;
    margin: 0 auto;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group .hint {
    display: block;
    color: var(--color-text-light);
    font-size: 0.82rem;
    margin-top: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
input[type="url"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-bg);
    color: var(--color-text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: var(--color-white);
}

textarea { resize: vertical; min-height: 100px; }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.checkbox-item input { width: auto; margin-top: 4px; }

.consent-box {
    background: rgba(44,201,201,0.06);
    border: 1px solid var(--color-secondary);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.88rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.consent-box input { width: auto; margin-top: 4px; }

/* ===== رسائل ===== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success { background: rgba(47,191,113,0.12); color: #1C7A46; border: 1px solid rgba(47,191,113,0.3); }
.alert-error   { background: rgba(214,69,69,0.1); color: #A32F2F; border: 1px solid rgba(214,69,69,0.3); }
.alert-info    { background: rgba(44,201,201,0.1); color: #157A7A; border: 1px solid rgba(44,201,201,0.3); }

.field-error { color: var(--color-danger); font-size: 0.82rem; margin-top: 6px; display: block; }

/* ===== بطاا الاستبيانات ===== */
.survey-card { display: flex; flex-direction: column; gap: 10px; }
.survey-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    width: fit-content;
}
.status-open { background: rgba(47,191,113,0.15); color: #1C7A46; }
.status-closed { background: rgba(107,123,123,0.15); color: #4A5757; }
.survey-card img { border-radius: 10px; margin-top: 8px; border: 1px solid var(--color-border); }

/* ===== تنبه صحي ===== */
.health-notice {
    background: #FFF7E6;
    border: 1px solid #F0C36D;
    color: #7A5B12;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 0.9rem;
    max-width: 720px;
    margin: 0 auto;
}

/* ===== الفتر ===== */
.site-footer {
    text-align: center;
    padding: 30px 16px;
    color: var(--color-text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
    margin-top: 30px;
}

.site-footer a { color: var(--color-text-light); text-decoration: underline; }

.telegram-qr-box {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.telegram-qr-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    font-size: 1rem;
}

.telegram-icon { flex-shrink: 0; }

.telegram-qr-link-wrap {
    display: block;
    max-width: 600px;
    margin: 0 auto;
}

.telegram-qr-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    transition: transform 0.15s ease;
}

.telegram-qr-link-wrap:hover img {
    transform: scale(1.02);
}

.telegram-link {
    display: inline-block;
    color: #229ED9;
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 16px;
    direction: ltr;
}

.telegram-link:hover { text-decoration: underline; }

.telegram-qr-hint {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-top: 12px;
    margin-bottom: 0;
    max-width: 320px;
    margin-inline: auto;
}

/* ===== وحة الإدارة ===== */
.admin-body { background: #F3F6F5; }

.admin-header {
    background: var(--color-text);
    color: #fff;
    padding: 14px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a { color: #DFF5EA; }

.admin-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .num { font-size: 1.8rem; font-weight: 800; color: var(--color-primary); }
.stat-card .label { color: var(--color-text-light); font-size: 0.85rem; }

.data-table-wrap {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    padding: 6px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 600px;
}

table.data-table th, table.data-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

table.data-table th { color: var(--color-text-light); font-weight: 700; font-size: 0.85rem; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-pending { background: #FFF3D6; color: #8A6300; }
.badge-accepted { background: rgba(47,191,113,0.15); color: #1C7A46; }
.badge-rejected { background: rgba(214,69,69,0.1); color: #A32F2F; }

.filters-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    align-items: center;
}

.filters-bar input, .filters-bar select { width: auto; min-width: 160px; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.detail-box {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.detail-box h4 { margin-top: 0; font-size: 0.95rem; color: var(--color-text-light); }
.detail-box .value { font-size: 1.05rem; font-weight: 700; }

.action-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ===== استجابة اجوال ===== */
@media (max-width: 600px) {
    .hero {
        min-height: calc(100vh - 68px);
        min-height: calc(100svh - 68px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 28px;
        padding-bottom: 70px;
    }

.hero-actions .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-logo {
        width: 130px;
    }

    .hero h1 { font-size: 1.5rem; }
    .btn { width: 100%; }

   .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 10px 8px;
        font-size: 1.00rem;
    }

    .nav-toggle { display: flex; }

    .telegram-qr-link-wrap {
        max-width: none;
        width: calc(100% + 80px);
        margin-inline: -40px;
    }

    .telegram-qr-hint {
        max-width: 100%;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow);
        padding: 8px 20px 16px;
    }

    .site-nav.open { display: flex; }

    .site-nav a {
        padding: 12px 4px;
        border-bottom: 1px solid var(--color-border);
        font-size: 1rem;
    }

    .site-nav a:last-child { border-bottom: none; }

    .site-header .container { position: relative; }
}
