/* ============================================================
   WordJobSpot — Main Stylesheet
   Clean, fast, Jannah-inspired professional blog design
   ============================================================ */

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

:root {
    --primary:    #e8232a;
    --primary-dk: #c41a20;
    --dark:       #1a1a2e;
    --gray-900:   #1f2937;
    --gray-700:   #374151;
    --gray-500:   #6b7280;
    --gray-300:   #d1d5db;
    --gray-100:   #f3f4f6;
    --gray-50:    #f9fafb;
    --white:      #ffffff;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --radius:     8px;
    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,.1);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
    --transition: 0.2s ease;
    --container:  1200px;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === CONTAINER === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* === TOP BAR === */
.topbar {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    font-size: 12px;
    padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-links a { color: rgba(255,255,255,.7); margin-left: 16px; transition: color var(--transition); }
.topbar-links a:hover { color: var(--white); }

/* === HEADER === */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 24px;
}
.logo-link { display: flex; align-items: center; }
.logo-img { max-height: 48px; width: auto; }
.logo-text { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.logo-word { color: var(--primary); }
.logo-job  { color: var(--dark); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition);
    white-space: nowrap;
}
.main-nav a:hover { background: var(--gray-100); color: var(--primary); }
.main-nav a.active { background: var(--primary); color: var(--white); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: all 0.3s; }

/* === HERO SECTION (Homepage) === */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 60%, #0f3460 100%);
    color: var(--white);
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 1; }
.hero-section h1 { font-family: var(--font-serif); font-size: clamp(28px,4vw,48px); font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero-section h1 span { color: var(--primary); }
.hero-section p { font-size: 17px; color: rgba(255,255,255,.75); max-width: 560px; margin-bottom: 28px; }

/* Featured Post Card (Hero) */
.hero-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-featured-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.hero-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge { display: inline-block; background: var(--primary); color: var(--white); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 10px; border-radius: 4px; margin-bottom: 12px; }
.hero-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 16px; }
.hero-meta a { color: rgba(255,255,255,.6); }
.hero-featured-content h2 { font-family: var(--font-serif); font-size: clamp(20px,2.5vw,30px); line-height: 1.3; margin-bottom: 12px; }
.hero-featured-content h2 a { color: var(--white); transition: color var(--transition); }
.hero-featured-content h2 a:hover { color: var(--primary); }
.hero-excerpt { color: rgba(255,255,255,.7); font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.btn-read { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: var(--white); padding: 10px 22px; border-radius: 6px; font-size: 14px; font-weight: 600; transition: background var(--transition); }
.btn-read:hover { background: var(--primary-dk); color: var(--white); }

/* === SECTION LAYOUT === */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 2px solid var(--gray-100); }
.section-title { font-size: 20px; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: block; width: 4px; height: 22px; background: var(--primary); border-radius: 3px; }
.section-link { font-size: 13px; font-weight: 600; color: var(--primary); }
.section-link:hover { text-decoration: underline; }

/* Main content + sidebar layout */
.content-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }

/* === POST CARDS === */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 24px; }
.post-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-300) 100%); }
.post-card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.post-card-cat { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--primary); margin-bottom: 8px; }
.post-card-cat:hover { text-decoration: underline; }
.post-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; color: var(--gray-900); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { font-size: 14px; color: var(--gray-500); line-height: 1.5; margin-bottom: 14px; flex: 1; }
.post-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--gray-500); border-top: 1px solid var(--gray-100); padding-top: 12px; margin-top: auto; }
.post-card-meta .read-more { color: var(--primary); font-weight: 600; font-size: 13px; }
.post-card-meta .read-more:hover { text-decoration: underline; }

/* List style post card */
.posts-list { display: flex; flex-direction: column; gap: 16px; }
.post-list-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: box-shadow var(--transition);
}
.post-list-item:hover { box-shadow: var(--shadow-sm); }
.post-list-thumb { width: 100px; height: 70px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--gray-100); }
.post-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-body { flex: 1; }
.post-list-body h4 { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.post-list-body h4 a:hover { color: var(--primary); }
.post-list-meta { font-size: 12px; color: var(--gray-500); }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; }
.widget-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; padding: 14px 18px; background: var(--gray-50); border-bottom: 1px solid var(--gray-300); color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.widget-title::before { content: ''; display: block; width: 3px; height: 16px; background: var(--primary); border-radius: 2px; }
.widget-body { padding: 16px 18px; }

.category-list li { border-bottom: 1px solid var(--gray-100); }
.category-list li:last-child { border-bottom: none; }
.category-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; color: var(--gray-700); transition: color var(--transition); }
.category-list a:hover { color: var(--primary); }
.category-list .count { background: var(--gray-100); color: var(--gray-500); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }

/* === SINGLE POST === */
.post-header { padding: 40px 0 0; }
.post-header .container { max-width: 860px; }
.post-breadcrumb { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.post-breadcrumb a { color: var(--gray-500); }
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb span { color: var(--gray-300); }
.post-title { font-family: var(--font-serif); font-size: clamp(24px, 4vw, 40px); font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.post-meta-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.post-meta-bar .meta-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--gray-500); }
.post-meta-bar .meta-cat { background: var(--primary); color: var(--white); padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.post-feat-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; aspect-ratio: 16/7; }
.post-feat-img img { width: 100%; height: 100%; object-fit: cover; }

/* Post Content Styling */
.post-content { font-size: 17px; line-height: 1.8; color: var(--gray-700); }
.post-content h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--gray-900); margin: 36px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gray-100); }
.post-content h3 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 28px 0 12px; }
.post-content h4 { font-size: 17px; font-weight: 700; color: var(--gray-900); margin: 22px 0 10px; }
.post-content p { margin-bottom: 20px; }
.post-content img { border-radius: var(--radius); margin: 24px auto; box-shadow: var(--shadow-sm); }
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content ul, .post-content ol { margin: 16px 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote { border-left: 4px solid var(--primary); margin: 24px 0; padding: 16px 20px; background: var(--gray-50); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--gray-700); }
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.post-content th { background: var(--gray-50); font-weight: 700; padding: 10px 14px; text-align: left; border: 1px solid var(--gray-300); }
.post-content td { padding: 10px 14px; border: 1px solid var(--gray-300); }
.post-content tr:nth-child(even) td { background: var(--gray-50); }
.post-content code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: 14px; font-family: monospace; }
.post-content pre { background: var(--gray-900); color: #f8f8f2; padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 20px 0; }
.post-content pre code { background: none; color: inherit; padding: 0; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.post-tags span { font-size: 12px; font-weight: 600; color: var(--gray-500); }
.post-tags a { background: var(--gray-100); color: var(--gray-700); padding: 5px 12px; border-radius: 20px; font-size: 13px; transition: all var(--transition); }
.post-tags a:hover { background: var(--primary); color: var(--white); }

.post-share { display: flex; align-items: center; gap: 10px; margin: 28px 0; padding: 18px 20px; background: var(--gray-50); border-radius: var(--radius); }
.post-share span { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--white); transition: opacity var(--transition); }
.share-btn:hover { opacity: .85; color: var(--white); }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-li { background: #0a66c2; }

/* Related posts */
.related-posts { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--gray-100); }

/* === PAGINATION === */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 40px 0 20px; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pagination .prev, .pagination .next { width: auto; padding: 0 14px; gap: 4px; }

/* === BREADCRUMB === */
.breadcrumb-bar { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: 10px 0; font-size: 13px; color: var(--gray-500); }
.breadcrumb-bar a { color: var(--gray-500); }
.breadcrumb-bar a:hover { color: var(--primary); }

/* === 404 / EMPTY === */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 80px; font-weight: 900; color: var(--primary); line-height: 1; }
.not-found h2 { font-size: 24px; font-weight: 700; margin: 12px 0 8px; }
.not-found p { color: var(--gray-500); margin-bottom: 24px; }
.btn-primary { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: var(--white); padding: 11px 24px; border-radius: 6px; font-weight: 600; transition: background var(--transition); }
.btn-primary:hover { background: var(--primary-dk); color: var(--white); }

/* === FOOTER === */
.site-footer { background: var(--dark); color: rgba(255,255,255,.75); margin-top: 60px; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.footer-about { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.55); }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--white); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14px; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col ul a:hover { color: var(--primary); }
.social-links { display: flex; gap: 10px; margin-top: 14px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: 6px; color: rgba(255,255,255,.7); transition: all var(--transition); }
.social-links a:hover { background: var(--primary); color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,.4); }

/* === UTILITIES === */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-red { background: #fee2e2; color: var(--primary); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* === LOADING SKELETON === */
.skeleton { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .content-wrap { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero-featured { grid-template-columns: 1fr; }
    .hero-featured-img { display: none; }
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--gray-300); padding: 12px 20px; box-shadow: var(--shadow-md); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 10px 14px; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .sidebar { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-share { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .hero-section { padding: 36px 0 30px; }
    .section { padding: 32px 0; }
    .post-content { font-size: 16px; }
}

/* === PRINT === */
@media print {
    .site-header, .site-footer, .sidebar, .topbar { display: none; }
    .content-wrap { grid-template-columns: 1fr; }
}
