/* =================================================================
   Careers Page Styles - Source Grid
   Olive Green Theme: #636B2F
   ================================================================= */

/* Scoped to careers page content */
#careers-page-content {
    min-height: 100vh;
}

/* ===========================
   Hero Section
   =========================== */
.careers-hero {
    background: linear-gradient(135deg, #636B2F 0%, #7a8439 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.careers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.careers-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.careers-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===========================
   Section Common Styles
   =========================== */
.why-work-section,
.open-positions-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 40px;
}

/* ===========================
   Why Work Section
   =========================== */
.why-work-section {
    background-color: #f8f9fa;
}

.why-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.why-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(99, 107, 47, 0.15);
    border-color: #636B2F;
}

.why-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #636B2F 0%, #7a8439 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.why-card:hover .why-icon {
    transform: rotate(360deg);
}

.why-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.why-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.why-card p {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    margin: 0;
}

/* ===========================
   Open Positions Section
   =========================== */
.open-positions-section {
    background-color: #fff;
}

.position-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.position-card:hover {
    border-color: #636B2F;
    box-shadow: 0 8px 20px rgba(99, 107, 47, 0.12);
    transform: translateY(-5px);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.position-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    flex: 1;
}

.position-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-open {
    background-color: rgba(99, 107, 47, 0.1);
    color: #636B2F;
}

.badge-filled {
    background-color: rgba(203, 213, 224, 0.5);
    color: #718096;
}

.position-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #4a5568;
}

.meta-item i {
    color: #636B2F;
    font-size: 1rem;
}

.position-description {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.position-deadline {
    font-size: 0.9rem;
    color: #e53e3e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-deadline i {
    font-size: 1rem;
}

.btn-view-apply {
    background-color: #636B2F;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-apply:hover {
    background-color: #7a8439;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 107, 47, 0.3);
}

.btn-view-apply:disabled,
.position-card .btn-view-apply[onclick*="filled"] {
    background-color: #cbd5e0;
    cursor: not-allowed;
    color: #718096;
}

.btn-view-apply:disabled:hover,
.position-card .btn-view-apply[onclick*="filled"]:hover {
    transform: none;
    box-shadow: none;
}

/* ===========================
   No Positions Message
   =========================== */
.no-positions-message {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(99, 107, 47, 0.05) 0%, rgba(122, 132, 57, 0.05) 100%);
    border-radius: 16px;
    border: 2px dashed #636B2F;
}

.no-positions-message i {
    font-size: 4rem;
    color: #636B2F;
    margin-bottom: 30px;
}

.no-positions-message h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.no-positions-message p {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.btn-primary-custom {
    display: inline-block;
    background-color: #636B2F;
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #7a8439;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 107, 47, 0.3);
    color: #fff;
    text-decoration: none;
}

/* ===========================
   Application Modal
   =========================== */
.application-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #636B2F 0%, #7a8439 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

/* ===========================
   Form Styles
   =========================== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group .required {
    color: #e53e3e;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #636B2F;
    box-shadow: 0 0 0 3px rgba(99, 107, 47, 0.1);
}

.form-control.is-invalid {
    border-color: #e53e3e;
}

.error-message {
    display: block;
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 6px;
}

.form-text {
    display: block;
    color: #718096;
    font-size: 0.875rem;
    margin-top: 6px;
}

/* File Upload Styles */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border: 2px dashed #636B2F;
    border-radius: 8px;
    background-color: rgba(99, 107, 47, 0.03);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover {
    background-color: rgba(99, 107, 47, 0.08);
    border-color: #7a8439;
}

.file-upload-label i {
    font-size: 1.5rem;
    color: #636B2F;
}

.file-upload-label span {
    color: #4a5568;
    font-weight: 500;
}

.btn-submit-application {
    background-color: #636B2F;
    color: #fff;
    border: none;
    padding: 16px 48px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 20px;
}

.btn-submit-application:hover {
    background-color: #7a8439;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 107, 47, 0.3);
}

.btn-submit-application:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* ===========================
   Responsive Styles
   =========================== */
@media (max-width: 991px) {
    .careers-hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .why-work-section,
    .open-positions-section {
        padding: 60px 0;
    }

    .modal-content {
        width: 95%;
    }

    .modal-body {
        padding: 30px 20px;
    }
}

@media (max-width: 767px) {
    .careers-hero {
        padding: 60px 0 50px;
    }

    .careers-hero-title {
        font-size: 2rem;
    }

    .careers-hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .why-card,
    .position-card {
        margin-bottom: 20px;
    }

    .position-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .position-meta {
        flex-direction: column;
        gap: 10px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .btn-submit-application {
        width: 100%;
        padding: 14px 24px;
    }

    .no-positions-message {
        padding: 60px 20px;
    }

    .no-positions-message i {
        font-size: 3rem;
    }

    .no-positions-message h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .careers-hero-title {
        font-size: 1.75rem;
    }

    .why-icon {
        width: 60px;
        height: 60px;
    }

    .why-icon i {
        font-size: 2rem;
    }

    .position-title {
        font-size: 1.25rem;
    }
}

/* ========================================================================
   EDITORIAL THEME ALIGNMENT
   Aligns careers with the site-wide olive editorial design. Loaded after
   theme.css so the --tg-* tokens are available.
   ======================================================================== */
.careers-hero-title,
.why-work-section .section-title,
.open-positions .section-title {
  font-family: var(--tg-font-display, "Aboreto", Georgia, serif);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.why-card,
.position-card {
  border-radius: var(--tg-radius, 16px);
  border: 1px solid var(--tg-gray-300, #e3e5db);
  box-shadow: var(--tg-shadow-sm, 0 1px 3px rgba(31, 36, 18, 0.1));
}

.why-card:hover,
.position-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow-md, 0 10px 24px rgba(31, 36, 18, 0.09));
}
