/*
Theme Name: Saudi Job Hub
Theme URI: https://saudijobhub.com
Author: Saudi Job Hub Team
Author URI: https://saudijobhub.com
Description: قالب ووردبريس احترافي لموقع وظائف السعودية - منصة متخصصة في نشر الفرص الوظيفية في القطاعين الحكومي والخاص بالمملكة العربية السعودية
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saudijobhub
Tags: rtl-language-support, right-to-left, arabic, jobs, employment, custom-colors, custom-menu, featured-images, theme-options
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4

Saudi Job Hub - منصة التوظيف الأولى في المملكة العربية السعودية
*/

/* ===== CSS Variables ===== */
:root {
    --primary-color: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;
    --secondary-color: #1e293b;
    --text-color: #334155;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    direction: rtl;
    text-align: right;
}

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

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

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary-color);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #0f172a;
    color: var(--white);
}

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

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

/* ===== Header ===== */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

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

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

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

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
}

.search-box button {
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #0f172a;
}

/* ===== Categories Section ===== */
.categories-section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

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

.category-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

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

/* ===== Jobs Section ===== */
.jobs-section {
    padding: 3rem 0;
    background-color: var(--white);
}

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

.job-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.job-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.job-card.featured {
    border-color: var(--primary-color);
}

.job-card.featured::before {
    content: 'مميزة';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.job-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.job-title a {
    color: var(--secondary-color);
}

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

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

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.job-excerpt {
    color: var(--text-color);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.job-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== Articles Section ===== */
.articles-section {
    padding: 3rem 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.article-title a {
    color: var(--secondary-color);
}

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

.article-excerpt {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

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

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-widget {
    text-align: right;
}

.footer-widget h2,
.footer-widget h4,
.footer-widget-title {
    color: #22c55e !important;
    margin-bottom: 1rem !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    display: block !important;
    visibility: visible !important;
}

.footer-about .footer-widget-title {
    font-size: 1.5rem !important;
    color: #22c55e !important;
    margin-bottom: 0.75rem !important;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-widget .contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* ===== Single Job Page ===== */
.single-job {
    padding: 2rem 0;
}

.job-header {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.job-content h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.job-content ul {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.job-content li {
    margin-bottom: 0.5rem;
}

.apply-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5rem;
}

.apply-button:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* ===== Archive Pages ===== */
.archive-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.archive-header h1 {
    color: var(--white);
}

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

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

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background-color: var(--white);
    border: 1px solid var(--border-color);
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}


/* ===== Heading Styles for SEO ===== */
.filter-title,
.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.author-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

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

/* Ensure h2 in cards look like h3 visually */
.job-card .job-title,
.article-card .article-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}


/* ===== AdSense Container ===== */
.adsense-container {
    margin: 2rem 0;
    text-align: center;
    padding: 1rem 0;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.adsense-container ins.adsbygoogle {
    display: inline-block !important;
}

@media (max-width: 768px) {
    .adsense-container {
        margin: 1.5rem 0;
        padding: 0.75rem 0;
    }
}
