/* =========================================
   CAREERS PAGE STYLES
   ========================================= */

/* =========================================
   HERO — same animated gradient treatment as the About page hero
   (navy -> royal blue -> navy sweep, drifting aurora blobs, and a
   pointer-tracked spotlight wired up in careers.js)
   ========================================= */
.careers-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 3rem;
    overflow: hidden;
    isolation: isolate;

    /* Updated live by careers.js so the spotlight tracks the cursor */
    --hero-mx: 50%;
    --hero-my: 50%;

    background: linear-gradient(135deg,
                var(--color-navy) 0%,
                var(--color-navy-dark) 50%,
                var(--color-navy) 100%);
    background-size: 200% auto;
    background-position: 0% center;
    animation: heroGradientShift 18s ease-in-out infinite;
}

@keyframes heroGradientShift {
    0%   { background-position: 0% center; }
    50%  { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.careers-hero::before {
    content: "";
    position: absolute;
    inset: -25%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(38% 42% at 22% 28%, rgba(14, 23, 48, 0.55) 0%, rgba(14, 23, 48, 0) 66%),
        radial-gradient(34% 38% at 78% 70%, rgba(24, 38, 74, 0.60) 0%, rgba(24, 38, 74, 0) 68%),
        radial-gradient(30% 34% at 62% 16%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
    animation: heroAurora 26s ease-in-out infinite alternate;
}

@keyframes heroAurora {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    50%  { transform: translate3d(3%, 3%, 0) scale(1.08); }
    100% { transform: translate3d(-2%, 2%, 0) scale(1.03); }
}

.careers-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle 420px at var(--hero-mx) var(--hero-my),
                rgba(255, 255, 255, 0.20) 0%,
                rgba(14, 23, 48, 0.35) 38%,
                rgba(255, 255, 255, 0) 72%);
}

.careers-hero.is-pointer-active::after { opacity: 1; }

.careers-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.careers-hero .overline {
    color: var(--color-accent);
}

.careers-hero h2 {
    font-size: 3.5rem;
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--color-white);
}

.careers-hero h2 .highlight-blue {
    color: var(--color-accent);
}

.highlight-blue {
    color: var(--color-blue);
}

.careers-hero .desc-text {
    max-width: 500px;
    font-size: 1.1rem;
    color: var(--color-gray);
}

@media (prefers-reduced-motion: reduce) {
    .careers-hero,
    .careers-hero::before {
        animation: none;
    }
}

@media (max-width: 900px) {
    .careers-hero {
        padding: 8.5rem 0 3.5rem;
    }
}

/* =========================================
   VACANCIES ACCORDION
   ========================================= */
.vacancies-section {
    background-color: var(--color-white);
}

.vacancies-container {
    margin: 0 auto;
}

.vacancies-section .section-title {
    margin-bottom: 2.5rem;
}

.accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-row {
    border: 1px solid #dfe4ea;
    border-radius: 12px;
    background-color: var(--color-white);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.job-row:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--color-accent); /* Blue border on hover */
}

.job-info h3 {
    font-size: 1.2rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--color-gray);
    font-size: 0.85rem;
    font-weight: 500;
}

.job-meta span i {
    margin-right: 5px;
}

.job-row-apply {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.apply-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    display: inline-block;
}

.chevron-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-light);
    color: var(--color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.job-row-apply:hover .chevron-icon {
    background-color: var(--color-blue);
    color: var(--color-white);
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .job-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-row-apply {
        width: 100%;
        justify-content: space-between;
    }
}

/* =========================================
   EMPTY / ERROR STATE CARD
   Shown in place of the accordion when there are
   no active openings, or the list fails to load.
   ========================================= */
.no-positions-card {
    margin: 0 auto;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light) 100%);
    border: 1px solid #dfe4ea;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.no-positions-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 15px 35px rgba(24, 38, 74, 0.08);
    transform: translateY(-3px);
}

.no-positions-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background-color: rgba(40, 65, 162, 0.1);
    color: var(--color-blue);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-positions-icon--error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.no-positions-card h3 {
    color: var(--color-navy);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.no-positions-card p {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 auto 1.75rem;
}

.no-positions-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

/* =========================================
   GENERAL APPLICATION FORM
   Grey-gradient band, text + trust points on the
   left, the application card on the right — same
   split-layout language as the site's other
   text-left / visual-right CTA sections.
   ========================================= */
.general-app-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, #eef1f5 0%, #e2e7ee 48%, #eef1f5 100%);
}

.general-app-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(40% 55% at 6% 10%, rgba(126, 138, 150, 0.18) 0%, rgba(126, 138, 150, 0) 70%),
        radial-gradient(38% 55% at 96% 94%, rgba(40, 65, 162, 0.09) 0%, rgba(40, 65, 162, 0) 72%);
}

.general-app-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 4rem;
    text-align: left;
}

.general-app-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.general-app-text .section-title {
    margin-bottom: 1.1rem;
}

.general-app-text .desc-text {
    color: var(--color-gray);
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 440px;
    margin-bottom: 2rem;
}

.general-app-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.general-app-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.general-app-points li i {
    color: var(--color-blue);
    margin-top: 0.2rem;
}

@media (max-width: 900px) {
    .general-app-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .general-app-text {
        text-align: center;
    }

    .general-app-text .desc-text {
        margin-left: auto;
        margin-right: auto;
    }

    .general-app-points {
        align-items: stretch;   /* was: center */
        max-width: 380px;
        margin: 0 auto;
    }

    .general-app-points li {
        text-align: left;
    }
}

.form-card {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid #dfe4ea;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.form-card:hover,
.form-card:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 20px 45px rgba(24, 38, 74, 0.10);
    transform: translateY(-4px);
}

.form-card .form-row {
    display: flex;
    gap: 1.5rem;
}

.form-card .form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

/* Inputs styling (Including Phone Type) */
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-light);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--color-navy);
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

.form-card input::placeholder,
.form-card textarea::placeholder {
    color: #aeb6bb;
}

.form-card input:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(40, 65, 162, 0.1);
}

.form-card textarea {
    resize: vertical;
}

/* =========================================
   FILE UPLOAD & BOTTOM ACTION ROW
   ========================================= */
.form-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

.form-actions-row .file-upload-group {
    margin-bottom: 0;
}

.file-upload-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-upload-label {
    background-color: var(--color-light);
    color: var(--color-navy);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-label:hover {
    background-color: var(--color-blue);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 65, 162, 0.15);
}

/* Selected Files Display Box */
.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    border: 1px solid var(--color-light);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--color-navy);
    font-weight: 500;
}

.remove-file-btn {
    color: #ef4444; 
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.remove-file-btn:hover {
    color: #b91c1c;
    transform: scale(1.2);
}

.form-actions-row .submit-btn {
    width: auto;
    border-radius: 8px;
    padding: 1rem 2.5rem;
    box-shadow: 0 8px 20px rgba(40, 65, 162, 0.18);
}

.form-actions-row .submit-btn:hover {
    box-shadow: 0 14px 30px rgba(40, 65, 162, 0.28);
}

@media (max-width: 600px) {
    .form-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions-row .submit-btn {
        width: 100%;
    }
    .form-card .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* =========================================
   SUCCESS MODAL OVERLAY
   ========================================= */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(24, 38, 74, 0.6); 
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.success-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-modal-card {
    background-color: var(--color-white);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(24, 38, 74, 0.15);
    border: 1px solid var(--color-light);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-modal-overlay.active .success-modal-card {
    transform: scale(1);
}

.success-icon-halo {
    color: var(--color-accent); 
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-flex;
    animation: iconPopIn 0.5s ease;
}

.success-modal-card h3 {
    color: var(--color-navy);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.success-modal-card p {
    color: #555555;
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
}

.close-modal-btn {
    background-color: var(--color-blue);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

.close-modal-btn:hover {
    background-color: var(--color-navy);
}

@keyframes iconPopIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
/* =========================================
   DYNAMIC APPLY MODAL (injected by careers.js)
   Restored from the backend-wired careers.css so the
   per-opportunity application modal keeps its styling.
   ========================================= */
.apply-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(24, 38, 74, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 3rem 1rem;
}

    .apply-modal-overlay.active {
        display: flex;
    }

.apply-modal-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(24, 38, 74, 0.15);
}

    .apply-modal-card h3 {
        color: var(--color-navy);
        margin-top: 0;
    }

.apply-modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--color-gray);
    cursor: pointer;
}

.apply-modal-card .form-group {
    margin-bottom: 1.25rem;
}

.apply-modal-card label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.apply-modal-card input,
.apply-modal-card textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--color-light);
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: var(--font-main);
}

.apply-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}
