@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@700&family=Poppins:wght@400;600;700&family=Noto+Sans+Arabic:wght@400;600;700&display=swap');

/* ── RTL / Arabic support ─────────────────────── */
[dir="rtl"] body                { font-family: 'Noto Sans Arabic', 'Poppins', sans-serif; }
[dir="rtl"] .top-bar nav a      { margin-left: 0; margin-right: 20px; }
[dir="rtl"] .breadcrumb a::after { content: ' \\'; }
[dir="rtl"] a.menu-btn          { border-left: none; border-right: 5px solid var(--green); }
[dir="rtl"] a.menu-btn:hover    { border-right-color: var(--pink); transform: translateX(-4px); }
[dir="rtl"] .status             { border-left: none; border-right: 4px solid transparent; }
[dir="rtl"] .status.ok          { border-right-color: var(--green); }
[dir="rtl"] .status.error       { border-right-color: #dc2626; }

:root {
    --green:     #009537;
    --pink:      #ee0979;
    --orange:    #ff6a00;
    --dark-blue: #243673;
    --text:      #161616;
    --light-bg:  #FBFCFF;
    --gray:      #ececec;
    --white:     #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--light-bg);
}

h1, h2, h3 {
    font-family: 'Amatic SC', cursive;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3rem;  color: var(--dark-blue); margin-bottom: 12px; }
h2 { font-size: 2rem;  color: var(--dark-blue); margin-bottom: 10px; }
h3 { font-size: 1.5rem; color: var(--dark-blue); margin-bottom: 8px; }

a { color: var(--pink); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--green); }

/* ── Top bar ──────────────────────────────────── */
.top-bar {
    background: var(--dark-blue);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.top-bar .site-name {
    font-family: 'Amatic SC', cursive;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}

.top-bar nav a {
    color: rgba(255,255,255,0.8);
    margin-left: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.top-bar nav a:hover { color: var(--white); }

/* ── Container ────────────────────────────────── */
.container      { max-width: 860px;  margin: 0 auto; padding: 40px 24px; }
.container.wide { max-width: 1100px; }

/* ── Breadcrumb ───────────────────────────────── */
.breadcrumb {
    margin-bottom: 28px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.breadcrumb a { color: var(--pink); margin-right: 6px; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb a::after { content: ' /'; color: #bbb; margin-left: 6px; }

/* ── Cards ────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,0.09);
    padding: 28px;
    margin-bottom: 20px;
}

/* ── Form elements ────────────────────────────── */
label {
    display: block;
    margin: 10px 0 4px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray);
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
    margin-bottom: 14px;
    transition: border-color 0.15s;
}

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

textarea { resize: vertical; }

/* ── Buttons ──────────────────────────────────── */
button, a.btn {
    display: inline-block;
    padding: 13px 28px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    margin-right: 8px;
    margin-bottom: 8px;
}

button:hover, a.btn:hover { background: var(--pink); }

button.secondary           { background: #6b7280; }
button.secondary:hover     { background: #4b5563; }
button.danger              { background: #dc2626; }
button.danger:hover        { background: var(--pink); }
button.sm                  { padding: 7px 16px; font-size: 0.75rem; }

/* ── Layout helpers ───────────────────────────── */
.row       { display: flex; gap: 16px; flex-wrap: wrap; }
.row > *   { flex: 1 1 180px; }

/* ── Tables ───────────────────────────────────── */
table               { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td              { border: 1px solid var(--gray); padding: 10px 14px; text-align: left; }
th                  { background: var(--dark-blue); color: var(--white);
                      font-family: 'Amatic SC', cursive; font-size: 1.1rem;
                      font-weight: 700; letter-spacing: 0.02em; }
tr:nth-child(even) td { background: var(--light-bg); }

/* ── Status messages ──────────────────────────── */
.status {
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    border-left: 4px solid transparent;
}
.status.ok    { background: #e6ffed; border-color: var(--green); color: #166534; }
.status.error { background: #ffe6e6; border-color: #dc2626;     color: #991b1b; }

/* ── Hub menu ─────────────────────────────────── */
.menu { display: flex; flex-direction: column; gap: 12px; }

a.menu-btn {
    display: block;
    padding: 22px 28px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,0.09);
    text-decoration: none;
    color: var(--dark-blue);
    font-family: 'Amatic SC', cursive;
    font-size: 1.7rem;
    font-weight: 700;
    border-left: 5px solid var(--green);
    transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

a.menu-btn:hover {
    border-left-color: var(--pink);
    color: var(--pink);
    transform: translateX(4px);
}

a.menu-btn span {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.83rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 3px;
}

/* ── Index hero ───────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #1b2e6b 100%);
    padding: 40px 24px;
}

.hero-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    padding: 56px 64px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.hero-card h1 { font-size: 3.4rem; margin-bottom: 8px; }
.hero-card p  { color: #555; margin-bottom: 36px; }

.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-visitor  { background: var(--green); }
.btn-volunteer { background: var(--dark-blue); }
.btn-visitor:hover, .btn-volunteer:hover { background: var(--pink); }

/* ── Visit item rows ──────────────────────────── */
.items-header {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    flex-wrap: wrap;
}
.items-header span { flex: 1 1 110px; }

.item-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.item-row select, .item-row input { flex: 1 1 110px; margin-bottom: 0; }
.item-row button { flex: none; }

p.empty { color: #6b7280; font-style: italic; }

.lang-change { font-size: 0.82rem; margin-bottom: 20px; }

.family-confirm { font-size: 0.88rem; min-height: 22px; margin: 6px 0 14px; font-weight: 600; }
.family-confirm.ok    { color: var(--green); }
.family-confirm.error { color: #dc2626; }
