/*
Theme Name: CourseLK
Theme URI: https://courselk.com
Author: CourseLK
Author URI: https://courselk.com
Description: Sri Lanka Education News & Course Aggregator Theme — AdSense compliant, Schema.org ready, Mobile-first responsive.
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: courselk
Tags: education, news, adsense, schema, seo, responsive
*/

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

:root {
  --brand:       #1B4F8A;
  --brand-mid:   #2B6CB8;
  --brand-light: #E8F0FA;
  --accent:      #F59E0B;
  --accent-dark: #D97706;
  --accent-light:#FEF3C7;
  --success:     #059669;
  --success-l:   #DCFCE7;
  --danger:      #DC2626;
  --danger-l:    #FEE2E2;
  --purple:      #7C3AED;
  --purple-l:    #F3E8FF;
  --text-1:      #0F1C2E;
  --text-2:      #4A5568;
  --text-3:      #8A96A8;
  --border:      rgba(0,0,0,0.09);
  --surface:     #F8F9FC;
  --card:        #FFFFFF;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 2px 8px rgba(0,0,0,0.10);
}

/* =====================================================
   BASE
   ===================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--surface);
  overflow-x: hidden;
  width: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-mid); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =====================================================
   LAYOUT — mobile first
   ===================================================== */
.site-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Single column on mobile, two-col on desktop */
.content-sidebar-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 0;
}
.content-area { width: 100%; min-width: 0; }
.sidebar       { width: 100%; min-width: 0; }

@media (min-width: 960px) {
  .content-sidebar-wrap {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 0;
  }
  .content-area { flex: 1; min-width: 0; }
  .sidebar      { width: 300px; flex-shrink: 0; }
}

/* =====================================================
   TOPBAR — hide on mobile to save space
   ===================================================== */
.site-topbar {
  background: var(--brand);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: none; /* hidden on mobile */
}
@media (min-width: 600px) {
  .site-topbar { display: block; }
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.topbar-right a { color: rgba(255,255,255,0.8); font-size: 12px; }
.topbar-right a:hover { color: #fff; }
.lang-switcher { display: flex; gap: 6px; }
.lang-switcher a {
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
}
.lang-switcher a.active,
.lang-switcher a:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* =====================================================
   HEADER / NAVBAR — mobile first
   ===================================================== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  position: relative;
}
@media (min-width: 960px) {
  .header-inner { height: 62px; }
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--brand); letter-spacing: -0.5px; white-space: nowrap; }
.logo-text span { color: var(--accent); }
@media (min-width: 960px) {
  .logo-icon { width: 36px; height: 36px; font-size: 18px; }
  .logo-text { font-size: 20px; }
  .site-logo { margin-right: 20px; }
}

/* Primary Nav — hidden by default on mobile */
.primary-nav {
  display: none;
  position: absolute;
  top: 56px;
  left: 0; right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 300;
  padding: 6px 0 10px;
}
.primary-nav.open { display: block; }
.primary-nav ul { display: flex; flex-direction: column; }
.primary-nav ul li a {
  display: block;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-left: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a {
  color: var(--brand);
  border-left-color: var(--brand);
  background: var(--brand-light);
}
.primary-nav .vacancy-link > a { color: var(--accent-dark); }

/* Desktop nav */
@media (min-width: 960px) {
  .primary-nav {
    display: flex !important;
    position: static;
    flex: 1;
    height: 100%;
    padding: 0;
    box-shadow: none;
    border-bottom: none;
  }
  .primary-nav ul { flex-direction: row; height: 62px; }
  .primary-nav ul li a {
    display: flex; align-items: center;
    height: 100%;
    padding: 0 12px;
    font-size: 13px;
    border-left: none;
    border-bottom: 3px solid transparent;
    background: transparent;
  }
  .primary-nav ul li a:hover,
  .primary-nav ul li.current-menu-item > a {
    border-left: none;
    border-bottom-color: var(--brand);
    background: transparent;
  }
}

/* Header actions */
.header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.header-search-form {
  display: none; /* hidden on mobile — hero has search */
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  gap: 6px;
}
@media (min-width: 960px) {
  .header-search-form { display: flex; }
}
.header-search-form input {
  border: none; background: transparent;
  font-size: 13px; color: var(--text-1);
  outline: none; width: 160px;
}
.header-search-form button {
  border: none; background: transparent;
  color: var(--text-3); cursor: pointer; font-size: 15px; padding: 0;
}
.header-search-form button:hover { color: var(--brand); }

.btn-subscribe {
  background: var(--brand);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  display: none;
}
@media (min-width: 600px) {
  .btn-subscribe { display: inline-block; }
}

/* Mobile menu button */
.menu-toggle {
  display: flex;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  font-size: 20px; cursor: pointer;
  color: var(--text-1); padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
@media (min-width: 960px) {
  .menu-toggle { display: none; }
}

/* =====================================================
   BREAKING NEWS TICKER
   ===================================================== */
.breaking-bar {
  background: var(--accent-light);
  border-bottom: 1px solid rgba(245,158,11,0.25);
  padding: 7px 0;
  overflow: hidden;
}
.breaking-inner { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.breaking-tag {
  background: var(--accent);
  color: #78350F;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-ticker { overflow: hidden; flex: 1; min-width: 0; }
.breaking-ticker-inner {
  display: flex; gap: 32px;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
  font-size: 12px; color: #92400E;
}
.breaking-ticker-inner a { color: #92400E; font-weight: 500; text-decoration: none; }
.breaking-ticker-inner a:hover { color: var(--brand); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =====================================================
   HERO SECTION — mobile first
   ===================================================== */
.site-hero {
  background: var(--brand);
  padding: 24px 0 20px;
}
@media (min-width: 760px) {
  .site-hero { padding: 36px 0 28px; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 760px) {
  .hero-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }
  .hero-left { flex: 1; min-width: 0; }
  .hero-right { width: 280px; flex-shrink: 0; }
}
@media (min-width: 960px) {
  .hero-right { width: 300px; }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 20px; font-weight: 700;
  color: #fff; line-height: 1.3;
  margin-bottom: 10px;
}
@media (min-width: 600px)  { .hero-title { font-size: 22px; } }
@media (min-width: 960px)  { .hero-title { font-size: 26px; } }

.hero-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.75);
  margin-bottom: 18px; line-height: 1.6;
}
@media (min-width: 600px) { .hero-subtitle { font-size: 14px; } }

/* Hero search */
.hero-search-wrap { margin-bottom: 16px; }
.hero-search-form {
  display: flex;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-search-form input {
  flex: 1; border: none; padding: 12px 14px;
  font-size: 14px; color: var(--text-1);
  outline: none; background: transparent;
  min-width: 0; /* prevent overflow */
}
.hero-search-form button {
  background: var(--accent);
  color: #78350F;
  border: none; padding: 0 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  flex-shrink: 0;
}
.hero-search-form button:hover { background: var(--accent-dark); }

/* Hero filter pills */
.hero-filters {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px;
}
.hero-filter-pill {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
  text-decoration: none;
}
.hero-filter-pill:hover { background: rgba(255,255,255,0.3); color: #fff; }

/* Hero stats */
.hero-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-stat-num { font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1; }
.hero-stat-label { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* Hero live results panel */
.hero-results-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.hero-card-title {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-card-title a { font-size: 11px; color: var(--accent); text-decoration: none; }
.result-live-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.result-live-item:last-child { border-bottom: none; }
.result-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.result-status-dot.released { background: #22C55E; }
.result-status-dot.pending  { background: var(--accent); }
.result-status-dot.upcoming { background: var(--text-3); }
.result-live-info { flex: 1; min-width: 0; }
.result-live-name { font-size: 13px; color: #fff; line-height: 1.3; }
.result-live-name a { color: #fff; text-decoration: none; }
.result-live-meta { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 1px; }
.result-live-badge {
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; background: var(--success); color: #fff; white-space: nowrap;
}

/* =====================================================
   CATEGORY STRIP
   ===================================================== */
.category-strip {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 100;
}
@media (min-width: 960px) {
  .category-strip { top: 62px; }
}
.cat-strip-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-strip-item {
  display: flex; align-items: center; gap: 5px;
  padding: 11px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  white-space: nowrap; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
@media (min-width: 600px) {
  .cat-strip-item { padding: 13px 14px; font-size: 13px; }
}
.cat-strip-item:hover { color: var(--brand); }
.cat-strip-item.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: var(--brand-light);
}
.cat-count-badge {
  font-size: 10px; font-weight: 600;
  background: var(--brand-light); color: var(--brand);
  padding: 1px 6px; border-radius: 20px;
}
.cat-strip-item.active .cat-count-badge { background: var(--brand); color: #fff; }

/* =====================================================
   ADSENSE AD SLOTS — AdSense policy compliant
   ===================================================== */
.ad-slot {
  margin: 16px 0;
  text-align: center;
  overflow: hidden;
}
.ad-slot-label {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
/* Policy: label ONLY as "Advertisements" or "Sponsored Links" */
.ad-slot-label::before { content: "Advertisements"; }

/* Mobile anchor ad */
.ad-slot-anchor {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 150; text-align: center;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 4px 0;
}
@media (min-width: 960px) {
  .ad-slot-anchor { display: none; } /* anchor ad only on mobile */
}

/* =====================================================
   SECTION HEADER
   ===================================================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.section-title {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; width: 4px; height: 18px;
  background: var(--brand); border-radius: 2px; display: inline-block; flex-shrink: 0;
}
.view-all-link { font-size: 12px; color: var(--brand); font-weight: 500; white-space: nowrap; text-decoration: none; }
.view-all-link:hover { text-decoration: underline; }

/* =====================================================
   POST CARDS — mobile first
   ===================================================== */
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  transition: border-color 0.15s;
  overflow: hidden;
}
.post-card:hover { border-color: var(--brand-mid); }
@media (min-width: 600px) {
  .post-card { padding: 14px 16px; }
}

.post-card-thumb {
  width: 56px; height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
@media (min-width: 600px) {
  .post-card-thumb { width: 72px; height: 60px; font-size: 26px; }
}
.thumb-course  { background: var(--brand-light); }
.thumb-result  { background: var(--success-l); }
.thumb-exam    { background: var(--accent-light); }
.thumb-scholar { background: var(--purple-l); }
.thumb-news    { background: #F1F5F9; }

.post-card-body { flex: 1; min-width: 0; overflow: hidden; }

.post-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.post-tag {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  white-space: nowrap;
}
.tag-course  { background: var(--brand-light); color: var(--brand); }
.tag-result  { background: var(--success-l);   color: var(--success); }
.tag-exam    { background: var(--accent-light); color: #92400E; }
.tag-scholar { background: var(--purple-l);     color: var(--purple); }
.tag-news    { background: #F1F5F9;             color: var(--text-2); }
.tag-hot     { background: var(--danger-l);     color: var(--danger); }
.tag-new     { background: var(--success-l);    color: var(--success); }

.post-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  line-height: 1.4; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
@media (min-width: 600px) {
  .post-card-title { font-size: 14px; }
}
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--brand); }

.post-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3);
}
.meta-institution { color: var(--brand-mid); font-weight: 500; }
.meta-deadline { color: var(--danger); font-weight: 600; }

/* =====================================================
   SIDEBAR WIDGETS
   ===================================================== */
.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.widget-header {
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.widget-list-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}
.widget-list-item:last-child { border-bottom: none; }
.widget-list-item:hover { background: var(--surface); }
.widget-item-num {
  width: 20px; height: 20px;
  border-radius: 4px;
  background: var(--brand-light); color: var(--brand);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.widget-item-text { font-size: 13px; color: var(--text-1); line-height: 1.4; }
.widget-item-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Deadline widget */
.deadline-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.deadline-item:last-child { border-bottom: none; }
.deadline-item:hover { background: var(--surface); }
.deadline-date-box { text-align: center; min-width: 36px; flex-shrink: 0; }
.deadline-day { font-size: 18px; font-weight: 700; color: var(--brand); line-height: 1; }
.deadline-month { font-size: 10px; color: var(--text-3); text-transform: uppercase; }
.deadline-info { flex: 1; min-width: 0; }
.deadline-title { font-size: 12px; color: var(--text-1); line-height: 1.3; font-weight: 500; word-break: break-word; }
.deadline-status { font-size: 10px; font-weight: 600; margin-top: 2px; }
.deadline-status.urgent { color: var(--danger); }
.deadline-status.soon   { color: var(--accent-dark); }
.deadline-status.ok     { color: var(--success); }

/* Stats widget */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat-cell {
  padding: 14px 8px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-num { font-size: 18px; font-weight: 700; color: var(--brand); }
.stat-lbl { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* Push notification CTA */
.push-cta {
  background: var(--brand);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}
.push-cta-icon { font-size: 26px; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.push-cta-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.push-cta-desc { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 14px; line-height: 1.5; }
.btn-push {
  display: block;
  background: var(--accent);
  color: #78350F !important;
  font-weight: 700; font-size: 13px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer; border: none; width: 100%;
}
.btn-push:hover { background: var(--accent-dark); }

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb-wrap {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 12px; color: var(--text-3);
  overflow: hidden;
}
.breadcrumb-list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  overflow: hidden;
}
.breadcrumb-list li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.breadcrumb-list li:not(:last-child)::after { content: "›"; color: var(--text-3); flex-shrink: 0; }
.breadcrumb-list li a { color: var(--brand); white-space: nowrap; }
.breadcrumb-list li:last-child {
  color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
@media (min-width: 600px) { .breadcrumb-list li:last-child { max-width: none; } }

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-post-header { margin-bottom: 16px; }
.single-post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.single-post-title {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  line-height: 1.35; margin-bottom: 12px; word-break: break-word;
}
@media (min-width: 600px) { .single-post-title { font-size: 24px; } }
.single-post-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--text-3);
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.single-post-meta strong { color: var(--text-2); }

/* Key info box */
.post-info-box {
  background: var(--brand-light);
  border: 1px solid rgba(27,79,138,0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0;
  overflow: hidden;
}
.post-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .post-info-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
.post-info-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.post-info-value { font-size: 13px; font-weight: 600; color: var(--text-1); margin-top: 2px; word-break: break-word; }
@media (min-width: 600px) { .post-info-value { font-size: 14px; } }
.post-info-value.deadline { color: var(--danger); }
.post-info-value.institution { color: var(--brand); }

/* Apply button — wraps on mobile */
.apply-btn-wrap { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.btn-apply {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-weight: 700; font-size: 14px;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-apply:hover { background: var(--brand-mid); color: #fff; }

/* Post content */
.post-content { font-size: 15px; line-height: 1.8; color: var(--text-2); overflow-wrap: break-word; word-break: break-word; }
.post-content h2 { font-size: 18px; font-weight: 700; color: var(--text-1); margin: 22px 0 10px; }
.post-content h3 { font-size: 16px; font-weight: 700; color: var(--text-1); margin: 16px 0 8px; }
.post-content p { margin-bottom: 14px; }
.post-content ul, .post-content ol { margin: 0 0 14px 20px; }
.post-content li { margin-bottom: 6px; }
.post-content a { color: var(--brand); text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.post-content table { width: 100%; overflow-x: auto; display: block; }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin: 20px 0;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2);
  background: var(--card); transition: all 0.15s;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* =====================================================
   FOOTER — mobile first
   ===================================================== */
.site-footer {
  background: var(--brand);
  color: rgba(255,255,255,0.8);
  padding: 28px 0 0;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 24px;
}
@media (min-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand .logo-text { color: #fff; font-size: 22px; }
.footer-brand .logo-text span { color: var(--accent); }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 10px; line-height: 1.6; }
.footer-col-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 14px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,0.5);
}

/* Footer subscribe form */
.footer-subscribe { display: flex; gap: 6px; margin-top: 8px; }
.footer-subscribe input {
  flex: 1; min-width: 0;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff; font-size: 12px;
}
.footer-subscribe input::placeholder { color: rgba(255,255,255,0.5); }
.footer-subscribe button {
  background: var(--accent); color: #78350F;
  border: none; padding: 7px 12px;
  border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}

/* =====================================================
   MOBILE BODY PADDING for anchor ad
   ===================================================== */
@media (max-width: 959px) {
  body.has-anchor-ad { padding-bottom: 70px; }
}

/* =====================================================
   UTILITY: Prevent horizontal overflow everywhere
   ===================================================== */
.site-container,
.hero-inner,
.header-inner,
.content-sidebar-wrap,
.post-card,
.post-card-body,
.post-card-title,
.post-content,
.post-info-box,
.widget-item-text,
.deadline-title {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Prevent table overflow */
table { max-width: 100%; }

/* Prevent pre/code overflow */
pre, code { overflow-x: auto; max-width: 100%; white-space: pre-wrap; }


/* =====================================================
   HERO RIGHT PANEL — full width on mobile
   ===================================================== */
.hero-right {
  width: 100%;
}
@media (min-width: 760px) {
  .hero-right { width: 280px; }
}
@media (min-width: 960px) {
  .hero-right { width: 300px; }
}
.hero-left { width: 100%; }

/* =====================================================
   SINGLE POST INFO GRID — 1 col on very small screens
   ===================================================== */
@media (max-width: 400px) {
  .post-info-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   FOOTER GRID — ensure 1 col on tiny screens
   ===================================================== */
@media (max-width: 359px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .hero-title  { font-size: 18px; }
  .site-container { padding: 0 12px; }
}

/* =====================================================
   PREVENT OVERFLOW: fix any remaining issues
   ===================================================== */
.hero-search-form input { max-width: 100%; }
.primary-nav ul li a { overflow: hidden; text-overflow: ellipsis; }
.footer-subscribe input { max-width: 100%; }
ins.adsbygoogle { max-width: 100% !important; }
