/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff4545;
    --secondary-color: #ffa500;
    --accent-color: #00d4ff;
    --dark-bg: #0d0d0d;
    --darker-bg: #050505;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --gradient-1: linear-gradient(135deg, #ff4545 0%, #ffa500 100%);
    --gradient-2: linear-gradient(135deg, #00d4ff 0%, #0080ff 100%);
    --gradient-3: linear-gradient(135deg, #ff0080 0%, #ff4545 100%);
    --shadow-glow: 0 0 40px rgba(255, 69, 69, 0.6);
    --shadow-blue: 0 0 30px rgba(0, 212, 255, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Persian Font Support - IranYekan */
[dir="rtl"],
[dir="rtl"] *,
[lang="fa"],
[lang="fa"] * {
    font-family: 'IranYekan', Arial, sans-serif !important;
}

/* English Font Support - Poppins */
[dir="ltr"],
[dir="ltr"] *,
[lang="en"],
[lang="en"] * {
    font-family: 'Poppins', Arial, sans-serif !important;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 69, 69, 0.3);
}

.lang-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.lang-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 69, 69, 0.6);
}

.flag-img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.lang-btn:hover .flag-img {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slider {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: brightness(0.4) grayscale(0.3);
}

.slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 69, 69, 0.15) 0%, rgba(0, 0, 0, 0.9) 70%);
    z-index: 1;
}

/* Hero Images Animation */
.hero-image-left,
.hero-image-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.hero-image-left {
    left: 50%;
    margin-left: -550px;
    animation: floatLeft 4s ease-in-out infinite;
}

.hero-image-right {
    right: 50%;
    margin-right: -550px;
    animation: floatRight 4s ease-in-out infinite 2s;
}

.animated-image {
    max-width: 168px;
    width: 100%;
    height: auto;
    opacity: 0.7;
    filter: drop-shadow(0 10px 30px rgba(255, 69, 69, 0.4));
    transition: all 0.3s ease;
}

.animated-image:hover {
    opacity: 0.9;
    filter: drop-shadow(0 15px 40px rgba(255, 69, 69, 0.7));
    transform: scale(1.05);
}

@keyframes floatLeft {
    0%, 100% {
        transform: translateY(-50%) translateX(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-50%) translateX(20px) rotate(5deg);
    }
}

@keyframes floatRight {
    0%, 100% {
        transform: translateY(-50%) translateX(0) rotate(5deg);
    }
    50% {
        transform: translateY(-50%) translateX(-20px) rotate(-5deg);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-text h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 69, 69, 0.7));
    animation: titlePulse 3s infinite;
}

@keyframes titlePulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 69, 69, 0.7));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 69, 69, 1)) drop-shadow(0 0 60px rgba(255, 165, 0, 0.5));
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
    animation: fadeInUp 1s ease 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.5s both;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    padding: 18px 60px;
    background: var(--gradient-1);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: fadeInUp 1s ease 0.7s both;
    text-transform: uppercase;
    box-shadow: 0 10px 40px rgba(255, 69, 69, 0.5);
    border: 2px solid transparent;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    transition: left 0.5s ease;
    z-index: -1;
}

.cta-btn:hover::before {
    left: 0;
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(255, 69, 69, 0.8), 0 0 30px rgba(0, 212, 255, 0.5);
    border-color: rgba(0, 212, 255, 0.5);
}

.cta-btn span {
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
    animation: bounce 2s infinite;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 10px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

/* About Section */
.about {
    padding: 120px 0;
    background: var(--darker-bg);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 69, 69, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 80px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    filter: drop-shadow(0 0 20px rgba(255, 69, 69, 0.5));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 69, 69, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: all 0.4s ease;
}

.feature-card:hover::before {
    left: 0;
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 69, 69, 0.4);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: grayscale(1);
    transition: filter 0.4s ease;
}

.feature-card:hover .feature-icon {
    filter: grayscale(0);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Form Section */
.form-section {
    padding: 120px 0;
    background: var(--dark-bg);
}

.form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 69, 69, 0.3);
}

.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient-1);
    width: 25%;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px var(--primary-color);
}

/* Step Indicators */
.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.step-indicators::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--darker-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: var(--gradient-1);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    color: #fff;
}

.step-indicator.completed .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Steps */
.form-step {
    display: none;
    animation: slideIn 0.5s ease;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-step h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    background: var(--darker-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 69, 69, 0.3);
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 400;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* CAPTCHA */
.captcha-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.captcha-container label {
    display: block;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

#captcha-canvas-fa,
#captcha-canvas-en {
    background: var(--darker-bg);
    border: 2px solid rgba(255, 69, 69, 0.4);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 69, 69, 0.2);
}

.refresh-captcha {
    background: var(--gradient-1);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.refresh-captcha:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.captcha-container input {
    max-width: 300px;
    padding: 18px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    background: var(--darker-bg);
    border: 2px solid rgba(255, 69, 69, 0.4);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.captcha-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(255, 69, 69, 0.5);
    transform: scale(1.02);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: space-between;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

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

.btn-prev:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(-5px);
}

.btn-next,
.btn-submit {
    background: var(--gradient-1);
    color: #fff;
    margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-submit {
    background: var(--gradient-3);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    background: var(--darker-bg);
    border-top: 1px solid rgba(255, 69, 69, 0.2);
}

.footer p {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
        padding: 8px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 20px;
    }

    .hero-image-left {
        left: 50%;
        margin-left: -300px;
    }

    .hero-image-right {
        right: 50%;
        margin-right: -300px;
    }

    .animated-image {
        max-width: 112px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .form-wrapper {
        padding: 30px 20px;
    }

    .step-indicators {
        flex-wrap: wrap;
        gap: 20px;
    }

    .step-label {
        font-size: 0.7rem;
    }

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

    .form-navigation {
        flex-direction: column;
    }

    .btn-next,
    .btn-submit {
        margin-left: 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Prevent viewport zoom on input focus for iOS */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    /* Prevent layout shift when focusing inputs */
    .form-group {
        position: relative;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        position: relative;
        z-index: 10;
        transform: none;
    }
}

@media (max-width: 480px) {
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        display: none;
    }

    .hero-image-left,
    .hero-image-right {
        display: none;
    }
}

/* RTL Support for Farsi */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .form-navigation {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-next,
[dir="rtl"] .btn-submit {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .btn-prev:hover {
    transform: translateX(5px);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Success Message */
.success-message {
    background: rgba(255, 69, 69, 0.1);
    border: 2px solid var(--primary-color);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.success-message h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Particle Effect */
.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: rgba(255, 69, 69, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 20px 60px rgba(255, 69, 69, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease 0.2s both;
}

.modal-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.modal-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-btn {
    background: var(--gradient-1);
    color: white;
    padding: 15px 50px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 69, 69, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}
