/* --- 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-size: clamp(3.5rem, 6vw, 5rem);
    margin-bottom: 1rem;
}

.hero-content .cursive-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.hero-content .gold-dot {
    color: #C89B3C;
}

/* --- THE ALABASTER CANVAS --- */
.jobs-section {
    background-color: #E6E4E0; /* Textured Alabaster */
    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 #C89B3C; /* Matte gold interaction */
}

.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-size: 1.5rem;
    color: #050505;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.job-card.active .job-title-group h2 {
    color: #C89B3C;
}

.job-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #555555;
}

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

.job-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: #C89B3C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.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; /* Slightly off-white to inset the content */
}

.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;
}

.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;
}

.details-inner ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: #C89B3C; /* Matte gold custom bullets */
    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);
}

.closing-date {
    font-weight: 600;
    color: #050505;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.apply-btn {
    background: #050505;
    color: #ffffff;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 2px solid #050505;
}

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

/* ==========================================
   APPLY NOW MODAL
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.85); /* Dark cinematic overlay */
    backdrop-filter: blur(4px); /* Sleek background blur */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Ensures it sits above the global nav */
    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);
}

.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: #C89B3C;
}

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

.modal-title {
    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: #C89B3C;
    border-color: #C89B3C;
}

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

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

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 3rem 2rem;
    }
    .modal-actions {
        flex-direction: column;
    }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .apply-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}