/*
Theme Name: شاغر - وظائف
Theme URI: https://example.com/sha5r
Author: Your Name
Author URI: https://example.com
Description: قالب وظائف عربي احترافي متوافق مع PHP 8 ووردبريس
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sha5r
Domain Path: /languages
Requires at least: 5.8
Requires PHP: 8.0
*/

/* Reset & Base */
:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-blue {
    background: var(--primary-light);
    color: var(--white);
}

.btn-blue:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 800;
}

.site-logo i {
    font-size: 2rem;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 5rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Box */
.search-section {
    margin-top: -4rem;
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
}

.search-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.search-form {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select.form-control {
    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='%236b7280'%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 1rem center;
    background-size: 1.5rem;
    padding-left: 3rem;
}

.search-btn {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

/* Jobs Section */
.jobs-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 800;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-weight: 600;
}

.view-all:hover {
    gap: 0.75rem;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Job Card */
.job-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border-right: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: right;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-right-color: var(--primary-light);
}

.job-card:hover::before {
    transform: scaleX(1);
}

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

.job-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.job-company {
    color: var(--text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.job-badge.new {
    background: #dbeafe;
    color: #1e40af;
}

.job-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
}

.job-badge.featured {
    background: #fef3c7;
    color: #92400e;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.job-meta-item i {
    color: var(--primary-light);
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.job-salary {
    color: var(--success);
    font-weight: 700;
    font-size: 1.125rem;
}

.job-apply-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    background: var(--white);
    border-color: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 1.75rem;
}

.category-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.category-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--primary-light);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-title {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #64748b;
}

/* Single Job Page */
.single-job-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 4rem 0;
    color: var(--white);
}

.single-job-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-job-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.single-job-content {
    padding: 3rem 0;
}

.job-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.job-main-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.job-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Archive Page */
.archive-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 3rem 0;
    color: var(--white);
    text-align: center;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.archive-description {
    opacity: 0.9;
}

.archive-content {
    padding: 3rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    font-weight: 600;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary-light);
    color: var(--white);
}

.pagination .current {
    background: var(--primary-light);
    color: var(--white);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 1024px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--primary-color);
        padding: 1rem;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .job-content-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .job-sidebar {
        display: none;
    }
    
    .job-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
/* ============================================
   APPLICATION FORM STYLES - NEW
   ============================================ */

/* Application Form Container */
#application-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 3rem;
}

#application-section h2 {
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* Form Styles */
#job-application-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#job-application-form .form-group {
    margin-bottom: 1.5rem;
}

#job-application-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e3a8a;
    font-size: 0.95rem;
}

#job-application-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

#job-application-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#job-application-form input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s;
}

#job-application-form input[type="file"]:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

#job-application-form small {
    color: #6b7280;
    font-size: 0.875rem;
}

#job-application-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Button States */
#job-application-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Application Messages */
#application-messages {
    margin-bottom: 1rem;
}

/* Responsive Form */
@media (max-width: 768px) {
    #job-application-form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    #application-section {
        padding: 1rem;
    }
    
    #job-application-form {
        padding: 1.5rem;
    }
}

/* Print Styles for Applications */
@media print {
    #application-section form,
    .job-sidebar {
        display: none;
    }
    
    #application-section {
        background: white;
        padding: 0;
    }
}