/* ===================================
   CAREERS SECTION STYLES
   Consolidated styles for all career-related pages
   ================================== */

/* ===================================
   USER-FACING CAREERS STYLES
   ================================== */

/* Modern Careers Section Styles */
.careers-hero {
    background: linear-gradient(135deg, #2E3192 0%, #29B6E6 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'); */
    opacity: 0.3;
}

.careers-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.careers-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #f0f4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.careers-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.careers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.career-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.career-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2E3192;
}

.career-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.career-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.career-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #2E3192;
}

.career-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.info-label {
    color: #4a5568;
    font-weight: 500;
}

.info-value {
    color: #2d3748;
    font-weight: 600;
}

.vacancy-badge {
    background: #2E3192;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(46, 49, 146, 0.3);
}

.career-meta {
    display: flex;
    align-items: center;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.career-meta::before {
    content: '📅';
    font-size: 1rem;
}

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

.apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2E3192;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
    border: none;
    cursor: pointer;
    gap: 0.5rem;
}

.apply-btn:hover {
    background-color: #252a7a;
    box-shadow: 0 8px 25px rgba(46, 49, 146, 0.4);
    text-decoration: none;
    color: white;
}

.apply-btn::after {
    content: '→';
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8fafc;
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 600px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
    margin: 0;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* ===================================
   ADMIN CAREERS MANAGEMENT STYLES
   ================================== */

/* Admin Careers Container */
.admin-careers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.admin-header h1 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.add-career-btn {
    display: inline-flex;
    align-items: center;
    background: #2E3192;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.add-career-btn:hover {
    background-color: #252a7a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 49, 146, 0.4);
    text-decoration: none;
    color: white;
}

.add-career-btn::before {
    content: '+';
    font-size: 1.2rem;
    font-weight: bold;
}

.success-alert {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.careers-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-wrapper {
    overflow-x: auto;
}

.careers-table {
    width: 100%;
    border-collapse: collapse;
}

.careers-table th {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #2d3748;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.careers-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    vertical-align: middle;
}

.careers-table tr:hover {
    background-color: #f7fafc;
}

.career-title-cell {
    font-weight: 600;
    color: #2d3748;
    max-width: 200px;
}

.vacancy-cell {
    text-align: center;
}

.url-cell {
    max-width: 300px;
}

.url-link {
    color: #29B6E6;
    text-decoration: none;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-link:hover {
    color: #29A7E0;
    text-decoration: underline;
}

.actions-cell {
    text-align: center;
    white-space: nowrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.edit-btn {
    background-color: #2E3192;
    color: white;
}

.edit-btn:hover {
    background-color: #252a7a;
    color: white;
    text-decoration: none;
}

.delete-btn {
    background-color: #e53e3e;
    color: white;
}

.delete-btn:hover {
    background-color: #c53030;
}

.delete-form {
    display: inline-block;
    margin: 0;
}

/* ===================================
   ADMIN FORM STYLES (Create/Edit)
   ================================== */

.admin-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.form-header h1 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.form-header p {
    color: #718096;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.error-alert {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #742a2a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #e53e3e;
}

.error-alert ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-alert li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.career-form {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: span 2;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    gap: 0.25rem;
}

.required-mark {
    color: #e53e3e;
    font-weight: bold;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #2E3192;
    box-shadow: 0 0 0 3px rgba(46, 49, 146, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.form-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.cancel-btn,
.back-btn {
    background-color: #e2e8f0;
    color: #4a5568;
}

.cancel-btn:hover,
.back-btn:hover {
    background-color: #cbd5e0;
    text-decoration: none;
    color: #2d3748;
}

.submit-btn {
    background: #2E3192;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.submit-btn:hover {
    background-color: #252a7a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 49, 146, 0.4);
}

.update-btn {
    background: #2E3192;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.update-btn:hover {
    background-color: #252a7a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 49, 146, 0.4);
}

.field-description {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.5rem;
}

.edit-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ===================================
   RESPONSIVE DESIGN
   ================================== */

/* Tablet Styles */
@media (max-width: 768px) {
    .careers-hero {
        padding: 3rem 0;
    }

    .careers-hero h1 {
        font-size: 2.5rem;
    }

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

    .careers-container {
        padding: 3rem 1.5rem;
    }

    .careers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .career-card {
        padding: 1.5rem;
    }

    .career-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .vacancy-badge {
        align-self: flex-start;
    }

    /* Admin Styles */
    .admin-careers-container {
        padding: 1.5rem;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .admin-header h1 {
        font-size: 1.75rem;
    }

    .careers-table th,
    .careers-table td {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .career-title-cell,
    .url-cell {
        max-width: 150px;
    }

    .action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Form Styles */
    .admin-form-container {
        padding: 1.5rem;
    }

    .career-form {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-field.full-width {
        grid-column: span 1;
    }

    .form-header h1 {
        font-size: 1.75rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-btn {
        justify-content: center;
    }
}

/* Mobile Styles */
@media (max-width: 640px) {

    .careers-table th,
    .careers-table td {
        padding: 0.75rem 0.5rem;
    }

    .actions-cell {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-btn {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .careers-hero {
        padding: 2.5rem 0;
    }

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

    .careers-container {
        padding: 2rem 1rem;
    }

    .career-card {
        padding: 1.25rem;
    }

    .apply-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Admin Form Styles */
    .admin-form-container {
        padding: 1rem;
    }

    .career-form {
        padding: 1.5rem;
    }

    .form-btn {
        padding: 0.75rem 1.5rem;
    }
}