/* ============================================================
   ELL Insights & News — insights-news.css
   Enqueue via functions.php on page-insights.php only.
   Matches the HTML prototype exactly.
============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --blue:        #0075C1;
    --blue-dark:   #005a96;
    --white:       #ffffff;
    --off-white:   #f8f9fa;
    --light-grey:  #f2f3f4;
    --mid-grey:    #e0e2e5;
    --text-dark:   #1a1a2e;
    --text-body:   #444444;
    --text-muted:  #888888;
    --radius:      6px;
    --shadow:      0 2px 16px rgba(0,0,0,0.08);
    --shadow-hover:0 6px 28px rgba(0,117,193,0.15);
  }
  
  /* ── Page Hero ─────────────────────────────────────────────── */
  .page-hero {
    background: var(--blue);
    padding: 48px 40px 44px;
    text-align: center;
  }
  .page-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    margin: 0;
  }
  
  /* ── Two-Column Blog Layout ────────────────────────────────── */
  .blog-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
  }
  
  /* ── Tab / Category Filter Bar ─────────────────────────────── */
  .category-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
  }
  .cat-btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 30px;
    border: 1.5px solid var(--mid-grey);
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .cat-btn:hover {
    border-color: var(--blue);
    color: var(--white);
  }
  .cat-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
  }
  
  /* Search icon button */
  .search-icon-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    padding: 6px;
    transition: color 0.2s;
  }
  .search-icon-btn:hover { color: var(--white); border: none;}
  
  /* ── Search Bar ────────────────────────────────────────────── */
  .search-bar {
    display: none;
    margin-bottom: 28px;
  }
  .search-bar.open { display: flex; }
  .search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--mid-grey);
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
  }
  .search-bar input:focus { border-color: var(--blue); }
  .search-bar button {
    padding: 10px 18px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
  }
  .search-bar button:hover { background: var(--blue-dark); }
  
  /* ── Featured Post ─────────────────────────────────────────── */
  .featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 48px;
    background: var(--white);
    transition: box-shadow 0.3s;
  }
  .featured-post:hover { box-shadow: var(--shadow-hover); }
  
  .featured-post .fp-image {
    position: relative;
    overflow: hidden;
    min-height: 300px;
  }
  .featured-post .fp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  .featured-post:hover .fp-image img { transform: scale(1.04); }
  
  .featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--blue);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
  }
  
  .featured-post .fp-content {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .fp-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue);
    margin-bottom: 12px;
  }
  .fp-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin: 0 0 14px;
  }
  .fp-content h2 a { color: inherit; text-decoration: none; }
  .fp-content h2 a:hover { color: var(--blue); }
  .fp-excerpt {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.65;
    margin: 0 0 20px;
  }
  .fp-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .fp-meta i { color: var(--blue); }
  .fp-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: gap 0.2s;
  }
  .fp-read-more:hover { gap: 12px; }
  
  /* ── Section Heading ───────────────────────────────────────── */
  .section-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mid-grey);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-heading::before {
    content: '';
    display: block;
    width: 4px;
    height: 22px;
    background: var(--blue);
    border-radius: 2px;
    flex-shrink: 0;
  }
  
  /* ── Posts Grid ────────────────────────────────────────────── */
  .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
  }
  .post-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
  }
  .post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
  }
  .post-card .card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
  }
  .post-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  .post-card:hover .card-image img { transform: scale(1.05); }
  
  /* Category badge on image */
  .card-cat-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--white);
  }
  /* CPT badge colours — add more as needed */
  .tag-senior     { background: #0075C1; }
  .tag-employee   { background: #2e7d32; }
  .tag-employer   { background: #6a1b9a; }
  .tag-settlement { background: #e65100; }
  .tag-discrimination { background: #c62828; }
  .tag-press      { background: #37474f; }
  .tag-updater    { background: #00695c; }
  .tag-insight    { background: #0075C1; }
  
  .card-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--blue);
    margin-bottom: 8px;
  }
  .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.45;
    margin: 0 0 10px;
    flex: 1;
    letter-spacing: 0;
  }
  button:focus {
    background: transparent;
    color: var(--blue);
    border: none;
}
  .card-title a { color: inherit; text-decoration: none; }
  .card-title a:hover { color: var(--blue); }
  .card-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
  }
  .card-meta i { color: var(--blue); font-size: 10px; }
  
  /* ── Pagination ────────────────────────────────────────────── */
  .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    margin-bottom: 16px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}
  /* WordPress paginate_links wraps output in <ul><li> */
  .pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .pagination li { display: flex; }
  .pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    border: 1.5px solid var(--mid-grey);
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
  }
  .pagination .page-numbers:hover {
    border-color: var(--blue);
    color: var(--blue);
  }
  .pagination .page-numbers.current {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
    font-weight: 700;
  }
  .pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
  }
  
  /* ── No posts message ──────────────────────────────────────── */
  .no-posts {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 14px;
  }
  
  /* ── Sidebar ───────────────────────────────────────────────── */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 100px; /* adjust to match your theme's sticky header height */
  }
  
  /* CTA Widget */
  .cta-widget {
    background: var(--blue);
    border-radius: 10px;
    padding: 28px 24px;
    color: var(--white);
    text-align: center;
}
.cta-widget h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: 0;
}
  .cta-widget p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 20px;
    opacity: 0.92;
  }
  .cta-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--white);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }
  .cta-btn:hover {
    background: transparent;
    color: var(--white);
  }
  
  /* Sidebar Widget */
  .sidebar-widget {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .widget-header {
    background: var(--blue);
    color: var(--white);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
  }
  .widget-body { padding: 20px; }
  
  /* Category list */
  .cat-list { list-style: none; padding: 0; margin: 0; }
  .cat-list li { border-bottom: 1px solid var(--light-grey); }
  .cat-list li:last-child { border-bottom: none; }
  .cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
  }
  .cat-list a:hover { color: var(--blue); }
  .cat-count {
    background: var(--light-grey);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
  }
  
  /* Recent posts */
  .recent-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-grey);
  }
  .recent-post:last-child { border-bottom: none; padding-bottom: 0; }
  .recent-post:first-child { padding-top: 0; }
  .recent-thumb {
    width: 64px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .recent-info { flex: 1; min-width: 0; }
  .recent-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.45;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .recent-title a { color: inherit; text-decoration: none; }
  .recent-title a:hover { color: var(--blue); }
  .recent-date { font-size: 11px; color: var(--text-muted); }
  
  /* Newsletter form */
  .nl-desc {
    font-size: 13px;
    color: var(--text-body);
    margin: 0 0 14px;
    line-height: 1.55;
  }
  .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .newsletter-form input {
    padding: 10px 14px;
    border: 1.5px solid var(--mid-grey);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
  }
  .newsletter-form input:focus { border-color: var(--blue); }
  .newsletter-form button {
    padding: 11px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }
  .newsletter-form button:hover { background: var(--blue-dark); }
  
  /* Tags cloud */
  .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tag-pill {
    display: inline-block;
    padding: 5px 12px;
    border: 1.5px solid var(--mid-grey);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
  }
  .tag-pill:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(0,117,193,0.05);
  }
  
  /* ── Responsive ────────────────────────────────────────────── */
  @media (max-width: 1024px) {
    .blog-layout {
      grid-template-columns: 1fr;
      gap: 32px;
    }
    .sidebar { position: static; }
  }
  
  @media (max-width: 768px) {
    .page-hero { padding: 32px 20px; }
    .page-hero h1 { font-size: 26px; }
    .blog-layout {
      padding: 32px 16px 60px;
      display: block;
  }
    .featured-post { grid-template-columns: 1fr; }
    .featured-post .fp-image { min-height: 220px; }
    .fp-content { padding: 24px 20px; }
    .fp-content h2 { font-size: 20px; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  }
  
  @media (max-width: 540px) {
    .posts-grid { grid-template-columns: 1fr; }
    .category-bar { gap: 6px; }
    .cat-btn { padding: 6px 12px; font-size: 12px; }
  }
  
  /* ── AJAX Loading State ─────────────────────────────────── */
  #ellTabContent {
      min-height: 200px;
      transition: opacity 0.2s ease;
      position: relative;
  }
  #ellTabContent.ell-loading {
      opacity: 0.5;
      pointer-events: none;
  }
  .ell-spinner {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 80px 0;
      font-size: 28px;
      color: var(--blue);
  }
  
  /* ── Sidebar category list buttons (AJAX version) ───────── */
  .cat-list-btn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 10px 0;
      font-family: inherit;
      font-size: 13px;
      color: var(--text-dark);
      background: none;
      border: none;
      cursor: pointer;
      text-align: left;
      transition: color 0.2s;
  }
  .cat-list-btn:hover {
    color: var(--blue);
    border: none;
    background: transparent;
}
  .cat-list-btn.active { color: var(--blue); font-weight: 600; }
  
  /* ── Search bar open state fix ──────────────────────────── */
  .search-bar {
      display: none;
      margin-bottom: 28px;
      animation: ellSlideDown 0.2s ease;
  }
  .search-bar.open {
      display: flex;
  }
  
  @keyframes ellSlideDown {
      from { opacity: 0; transform: translateY(-6px); }
      to   { opacity: 1; transform: translateY(0);    }
  }
  
  /* Search icon active state */
  .search-icon-btn[aria-expanded="true"] {
      color: var(--blue);
      border: none;
  }
  .search-icon-btn[aria-expanded="true"]:hover {
    color: var(--white);
}
  form.serach-form-cstm {
    display: flex;
    width: 100%;
}