/* ========================================
   Tajweed Academy - Islamic Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;600;700&display=swap');

:root {
    /* Islamic Color Palette */
    --primary-gold: #D4AF37;
    --primary-green: #0D6336;
    --secondary-green: #1A7F4B;
    --accent-turquoise: #1B998B;
    --dark-bg: #1C1C1E;
    --light-cream: #F8F6F0;
    --white: #FFFFFF;
    --border-gold: #B8972D;
    
    /* Typography */
    --font-arabic: 'Cairo', 'Amiri', serif;
    --font-arabic-title: 'Amiri', serif;
}

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

body {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
    background: #F8F6F0 url('/images/islamic-bg.svg') center center / cover no-repeat fixed;
    color: #333;
    line-height: 1.8;
    position: relative;
    min-height: 100vh;
}

/* طبقة شفافة فوق الخلفية للتحكم في الشفافية */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* زخارف إضافية في الزوايا */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 5% 5%, rgba(13, 99, 54, 0.08) 0%, transparent 15%),
        radial-gradient(circle at 95% 5%, rgba(212, 175, 55, 0.08) 0%, transparent 15%),
        radial-gradient(circle at 5% 95%, rgba(212, 175, 55, 0.08) 0%, transparent 15%),
        radial-gradient(circle at 95% 95%, rgba(13, 99, 54, 0.08) 0%, transparent 15%);
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-arabic-title);
    color: var(--primary-green);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

/* ========================================
   Login Page
   ======================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* خلفية خاصة بصفحة Login - أكثر وضوحاً */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0D6336 0%, #1A7F4B 50%, #D4AF37 100%);
    opacity: 0.9;
    z-index: -2;
}

.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('/images/islamic-bg.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(13, 99, 54, 0.1),
        0 0 0 1px rgba(212, 175, 55, 0.1);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 20px;
    background: var(--white);
    border-radius: 20px 20px 0 0;
}

.islamic-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.islamic-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--white);
}

.login-header h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.login-body {
    padding: 2.5rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E0DED4;
    border-radius: 12px;
    font-family: var(--font-arabic);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-cream);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-family: var(--font-arabic);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--border-gold) 100%);
    color: var(--white);
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

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

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-danger {
    background: #FEE;
    border: 1px solid #FCC;
    color: #C33;
}

.alert-success {
    background: #EFE;
    border: 1px solid #CFC;
    color: #3C3;
}

/* ========================================
   Role Selection
   ======================================== */
.role-selection {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 2rem auto;
}

.role-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.role-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.role-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.role-icon svg {
    width: 50px;
    height: 50px;
    fill: var(--white);
}

.role-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.role-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ========================================
   Islamic Decorative Elements
   ======================================== */
.islamic-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.islamic-divider::before,
.islamic-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-gold), transparent);
}

.islamic-divider::before {
    right: 0;
}

.islamic-divider::after {
    left: 0;
}

.islamic-divider svg {
    width: 30px;
    height: 30px;
    fill: var(--primary-gold);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .role-grid {
        grid-template-columns: 1fr;
    }
}
