/* ========================================
   :root - تعریف متغیرهای اصلی
======================================== */
:root {
    /* Colors */
    --bg-primary: hsl(225, 47%, 7%);
    --bg-secondary: hsl(225, 47%, 10%);
    --bg-tertiary: hsl(225, 47%, 13%);
    --text-primary: hsl(0, 0%, 97%);
    --text-secondary: hsl(0, 0%, 60%);
    --text-muted: hsla(0, 0%, 100%, 0.7);
    --accent-blue: hsla(212, 49%, 34%, 0.95);
    --accent-purple: hsla(270, 41%, 41%, 0.95);

    /* Overlays */
    --overlay-light: rgba(255, 255, 255, 0.03);
    --overlay-lighter: rgba(255, 255, 255, 0.05);
    --overlay-lightest: rgba(255, 255, 255, 0.15);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    --gradient-reverse: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);

    /* Spacing */
    --container-padding: 40px;
    --container-width: 1200px;
    --gap-sm: 20px;
    --gap-md: 40px;
    --gap-lg: 60px;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

body{
    direction: rtl;
}

 .container-team:first-of-type {
     display: flex;
     justify-content: center;
     align-items: center;
     position: relative;
}
/* CONTAINER */
 .container-team {
     text-align: left;
     max-width: var(--container-width);
     width: 90%;
     margin: 0 auto;
     padding: var(--container-padding);
     display: flex;
     align-items: center;
     gap: var(--gap-lg);
     pointer-events: auto;
     z-index: 3;
     position: relative;
     justify-content: center;
}
/* ========================================
   Sections عمومی
======================================== */
section {
    padding: 100px 0;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.animated { opacity: 1; transform: translateY(0); }

.section-title {
    text-align: center;
    margin-bottom: var(--gap-md);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title.animated { opacity: 1; transform: translateY(0); }

.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* ========================================
   داستان ما (Story Section)
======================================== */
.story-section { background-color: var(--bg-secondary); }

.story {
    background-color: var(--bg-tertiary);
    border-radius: 20px;
    padding: var(--gap-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.story.animated { opacity: 1; transform: translateX(0); }

.story::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--gradient-primary);
}

.story-content { display: flex; align-items: center; gap: var(--gap-md); }

.story-icon {
    flex-shrink: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
}

.story-text h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--text-primary); }

.story-text p { color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }

/* ========================================
   تیم ما (Team Section)
======================================== */
.team-section { background-color: var(--bg-primary); }

.team-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
    margin-top: var(--gap-lg);
}

.team-card {
    background-color: var(--bg-tertiary);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow var(--transition-fast);
}

.team-card.animated { opacity: 1; transform: translateY(0) scale(1); }

.team-card:nth-child(1) { transition-delay: 0.1s; }
.team-card:nth-child(2) { transition-delay: 0.2s; }
.team-card:nth-child(3) { transition-delay: 0.3s; }

.team-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--border-medium); }

.team-photo {
    width: 140px; height: 140px;
    border-radius: 50%;
    margin-bottom: 25px;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    padding: 3px;
}

.team-photo img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 50%;
    transition: transform var(--transition-medium);
}

.team-card:hover .team-photo img { transform: scale(1.05); }

.team-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

.team-info h3 { font-size: 1.4rem; margin-bottom: 8px; font-weight: 600; }

.team-info .role { color: var(--accent-blue); font-weight: 500; margin-bottom: 15px; display: block; font-size: 0.95rem; }

.team-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-top: auto; }

.team-card .more { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.team-card.is-open .more { max-height: 500px; }
.toggle-btn {
    margin-top: 15px;
    background: none; border: 1px solid var(--accent-blue);
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 0.95rem;
}




/* ========================================
   Scroll Progress Bar
======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform-origin: 0%;
    transform: scaleX(0);
    transition: transform 0.1s ease;
    z-index: 1000;
}



/* ========================================
   Responsive Design
======================================== */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .story-content { flex-direction: column; text-align: center; }
    .story-icon { margin-bottom: var(--gap-sm); }
    .team-cards, .values-cards { grid-template-columns: repeat(2, 1fr); }
    .team-card:nth-child(3) { transition-delay: 0.1s; }
}

@media (max-width: 768px) {
    .hero { height: 80vh; min-height: 500px; }
    .hero h1 { font-size: 2.2rem; }
    .section-title h2 { font-size: 2rem; }
    .team-cards, .values-cards {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    section { padding: 70px 0; }
    .team-card, .value-card { padding: 25px; }
    .team-card:nth-child(1), .team-card:nth-child(2), .team-card:nth-child(3) { transition-delay: 0.1s; }
}

@media (max-width: 480px) {
    :root { --container-padding: 20px; --gap-md: 30px; --gap-lg: 40px; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .story, .team-card, .value-card { padding: 20px; }
    .team-photo { width: 120px; height: 120px; }
    .value-icon { width: 70px; height: 70px; font-size: 1.8rem; }
    .menu { top: 1rem; right: 1rem; gap: 1rem; }
    .menu a { font-size: 0.9rem; }
}
