/* --- CINEMATIC HERO --- */
.jobs-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.7); /* Dark cinematic tint */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(3.5rem, 6vw, 5rem);
    margin-bottom: 1rem;
}

.hero-content .cursive-text {
    font-style: italic;
}

.hero-content .purple-dot {
    color: #6d275f; /* Ticket & Tags Purple */
}

.hero-content p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- THE ALABASTER CANVAS --- */
.jobs-section {
    background-color: #f3f2ef; /* Ticket & Tags light background */
    padding: 6rem 5%;
    min-height: 50vh;
}

.jobs-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- THE JOB CARDS (Accordion Style) --- */
.job-card {
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid transparent;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #6d275f; /* Brand Purple */
}

.job-header {
    padding: 2rem 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.job-title-group h2 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.5rem;
    color: #050505;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.job-card.active .job-title-group h2 {
    color: #6d275f; /* Brand Purple */
}

.job-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #555555;
    font-family: 'Poppins', sans-serif;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: #6d275f; /* Brand Purple */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
}

.job-action svg {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.job-card.active .job-action svg {
    transform: rotate(180deg);
}

/* --- THE EXPANDED DETAILS --- */
.job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: #ffffff; 
}

.details-inner {
    padding: 0 2.5rem 3rem 2.5rem;
    border-top: 1px solid rgba(5, 5, 5, 0.05);
    margin-top: 1rem;
    padding-top: 2rem;
    font-family: 'Poppins', sans-serif;
}

.details-inner p {
    color: #050505;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.details-inner h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #050505;
}

.details-inner ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2.5rem;
}

.details-inner ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #555555;
    font-size: 0.95rem;
}

.details-inner ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: #6d275f; /* Brand Purple */
    border-radius: 50%;
}

.apply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid rgba(5, 5, 5, 0.1);
}

.apply-btn {
    background: #050505;
    color: #ffffff;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
    border: 2px solid #050505;
    cursor: pointer;
}

.apply-btn:hover {
    background: transparent;
    color: #050505;
}

/* ==========================================
   APPLY NOW MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: blur(4px); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    padding: 4rem 3.5rem;
    position: relative;
    border-radius: 4px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #050505;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #6d275f;
}

.modal-kicker {
    display: block;
    color: #6d275f; /* Brand Purple */
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2rem;
    line-height: 1.2;
    color: #050505;
    margin-bottom: 1.5rem;
}

.modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555555;
    margin-bottom: 2.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.modal-btn.primary {
    background: #050505;
    color: #ffffff;
    border: 2px solid #050505;
}

.modal-btn.primary:hover {
    background: #6d275f;
    border-color: #6d275f;
}

.modal-btn.secondary {
    background: transparent;
    color: #050505;
    border: 2px solid rgba(5, 5, 5, 0.2);
}

.modal-btn.secondary:hover {
    border-color: #050505;
}

/* --- Hero Heading Dash & Sub-heading Styles (White) --- */
.hero-content .sub-heading {
    display: block;
    color: #ffffff; /* Forces text to remain white */
    font-size: 0.85em;
    font-weight: 400;
    font-style: normal; /* Overrides previous cursive style to match other pages */
}

.hero-content .title-dash {
    display: inline-block;
    width: 80px;
    height: 4px;
    background-color: #ffffff; /* Forces dash to remain white */
    margin-bottom: 0.2em;
    margin-right: 20px;
    vertical-align: middle;
}

/* Responsive adjustment for the dash */
@media (max-width: 768px) {
    .hero-content .title-dash {
        width: 50px;
        margin-bottom: 0.3em;
    }
}

/* ==========================================
   MOBILE RESPONSIVE OPTIMIZATION
   ========================================== */

@media (max-width: 768px) {
    /* Adjust overall section padding */
    .jobs-section {
        padding: 4rem 5%; 
    }

    /* Stack Job Header & Reduce Padding */
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem; 
    }

    /* Stack metadata (Location & Type) so it doesn't overflow */
    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Reduce inner details padding for narrow screens */
    .details-inner {
        padding: 0 1.5rem 2rem 1.5rem; 
    }

    /* Stack Apply Bar and make button full-width */
    .apply-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .apply-btn {
        text-align: center;
        width: 100%;
    }

    /* Modal Mobile Adjustments */
    .modal-content {
        padding: 3rem 1.5rem;
        width: 95%;
    }

    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }

    .modal-close {
        top: 1rem;
        right: 1.5rem;
    }
}

/* Fallback message logic */
.empty-jobs-msg:not(:only-child) {
    display: none;
}