/* ===============================================
   DirectInsta - Custom Styles
   RTL Design for Persian Language
   =============================================== */

/* ===============================================
   Persian Font Import
   =============================================== */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* ===============================================
   CSS Variables
   =============================================== */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ===============================================
   Base Styles
   =============================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    direction: rtl;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ===============================================
   Typography
   =============================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* ===============================================
   Buttons
   =============================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #40b868;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-login {
    padding: 8px 20px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    font-weight: 600;
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===============================================
   Header & Navigation
   =============================================== */
#header-placeholder,
.header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

#header-placeholder {
    padding: 0;
}

.header {
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu li a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-cart {
    position: relative;
    padding: 8px 15px;
    background-color: var(--light-color);
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-cart:hover {
    background-color: #d5dce0;
}

.cart-icon {
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* ===============================================
   Hero Section
   =============================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image {
    animation: fadeInRight 1s ease;
}

.hero-image-placeholder {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* ===============================================
   Highlighted Services Section
   =============================================== */
.highlighted-services {
    padding: 80px 0;
    background-color: white;
}

.section-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
}

.section-intro .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.section-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-light);
    text-align: justify;
}

.highlighted-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: white;
    border: 1px solid #e8e8e8;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.service-icon.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.service-icon.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.service-icon.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block;
}

.service-link:hover {
    color: var(--dark-color);
    transform: translateX(-5px);
}

/* ===============================================
   Benefits Section
   =============================================== */
.benefits {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.benefits-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.benefits-image:hover img {
    transform: scale(1.05);
}

.benefits-text h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.benefits-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: justify;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.benefit-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1.2;
}

.benefit-item h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.benefit-item p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0;
}

.benefits-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.benefits-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===============================================
   What is DirectInsta Section
   =============================================== */
.what-is {
    padding: 80px 0;
    background-color: white;
}

.what-is-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.what-is-text {
    order: 1;
}

.what-is-image {
    order: 2;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.what-is-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.what-is-image:hover img {
    transform: scale(1.05);
}

.what-is-text h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.what-is-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: justify;
}

.what-is-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===============================================
   Features Section
   =============================================== */
.features {
    padding: 80px 0;
    background-color: #f8f9fa;
}

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

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

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===============================================
   About Section
   =============================================== */
.about {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.about-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.about-list li {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.about-list li:last-child {
    border-bottom: none;
}

.about-image svg {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ===============================================
   Blog Section
   =============================================== */
.blog {
    padding: 80px 0;
    background-color: white;
}

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

.blog-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    overflow: hidden;
}

.blog-image svg {
    width: 100%;
    display: block;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.blog-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.blog-link:hover {
    color: var(--dark-color);
}

/* ===============================================
   Contact Section
   =============================================== */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.contact-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* ===============================================
   Testimonials
   =============================================== */
.testimonials {
    padding: 80px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.testimonials-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.testimonials .section-title {
    margin-bottom: 3rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background-color: white;
    padding: 2.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.testimonial-name {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.testimonial-position {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===============================================
   Stats Section
   =============================================== */
.stats-section {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.stats-wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: white;
    clip-path: ellipse(100% 100% at 50% 0%);
}

.stats-wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: white;
    clip-path: ellipse(100% 100% at 50% 100%);
}

.stats-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.stats-text {
    padding-right: 2rem;
}

.stats-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.stats-description {
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.stats-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-outline-white {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background-color: white;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===============================================
   Footer
   =============================================== */
#footer-placeholder {
    background-color: var(--dark-color);
}

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-column p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: white;
    padding-right: 5px;
}

.trust-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* ===============================================
   Scroll to Top Button
   =============================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--dark-color);
    transform: translateY(-5px);
}

/* ===============================================
   Animations
   =============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===============================================
   Responsive Design
   =============================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .header-actions {
        order: -1;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .hero-image {
        order: -1;
    }

    .benefits-content {
        grid-template-columns: 1fr;
    }

    .benefits-image {
        order: -1;
    }

    .what-is-content {
        grid-template-columns: 1fr;
    }

    .what-is-image {
        order: 1;
    }

    .what-is-text {
        order: 2;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .stats-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .stats-text {
        padding-right: 0;
        text-align: center;
    }

    .stats-grid {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 3rem;
    }

    .stats-title {
        font-size: 1.8rem;
    }

    .stats-buttons {
        justify-content: center;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .highlighted-services-grid,
    .features-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section-description {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .scroll-to-top {
        left: 20px;
        bottom: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 40px 0;
    }

    .features,
    .about,
    .blog,
    .contact {
        padding: 40px 0;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}
