:root {
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --accent: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

.team-section {
    background-color: var(--dark-bg);
    color: var(--text-main);
    padding: 120px 20px; /* Increased padding to allow for offset cards */
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

.team-header {
    text-align: center;
    margin-bottom: 100px;
}

/* Grid setup for 5 columns */
.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 80px;
}

/* Base Card Style */
.team-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

/* --- THE TREE STRUCTURE LOGIC --- */

/* Outer Cards (1 and 5) - Sit lowest */
.team-grid .team-card:nth-child(1),
.team-grid .team-card:nth-child(5) {
    transform: translateY(60px);
}

/* Inner Cards (2 and 4) - Sit middle */
.team-grid .team-card:nth-child(2),
.team-grid .team-card:nth-child(4) {
    transform: translateY(30px);
}

/* Center Card (3) - Sit highest */
.team-grid .team-card:nth-child(3) {
    transform: translateY(0);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hover Effect: Ensure they don't lose their relative position but pop out */
.team-card:hover {
    z-index: 10;
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Specific hover overrides to maintain the arc while lifting */
.team-grid .team-card:nth-child(1):hover,
.team-grid .team-card:nth-child(5):hover { transform: translateY(40px) scale(1.05); }

.team-grid .team-card:nth-child(2):hover,
.team-grid .team-card:nth-child(4):hover { transform: translateY(10px) scale(1.05); }

.team-grid .team-card:nth-child(3):hover { transform: translateY(-20px) scale(1.05); }

/* --- Visuals --- */

.image-wrapper {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.profile-svg { width: 80px; height: 80px; }

.card-content h3 { font-size: 1.2rem; margin-bottom: 10px; }

.card-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border-radius: 6px;
    font-weight: bold;
}

.cta-container { text-align: center; margin-top: 40px; }

.cta-button {
    background: var(--accent);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

/* Mobile: Disable the arc for better readability */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    .team-grid .team-card:nth-child(n) {
        transform: translateY(0) !important;
    }
}

/* Typography Imports - Adding a premium font look */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&display=swap');

.team-header {
    text-align: center;
    margin-bottom: 100px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: relative;
}

/* The small text above the heading */
.eyebrow {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    opacity: 0.9;
}

.main-title {
    font-size: 3.5rem; /* Larger, more impactful size */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--text-main);
    letter-spacing: -1px;
}

/* Gradient effect for "Amazon Dream Team" */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Hand-drawn underline SVG */
.title-underline {
    width: 280px;
    margin: 0 auto 30px auto;
    height: 15px;
    opacity: 0.6;
}

.title-underline svg {
    width: 100%;
    height: 100%;
}

/* Tagline styling */
.tagline {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
}

.white-highlight {
    color: var(--text-main);
    font-weight: 600;
}

/* Animation for the header */
.team-header {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    .tagline {
        font-size: 1rem;
        padding: 0 10px;
    }
    .title-underline {
        width: 200px;
    }
}