﻿:root {
    --primary: #0ea5e9;
    --primary-dark: #0369a1;
    --primary-light: #7dd3fc;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    min-height: 100vh;
    background: var(--dark);
    color: var(--dark);
    direction: rtl;
}

.app-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

#canvas-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.gradient-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.15) 0%, transparent 50%), radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    filter: blur(80px);
    z-index: 2;
}

.main-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    gap: 60px;
    padding: 40px;
    z-index: 3;
    max-width: 1440px;
    margin: 0 auto;
    align-items: center;
}

.info-section {
    flex: 1;
    color: white;
    padding: 40px;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 1s forwards;
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    background: linear-gradient(45deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.main-description {
    font-size: 20px;
    line-height: 1.8;
    color: #e2e8f0;
    margin-bottom: 56px;
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    gap: 32px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .feature-card::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03));
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .feature-card:hover {
        transform: translateY(-8px);
        border-color: var(--primary);
    }

        .feature-card:hover::before {
            opacity: 1;
        }

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.feature-description {
    color: #94a3b8;
    line-height: 1.7;
    font-size: 12px;
}

.login-section {
    width: 100%;
    max-width: 520px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.logos-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.naba-logo {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kfsc-logo {
    height: 90px;
    width: auto;
    opacity: 0.9;
}

.form-header {
    text-align: center;
    margin-bottom: 48px;
}

.form-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    color: var(--gray);
    font-size: 16px;
}

.login-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.login-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    color: var(--dark);
}

    .login-option.active {
        border-color: var(--primary);
        background: rgba(14, 165, 233, 0.05);
    }

    .login-option:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }

.input-group {
    margin-bottom: 28px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 18px 56px 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--dark);
    background: rgba(255, 255, 255, 0.5);
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
        background: white;
    }

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 22px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.nafath-button {
    width: 100%;
    padding: 18px;
    background: white;
    color: var(--dark);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .submit-button::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2));
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .submit-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(14, 165, 233, 0.2);
    }

.forgot-password {
    text-align: center;
    margin-top: 24px;
}

    .forgot-password a {
        color: var(--primary);
        text-decoration: none;
        font-size: 15px;
        transition: all 0.3s ease;
        font-weight: 500;
    }

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 24px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 14px;
}

/* Base responsive adjustments */
@media (max-width: 1024px) {
    .main-wrapper {
        padding: 16px;
        gap: 24px;
        padding-top: 80px;
    }

    .info-section {
        padding: 16px;
        max-width: 100%;
    }

    .main-title {
        font-size: 32px;
    }

    .feature-grid {
        gap: 16px;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding-top: 60px;
    }

    .login-section {
        padding: 12px;
        max-width: 100%;
    }

    .login-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .logos-container {
        gap: 16px;
    }

    .naba-logo {
        width: 56px;
        height: 56px;
        font-size: 20px;
        border-radius: 12px;
    }

    .kfsc-logo {
        height: 50px;
    }

    .form-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .login-options {
        gap: 12px;
    }

    .login-option {
        padding: 12px;
        font-size: 14px;
        border-radius: 12px;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .form-input {
        padding: 14px 40px 14px 12px;
        font-size: 14px;
        border-radius: 12px;
    }

    .input-icon {
        font-size: 18px;
        right: 12px;
    }

    .submit-button,
    .nafath-button {
        padding: 14px;
        font-size: 16px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .main-wrapper {
        padding: 12px;
        padding-top: 50px;
    }

    .login-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .naba-logo {
        width: 48px;
        height: 48px;
        font-size: 18px;
        border-radius: 10px;
    }

    .kfsc-logo {
        height: 40px;
    }

    .form-title {
        font-size: 20px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .login-option {
        padding: 10px;
        font-size: 13px;
    }

    .form-input {
        padding: 12px 36px 12px 10px;
        font-size: 13px;
    }

    .input-icon {
        font-size: 16px;
        right: 10px;
    }

    .submit-button,
    .nafath-button {
        padding: 12px;
        font-size: 14px;
    }

    .forgot-password a {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 16px 12px;
    }

    .naba-logo {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .form-title {
        font-size: 18px;
    }

    .form-input,
    .login-option,
    .submit-button,
    .nafath-button {
        padding: 10px;
        font-size: 12px;
    }
}

/* Header responsive adjustments */
@media (max-width: 768px) {
    .header-logos {
        padding: 12px;
        height: auto;
    }

    .logo-container {
        gap: 12px;
    }

    .naba-logo {
        margin: 0;
    }
}

/* Feature cards responsive adjustments */
@media (max-width: 480px) {
    .feature-card {
        padding: 16px;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 12px;
    }

    .feature-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .feature-description {
        font-size: 11px;
        line-height: 1.4;
    }
}

.header-logos {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(8px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.naba-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kfsc-logo {
    height: 90px;
    width: auto;
    opacity: 0.9;
}

/* Update main wrapper to account for header */
.main-wrapper {
    padding-top: 100px;
}

/* Update login card styles */
.login-card {
    padding-top: 40px;
}

.info-section {
    flex: 0.8; /* Reduced from 1 to make it smaller */
    color: white;
    padding: 30px; /* Reduced from 40px */
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 1s forwards;
    max-width: 600px; /* Added max-width to control size */
}

.main-title {
    font-size: 38px; /* Reduced from 56px */
    font-weight: 800;
    margin-bottom: 16px; /* Reduced from 24px */
    line-height: 1.2;
    background: linear-gradient(45deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-description {
    font-size: 16px; /* Reduced from 20px */
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 32px; /* Reduced from 56px */
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    gap: 20px; /* Reduced from 32px */
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px; /* Reduced from 24px */
    padding: 20px; /* Reduced from 32px */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-icon {
    width: 44px; /* Reduced from 56px */
    height: 44px; /* Reduced from 56px */
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px; /* Reduced from 28px */
    margin-bottom: 16px; /* Reduced from 24px */
}

.feature-title {
    font-size: 18px; /* Reduced from 24px */
    font-weight: 700;
    color: white;
    margin-bottom: 8px; /* Reduced from 12px */
}

.feature-description {
    color: #94a3b8;
    line-height: 1.5;
    font-size: 12px; /* Reduced from 16px */
}


.naba-logo {
    position: relative;
    overflow: hidden;
}

    .naba-logo::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100% );
        transform: rotate(45deg);
        animation: lightEffect 3s ease-in-out infinite;
    }

@keyframes lightEffect {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }

    100% {
        transform: rotate(45deg) translateY(100%);
    }
}


@media (max-width: 768px) {
    .kfsc-logo {
        display: none; /* Hide KFSC logo on mobile */
    }

    .header-logos {
        justify-content: center; /* Center the remaining logo */
        padding: 12px;
    }

    .logo-container {
        justify-content: center;
    }
}


/* Alert and Validation Styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.text-danger {
    color: #dc2626;
}

.validation-summary-errors {
    color: #dc2626;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-right: 1.5rem;
    }


.feature-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.feature-slider {
    position: relative;
    height: 200px; /* Adjust based on your content */
}

.feature-card {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s ease;
}

    .feature-card.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .feature-card.prev {
        transform: translateX(-100%);
    }

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.slider-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active {
        background: var(--primary);
        transform: scale(1.2);
    }

@media (max-width: 768px) {
    .feature-slider {
        height: 180px; /* Adjust for mobile */
    }

    .feature-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .feature-slider {
        height: 160px; /* Adjust for smaller mobile */
    }
}




/* Enhanced Mobile Layout */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 16px;
        padding-top: 80px;
        align-items: stretch;
    }

    .info-section {
        padding: 16px;
        text-align: center;
    }

    .main-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .main-description {
        font-size: 14px;
        margin-bottom: 24px;
    }

    /* Improve feature slider for mobile */
    .feature-slider {
        height: 140px;
    }

    .feature-card {
        padding: 16px;
        border-radius: 12px;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 8px;
    }

    .feature-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .feature-description {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Enhanced login section for mobile */
    .login-section {
        width: 100%;
        padding: 0;
    }

    .login-card {
        border-radius: 16px;
        padding: 24px 16px;
        margin: 0;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }

    .form-header {
        margin-bottom: 24px;
    }

    .login-options {
        gap: 8px;
        margin-bottom: 20px;
    }

    .login-option {
        padding: 12px 8px;
        font-size: 14px;
    }

        .login-option img {
            width: 20px;
            height: 20px;
        }

    .input-group {
        margin-bottom: 16px;
    }

    .form-input {
        padding: 14px 40px 14px 16px;
        font-size: 14px;
        border-radius: 12px;
    }
}

/* Additional improvements for very small screens */
@media (max-width: 360px) {
    .main-title {
        font-size: 24px;
    }

    .main-description {
        font-size: 13px;
    }

    .login-card {
        padding: 20px 12px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .form-title {
        font-size: 20px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .login-option {
        padding: 10px 6px;
        font-size: 13px;
    }

    .input-group {
        margin-bottom: 12px;
    }

    .form-input {
        padding: 12px 36px 12px 12px;
    }

    .submit-button {
        padding: 12px;
        font-size: 14px;
    }
}

/* Improve touch targets for mobile */
@media (hover: none) {
    .login-option,
    .submit-button,
    .form-input {
        min-height: 44px;
    }

    .dot {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
}

/* Fix layout shifts during loading */
.main-wrapper {
    min-height: calc(100vh - 100px);
    margin-bottom: 0;
}

/* Improve form accessibility */
.form-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* Smooth scrolling for better mobile experience */
html {
    scroll-behavior: smooth;
}

/* Prevent content overflow */
* {
    max-width: 100%;
    overflow-wrap: break-word;
}



