/* ===================================
   N Design Header & Navigation Style
   نسخة مطابقة للموقع المرجعي
   =================================== */

:root {
    --primary-dark: #1a3d2e;
    --primary: #2d5a47;
    --primary-light: #3d7a5f;
    --accent: #d4a017;
    --accent-light: #e6b82a;
    --accent-glow: rgba(212, 160, 23, 0.3);
    --bg-cream: #f5f0e6;
    --bg-light: #faf8f3;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #7a7a7a;
    --text-white: #ffffff;
    --text-cream: #f5f0e6;
    --success: #22c55e;
    --shadow-md: 0 4px 12px rgba(26, 61, 46, 0.15);
    --shadow-lg: 0 8px 24px rgba(26, 61, 46, 0.2);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    --transition: 0.3s ease;
    --font-primary: 'Cairo', sans-serif;
    --font-decorative: 'Aligarh Arabic', serif;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s ease infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; animation-delay: 3s; }
.particle:nth-child(3) { left: 50%; animation-delay: 6s; }
.particle:nth-child(4) { left: 70%; animation-delay: 9s; }
.particle:nth-child(5) { left: 90%; animation-delay: 12s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-svg {
    width: 50px;
    height: 50px;
}

.logo-text {
    font-family: var(--font-decorative);
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-cream);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Container */
.main-container {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a017' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-decorative);
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    unicode-bidi: plaintext;
    direction: rtl;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-cream);
    opacity: 0.9;
}

/* Progress Section */
.progress-section {
    background: var(--bg-white) !important;
    padding: 2rem !important;
    margin: -2rem auto 2rem !important;
    max-width: 700px !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    position: relative !important;
    z-index: 10 !important;
}

.progress-container {
    max-width: 700px;
    margin: 0 auto;
}

.progress-bar {
    height: 6px !important;
    background: var(--bg-cream) !important;
    border-radius: var(--radius-full) !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important;
}

.progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%) !important;
    border-radius: var(--radius-full) !important;
    transition: width 0.5s ease !important;
    /* width removed to allow JavaScript control */
}

.progress-steps {
    display: flex !important;
    justify-content: space-between !important;
}

.step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    opacity: 0.5 !important;
    transition: var(--transition) !important;
}

.step.active {
    opacity: 1 !important;
}

.step.completed {
    opacity: 1 !important;
}

.step-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: var(--radius-full) !important;
    background: var(--bg-cream) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    color: var(--text-light) !important;
    transition: var(--transition) !important;
    border: 2px solid transparent !important;
}

.step.active .step-icon {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    border-color: var(--accent) !important;
    box-shadow: var(--shadow-glow) !important;
}

.step.completed .step-icon {
    background: var(--success) !important;
    color: var(--text-white) !important;
}

.step-label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--text-medium) !important;
}

.step.active .step-label {
    color: var(--primary) !important;
}

/* Form Wrapper */
.form-wrapper {
    max-width: 700px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Form Step */
.form-step {
    background: var(--bg-white) !important;
    border-radius: var(--radius-xl) !important;
    padding: 2.5rem !important;
    box-shadow: var(--shadow-lg) !important;
    animation: fadeIn 0.5s ease !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.form-step.active {
    display: block !important;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.step-icon-large {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 1.5rem !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    border-radius: var(--radius-full) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2rem !important;
    color: var(--accent) !important;
    box-shadow: var(--shadow-lg) !important;
}

.step-title {
    font-family: var(--font-decorative) !important;
    font-size: 2rem !important;
    color: var(--primary) !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
    text-align: center !important;
    unicode-bidi: plaintext;
    direction: rtl;
}

.step-description {
    color: var(--text-medium) !important;
    font-size: 1rem !important;
    width: 100% !important;
    text-align: center !important;
}

/* Form Grid */
.form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* عمود واحد بدلاً من اثنين */
    gap: 1.25rem !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-group.full-width {
    grid-column: 1 / -1 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
        font-family: 'Cairo', sans-serif;
        font-weight: 800;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .progress-section {
        margin: -1rem 1rem 1.5rem !important;
        padding: 1.5rem !important;
    }
    
    .progress-steps {
        flex-direction: row !important;
        gap: 0.25rem !important;
        align-items: center !important;
        justify-content: space-between !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap !important;
    }
    
    .progress-steps::-webkit-scrollbar {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   Site Header with Logo
   =================================== */

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(26, 61, 46, 0.95) 0%, rgba(45, 90, 71, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start; /* يمين الصفحة في RTL */
    align-items: center;
}

.logo-link {
    display: inline-block;
    transition: var(--transition);
    text-decoration: none;
}

.logo-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.logo-link:active {
    transform: scale(0.98);
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* إضافة مسافة علوية للمحتوى بسبب الهيدر الثابت */
body {
    padding-top: 80px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    .site-logo {
        height: 40px;
        max-width: 140px;
    }
    
    body {
        padding-top: 65px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0.5rem 0.75rem;
    }
    
    .site-logo {
        height: 35px;
        max-width: 120px;
    }
    
    body {
        padding-top: 55px;
    }
}
