

/* ======= Careers Header Section ======= */
.careers-header {
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 50%, #f4c632 100%);
    color: white;
    padding: 140px 5% 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.careers-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(119, 199, 181, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(244, 198, 50, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.careers-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.careers-header .container {
    max-width: 900px;
    margin: auto;
    position: relative;
    z-index: 2;
}

.careers-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.careers-header p {
    font-size: 1.3rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    max-width: 850px;
    margin: 0 auto;
    font-weight: 400;
}

/* ======= Mission Section ======= */
.mission-section {
    padding: 100px 5%;
    background: white;
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mission-content h2 {
    font-size: 2.8rem;
    color: #1a1a2e;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-content p {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

/* ======= Responsive Design for Header ======= */
@media (max-width: 992px) {
    .careers-header {
        padding: 120px 5% 80px;
    }
    
    .careers-header h1 {
        font-size: 3rem;
    }
    
    .careers-header p {
        font-size: 1.2rem;
    }
    
    .mission-content h2 {
        font-size: 2.3rem;
    }
    
    .mission-content p {
        font-size: 1.15rem;
    }
}

@media (max-width: 600px) {
    .careers-header {
        padding: 100px 5% 60px;
    }
    
    .careers-header h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .careers-header p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .mission-section {
        padding: 80px 5%;
    }
    
    .mission-content h2 {
        font-size: 2rem;
    }
    
    .mission-content p {
        font-size: 1.1rem;
    }
}

/* ======= Page Base ======= */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fc;
    margin: 0;
    padding: 80px 0 0 0;
    color: #1a1a2e;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ======= Positions Section ======= */
.positions-section {
    padding: 100px 5%;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
    font-weight: 800;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    width: 100%;
    justify-items: center;
}

.position-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(43, 78, 135, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.position-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    transition: all 0.8s ease;
}

.position-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(43, 78, 135, 0.15);
    border-color: rgba(43, 78, 135, 0.3);
    height: auto;
    min-height: 120px;
}

.position-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.7s ease;
}

.position-header h3 {
    font-size: 1.4rem;
    color: #1a1a2e;
    font-weight: 700;
    margin: 0;
    flex: 1;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.position-card:hover .position-header h3 {
    transform: translateY(-5px);
}

.position-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.position-card:hover .position-content {
    max-height: 300px;
    opacity: 1;
    margin-top: 1.5rem;
    transform: translateY(0);
}

.position-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: all 0.8s ease;
}

.position-tags {
    display: inline;
    transition: all 0.8s ease;
}

.tag {
    background: transparent;
    color: #555;
    padding: 0;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(10px);
    border: none;
    font-style: normal;
    display: inline;
}

.tag:not(:last-child)::after {
    content: ', ';
}

.position-card:hover .tag {
    transform: translateY(0);
    opacity: 1;
}

.position-card:hover .tag:nth-child(1) {
    transition-delay: 0.15s;
}
.position-card:hover .tag:nth-child(2) {
    transition-delay: 0.3s;
}
/* CRITICAL FIX: Ensure smooth closing with same timing as opening */
.position-card .position-content,
.position-card .tag,
.position-card .position-header h3 {
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.position-card .tag {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.position-card .position-header h3 {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove the faster closing transitions */
.position-card:not(:hover) .position-content,
.position-card:not(:hover) .tag,
.position-card:not(:hover) .position-header h3 {
    /* Inherit the same slow timing from above */
}

/* ======= Responsive Design ======= */
@media (max-width: 992px) {
    .positions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
}

@media (max-width: 600px) {
    .positions-section {
        padding: 60px 5%;
    }

    .position-card {
        padding: 2rem;
        height: 100px;
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .position-content {
        transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
}