/*
Theme Name: Ilmi Career Pro
Theme URI: https://example.com/ilmi-career-pro
Author: Antigravity
Author URI: https://github.com/google-deepmind
Description: A professional, ultra-fast, mobile-first WordPress theme optimized for Google Discover, Search SEO, AdSense, and Google AdX. Tailored for international jobs, visa guides, work permits, and visa sponsorship news.
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: ilmi-career-pro
Tags: grid-layout, two-columns, custom-menu, custom-logo, translation-ready, news, job-board, right-sidebar, editor-style
*/

/* ==========================================================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  --primary: #0057FF;
  --primary-hover: #0044CC;
  --accent: #00A86B;
  --accent-hover: #008756;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F3F4F6;
  --bg-tertiary: #E5E7EB;
  --text-main: #111827;
  --text-muted: #4B5563;
  --text-light: #9CA3AF;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  --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);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. RESET & BASE ELEMENTS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-main);
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.25;
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  height: 60px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 24px;
  }
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.nav-desktop li {
  position: relative;
}

.nav-desktop a {
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: block;
}

.nav-desktop a:hover,
.nav-desktop li.current-menu-item > a {
  color: var(--primary);
  background-color: var(--bg-secondary);
}

/* Submenu layout */
.nav-desktop li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-desktop ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  flex-direction: column;
  padding: 8px 0;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1100;
}

.nav-desktop ul ul a {
  padding: 10px 16px;
  font-weight: 500;
  border-radius: 0;
}

.nav-desktop ul ul a:hover {
  background-color: var(--bg-secondary);
  color: var(--primary);
}

/* Search Popup Icon & Toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  font-size: 18px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.search-toggle-btn:hover {
  color: var(--primary);
  background-color: var(--bg-secondary);
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.hamburger-btn:hover {
  background-color: var(--bg-secondary);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  transition: var(--transition);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .hamburger-btn {
    display: none;
  }
}

/* Mobile Nav Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.close-drawer-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-drawer-nav a {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
}

.mobile-drawer-nav ul ul {
  padding-left: 16px;
  margin-top: 8px;
  background: none;
  box-shadow: none;
  border: none;
  display: flex;
}

.mobile-drawer-nav ul ul a {
  font-weight: 500;
  font-size: 14px;
  background-color: transparent;
  border-left: 2px solid var(--border-color);
  border-radius: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  z-index: 1999;
  transition: var(--transition);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup Search Styling */
.search-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.98);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-popup.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.search-popup-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.search-popup-close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.search-popup-form {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  text-align: center;
}

.search-popup-form h3 {
  margin-bottom: 24px;
  font-size: 28px;
}

.search-field-container {
  display: flex;
  border-bottom: 3px solid var(--primary);
  padding: 8px 0;
}

.search-popup-field {
  width: 100%;
  border: none;
  background: none;
  font-size: 24px;
  font-family: var(--font-heading);
  outline: none;
  color: var(--text-main);
}

.search-popup-field::placeholder {
  color: var(--text-light);
}

.search-popup-submit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--primary);
  padding: 0 12px;
}

/* ==========================================================================
   4. LAYOUT & HYBRID HOMEPAGE
   ========================================================================== */
.site-main {
  padding: 30px 0 60px 0;
}

.homepage-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 1024px) {
  .hero-section {
    grid-template-columns: 2fr 1fr;
  }
}

.hero-main-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.hero-main-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-main-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.hero-main-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero-main-card:hover .hero-main-thumb img {
  transform: scale(1.03);
}

.badge-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-overlay.accent {
  background-color: var(--accent);
}

.hero-main-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hero-main-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.hero-main-title {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .hero-main-title {
    font-size: 32px;
  }
}

.hero-main-title a {
  color: var(--text-main);
}

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

.hero-main-excerpt {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  align-self: flex-start;
  background-color: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 87, 255, 0.2);
}

.read-more-btn:hover {
  background-color: var(--primary-hover);
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 6px 14px rgba(0, 87, 255, 0.3);
}

/* Hero Right: Trending Widget Panel */
.hero-trending-panel {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title-sm {
  font-size: 20px;
  font-weight: 800;
  border-bottom: 3px solid var(--border-color);
  padding-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-sm::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trending-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-number {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--border-tertiary, #CBD5E1);
  line-height: 1;
}

.trending-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trending-item-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.trending-item-title a {
  color: var(--text-main);
}

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

.trending-item-meta {
  font-size: 11px;
  color: var(--text-light);
}

/* Country Wise Job Grid Cards */
.country-cards-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .country-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .country-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.country-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.country-flag-icon {
  font-size: 36px;
  line-height: 1;
}

.country-card-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.country-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background-color: rgba(0, 168, 107, 0.08);
  padding: 3px 8px;
  border-radius: 12px;
}

/* Two Column Layout (Content & Sidebar) */
.layout-content-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 1024px) {
  .layout-content-sidebar {
    grid-template-columns: 2fr 1fr;
  }
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  border-bottom: 3px solid var(--border-color);
  padding-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background-color: var(--primary);
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .posts-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .posts-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Generic Post Card Design (Requirement 3) */
.post-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 87, 255, 0.2);
}

.post-card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-card-title {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 10px;
  font-weight: 700;
}

.post-card-title a {
  color: var(--text-main);
}

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

.post-card-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-link {
  margin-top: auto;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}

.post-card-link:hover {
  color: var(--primary-hover);
}

.post-card-link svg {
  transition: transform 0.2s;
}

.post-card-link:hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   5. SINGLE POST TEMPLATE
   ========================================================================== */
.post-header {
  margin-bottom: 24px;
}

.breadcrumb-nav {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb-separator {
  color: var(--text-light);
}

.post-title-main {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .post-title-main {
    font-size: 40px;
  }
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.author-box-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background-color: var(--bg-tertiary);
}

.meta-dates,
.meta-read-time {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-featured-wrapper {
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1200/628;
  background-color: var(--bg-tertiary);
}

.post-featured-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sharing buttons */
.social-share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.share-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.share-btn svg {
  fill: currentColor;
  width: 14px;
  height: 14px;
}

.share-btn.fb { background-color: #1877F2; }
.share-btn.fb:hover { background-color: #145dbf; }
.share-btn.tw { background-color: #1DA1F2; }
.share-btn.tw:hover { background-color: #1a8cd8; }
.share-btn.wa { background-color: #25D366; }
.share-btn.wa:hover { background-color: #20ba5a; }
.share-btn.li { background-color: #0077B5; }
.share-btn.li:hover { background-color: #005987; }

/* Table of Contents */
.table-of-contents {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.toc-header {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc-toggle {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list li {
  padding-left: 12px;
  position: relative;
}

.toc-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.toc-list a {
  color: var(--text-muted);
  font-size: 15px;
}

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

/* Post Content Body */
.post-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.post-content h2 {
  font-size: 24px;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}

.post-content h3 {
  font-size: 20px;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.post-content p {
  margin-top: 0;
  margin-bottom: 1.5em;
}

.post-content ul,
.post-content ol {
  margin-top: 0;
  margin-bottom: 1.5em;
  padding-left: 20px;
}

.post-content li {
  margin-bottom: 0.5em;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--bg-secondary);
  padding: 16px 20px;
  margin: 0 0 1.5em 0;
  font-style: italic;
  color: var(--text-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* FAQ Accordion Design */
.faq-section-wrapper {
  margin-top: 40px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.faq-title {
  margin-bottom: 20px;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question-btn {
  width: 100%;
  text-align: left;
  background-color: var(--bg-secondary);
  border: none;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question-btn:hover {
  background-color: var(--bg-tertiary);
}

.faq-question-btn::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item.active .faq-question-btn::after {
  content: '−';
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out, padding 0.25s ease-out;
  background-color: var(--bg-primary);
  font-size: 15px;
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  padding: 16px 20px;
  max-height: 500px;
}

/* Author Profile Box */
.author-profile-box {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

@media (min-width: 640px) {
  .author-profile-box {
    flex-direction: row;
    align-items: flex-start;
  }
}

.author-profile-avatar {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.author-profile-info {
  display: flex;
  flex-direction: column;
}

.author-profile-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.author-profile-bio {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.author-profile-links {
  display: flex;
  gap: 12px;
}

/* Newsletter Signup / Job Alerts Card */
.job-alert-box {
  background: linear-gradient(135deg, #0057FF 0%, #002B80 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.job-alert-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(45deg);
  pointer-events: none;
}

.job-alert-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.job-alert-title {
  color: #fff;
  font-size: 22px;
  margin-bottom: 8px;
}

.job-alert-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.job-alert-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .job-alert-form {
    flex-direction: row;
  }
}

.job-alert-input {
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  flex-grow: 1;
  font-size: 14px;
  outline: none;
  color: var(--text-main);
}

.job-alert-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.job-alert-btn:hover {
  background-color: var(--accent-hover);
}

/* Related articles */
.related-articles {
  margin-top: 40px;
}

/* ==========================================================================
   6. SIDEBAR & WIDGETS
   ========================================================================== */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.widget {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.widgettitle {
  font-size: 18px;
  font-weight: 800;
  border-bottom: 3px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 16px;
  position: relative;
}

.widgettitle::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget li {
  font-size: 14px;
}

.widget li a {
  color: var(--text-muted);
}

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

/* Trending Guides Images */
.trending-item-thumb {
  width: 60px;
  height: 50px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--bg-tertiary);
}
.trending-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Standardized Premium Search Form */
.search-form {
  display: flex;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.15);
}
.search-form .search-field {
  border: none;
  padding: 10px 14px;
  outline: none;
  flex-grow: 1;
  width: 50px;
  font-size: 14px;
  color: var(--text-main);
  background: none;
}
.search-form .search-submit {
  background-color: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
.search-form .search-submit:hover {
  background-color: var(--primary-hover);
}

/* Ad Box Widget */
.widget-ad-box {
  text-align: center;
  padding: 12px;
}

.widget-ad-label {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

/* ==========================================================================
   7. AD PLACEMENT SYSTEM
   ========================================================================== */
.ad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  text-align: center;
  clear: both;
}

.ad-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ad-box-mock {
  width: 100%;
  min-height: 90px;
  max-width: 728px;
  background-color: var(--bg-tertiary);
  border: 1px dashed var(--text-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 600;
}

/* Sticky Bottom Ad on Mobile */
.sticky-bottom-ad-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-primary);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
  padding: 6px 0;
}

@media (max-width: 767px) {
  .sticky-bottom-ad-mobile {
    display: block;
  }
  body {
    padding-bottom: 70px; /* Space for sticky bottom ad */
  }
}

.sticky-bottom-ad-mobile .ad-container {
  margin: 0;
}

.sticky-bottom-ad-mobile .ad-box-mock {
  min-height: 50px;
  max-width: 320px;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--text-main);
  color: #fff;
  padding: 60px 0 20px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-widget-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-widget-title {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.footer-about-text {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.footer-social-links {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  background-color: rgba(255,255,255,0.05);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social-btn:hover {
  background-color: var(--primary);
  color: #fff;
}

.footer-widget-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-widget-col li a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-widget-col li a:hover {
  color: var(--primary);
  padding-left: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.footer-links-inline {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-inline a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

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

/* ==========================================================================
   9. ARCHIVE, SEARCH & PAGINATION
   ========================================================================== */
.archive-header {
  background-color: var(--bg-primary);
  padding: 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.archive-title {
  margin: 0 0 8px 0;
  font-size: 28px;
}

.archive-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.pagination-container {
  margin-top: 40px;
}

.pagination-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.pagination-links .page-numbers {
  background-color: var(--bg-primary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

.pagination-links .page-numbers.current,
.pagination-links a.page-numbers:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   10. 404 PAGE
   ========================================================================== */
.error-404-container {
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  background-color: var(--bg-primary);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.error-404-title {
  font-size: 96px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 12px;
}

.error-404-subtitle {
  font-size: 24px;
  margin-bottom: 16px;
}

.error-404-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
}

.error-404-home-btn {
  background-color: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0, 168, 107, 0.2);
}

.error-404-home-btn:hover {
  background-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}
