/* ==================== فونت وزیرمتن لوکال ==================== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ==================== ریست ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== بدنه ==================== */
body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: #06060f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* ==================== پس‌زمینه گرادیان متحرک ==================== */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.15) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(1%, 2%) rotate(1deg); }
    50% { transform: translate(0, 3%) rotate(0deg); }
    75% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ==================== ذرات شناور ==================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 15s ease-in infinite;
    opacity: 0;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 85%; top: 15%; animation-delay: -3s; width: 2px; height: 2px; }
.particle:nth-child(3) { left: 25%; top: 75%; animation-delay: -6s; width: 4px; height: 4px; }
.particle:nth-child(4) { left: 70%; top: 80%; animation-delay: -9s; width: 2px; height: 2px; }
.particle:nth-child(5) { left: 50%; top: 10%; animation-delay: -12s; width: 3px; height: 3px; }
.particle:nth-child(6) { left: 15%; top: 50%; animation-delay: -5s; width: 2px; height: 2px; }
.particle:nth-child(7) { left: 90%; top: 40%; animation-delay: -8s; width: 3px; height: 3px; }
.particle:nth-child(8) { left: 35%; top: 30%; animation-delay: -2s; width: 2px; height: 2px; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ==================== کانتینر اصلی ==================== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==================== هدر ==================== */
.header {
    text-align: center;
    margin-bottom: 8px;
}

.header-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #a78bfa;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.header-title {
    color: #f1f5f9;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.4;
}

.header-desc {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
}

.header-desc span {
    color: #c4b5fd;
    font-weight: 600;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== سکشن تایتل ==================== */
.section-title {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.section-icon {
    font-size: 20px;
}

/* ==================== گرید پروژه‌ها ==================== */
.projects-grid {
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.project-card {
    background: rgba(15, 15, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 18px;
    padding: 18px 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.08);
}

.project-card:hover::before {
    opacity: 1;
}

.project-icon {
    font-size: 28px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.project-name {
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.project-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

/* ==================== سوالات متداول (آکاردئون) ==================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: rgba(15, 15, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 16px 18px;
    color: #e2e8f0;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
    gap: 12px;
}

.faq-arrow {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #a78bfa;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 18px 16px;
}

.faq-answer p {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
}

.faq-answer strong {
    color: #c4b5fd;
    font-weight: 600;
}

/* ==================== کارت ثبت‌نام ==================== */
.card {
    background: rgba(15, 15, 30, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 28px;
    padding: 36px 28px 32px;
    text-align: center;
    box-shadow: 
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 100px rgba(139, 92, 246, 0.12);
}

/* ==================== آیکون ==================== */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    position: relative;
}

.icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #3b82f6);
    opacity: 0.3;
    filter: blur(15px);
    z-index: -1;
}

.icon {
    font-size: 28px;
}

/* ==================== متن‌های کارت ==================== */
.card h2 {
    color: #f1f5f9;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.subtitle {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 24px;
    line-height: 1.9;
}

.subtitle span {
    color: #a78bfa;
    font-weight: 600;
}

/* ==================== گروه شماره ==================== */
.phone-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    direction: ltr;
    position: relative;
    flex-wrap: nowrap;
}

/* ==================== سلکتور کشور ==================== */
.country-selector {
    position: relative;
    flex-shrink: 0;
    z-index: 10;
}

.country-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 14px;
    background: rgba(20, 20, 40, 0.6);
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    color: #f1f5f9;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    user-select: none;
    min-width: 90px;
    justify-content: center;
}

.country-btn:hover {
    border-color: #8b5cf6;
    background: rgba(25, 25, 50, 0.8);
}

.country-btn .flag {
    font-size: 20px;
    line-height: 1;
}

.country-btn .arrow {
    font-size: 10px;
    margin-right: 2px;
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.country-btn.open .arrow {
    transform: rotate(180deg);
}

/* ==================== دراپ‌داون کشورها ==================== */
.country-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(18, 18, 38, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.country-selector {
    overflow: visible !important;
}

.country-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.country-dropdown::-webkit-scrollbar {
    width: 6px;
}
.country-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.country-dropdown::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 10px;
}
.country-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* ==================== سرچ دراپ‌داون ==================== */
.dropdown-search {
    position: sticky;
    top: 0;
    padding: 12px;
    background: rgba(18, 18, 38, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    z-index: 2;
    border-radius: 14px 14px 0 0;
}

.dropdown-search input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(25, 25, 50, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    color: #f1f5f9;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    font-size: 13px;
    outline: none;
    direction: rtl;
}

.dropdown-search input::placeholder {
    color: #475569;
}

.dropdown-search input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

/* ==================== آیتم‌های کشور ==================== */
.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.country-option:hover {
    background: rgba(139, 92, 246, 0.12);
}

.country-option.selected {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.country-option .flag {
    font-size: 20px;
    flex-shrink: 0;
}

.country-option .info {
    flex: 1;
    min-width: 0;
}

.country-option .name {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    text-align: right;
}

.country-option .code {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
    text-align: right;
}

/* ==================== اینپوت شماره ==================== */
.phone-input-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
}

.phone-input-wrap input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(20, 20, 40, 0.6);
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    font-size: 16px;
    color: #f1f5f9;
    text-align: left;
    direction: ltr;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    font-weight: 400;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    outline: none;
}

.phone-input-wrap input::placeholder {
    color: #475569;
    letter-spacing: 0;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
}

.phone-input-wrap input:focus {
    border-color: #8b5cf6;
    background: rgba(25, 25, 50, 0.8);
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.1),
        0 0 20px rgba(139, 92, 246, 0.1);
}

.phone-input-wrap::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 15px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #3b82f6);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.phone-input-wrap:focus-within::before {
    opacity: 0.4;
}

/* ==================== دکمه ==================== */
button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    letter-spacing: -0.2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3);
}

button:hover:not(:disabled)::before {
    left: 100%;
}

button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

button:disabled::before {
    display: none;
}

/* ==================== لودینگ ==================== */
.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

button.loading .spinner {
    display: inline-block;
}

button.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== پیام ==================== */
.message {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 400;
    display: none;
    animation: msgIn 0.4s ease;
    word-break: break-word;
    text-align: center;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* ==================== فوتر ==================== */
.footer-text {
    text-align: center;
    color: #475569;
    font-size: 12px;
    font-weight: 400;
    margin-top: -8px;
}

/* ==================== اورلی ==================== */
/* .dropdown-overlay {
    inset: 0;
    background: transparent;
    z-index: 9999;
} */

/* .dropdown-overlay.show {
    display: block;
    pointer-events: auto;
} */

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        gap: 20px;
    }

    .header-title {
        font-size: 24px;
    }

    .header-desc {
        font-size: 13px;
    }

    .projects-grid {
        gap: 10px;
    }

    .project-card {
        padding: 14px 12px;
    }

    .project-icon {
        font-size: 24px;
    }

    .project-name {
        font-size: 12px;
    }

    .section-title {
        font-size: 15px;
    }

    .card {
        padding: 30px 20px 26px;
        border-radius: 24px;
    }

    .card h2 {
        font-size: 20px;
    }

    .icon-wrapper {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .icon {
        font-size: 24px;
    }

    .phone-group {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .country-btn {
        padding: 14px 10px;
        font-size: 13px;
        min-width: 75px;
    }

    .country-btn .flag {
        font-size: 18px;
    }

    .country-btn .arrow {
        font-size: 9px;
    }

    .phone-input-wrap input {
        padding: 14px 12px;
        font-size: 14px;
        letter-spacing: 1px;
    }

    .country-dropdown {
        width: 260px;
        left: 0;
        right: auto;
    }

    .country-option .name {
        font-size: 12px;
    }

    .country-option .code {
        font-size: 10px;
    }

    .faq-question {
        font-size: 13px;
        padding: 14px 16px;
    }

    .faq-item.active .faq-answer {
        padding: 0 16px 14px;
    }

    .faq-answer p {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .container {
        gap: 16px;
    }

    .card {
        padding: 24px 14px 20px;
    }

    .phone-group {
        gap: 6px;
    }

    .country-btn {
        padding: 12px 8px;
        min-width: 68px;
        font-size: 12px;
    }

    .country-btn .flag {
        font-size: 16px;
    }

    .phone-input-wrap input {
        padding: 12px 10px;
        font-size: 13px;
    }

    .country-dropdown {
        width: 240px;
    }

    .projects-grid {
        gap: 8px;
    }

    .project-card {
        padding: 12px 10px;
        border-radius: 14px;
    }

    .project-icon {
        font-size: 22px;
    }

    .project-name {
        font-size: 11px;
    }
}

/* ==================== رفع باگ صفحه لمسی ==================== */
@media (hover: none) {
    .country-btn:hover {
        border-color: rgba(139, 92, 246, 0.2);
        background: rgba(20, 20, 40, 0.6);
    }

    button:hover:not(:disabled) {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }
}


.icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* اگه سایزش توی موبایل کوچیکتر میخوای */
@media (max-width: 480px) {
    .icon-img {
        width: 26px;
        height: 26px;
    }
}