html {
    scroll-behavior: smooth;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.is-visible {
    opacity: 1;
    transform: none;
    animation: fadeInUp 0.8s ease-out forwards;
}

:root {
    --primary-color: #00AEEF; /* A brighter, more electric blue */
    --primary-color-light: rgba(0, 174, 239, 0.1);
	--secondary-color: #34d399;
    --text-color: #E0E0E0; /* Light gray for readability on dark backgrounds */
    --heading-color: #FFFFFF; /* Pure white for headings */
    --background-color: #0D1117; /* A very dark, slightly blue-tinted gray */
    --light-gray: #161B22; /* A slightly lighter dark gray for sections */
    --gray: #8B949E; /* A medium gray for secondary text */
    --border-color: #30363D; /* A subtle border color */
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: right;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400; /* Default weight */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* General Section Styling */
section {
    padding: 120px 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.section-header h2 .highlight {
    color: var(--primary-color);
}

.section-header p {
    font-size: 18px;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Pricing Page Specific Styles */
.billing-cycle-selector {
    text-align: center;
    margin-bottom: 40px;
}

.billing-cycle-selector label {
    font-weight: 500;
    margin-left: 10px;
    color: var(--text-color);
}

.billing-cycle-selector select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--light-gray);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
}

/* FAQ Section */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.faq-toggle {
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    stroke: #AEAEB2;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    stroke: #ffd700;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-answer p {
    margin: 0;
    padding: 20px 25px 20px;
    color: #AEAEB2;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust as needed */
}

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.6);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background-color: var(--background-color);
            margin: 15% auto;
            padding: 30px;
            border: 1px solid var(--border-color);
            width: 80%;
            max-width: 500px;
            border-radius: 12px;
            text-align: center;
            position: relative;
        }

        .close-button {
            color: var(--gray);
            position: absolute;
            left: 20px;
            top: 10px;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close-button:hover,
        .close-button:focus {
            color: var(--heading-color);
            text-decoration: none;
        }

        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 20px;
        }

        /* Modal Styles */
        .modal {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1001; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .modal-content {
            background-color: var(--background-color);
            margin: 15% auto;
            padding: 30px;
            border: 1px solid var(--border-color);
            width: 90%;
            max-width: 500px;
            border-radius: 12px;
            text-align: center;
            position: relative;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .close-button {
            color: var(--gray);
            position: absolute;
            left: 20px;
            top: 10px;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close-button:hover,
        .close-button:focus {
            color: var(--heading-color);
            text-decoration: none;
        }

        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 20px;
        }

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .pricing-card.standard {
        transform: scale(1); /* Reset scale for stacked layout */
    }
    #app-downloads .container {
        flex-direction: column-reverse;
        gap: 40px;
    }
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .flags-grid {
        grid-template-columns: repeat(6, 1fr);
    }

}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    .network-metrics {
        flex-direction: column;
        gap: 30px;
    }
    .flags-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    #hero .container {
        flex-direction: column;
    }
    /* The body text-align: center was causing layout issues. The global text-align: right is sufficient */
    .cta-buttons,
    .benefit-chips {
        flex-direction: column;
        align-items: center; /* better than text-align for flex containers */
    }

    #hero {
        padding: 60px 0;
    }
    #hero .container {
        gap: 50px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-content h1 {
        font-size: 38px;
    }
    .hero-content .subtitle {
        font-size: 18px;
    }
    .cta-buttons {
        justify-content: center;
    }
    .benefit-chips {
        justify-content: center;
    }
    .hero-visual svg {
        width: 300px;
        height: 300px;
    }
    .section-header h2,
    .app-downloads-content h2 {
        font-size: 32px;
    }
    #features .features-grid {
        grid-template-columns: 1fr;
    }
    .metrics-strip {
        flex-direction: column;
        gap: 30px;
    }
    .download-buttons-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    /* Modal adjustments for mobile */
    .modal-content-v2 {
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        padding: 30px 20px;
    }
    .purchase-options {
        grid-template-columns: 1fr;
    }
}
#why-choose-us {
    background-color: var(--light-gray);
}

#app-downloads .download-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}


#app-downloads .download-button .icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    align-self: center;
}

#app-downloads .download-button .text {
    text-align: right;
}

#app-downloads .download-button .platform {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--heading-color);
}

#app-downloads .download-button .version {
    font-size: 0.9rem;
    color: var(--gray);
}

#app-downloads .download-button:hover {
    background-color: var(--border-color);
    color: var(--heading-color);
    transform: translateY(-3px);
}

#app-downloads .os-icons {
    font-size: 2.5rem; /* Increased size */
    margin-bottom: 2rem;
}

/* Payment Info Card Styles */
.payment-info-card {
    max-width: 500px;
    margin: 40px auto;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    overflow: hidden;
}
.payment-info-card .card-header {
    padding: 20px 25px;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}
.payment-info-card .card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--heading-color);
}
.payment-info-card .card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.payment-info-card .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}
.payment-info-card .label {
    color: var(--gray);
    font-weight: 500;
}
.payment-info-card .value {
    color: var(--text-color);
    font-weight: 500;
    direction: ltr;
    text-align: left;
}
.payment-info-card .value-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.payment-info-card .copy-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--gray);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}
.payment-info-card .copy-btn:hover {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}
.payment-info-card .card-footer {
    padding: 20px 25px;
    background-color: rgba(253, 126, 20, 0.1);
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.payment-info-card .card-footer p {
    margin: 0;
    color: #fd7e14;
    font-weight: 500;
}

/* Social Media Icons in Footer */
.social-media-icons {
    margin-bottom: 15px;
    text-align: center;
}

.social-media-icons a {
    color: var(--gray);
    font-size: 24px;
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-media-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}
/* 404 Error Page Styles */
.error-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    min-height: 60vh;
    text-align: center;
}
.error-content {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 50px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.error-title {
    font-size: 80px;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 10px;
}
.error-subtitle {
    font-size: 28px;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 20px;
}
.error-description {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 30px;
}
.error-actions .cta-button {
    padding: 12px 30px;
}

/* Scoped FAQ Section for Homepage */

#faq .faq-item {
    background: var(--light-gray);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

#faq .faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.1);
}

#faq .faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
}

#faq .faq-question .faq-toggle {
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    stroke: var(--gray);
}

#faq .faq-item.active .faq-question .faq-toggle {
    transform: rotate(45deg);
    stroke: var(--primary-color);
}

#faq .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: var(--background-color);
}

#faq .faq-answer p {
    padding: 0 25px 20px;
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
    text-align: right;
}