/* ========== Persian Fonts ========== */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/estedad@v1.0.0/estedad-font-face.css');

/* ========== Variables ========== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --white: #ffffff;
    --border: #e5e7eb;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Estedad', 'Segoe UI', Tahoma, Arial, sans-serif;
    line-height: 1.75;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* ========== Navbar ========== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
}

.logo i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    min-width: 250px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 0.5rem 0;
}

.user-name {
    font-weight: bold;
    color: var(--dark);
}

.user-email {
    font-size: 0.875rem;
    color: var(--gray);
}

.user-dropdown a {
    display: block;
    padding: 0.75rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--light);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

/* ========== Buttons ========== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-delay-1 {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Loading Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========== Upload Section ========== */
.upload-section {
    padding: 4rem 0;
    background: var(--light);
}

.upload-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.usage-indicator {
    flex: 1;
    min-width: 250px;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.upload-area:hover::before {
    width: 500px;
    height: 500px;
}

.upload-area:hover {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(99, 102, 241, 0.03);
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-formats {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 1rem;
}

.upload-options {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
}

/* ========== Processing Indicator ========== */
.processing {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== Results Section ========== */
.results-section {
    padding: 4rem 0;
    background: var(--light);
}

.results-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.results-content {
    display: grid;
    gap: 2rem;
}

.transcription-box,
.summary-box,
.keypoints-box {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.transcription-box h3,
.summary-box h3,
.keypoints-box h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.text-content {
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--dark);
}

.keypoints-list {
    list-style: none;
}

.keypoints-list li {
    padding: 0.75rem;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-right: 4px solid var(--primary);
}

/* ========== Features Section ========== */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 800;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    letter-spacing: -0.015em;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray);
    font-weight: 400;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.25rem;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.8;
    font-weight: 400;
}

/* ========== Pricing Section ========== */
.pricing {
    padding: 6rem 0;
    background: var(--light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border-color: var(--primary);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -15px;
    right: 50%;
    transform: translateX(50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'Estedad', sans-serif;
}

.pricing-price span {
    font-size: 1.25rem;
    color: var(--gray);
}

.pricing-duration {
    color: var(--gray);
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: right;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: var(--success);
    margin-left: 0.5rem;
}

/* ========== How It Works ========== */
.how-it-works {
    padding: 6rem 0;
    background: var(--white);
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.step-icon {
    width: 100px;
    height: 100px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--primary);
}

.step h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.step p {
    color: var(--gray);
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
}

/* ========== CTA Section ========== */
.cta {
    padding: 6rem 0;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ========== Footer ========== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark);
}

.modal-content h2 {
    margin-bottom: 2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ========== Toast Notification ========== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3000;
    animation: slideUp 0.3s ease-out;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ========== FAQ Section (Home) ========== */
.faq-section {
    padding: 6rem 0;
    background: var(--light);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.faq-item-home {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item-home:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-question-home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question-home h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.faq-question-home h3 i {
    color: var(--primary);
    font-size: 1.15rem;
}

.faq-icon-home {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-item-home.active .faq-icon-home {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(45deg);
}

.faq-answer-home {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease;
}

.faq-item-home.active .faq-answer-home {
    max-height: 300px;
    margin-top: 1rem;
}

.faq-answer-home p {
    line-height: 1.8;
    color: var(--gray);
    margin: 0;
}

/* ========== Live Chat Widget ========== */
.live-chat-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.chat-button:active {
    transform: scale(1.05);
}

.chat-button .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    border: 3px solid white;
    animation: blink 2s infinite;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 600px;
    max-height: calc(100vh - 180px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transform-origin: bottom left;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.chat-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    position: relative;
}

.chat-avatar-online {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid white;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-header-text p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.95;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.chat-message.user .chat-message-avatar {
    background: var(--gray);
}

.chat-message-content {
    max-width: 70%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chat-message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.chat-message.user .chat-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-message-name {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: white;
    border-radius: 0 0 20px 20px;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.chat-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
    resize: none;
    overflow: hidden;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-attach-btn:hover {
    background: #e5e7eb;
    color: var(--primary);
}

.chat-voice-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-voice-btn:hover {
    background: #fef3c7;
    color: #f59e0b;
}

.chat-recording-area {
    margin-top: 0.75rem;
}

/* Additional chat fixes */
.chat-message {
    width: 100%;
    box-sizing: border-box;
}

.chat-message-content {
    display: flex;
    flex-direction: column;
}

.chat-body {
    overflow-x: hidden;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chat-send-btn:active {
    transform: scale(1.05);
}

.chat-welcome {
    text-align: center;
    padding: 2rem 1rem;
}

.chat-welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.chat-welcome h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
    font-size: 1.25rem;
}

.chat-welcome p {
    margin: 0;
    color: var(--gray);
    line-height: 1.6;
}

.chat-quick-options {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.chat-quick-btn {
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--dark);
}

.chat-quick-btn:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(-3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .live-chat-widget {
        left: auto;
        right: 1rem;
        bottom: 1rem;
    }
    
    .chat-window {
        left: auto;
        right: 0;
        width: calc(100vw - 2rem);
        height: calc(100vh - 100px);
        bottom: 70px;
        max-height: 600px;
    }
    
    .chat-body {
        max-height: 350px;
    }
    
    .chat-input-container {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .chat-attach-btn,
    .chat-voice-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .chat-send-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .chat-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.9rem;
    }
    
    .chat-message-bubble {
        font-size: 0.9rem;
        padding: 0.65rem 0.9rem;
    }
    
    .chat-quick-btn {
        font-size: 0.9rem;
        padding: 0.65rem 0.9rem;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .chat-header {
        border-radius: 0;
    }
    
    .chat-footer {
        border-radius: 0;
    }
}

/* Recorder Styles */
.btn-record:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-stop {
    display: flex !important;
}

.recording-indicator {
    display: flex !important;
}

/* ========== Voice Recorder Animations ========== */
@keyframes blink {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.3; 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

.btn-record:hover {
    transform: scale(1.05);
}

.btn-record:active {
    transform: scale(0.98);
}

.btn-stop {
    display: flex !important;
}

.recording-dot {
    display: inline-block;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .btn-mobile-menu {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-actions {
        width: 100%;
    }
    
    .results-actions .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-width: 95%;
    }
    
    .recorder-section {
        padding: 1.5rem 1rem !important;
    }
    
    .recorder-controls {
        flex-direction: column !important;
    }
    
    .btn-record, .btn-stop {
        width: 100% !important;
        max-width: 300px !important;
        justify-content: center !important;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .upload-options {
        flex-direction: column;
    }
    
    .option-group {
        width: 100%;
    }
    
    .pricing-grid {
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}
