/* ========================================
   Job Application Form Styles
   نظام نموذج التوظيف - Bateel Tech Solutions
   ======================================== */

:root {
    /* Brand Colors - Bateel Tech Solutions */
    --primary: #1ABC9C;
    --primary-dark: #16A085;
    --primary-light: #48C9B0;
    --secondary: #2C3E50;
    --accent: #3498DB;
    --success: #27AE60;
    --error: #E74C3C;
    --warning: #F39C12;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);
    --gradient-secondary: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    --gradient-success: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
    --gradient-bg: linear-gradient(135deg, #e9f5f1 0%, #e0f2ed 100%);

    /* Text Colors */
    --text-primary: #2C3E50;
    --text-secondary: #5D6D7E;
    --text-muted: #95A5A6;
    --text-light: #ffffff;

    /* Background */
    --bg-light: #ffffff;
    --bg-page: #e9f5f1;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --border-color: #dee2e6;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(26, 188, 156, 0.25);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Decoration */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 30px) scale(1.02);
    }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    margin-bottom: 24px;
}

.logo img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-normal);
}

.logo img:hover {
    transform: scale(1.05);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ===== JOB LISTINGS SECTION ===== */
.jobs-section {
    padding: 40px 0 60px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    text-align: right;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.job-card-header {
    background: var(--bg-card-hover);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.job-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.job-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-meta i {
    color: var(--primary);
}

.job-card-body {
    padding: 20px;
    flex: 1;
}

.job-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-salary {
    font-weight: 600;
    color: var(--success);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.apply-job-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bg-light);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    width: 100%;
}

.apply-job-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.selected-job-text {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(26, 188, 156, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.loading-jobs {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* File Input Styling */
input[type="file"] {
    padding: 12px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-inline-end: 16px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--secondary);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary);
}

input[type="url"] {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-normal);
}

input[type="url"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.15);
}

/* Form Container */
.form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-group label i {
    color: var(--primary);
    font-size: 1rem;
}

.required {
    color: var(--error);
    font-weight: 700;
}

.optional {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-normal);
}

input::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.15);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231ABC9C'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 20px;
    padding-left: 45px;
}

select option {
    background: var(--bg-light);
    color: var(--text-primary);
    padding: 10px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 12px 20px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    flex: 1;
    justify-content: center;
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-normal);
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.radio-label input[type="radio"]:checked+.radio-custom {
    border-color: var(--primary);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(26, 188, 156, 0.1);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-modal .modal-icon {
    color: var(--success);
}

.error-modal .modal-icon {
    color: var(--error);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-btn {
    padding: 12px 40px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Option Button */
.option-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.option-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.2);
}

.option-btn i {
    transition: transform 0.3s;
}

.option-btn:hover i {
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .form-container {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .social-icons {
        gap: 8px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 20px 16px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="tel"],
    input[type="number"],
    select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

/* Animations */
.form-group {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.15s;
}

.form-group:nth-child(3) {
    animation-delay: 0.2s;
}

.form-group:nth-child(4) {
    animation-delay: 0.25s;
}

.form-group:nth-child(5) {
    animation-delay: 0.3s;
}

.form-group:nth-child(6) {
    animation-delay: 0.35s;
}

.form-group:nth-child(7) {
    animation-delay: 0.4s;
}

.form-group:nth-child(8) {
    animation-delay: 0.45s;
}

.form-group:nth-child(9) {
    animation-delay: 0.5s;
}

.form-group:nth-child(10) {
    animation-delay: 0.55s;
}

/* Job Cards Refinement */
.job-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.job-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(26, 188, 156, 0.1);
    border-color: var(--primary);
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
}

.job-card:hover::before {
    height: 100%;
}

.job-badge {
    background: rgba(26, 188, 156, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.job-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.job-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.job-meta-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 5.1em;
    /* approx 3 lines */
}

.job-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.job-apply-btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 480px) {
    .job-card {
        padding: 20px;
    }

    .job-title {
        font-size: 1.2rem;
    }

    .job-meta {
        gap: 10px;
    }
}