:root {
    --border-color: #333;
    --border-light: #555;
    --card-bg: #1A1A1A;
    --dark-bg-primary: #0A0A0A;
    --dark-bg-secondary: #141414;
    --dark-bg-tertiary: #1F1F1F;
    /* اگر پس‌زمینه SVG لازم باشد، می‌توانید فایل صحیح را جایگزین کنید */
    --dynamic-bg-image: url('/assets/img/geometric-background.svg');
    --font-family: 'Vazir', sans-serif;
    --gradient-mix: linear-gradient(120deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    --gradient-primary: linear-gradient(45deg, var(--primary-dark), var(--primary-light));
    --header-height-initial: 90px;
    --header-height-scrolled: 70px;
    --primary-color: #FF8C00;
    --primary-dark: #E57D00;
    --primary-light: #FFA500;
    --secondary-color: #00C6FF;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 8px 25px rgba(255, 140, 0, 0.3);
    --shadow-primary-inset: inset 0 0 15px rgba(255, 140, 0, 0.2);
    --text-dark: #111;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

img,
svg {
    display: block;
    height: auto;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
}

h4 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

section {
    overflow: hidden;
    padding: clamp(70px, 12vh, 120px) 5%;
    position: relative;
}

section:nth-of-type(odd) {
    background-color: var(--dark-bg-secondary);
}

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

.section-title {
    color: var(--primary-light);
    margin-bottom: clamp(50px, 8vh, 80px);
    opacity: 0;
    text-align: center;
    transform: translateY(30px);
}

.section-title.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out 0.1s, transform 0.8s ease-out 0.1s;
}

.highlight {
    color: var(--primary-light);
    font-weight: inherit;
}

.btn {
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    padding: 14px 35px;
    position: relative;
    text-align: center;
    transition: var(--transition-smooth);
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-primary);
    color: var(--text-dark);
}

.btn-primary::before {
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    content: '';
    height: 100%;
    left: -100%;
    position: absolute;
    top: 0;
    transition: left 0.6s ease;
    width: 100%;
    z-index: -1;
}

.btn-primary:hover {
    box-shadow: 0 12px 30px rgba(255, 140, 0, 0.45);
    transform: translateY(-3px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-light);
    color: var(--primary-light);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes dynamicBackground {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.reveal-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header --- */
header#mainHeader {
    align-items: center;
    background-color: transparent;
    display: flex;
    height: var(--header-height-initial);
    justify-content: space-between;
    left: 0;
    padding: 0 5%;
    position: fixed;
    right: 0;
    top: 0;
    transition: height 0.4s ease, background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
    z-index: 1000;
}

header#mainHeader.scrolled {
    backdrop-filter: blur(15px);
    background-color: rgba(10, 10, 10, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-medium);
    height: var(--header-height-scrolled);
}

.logo-container {
    align-items: center;
    display: flex;
}

.logo-container img {
    filter: drop-shadow(0 2px 5px rgba(255, 140, 0, 0.5));
    margin-left: 15px;
    max-height: 50px;
    transition: max-height 0.4s ease;
}

.brand-name {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    transition: font-size 0.4s ease;
}

header#mainHeader.scrolled .logo-container img {
    max-height: 38px;
}

header#mainHeader.scrolled .brand-name {
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-right: 30px;
}

nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 8px;
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--text-primary);
}

nav a::after {
    background: var(--gradient-primary);
    bottom: 0;
    content: '';
    height: 2px;
    position: absolute;
    right: 0;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 0;
}

nav a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    align-items: center;
    /* در صورت وجود فایل پس‌زمینه، می‌توان خط زیر را جایگزین یا اصلاح کرد */
    background: var(--dark-bg-primary)
        /* url(var(--dynamic-bg-image)) */
        repeat;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding-top: var(--header-height-initial);
    position: relative;
    text-align: center;
}

.hero-background-shapes {
    height: 100%;
    left: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;
}

.shape {
    animation: float 15s ease-in-out infinite alternate;
    background: var(--gradient-mix);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.1;
    position: absolute;
}

.shape-1 {
    animation-duration: 18s;
    height: 400px;
    right: 5%;
    top: 10%;
    width: 400px;
}

.shape-2 {
    animation-duration: 12s;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-light));
    bottom: 15%;
    height: 300px;
    left: 10%;
    width: 300px;
}

.shape-3 {
    animation-duration: 20s;
    height: 200px;
    left: 40%;
    opacity: 0.05;
    top: 40%;
    width: 200px;
}

.hero-content {
    animation: scaleUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s forwards;
    max-width: 950px;
    opacity: 0;
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: #fff;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

.hero p.subtitle {
    color: var(--text-secondary);
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* --- Services Section --- */
#services {
    background-color: var(--dark-bg-secondary);
    padding-bottom: clamp(80px, 15vh, 150px);
}

.services-grid {
    display: grid;
    gap: clamp(20px, 4vw, 40px);
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.service-item-v2 {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    padding: 40px 35px;
    position: relative;
    transition: var(--transition-smooth);
    z-index: 1;
}

.service-item-v2::before {
    background: var(--gradient-primary);
    content: '';
    filter: blur(120px);
    height: 150px;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(30%, -30%);
    transition: opacity 0.5s ease;
    width: 150px;
    z-index: -1;
}

.service-item-v2:hover {
    border-color: rgba(255, 140, 0, 0.5);
    box-shadow: var(--shadow-medium);
    transform: translateY(-8px) scale(1.01);
}

.service-item-v2:hover::before {
    opacity: 0.3;
}

.service-icon {
    background: var(--gradient-mix);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-size: 3rem;
    margin-bottom: 25px;
    transition: transform 0.4s ease;
}

.service-item-v2:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-item-v2 h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.service-item-v2 p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* --- Approach Section (Centered Timeline for RTL) --- */
#approach {
    background-color: var(--dark-bg-primary);
    padding-bottom: clamp(80px, 15vh, 150px);
    /* اضافه کردن یک پس‌زمینه گرادیان ظریف */
    background-image: linear-gradient(rgba(10, 10, 10, 0.95), var(--dark-bg-primary)), var(--dynamic-bg-image);
    background-size: auto, 300px; /* اندازه پس‌زمینه SVG */
    background-position: center, center;
}

/* ظرف اصلی تایم‌لاین */
.approach-timeline {
    position: relative; /* نیاز به position relative برای after pseudo-element */
    margin: 0 auto;
    max-width: 900px;
    padding: 0 24px;
}

/* خط وسط عمودی - کمی ضخیم‌تر و گرادیان واضح‌تر */
.approach-timeline::after {
    background: linear-gradient(to bottom, rgba(255, 140, 0, 0.2), var(--primary-color), rgba(255, 140, 0, 0.2));
    border-radius: 3px; /* گردی بیشتر */
    bottom: 0;
    content: '';
    left: 50%;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 5px; /* ضخامت بیشتر */
    z-index: 0;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3); /* اضافه کردن درخشش ملایم */
}

/* تنظیمات آیتم تایم‌لاین در دسکتاپ */
.timeline-item {
    box-sizing: border-box;
    clear: both;
    margin-bottom: 60px; /* افزایش فاصله عمودی */
    opacity: 0;
    padding: 20px 0;
    position: relative;
    transform: translateY(40px); /* افزایش مقدار اولیه جابجایی */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* کمی کندتر کردن انیمیشن */
    width: 42%; /* کمی افزایش عرض برای تعادل بهتر */
}

/* وقتی آیتم دیده شود */
.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* آیتم‌های فرد (۱، ۳، …) در سمت راست */
.timeline-item:nth-child(odd) {
    float: right;
    margin-right: 5%;
    /* ایجاد فاصله از سمت مرکز */
    text-align: right;
}

/* آیتم‌های زوج (۲، ۴، …) در سمت چپ */
.timeline-item:nth-child(even) {
    float: left;
    margin-left: 5%;
    /* ایجاد فاصله از سمت مرکز */
    text-align: left;
}

/* تنظیمات محتوای داخلی آیتم */
.timeline-content {
    background: linear-gradient(145deg, var(--card-bg), #222); /* گرادیان پس‌زمینه */
    border: 1px solid var(--border-color);
    border-radius: 15px; /* گردی بیشتر */
    padding: 30px 35px; /* افزایش padding */
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; /* اضافه کردن border-color به transition */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* سایه اولیه ملایم */
}

.timeline-content:hover {
    border-color: var(--primary-light); /* تغییر رنگ border در هاور */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), var(--shadow-primary-inset); /* سایه قوی‌تر در هاور */
    transform: translateY(-6px) scale(1.02); /* کمی بزرگنمایی بیشتر در هاور */
}

/* دایره شاخص (نقطه) مرتبط با هر آیتم - بزرگتر و با استایل بهتر */
.timeline-item::after {
    background-color: var(--dark-bg-primary); /* پس‌زمینه تیره‌تر */
    border: 4px solid var(--border-light); /* border ضخیم‌تر */
    border-radius: 50%;
    content: '';
    height: 24px; /* بزرگتر */
    position: absolute;
    top: 35px; /* تنظیم موقعیت عمودی */
    transition: background-color 0.5s ease, border-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease; /* اضافه کردن box-shadow به transition */
    width: 24px; /* بزرگتر */
    z-index: 1;
}

/* برای آیتم‌های فرد: دایره در سمت چپ آیتم (نزدیک به خط وسط) */
.timeline-item:nth-child(odd)::after {
    left: -12px; /* تنظیم دقیق موقعیت افقی */
    right: auto;
}

/* برای آیتم‌های زوج: دایره در سمت راست آیتم */
.timeline-item:nth-child(even)::after {
    left: auto;
    right: -12px; /* تنظیم دقیق موقعیت افقی */
}

/* استایل تغییر یافته دایره وقتی آیتم قابل مشاهده می‌شود */
.timeline-item.is-visible::after {
    background-color: var(--primary-dark);
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6), 0 0 0 4px rgba(255, 140, 0, 0.2); /* درخشش قوی‌تر و حلقه بیرونی */
    transform: scale(1.15); /* بزرگنمایی بیشتر */
}

/* استایل عناوین و آیکون‌ها */
.timeline-content h4 {
    align-items: center;
    color: var(--primary-light);
    display: flex;
    gap: 12px; /* افزایش فاصله آیکون و متن */
    margin-bottom: 15px; /* افزایش فاصله پایین */
    font-size: 1.25rem; /* کمی بزرگتر کردن فونت عنوان */
}

.timeline-icon {
    color: var(--primary-light);
    font-size: 1.6rem; /* بزرگتر کردن آیکون */
    opacity: 0.9; /* کمی شفافیت بیشتر */
    text-align: center;
    width: 30px; /* افزایش عرض برای هم‌ترازی بهتر */
    transition: transform 0.4s ease; /* اضافه کردن transition برای هاور */
}

.timeline-content:hover .timeline-icon {
    transform: scale(1.1) rotate(-5deg); /* افکت هاور برای آیکون */
}

/* --- Showcase Section --- */
#showcase {
    background-color: var(--dark-bg-secondary);
}

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

.showcase-item {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.showcase-item img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
}

.showcase-item:hover img {
    transform: scale(1.08);
}

.showcase-overlay {
    background: linear-gradient(transparent 60%, rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: flex-end;
    opacity: 0;
    padding: 25px;
    position: absolute;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.showcase-item:hover .showcase-overlay {
    opacity: 1;
    transform: translateY(0);
}

.showcase-overlay h4 {
    color: #fff;
    margin-bottom: 5px;
}

.showcase-overlay p {
    color: var(--primary-light);
    font-size: 0.85rem;
}

/* --- Testimonials Section --- */
#testimonials {
    background-color: var(--dark-bg-primary);
    padding-bottom: clamp(60px, 12vh, 120px);
    padding-top: clamp(40px, 8vh, 80px);
}

.testimonial-slider {
    margin: 0 auto;
    max-width: 800px;
    position: relative;
}

.swiper-slide {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
}

.testimonial-quote {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 25px;
    padding: 0 20px;
    position: relative;
}

.testimonial-quote::before,
.testimonial-quote::after {
    color: var(--primary-light);
    content: '"';
    font-size: 3rem;
    line-height: 1;
    opacity: 0.3;
    position: absolute;
}

.testimonial-quote::before {
    right: -5px;
    top: -10px;
}

.testimonial-quote::after {
    bottom: -20px;
    left: -5px;
}

.testimonial-author {
    color: var(--text-primary);
    font-weight: bold;
}

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

.swiper-pagination-bullet {
    background-color: var(--border-light);
    opacity: 0.7;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-light);
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-light);
    height: 40px;
    transition: background-color 0.3s ease;
    width: 40px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(255, 140, 0, 0.3);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- Tech Stack Section --- */
#tech-stack {
    background-color: var(--dark-bg-secondary);
}

.tech-logos {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(30px, 5vw, 60px);
    justify-content: center;
}

.tech-logo {
    filter: grayscale(80%);
    max-height: 50px;
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: auto;
}

.tech-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- About Section --- */
#about {
    background-color: var(--dark-bg-primary);
}

.about-grid {
    align-items: center;
    display: grid;
    gap: clamp(30px, 6vw, 80px);
    grid-template-columns: 1fr 1fr;
}

.about-image {
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    position: relative;
}

.about-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.about-image::after {
    background: var(--gradient-mix);
    content: '';
    inset: 0;
    mix-blend-mode: overlay;
    opacity: 0.15;
    position: absolute;
}

.about-content h3 {
    color: var(--primary-light);
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-content ul {
    list-style: none;
    margin-top: 25px;
    padding: 0;
}

.about-content li {
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-right: 25px;
    position: relative;
}

.about-content li::before {
    color: var(--primary-light);
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 2px;
}

.contact-wrapper {
    backdrop-filter: blur(10px);
    background-color: rgba(26, 26, 26, 0.8);
    border-radius: 25px;
    box-shadow: var(--shadow-medium), 0 0 40px rgba(0, 0, 0, 0.4);
    display: grid;
    gap: clamp(40px, 6vw, 80px);
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    overflow: hidden;
    padding: clamp(40px, 6vw, 70px);
    position: relative;
    z-index: 1;
}

.contact-wrapper::before {
    background: linear-gradient(to bottom right, var(--border-color), var(--border-light), var(--border-color));
    border-radius: inherit;
    content: '';
    inset: 0;
    mask-composite: exclude;
    padding: 1px;
    pointer-events: none;
    position: absolute;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: 0;
}

.contact-wrapper::after {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, rgba(255, 140, 0, 0) 70%);
    border-radius: 50%;
    bottom: -150px;
    content: '';
    filter: blur(80px);
    height: 400px;
    left: -150px;
    opacity: 0.6;
    pointer-events: none;
    position: absolute;
    width: 400px;
    z-index: -1;
}

.contact-info,
.contact-form {
    position: relative;
    z-index: 1;
}

.contact-info h3 {
    color: var(--primary-light);
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.contact-details li {
    align-items: flex-start;
    color: var(--text-secondary);
    display: flex;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.contact-details li:hover {
    color: var (--text-primary);
}

.contact-details i {
    color: var(--primary-light);
    flex-shrink: 0;
    font-size: 1.4rem;
    margin-left: 18px;
    padding-top: 3px;
    text-align: center;
    width: 25px;
}

.contact-details li:hover i {
    color: var(--primary-light);
    transform: scale(1.1);
}

.contact-details a {
    color: inherit;
}

.contact-details a:hover {
    color: var(--primary-light);
}

/* تنها لینک شبکه اجتماعی: گیت‌هاب */
.contact-socials {
    margin-top: 45px;
}

.contact-socials a {
    color: var(--text-secondary);
    display: inline-block;
    font-size: 1.6rem;
    margin-left: 25px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-socials a:hover {
    color: var(--primary-light);
    transform: translateY(-4px) scale(1.1);
}

.contact-form h3 {
    color: var(--primary-light);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.contact-form label {
    background-color: var(--card-bg);
    color: var(--text-secondary);
    font-size: 1rem;
    opacity: 0.7;
    padding: 0 5px;
    pointer-events: none;
    position: absolute;
    right: 20px;
    top: 16px;
    transition: all 0.3s ease;
}

.contact-form input,
.contact-form textarea {
    background-color: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    padding: 16px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.contact-form input:focus+label,
.contact-form input:not(:placeholder-shown)+label,
.contact-form textarea:focus+label,
.contact-form textarea:not(:placeholder-shown)+label {
    color: var(--primary-light);
    font-size: 0.85rem;
    opacity: 1;
    right: 15px;
    top: -10px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: transparent;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.25), var(--shadow-primary-inset);
    outline: none;
}

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

.contact-form button {
    margin-top: 10px;
    width: 100%;
}

.contact-form button:hover {
    background: linear-gradient(60deg, var(--primary-light), var(--primary-dark));
}

/* --- Footer --- */
footer {
    background-color: var(--dark-bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 50px 5%;
    text-align: center;
}

.footer-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo img {
    filter: brightness(0.8);
    margin-bottom: 10px;
    max-height: 40px;
}

.footer-links a {
    color: var(--text-secondary);
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* تنها لینک شبکه اجتماعی: گیت‌هاب */
.footer-socials a {
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary-light);
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.85rem;
    margin-top: 15px;
}

/* --- Scroll Top Button --- */
.scroll-top-btn {
    align-items: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    bottom: 30px;
    box-shadow: var(--shadow-primary);
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    font-size: 1.3rem;
    height: 50px;
    justify-content: center;
    left: 30px;
    opacity: 0;
    position: fixed;
    transform: scale(0.8) translateY(20px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
    visibility: hidden;
    width: 50px;
    z-index: 999;
}

.scroll-top-btn.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
}

.scroll-top-btn:hover {
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.5);
    transform: scale(1.1);
}

/* Updated styles for ورود button */
.login-btn {
    align-self: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem; /* Reduced font size */
    font-weight: 600;
    margin-inline-start: auto;
    padding: 10px 25px; /* Reduced padding */
    text-align: center;
    transition: var(--transition-smooth);
}

.logo-container a {
    color: inherit; /* Inherit color from parent */
    display: contents; /* Prevent anchor from affecting flex layout */
    text-decoration: none; /* Remove underline */
}

/* --- Media Queries --- */

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin: 0 auto 40px auto;
        max-width: 500px;
    }

    /* در سایزهای تبلت، تمام آیتم‌ها در یک ستون قرار می‌گیرند */
    .approach-timeline::after {
        left: 35px; /* تنظیم موقعیت خط برای تبلت */
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: auto;
        padding-left: 0;
        padding-right: 60px; /* افزایش padding برای جا دادن نقطه بزرگتر */
        right: auto;
        text-align: right;
        transform: translateX(-30px);
        width: 100%;
    }

    .timeline-item.is-visible {
        transform: translateX(0);
    }

    .timeline-item::after,
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: auto;
        right: 23px; /* تنظیم موقعیت نقطه برای تبلت */
        transform: none;
    }

    .timeline-item.is-visible::after,
    .timeline-item:nth-child(odd).is-visible::after,
    .timeline-item:nth-child(even).is-visible::after {
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    header nav {
        display: none;
    }

    .hero {
        min-height: 80vh;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
    }

    .hero p.subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        align-items: center;
        flex-direction: column;
    }

    .shape-1 {
        height: 250px;
        width: 250px;
    }

    .shape-2 {
        height: 150px;
        width: 150px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 35px;
    }

    .footer-content {
        gap: 15px;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 20px;
        justify-content: center;
    }

    .footer-links a {
        margin: 0;
    }

    .scroll-top-btn {
        bottom: 20px;
        height: 45px;
        left: 20px;
        width: 45px;
    }

    .approach-timeline::after {
        left: 25px; /* تنظیم موقعیت خط برای موبایل */
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-right: 55px; /* تنظیم padding برای موبایل */
        margin-bottom: 40px; /* کاهش فاصله عمودی برای موبایل */
    }

    .timeline-item::after,
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        height: 20px; /* اندازه نقطه برای موبایل */
        width: 20px; /* اندازه نقطه برای موبایل */
        right: 15px; /* موقعیت نقطه برای موبایل */
        top: 38px; /* تنظیم موقعیت عمودی نقطه برای موبایل */
        border-width: 3px; /* ضخامت border نقطه برای موبایل */
    }

    .timeline-content {
        padding: 25px; /* کاهش padding برای موبایل */
    }

    .login-btn {
        font-size: 0.9rem; /* Kept mobile font size */
        padding: 10px 20px; /* Kept mobile padding */
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 0.9rem;
        padding: 12px 28px;
    }

    section {
        padding: 60px 4%;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item {
        aspect-ratio: 3 / 2;
    }

    .contact-details li span {
        font-size: 0.9rem;
    }

    .contact-wrapper {
        padding: 30px 25px;
    }

    .contact-socials a {
        font-size: 1.5rem;
        margin-left: 20px;
    }

    .timeline-content h4 {
        font-size: 1.2rem;
    }

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

