@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #10b981;
    --dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 700;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand span {
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-btn {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
    transition: var(--transition);
}

.nav-btn::after {
    display: none;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255,255,255,0) 70%);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 10px;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.8);
}

.search-box input, .search-box select {
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.search-box input:focus, .search-box select:focus {
    outline: none;
}

.search-box input {
    flex: 1;
    border-right: 1px solid var(--border);
}

.search-box select {
    width: 200px;
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-muted);
}

/* Job Cards List View */
.jobs-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.job-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.job-logo {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-main);
    border: 1px solid var(--border);
}

.job-title-wrapper h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.job-title-wrapper h3 a {
    color: var(--dark);
}

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

.org-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-location { background: #fef3c7; color: #b45309; }
.tag-type { background: #e0e7ff; color: #4338ca; }
.tag-edu { background: #dcfce7; color: #15803d; }

.job-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 150px;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.apply-btn {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.job-card:hover .apply-btn {
    background: var(--primary);
    color: white;
}

/* Page Layout (Sidebar + Content) */
.page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
}

.details-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
}

.sidebar-filters {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 90px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.95rem;
}

/* Sidebar Menu (Index) */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-menu a:hover {
    background: #eef2ff;
    color: var(--primary);
    border-color: #c7d2fe;
    transform: translateX(5px);
}

.sidebar-menu a .icon-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.sidebar-menu a .icon-text svg {
    color: var(--primary);
    opacity: 0.7;
}

.sidebar-menu a .chevron {
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover .chevron {
    color: var(--primary);
    transform: translateX(3px);
}

/* Job Details Page */
.job-details-header {
    background: var(--dark);
    color: white;
    padding: 60px 0;
}

.job-details-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.job-meta-top {
    display: flex;
    gap: 20px;
    color: #cbd5e1;
    font-size: 1rem;
    flex-wrap: wrap;
}

.job-meta-top span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.content-body {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.8;
    font-family: 'Inter', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', sans-serif;
}

.content-body:dir(rtl) {
    font-size: 1.2rem;
    line-height: 2;
}

.content-body p {
    unicode-bidi: plaintext;
    text-align: start;
}

.content-body ul, .content-body ol {
    padding-inline-start: 25px;
    margin-bottom: 15px;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body strong, .content-body b, .content-body i, .content-body em, .content-body a, .content-body span {
    unicode-bidi: plaintext;
}

.job-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: var(--bg-main);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-val {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
}

.ad-image {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

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

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 992px) {
    .page-layout, .details-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filters {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.show {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 40px 0 30px !important;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 30px 0 !important;
    }

    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-box input {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .search-box select {
        width: 100%;
    }

    .search-btn {
        padding: 15px;
        border-radius: 0 0 12px 12px;
    }

    .job-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .job-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
    
    .job-logo {
        display: none;
    }

    .job-tags {
        justify-content: flex-start;
    }

    .job-footer {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        padding-top: 15px;
        border-top: 1px dashed var(--border);
    }
    
    /* Job Details Page Mobile */
    .job-details-header {
        padding: 30px 0;
    }
    
    .job-details-header h1 {
        font-size: 1.4rem;
        line-height: 1.4;
    }
    
    .job-meta-top {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9rem;
    }
    
    .details-content {
        padding: 20px;
        margin-top: -15px;
    }
    
    .job-info-grid {
        grid-template-columns: 1fr; /* Stack into 1 column on very small screens */
        gap: 15px;
        padding: 15px;
    }
    
    .content-section h3 {
        font-size: 1.25rem;
    }
    
    .content-body {
        font-size: 1rem;
    }
}
