/* =========================
   TEAM-STRUCTURE.CSS
   Consistent with Khem IT design system
   Purple background (inverted), solid colors only
========================= */

/* ============================================
   1. BASE SECTION STYLES
============================================ */
.team-structure {
    width: 100%;
    padding: 80px 0;
    background: #1e1029;  /* Solid purple background - inverted */
    position: relative;
    overflow: hidden;
}

/* Subtle background decoration - keep minimal */
.team-structure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(74, 222, 128, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.team-structure .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ============================================
   2. SECTION HEADER
============================================ */
.team-structure .section-header {
    text-align: left;
    margin-bottom: 60px;
}

.team-structure .section-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.team-structure .section-tag hr {
    width: 50px;
    height: 3px;
    background: #c084fc;  /* Solid purple */
    border: none;
    border-radius: 3px;
}

.team-structure .section-tag h5 {
    color: #c084fc;  /* Purple */
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

.team-structure .section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: #e2d6f0;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.team-structure .section-header p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #d1e0d6;
    line-height: 1.6;
    max-width: 650px;
    margin: 0;
    opacity: 0.9;
}

/* ============================================
   3. ORGANIZATION LEVELS
============================================ */
.team-structure .org-levels {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.team-structure .org-level {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.team-structure .org-level:nth-child(1) { animation-delay: 0.1s; }
.team-structure .org-level:nth-child(2) { animation-delay: 0.2s; }
.team-structure .org-level:nth-child(3) { animation-delay: 0.3s; }
.team-structure .org-level:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   4. ORG HEADERS
============================================ */
.team-structure .org-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(192, 132, 252, 0.3);  /* Purple border */
    position: relative;
}

.team-structure .org-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #c084fc;  /* Solid purple */
    border-radius: 2px;
}

.team-structure .org-header i {
    font-size: 1.8rem;
    color: #4ade80;  /* Green icon */
}

.team-structure .org-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e2d6f0;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ============================================
   5. EXECUTIVE OFFICE CARDS
============================================ */
.team-structure .org-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.team-structure .org-card {
    background: rgba(10, 31, 26, 0.5);  /* Green tint background */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 35px;
    text-align: center;
    border: 1px solid rgba(74, 222, 128, 0.25);  /* Green border */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.team-structure .org-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.08), transparent);
    transition: left 0.6s ease;
}

.team-structure .org-card:hover::before {
    left: 100%;
}

.team-structure .org-card:hover {
    transform: translateY(-5px);
    border-color: #c084fc;  /* Purple border on hover */
    background: rgba(10, 31, 26, 0.7);
    box-shadow: 0 15px 35px rgba(192, 132, 252, 0.15);
}

.team-structure .org-card i {
    font-size: 1.8rem;
    color: #4ade80;  /* Green icon */
    margin-bottom: 12px;
    display: block;
}

.team-structure .org-card span {
    font-size: 1rem;
    font-weight: 600;
    color: #e2d6f0;
    letter-spacing: 0.5px;
}

/* ============================================
   6. DEPARTMENTS GRID
============================================ */
.team-structure .departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.team-structure .org-department {
    background: rgba(10, 31, 26, 0.4);  /* Green tint background */
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(74, 222, 128, 0.15);  /* Green border */
    transition: all 0.3s ease;
}

.team-structure .org-department:hover {
    border-color: rgba(192, 132, 252, 0.4);  /* Purple on hover */
    background: rgba(10, 31, 26, 0.5);
}

.team-structure .org-department.full-width {
    grid-column: 1 / -1;
}

/* Department Header */
.team-structure .dept-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);  /* Green border */
}

.team-structure .dept-header i {
    font-size: 1.3rem;
    color: #c084fc;  /* Purple icon */
}

.team-structure .dept-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4ade80;  /* Green text */
    margin: 0;
    letter-spacing: 0.5px;
}

/* Role Pills Grid */
.team-structure .dept-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-structure .dept-grid span {
    background: rgba(10, 31, 26, 0.6);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #d1e0d6;
    border: 1px solid rgba(74, 222, 128, 0.25);  /* Green border */
    transition: all 0.3s ease;
    cursor: default;
}

.team-structure .dept-grid span:hover {
    border-color: #c084fc;  /* Purple on hover */
    color: #c084fc;
    transform: translateY(-2px);
    background: rgba(10, 31, 26, 0.8);
}

/* Wide grid for Operations and Revenue */
.team-structure .dept-grid.wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.team-structure .dept-grid.wide span {
    text-align: center;
}

/* ============================================
   7. RESPONSIVE BREAKPOINTS
============================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
    .team-structure {
        padding: 60px 0;
    }
    
    .team-structure .section-header {
        margin-bottom: 40px;
    }
    
    .team-structure .org-header h3 {
        font-size: 1.2rem;
    }
    
    .team-structure .org-header i {
        font-size: 1.5rem;
    }
    
    .team-structure .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .team-structure .section-header {
        text-align: center;
    }
    
    .team-structure .section-tag {
        justify-content: center;
    }
    
    .team-structure .section-header h2 {
        text-align: center;
    }
    
    .team-structure .section-header p {
        text-align: center;
        margin: 0 auto;
    }
    
    .team-structure .org-header {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .team-structure .org-header::before {
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
    }
    
    .team-structure .org-grid {
        justify-content: center;
    }
    
    .team-structure .org-card {
        min-width: 160px;
        padding: 20px 25px;
    }
    
    .team-structure .dept-header {
        justify-content: center;
    }
    
    .team-structure .dept-grid {
        justify-content: center;
    }
    
    .team-structure .dept-grid.wide {
        grid-template-columns: 1fr;
    }
}

/* Small phones (≤ 480px) */
@media (max-width: 480px) {
    .team-structure {
        padding: 40px 0;
    }
    
    .team-structure .org-header h3 {
        font-size: 1rem;
    }
    
    .team-structure .org-header i {
        font-size: 1.3rem;
    }
    
    .team-structure .org-card {
        padding: 15px 20px;
        min-width: 140px;
    }
    
    .team-structure .org-card i {
        font-size: 1.3rem;
    }
    
    .team-structure .org-card span {
        font-size: 0.85rem;
    }
    
    .team-structure .dept-header h4 {
        font-size: 1rem;
    }
    
    .team-structure .dept-header i {
        font-size: 1.1rem;
    }
    
    .team-structure .dept-grid span {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

/* Very narrow (≤ 360px) */
@media (max-width: 360px) {
    .team-structure .org-card {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .team-structure .org-card span {
        font-size: 0.75rem;
    }
    
    .team-structure .departments-grid {
        grid-template-columns: 1fr;
    }
}