/* ============================================================
   Memorial – Public stylesheet  (Syrian identity palette)
   ============================================================ */

:root {
    /* ── Black memorial palette ────────────────────────────── */
    --bg:          #0c0c0c;
    --bg-soft:     #111111;
    --surface:     #171717;
    --surface2:    #1c1c1c;
    --gold:        #cfc8b8;   /* warm stone — accent */
    --gold-dim:    rgba(207,200,184,0.12);
    --gold-soft:   #ddd8cc;

    /* ── Flag colors (kept for functional use) ────────────── */
    --flag-green:  #1a5c2e;
    --flag-white:  #e8e8e8;
    --flag-red:    #CE1126;

    /* ── Functional ────────────────────────────────────────── */
    --green:       #1a5c2e;
    --green-soft:  #236b38;
    --white:       #e8e8e8;
    --white-muted: #888888;
    --black:       #0c0c0c;
    --black-soft:  #111111;
    --card-bg:     #171717;
    --red:         #CE1126;
    --red-soft:    #e03a4f;
    --border:      rgba(184,176,160,0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Cairo", sans-serif;
    background: radial-gradient(ellipse at 50% 30%, #1e1e1e 0%, #0c0c0c 65%);
    background-attachment: fixed;
    color: var(--white);
    min-height: 100vh;
}
.logo-container{
    text-align:center;
    margin:30px auto;
}

.gifted{
    font-size:20px !important;
}

/* ── Submit page flag ─────────────────────────────────────── */
.submit-flag {
    position: relative;
    /*top: 20px;*/
    /*right: 24px;*/
    width: 115px;
    height: auto;
    opacity: 0.88;
    pointer-events: none;
    z-index: 50;


}

/* ── Language switch ──────────────────────────────────────── */
.lang-switch {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--white-muted);
}

.lang-switch a {
    color: var(--white-muted);
    text-decoration: none;
    transition: color .2s;
}

.lang-switch a:hover {
    color: var(--white);
}

.lang-switch a.active {
    color: var(--gold);
    font-weight: 600;
}

body:not(.rtl) .lang-switch {
    justify-content: flex-end;
}

body.rtl .lang-switch {
    justify-content: flex-start;
}

/* ── Page wrap ────────────────────────────────────────────── */
.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*justify-content: center;*/
        padding: 10px 20px !important;
    padding-bottom: 40px !important;
}

/* ── Memorial header ──────────────────────────────────────── */
.memorial-header {
    text-align: center;
    margin-bottom: 28px;
}

.memorial-header h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 0 0 10px;
    line-height: 1.2;
}

.memorial-header p {
    color: var(--white-muted);
    font-size: 17px;
    margin: 0;
}

/* ── Gold title ───────────────────────────────────────────── */
.site-gold-title {
    color: var(--gold);
}

/* ── Form card ────────────────────────────────────────────── */
.form-card {
    width: 100%;
    max-width: 720px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(207, 200, 184, 0.1);
    border-radius: 18px;
    padding: 38px;
    box-shadow:0 10px 20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-head {
    margin-bottom: 28px;
}

.form-head h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}

.form-head p {
    margin: 0;
    color: var(--white-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Grid ─────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.full-width {
    grid-column: 1 / -1;
}

/* ── Labels ───────────────────────────────────────────────── */
.form-group label {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--white-muted);
    font-weight: 600;
}

.form-group label .optional {
    color: #666666;
    font-weight: 400;
}

/* ── Inputs ───────────────────────────────────────────────── */
.form-group input:not([type="file"]) {
    width: 100%;
    padding: 11px 14px;
    border-radius: 9px;
    border: 1px solid rgba(196, 169, 107, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: var(--white);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:not([type="file"])::placeholder {
    color: #3d5447;
}

.form-group input:not([type="file"]):focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 169, 107, 0.15);
    outline: none;
}

/* ── File input ───────────────────────────────────────────── */
.file-upload-wrap {
    position: relative;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px dashed rgba(196, 169, 107, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: var(--white-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .2s;
}

.form-group input[type="file"]:hover {
    border-color: var(--gold);
}

.file-preview {
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 180px;
    border: 1px solid var(--border);
}

.file-preview img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.form-group small {
    margin-top: 6px;
    font-size: 12px;
    color: #666666;
}

/* ── Submit button ────────────────────────────────────────── */
.form-actions {
    margin-top: 28px;
}

.btn-submit {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 14px;
    background: #ffffff;
    color: #0c0c0c;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background .2s, transform .15s;
}

.btn-submit:hover {
    background: #e0ddd8;
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    padding: 13px 16px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-success {
    background: rgba(0, 122, 61, .15);
    border: 1px solid rgba(0, 122, 61, .35);
    color: #a8f0bc;
}

.alert-error {
    background: rgba(206, 17, 38, .15);
    border: 1px solid rgba(206, 17, 38, .35);
    color: #ffd0d0;
}

.error-list {
    margin: 0;
    padding-inline-start: 20px;
}

/* ── RTL ──────────────────────────────────────────────────── */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 680px) {
    .form-card {
        padding: 24px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-head h2 {
        font-size: 19px;
    }

    .submit-flag {
        width: 90px;
    }
    .gifted {
    font-size: 14px !important;
}

}


/* ============================================================
   Memorial visualization page  (body.memorial-page)
   ============================================================ */

body.memorial-page {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, var(--bg) 70%);
}

/* ── Eagle watermark background ──────────────────────────── */
/*.bg-eagle {*/
/*    position: fixed;*/
/*    inset: 0;*/
/*    background: url('../img/eagle.png') center/50% auto no-repeat;*/
/*    opacity: 0.08;*/
/*    pointer-events: none;*/
/*    z-index: 0;*/
/*}*/

/* ── Top bar ─────────────────────────────────────────────── */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 0%, transparent 100%);
    pointer-events: none;
}

#topbar .site-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    pointer-events: auto;
}

#topbar .counter {
    font-size: 13px;
    color: var(--white-muted);
    direction: ltr;
}

#topbar .counter span {
    color: var(--gold);
    font-weight: 700;
}

#topbar nav {
    display: flex;
    gap: 16px;
    pointer-events: auto;
}

#topbar nav a {
    color: var(--white-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color .2s;
}

#topbar nav a:hover {
    color: var(--gold);
}

/* ── Subtitle (كي لا ننسى) ───────────────────────────────── */
#memorial-subtitle {
    position: fixed;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(15px, 2.2vw, 22px);
    font-weight: 400;
    letter-spacing: 0.22em;
    color: rgba(232, 232, 232, 0.55);
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    direction: rtl;
}

/* ── Bottom tagline ───────────────────────────────────────── */
#memorial-tagline {
    position: fixed;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(11px, 1.3vw, 14px);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(196, 169, 107, 0.45);
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
    direction: rtl;
    font-size: 21px;
}

/* ── Canvas ──────────────────────────────────────────────── */
#memorial-canvas {
    display: block;
    cursor: default;
    position: relative;
    z-index: 2;
}

/* ── Tooltip card ────────────────────────────────────────── */
#tooltip {
    position: fixed;
    display: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    background: rgba(7, 22, 13, 0.97);
    border: 1px solid rgba(196, 169, 107, 0.2);
    border-radius: 14px;
    padding: 14px;
    pointer-events: none;
    z-index: 200;
    width: 250px;
    backdrop-filter: blur(14px);
    direction: rtl;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

#tooltip .tt-photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(196, 169, 107, 0.4);
    flex-shrink: 0;
}

#tooltip .tt-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#tooltip .tt-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#tooltip .tt-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    display: block;
}

#tooltip .tt-age {
    font-size: 12px;
    color: var(--gold);
    display: block;
}

#tooltip .tt-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#tooltip .tt-label {
    font-size: 10px;
    color: rgba(143, 168, 152, 0.6);
    letter-spacing: 0.04em;
}

#tooltip .tt-row span:last-child {
    font-size: 12px;
    color: var(--white-muted);
}

#tooltip .tt-place span:last-child {
    color: var(--white-muted);
}

/* ── Loading overlay ─────────────────────────────────────── */
#loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    z-index: 300;
    transition: opacity 0.8s ease;
}

#loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loading .load-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    direction: ltr;
}

#loading .load-sub {
    font-size: 15px;
    color: var(--white-muted);
    margin-bottom: 32px;
}

#loading .load-bar-wrap {
    width: 220px;
    height: 2px;
    background: rgba(196, 169, 107, 0.12);
    border-radius: 2px;
    overflow: hidden;
}

#loading .load-bar {
    height: 100%;
    width: 0%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Empty state ─────────────────────────────────────────── */
#empty-state {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

#empty-state .em-text {
    font-size: clamp(60px, 12vw, 160px);
    font-weight: 900;
    letter-spacing: 0.12em;
    direction: ltr;
    background: linear-gradient(135deg, #0f4a28 0%, var(--gold) 50%, #0f4a28 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-align: center;
}

#empty-state .em-sub {
    margin-top: 28px;
    font-size: 16px;
    color: var(--white-muted);
    text-align: center;
}

#empty-state .em-sub a {
    color: var(--gold);
    text-decoration: none;
}

#empty-state .em-sub a:hover {
    text-decoration: underline;
}

/* ── Bottom hint ─────────────────────────────────────────── */
#hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(196, 169, 107, 0.35);
    pointer-events: none;
    letter-spacing: 0.05em;
    transition: opacity 1s;
    z-index: 10;
}