/* ═══════════════════════════════════════════
   NAMI LOGIN — FULLSCREEN IMMERSIVE
   Concept: Fullscreen slideshow + floating
   glassmorphism card centered on screen
   Font: DM Serif Display + Almarai
═══════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700&family=DM+Serif+Display:ital@0;1&display=swap");

:root {
    --accent:       #2b7e4c;
    --accent-light: #3aad68;
    --accent-glow:  rgba(43,126,76,0.25);
    --glass-bg:     rgba(8, 10, 14, 0.74);
    --glass-border: rgba(255,255,255,0.10);
    --glass-shine:  rgba(255,255,255,0.04);
    --text:         #f1f5f9;
    --text-muted:   rgba(255,255,255,0.40);
    --text-soft:    rgba(255,255,255,0.65);
    --radius:       24px;
    --radius-sm:    12px;
    --input-bg:     rgba(255,255,255,0.055);
    --input-border: rgba(255,255,255,0.10);
}

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

body {
    font-family: "Almarai", sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #080a0e;
}

/* ─── Layout ─── */
.container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─────────────────────────────────────────
   FULLSCREEN SLIDESHOW
───────────────────────────────────────── */
.image-side {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    animation: kenBurns 12s ease-in-out infinite alternate;
}

.bg-layer.active { opacity: 1; }

@keyframes kenBurns {
    0%   { transform: scale(1.00) translate(0px, 0px);   }
    100% { transform: scale(1.08) translate(-10px, -6px); }
}

.bg-layer:nth-child(1) { animation-delay: 0s;  }
.bg-layer:nth-child(2) { animation-delay: -6s; }
.bg-layer:nth-child(3) { animation-delay: -3s; }

/* Dark vignette overlay */
.image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 80% at 50% 50%,
        rgba(0,0,0,0.42) 0%,
        rgba(0,0,0,0.75) 100%
        );
    z-index: 2;
    pointer-events: none;
}

/* Edge vignette */
.image-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 100% at 50% 50%,
        transparent 38%,
        rgba(0,0,0,0.50) 100%
        );
    z-index: 2;
    pointer-events: none;
}

/* ─────────────────────────────────────────
   FORM SIDE — GLASS CARD (centered)
───────────────────────────────────────── */
.form-side {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    padding: 20px;
}

.form-wrap {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 44px 40px 36px;
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    box-shadow:
        0 0 0 1px var(--glass-shine) inset,
        0 32px 80px rgba(0,0,0,0.60),
        0 0 80px rgba(43,126,76,0.06);
    position: relative;
    animation: cardIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Top green shimmer line */
.form-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg,
    transparent,
    rgba(58,173,104,0.65) 50%,
    transparent
    );
}

@keyframes cardIn {
    from { opacity:0; transform:translateY(28px) scale(0.97); filter:blur(4px); }
    to   { opacity:1; transform:translateY(0)    scale(1);    filter:blur(0); }
}

/* Logo */
.form-wrap img.logo {
    display: block;
    max-height: 56px;
    max-width: 160px;
    margin: 0 auto 28px;
    object-fit: contain;
    filter: brightness(1.1) drop-shadow(0 2px 14px rgba(43,126,76,0.3));
    animation: cardIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.05s both;
}

/* Heading */
.form-wrap h1 {
    font-family: "DM Serif Display", serif;
    font-size: 30px;
    font-weight: 400;
    color: var(--text);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    animation: cardIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.10s both;
}

.form-wrap .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 32px;
    animation: cardIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}

/* Alert */
.alert {
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
}
.alert-danger {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.22);
    color: #fca5a5;
}

/* Form */
form { animation: cardIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.20s both; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}

.input-field { display:flex; flex-direction:column; gap:7px; }

.input-field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.input-field input {
    width: 100%;
    padding: 13px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: "Almarai", sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.input-field input::placeholder { color: var(--text-muted); }

.input-field input:focus {
    border-color: var(--accent);
    background: rgba(43,126,76,0.07);
    box-shadow: 0 0 0 3px rgba(43,126,76,0.14);
}

/* Remember me */
.check-field { margin: 8px 0 2px; }

.check-field > div {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.check-field label {
    font-size: 13px;
    color: var(--text-soft);
    cursor: pointer;
    user-select: none;
}

.check-field input[type="checkbox"] {
    width:16px; height:16px;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.check-field input[type="checkbox"]::after {
    content: "";
    width:16px; height:16px;
    border: 1.5px solid var(--input-border);
    border-radius: 5px;
    position: absolute;
    top:50%; left:50%;
    transform: translate(-50%,-50%);
    background: var(--input-bg);
    transition: all 0.2s;
    display: flex; align-items:center; justify-content:center;
    font-family: "Font Awesome 6 pro", sans-serif;
    font-size: 9px; color:#fff;
}

.check-field input[type="checkbox"]:checked::after {
    content: "\f00c";
    background: var(--accent);
    border-color: var(--accent);
}

/* Submit Button */
form button[type="submit"] {
    margin-top: 24px;
    width: 100%;
    height: 50px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-family: "Almarai", sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 6px 28px rgba(43,126,76,0.38);
}

form button[type="submit"]::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(43,126,76,0.5);
    filter: brightness(1.08);
}

form button[type="submit"]:hover::after { opacity:1; }
form button[type="submit"]:active { transform: translateY(0); }

/* Footer */
.footer {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    animation: cardIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.30s both;
}

.footer a { display:inline-flex; align-items:center; }

.logo-login {
    width: 64px;
    margin: 0 4px;
    filter: brightness(0) invert(0.55);
    vertical-align: middle;
    transition: filter 0.2s;
}
.logo-login:hover { filter: brightness(0) invert(0.8); }

/* ─────────────────────────────────────────
   SLIDE DOTS (bottom center, above card)
───────────────────────────────────────── */
.slide-dots {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 20;
}

.slide-dot {
    height: 5px;
    width: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.28);
    cursor: pointer;
    transition: background 0.35s, width 0.35s;
}

.slide-dot.active {
    background: rgba(255,255,255,0.88);
    width: 22px;
}

/* Slide counter bottom right */
.slide-badge {
    position: fixed;
    bottom: 22px;
    z-index: 20;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.12em;
    font-family: "DM Serif Display", serif;
}

[dir="ltr"] .slide-badge { right: 28px; }
[dir="rtl"] .slide-badge { left:  28px; }

/* ─────────────────────────────────────────
   LANGUAGE SWITCHER
───────────────────────────────────────── */
.selectLanguage {
    position: fixed;
    top: 22px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: rgba(8,10,14,0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.2s, background 0.2s;
}

.selectLanguage:hover {
    border-color: rgba(43,126,76,0.38);
    background: rgba(8,10,14,0.82);
}

[dir="ltr"] .selectLanguage { left: 28px; }
[dir="rtl"] .selectLanguage { right: 28px; }

.selectLanguage .icon { display:flex; align-items:center; padding:2px 4px; }
.selectLanguage .icon svg { width:18px; height:18px; }

.selectLanguage select {
    border: none; outline: none;
    background: transparent;
    font-size: 12px;
    font-family: "Almarai", sans-serif;
    color: var(--text-soft);
    cursor: pointer;
    padding: 4px 0;
}


.selectLanguage select option {
    background-color: #080a0e; /* نفس لون خلفية الحاوية أو لون داكن صريح */
    color: #ffffff;            /* تأكد أن اللون يتناقض مع الخلفية */
    padding: 10px;
}

/* حل إضافي لضمان عدم اختفاء النص في بعض المتصفحات */
.selectLanguage select {
    color: var(--text-soft) !important;
    appearance: none; /* لإلغاء أي تنسيق افتراضي مزعج من المتصفح */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ─────────────────────────────────────────
   RTL / LTR HELPERS
───────────────────────────────────────── */
[dir="rtl"] .margin { margin-right: 6px; }
[dir="ltr"] .margin { margin-left:  6px; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 480px) {
    .form-wrap {
        padding: 34px 22px 28px;
        border-radius: 20px;
        max-width: 100%;
    }
    .form-wrap h1 { font-size: 25px; }
}
