/*
 * Russia Immigration Website - Main Styles
 * Modern design with Russian & Moroccan fusion
 */

/* ==========================================
   CSS VARIABLES & DESIGN TOKENS
   ========================================== */
:root {
    /* Russian Colors */
    --russian-blue: #0039A6;
    --russian-red: #D52B1E;
    --russian-white: #FFFFFF;

    /* Moroccan Accent */
    --moroccan-gold: #F4A300;
    --moroccan-terracotta: #C44536;

    /* Primary Palette */
    --primary: #0039A6;
    --primary-light: #1a5fc9;
    --primary-dark: #002970;
    --secondary: #D52B1E;
    --accent: #F4A300;

    /* Neutrals */
    --dark-navy: #0A1628;
    --dark-blue: #0F1E35;
    --dark-gray: #1E293B;
    --gray-600: #475569;
    --gray-400: #94A3B8;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0A1628 0%, #0039A6 50%, #1a5fc9 100%);
    --gradient-primary: linear-gradient(135deg, #0039A6 0%, #1a5fc9 100%);
    --gradient-accent: linear-gradient(135deg, #D52B1E 0%, #F4A300 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 57, 166, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 50px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Cairo', 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 100px;
    --container-padding: 20px;
}

/* ==========================================
   BASE & RESET
   ========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-arabic);
    background: var(--dark-navy);
    color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Direction-specific styles */
[dir="rtl"] body {
    direction: rtl;
}

[dir="ltr"] body {
    direction: ltr;
    font-family: var(--font-primary);
}

[dir="ltr"] .form-input,
[dir="ltr"] .form-select,
[dir="ltr"] .form-textarea {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .form-select {
    background-position: right 15px center;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-200);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--moroccan-gold);
}

/* ==========================================
   LAYOUT
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray-400);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title .accent-line {
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 20px auto 0;
    border-radius: var(--radius-full);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-arabic);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 57, 166, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 57, 166, 0.5);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-navy);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(213, 43, 30, 0.4);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(213, 43, 30, 0.5);
    color: var(--white);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 20px 48px;
    font-size: 1.1rem;
}

/* ==========================================
   GLASS CARDS
   ========================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-arabic);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    transition: var(--transition-normal);
    direction: rtl;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 57, 166, 0.2);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 18px;
}

[dir="ltr"] .form-select {
    background-position: right 15px center;
}

.form-select option {
    background: var(--dark-navy);
    color: var(--white);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    color: var(--russian-red);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.fade-in {
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.1s;
}

.fade-in-delay-2 {
    animation-delay: 0.2s;
}

.fade-in-delay-3 {
    animation-delay: 0.3s;
}

.fade-in-delay-4 {
    animation-delay: 0.4s;
}

.fade-in-delay-5 {
    animation-delay: 0.5s;
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .container {
        padding: 0 15px;
    }

    .btn {
        padding: 14px 28px;
    }

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

@media (max-width: 480px) {
    :root {
        --section-padding: 40px;
    }

    .btn-lg {
        padding: 16px 32px;
        font-size: 1rem;
    }
}