/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white: #ffffff;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.main-header {
    background-color: var(--dark-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: center; /* تغییر به center */
    align-items: center;
    gap: 50px; /* فاصله بین لوگو و منو */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 40px;
    width: auto;
}

.main-header h1 {
    color: var(--white);
    font-size: 1.8rem;
    margin: 0;
}

.main-header nav {
    display: flex;
    align-items: center;
    gap: 30px; /* فاصله بین آیتم‌های منو */
}

.main-header nav a {
    color: var(--white);
    text-decoration: none;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-header nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    background-image: url('images/header.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 60px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    background-color: #27ae60;
}

.section-title {
    font-size: 2rem;
    text-align: center;
}

/* Team Section */
.team-section {
    scroll-margin-top: 50px;
    padding: 50px 0;
    background-color: var(--white);
}


.team-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
    font-size: 1.1rem;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-member {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.member-image {
    position: relative;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.member-social {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    transition: bottom 0.3s ease;
}

.team-member:hover .member-social {
    bottom: 0;
}

.member-social a {
    color: var(--white);
    margin: 0 10px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.member-social a:hover {
    color: var(--secondary-color);
}

.team-member h3 {
    margin: 20px 0 10px;
    color: var(--dark-color);
}

.member-role {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.member-desc {
    padding: 0 20px 20px;
    color: var(--text-color);
}

/* Services Section */
.services-section {
    scroll-margin-top: 50px;
    padding: 50px 0;
    background-image: url('images/services_placeholder.png');
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.services-section .container {
    position: relative;
    z-index: 2;
}

.services-section .section-title {
    color: var(--dark-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tech-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Products Section */
.products-section {
    scroll-margin-top: 50px;
    padding: 50px 0;
    background-color: var(--white);
}

.product-showcase {
    margin-top: 50px;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    overflow: hidden;
    max-height: 400px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 30px;
}

.product-info h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.product-desc {
    margin-bottom: 30px;
}

.product-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature i {
    color: var(--primary-color);
}

.product-cta {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.product-cta:hover {
    background-color: #2980b9;
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info h3 {
    margin-bottom: 15px;
}

.footer-contact h4,
.footer-social h4 {
    margin-bottom: 15px;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-left: 10px;
    color: var(--white);
}

.social-links a {
    color: var(--white);
    margin-left: 15px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 40px;
    width: auto;
}

/* Team Description Styles */
.team-description {
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: justify;
    line-height: 1.8;
    margin-top: 40px;
}

.team-description p {
    margin-bottom: 20px;
}

/* Services Updates */
.services-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 40px;
}

.service-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-link:hover {
    color: var(--secondary-color);
}

/* Contact Section */
.contact-section {
    scroll-margin-top: 50px;
    padding: 50px 0;
    background-color: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-text{
    text-align: justify;
    line-height: 1.8;
}

.contact-text p {
    margin-bottom: 20px;
}

.contact-info {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-btn2 {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
}

.contact-bt2n:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}


/* Service Modal Updates */
.modal-body {
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-body h3 {
    color: var(--primary-color);
    margin: 25px 0 15px;
}

.modal-body ul {
    list-style-type: none;
    padding: 0;
}

.modal-body li {
    margin-bottom: 10px;
    padding-right: 20px;
    position: relative;
}

.modal-body li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    right: 0;
}

.service-close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.feature-detail {
    margin-bottom: 25px;
    padding: 15px;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

.feature-detail h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-detail p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.feature-detail p:last-child {
    margin-bottom: 0;
}

.feature-detail strong {
    color: var(--dark-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .main-header {
        padding: 0;
    }
    
    .main-header .container {
        flex-direction: column;
        gap: 10px;
    }

    .logo-container {
        padding-top: 10px;
    }
    .main-header nav {
        gap: 10px;
    }

    .main-header nav a {
        margin: 0 2px;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
        text-align: center;
    }

    .tech-grid,
    .team-members,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        grid-template-columns: 1fr;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    .stat-item {
        width: 100%;
        margin-bottom: 20px;
    }

    .services-section {
        scroll-margin-top: 50px;
        padding: 50px 0;
        background-image: url('images/services_placeholder_mini.png?v=3');
        background-size: cover;
        background-attachment: fixed;
        position: relative;
    }
    
    .contact-content, .cooperation-content {
        grid-template-columns: 1fr;
    }

    .logo {
        height: 30px;
    }

    .contact-info, .cooperation-info {
        margin-top: 30px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .cta-button {
        padding: 12px 25px;
    }

    .team-member {
        margin: 0 10px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.0rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.app-intro {
    text-align: center;
    margin-bottom: 40px;
}

.app-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.app-description {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.screenshots-slider {
    position: relative;
    margin: 40px 0;
    padding: 0 40px;
    overflow: hidden;
}

.screenshots-container {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    transition: transform 0.3s ease;
    direction: ltr; /* برای عملکرد درست اسلایدر */
}

.screenshots-container img {
    min-width: 250px; /* از min-width استفاده می‌کنیم */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.screenshots-container img:hover {
    transform: scale(1.05);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.slider-arrow.prev {
    right: 0;
}

.slider-arrow.next {
    left: 0;
}

.slider-arrow:hover {
    background-color: var(--dark-color);
}

.app-cta {
    text-align: center;
    margin-top: 40px;
}

.app-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Modal Animation Classes */
.modal-show {
    display: block;
}

.modal-hide {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Design for Modal */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-container img {
        width: 200px;
    }
}




/* Contact Button in Header */
.contact-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 20px;

    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.contact-close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.contact-close-modal:hover {
    transform: rotate(90deg);
}

/* Contact Modal Styles */
.contact-departments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.department {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 10px;
}

.department h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.department p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-section {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 10px;
}

.message-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Vazirmatn', sans-serif;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}


/* Loading Button Styles */
.send-message-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s ease;
}

.send-message-btn:hover {
    background-color: var(--secondary-color);
}

.button-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top: 2px solid transparent;
    animation: spin 1s linear infinite;
    position: absolute;
}

.send-message-btn.loading .button-text {
    visibility: hidden;
}

.send-message-btn.loading .button-loader {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disable button while loading */
.send-message-btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
}