:root {
    --bg-color: #f5f7fa;
    --text-color: #2d3748;
    --primary-color: #4a5568;
    --accent-color: #4299e1;
}

@font-face {
    font-family: 'KalameBold';
    src: url('https://uploader-oss-mili.milaadfarzian.workers.dev/download/BQACAgQAAxkBAAIBt2gvk2dd-8W_33Zvss5134ggdjGAAAInFQACIid5US4tNMF8cepJNgQ/documents/file_570.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('https://uploader-oss-mili.milaadfarzian.workers.dev/download/BQACAgQAAxkBAAIBtmgvk2eclE7-kRYU2VpD15PYy2TrAAImFQACIid5UVqxYQkfmkeXNgQ/documents/file_569.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'YekanBakh', sans-serif;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(66, 153, 225, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'KalameBold', sans-serif;
    font-weight: bold;
}

body {
    font-family: 'IranianYekan', sans-serif;
    font-variation-settings: 'dots' 1.4;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    padding: 2rem 0;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

.animation-container {
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
    margin-bottom: 4rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-lottie {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-color);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #3182ce;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
}

.nav-tab {
    display: inline-block;
    padding: 0.2rem 0;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    opacity: 0.8;
}

.nav-tab:hover {
    color: var(--accent-color);
    opacity: 1;
}

@media (max-width: 480px) {
    .nav-tabs {
        gap: 0.5rem;
        padding: 0.2rem;
    }
    .nav-tab {
        font-size: 0.7rem;
    }
}

.nav-tab {
    display: inline-block;
    padding: 0.8rem 0;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.nav-tab::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-tab:hover::after {
    width: 100%;
}

.nav-tab:hover {
    color: var(--accent-color);
}

.nav-tab.active::after {
    width: 100%;
}

.nav-tab.active {
    color: var(--accent-color);
}

.projects-section {
    padding: 4rem 0;
    margin: 2rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.project-card {
    background-color: var(--bg-color);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.project-view-button {
    display: block;
    width: 100%;
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    text-align: center;
    transition: background-color 0.3s ease;
}

.project-view-button:hover {
    background-color: #3182ce;
}

.project-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 1rem 1rem 0 0;
    transition: bottom 0.3s ease;
    z-index: 1000;
}

.project-drawer.open {
    bottom: 0;
}

.project-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.project-drawer-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.project-drawer-content {
    background-color: white;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.project-drawer .project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-drawer .project-description {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 0.95rem;
    white-space: pre-line;
}

.project-drawer .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.project-drawer .close-button:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .project-drawer-content {
        width: 95%;
        padding: 1rem;
    }

    .project-drawer-header h2 {
        font-size: 1.2rem;
    }

    .project-drawer .project-description {
        font-size: 0.9rem;
    }
}


.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-button {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 2rem;
    border-radius: 1rem 1rem 0 0;
    transition: bottom 0.3s ease;
    z-index: 1000;
}

.contact-drawer.open {
    bottom: 0;
    border: 2px solid var(--accent-color);
}

.contact-drawer .close-drawer {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

.contact-drawer-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.contact-drawer-description {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: 'IranianYekan', sans-serif;
}

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

.contact-form-buttons {
    display: flex;
    justify-content: center;
}

.contact-form-buttons button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: 'IranianYekan', sans-serif;
    font-weight: bold;
}

.send-button {
    background-color: var(--accent-color);
    color: white;
    width: 100%;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.send-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-button {
    background-color: #e2e8f0;
    color: var(--text-color);
}

.faq-section {
    padding: 4rem 0;
    margin: 2rem 0;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-question {
    align-self: flex-start;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 1rem 0;
    font-size: 0.95rem;
    max-width: 80%;
}

.faq-answer {
    align-self: flex-end;
    background-color: #f1f5f9;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 0 1rem;
    font-size: 0.95rem;
    max-width: 80%;
    line-height: 1.6;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    font-size: 0.9rem;
    color: var(--text-color);
}

.online-bots-section {
    padding: 2rem 0;
    margin: 1rem 0;
}

.online-bots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.online-bot-card {
    background-color: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.online-bot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.online-bot-image {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.bot-status {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bot-status.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bot-status.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.online-bot-image img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.online-bot-description {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.online-bot-description h3 {
    font-size: 1rem;
    color: var(--primary-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.online-bot-description p {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

.project-view-button {
    margin-top: auto;
    display: block;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    padding: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.project-view-button:hover {
    background-color: #3182ce;
}

@media (max-width: 480px) {
    .online-bots-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.75rem;
    }

    .online-bot-card {
        border-radius: 0.75rem;
    }

    .online-bot-image {
        padding: 0.75rem;
    }

    .online-bot-image img {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .online-bot-description {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .online-bot-description h3 {
        font-size: 0.95rem;
    }

    .online-bot-description p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .project-view-button {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}


.online-bot-card .online-bot-description .project-view-button:hover {
    background-color: #cbd5e0;
}


.features-section {
    overflow: hidden;
    position: relative;
    padding: 30px 0;
    width: 100%;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.features-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.feature-card {
    flex: 0 0 280px;
    margin: 0 10px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.feature-card:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Performance optimizations */
.features-track {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Styles for the bottom fade effect, only visible when scrolling */
body::after {
    content: "";
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100px; /* Adjust height as needed */
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent); /* Adjust color and opacity as needed */
    pointer-events: none; /* Allows clicking through the fade effect */
    z-index: 999; /* Ensure it's above other content */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

body.scrolling::after {
    opacity: 1; /* Visible when the body has the 'scrolling' class */
}
