@import "https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Lora:ital,wght@0,400..700;1,400..700&display=swap";

/* ==========================================
   1. CSS Variables
   ========================================== */

:root {
  --background: #f8fafc;
  --foreground: #1e293b;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --popover: #ffffff;
  --popover-foreground: #1e293b;
  --primary: #1e293b;
  --primary-foreground: #ffffff;
  --secondary: #d97706;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #d97706;
  --accent-foreground: #1e293b;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #1e293b;
  --radius: 0.5rem;
}

.dark {
  --background: #0f172a;
  --foreground: #f8fafc;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --popover: #1e293b;
  --popover-foreground: #f8fafc;
  --primary: #f8fafc;
  --primary-foreground: #1e293b;
  --secondary: #d97706;
  --secondary-foreground: #0f172a;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #d97706;
  --accent-foreground: #0f172a;
  --destructive: #991b1b;
  --destructive-foreground: #f8fafc;
  --border: #334155;
  --input: #334155;
  --ring: #f8fafc;
}

/* ==========================================
   2. Universal Reset
   ========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: var(--border);
}

/* ==========================================
   3. Base HTML Elements
   ========================================== */

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr[title] {
  text-decoration: underline dotted;
}

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

button, select {
  text-transform: none;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  background-color: transparent;
}

button, [role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img, video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

/* ==========================================
   4. Typography & Layout Headings
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: Lora, Georgia, serif;
  color: var(--foreground);
}

h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  h1 { font-size: 3rem; line-height: 1; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.75rem; line-height: 1; }
}

h2 {
  font-size: 1.875rem;
  line-height: 1.375;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  h2 { font-size: 2.25rem; line-height: 2.5rem; }
}

h3 {
  font-size: 1.5rem;
  line-height: 1.375;
  font-weight: 500;
}

@media (min-width: 768px) {
  h3 { font-size: 1.875rem; line-height: 2.25rem; }
}

h4 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  h4 { font-size: 1.5rem; line-height: 2rem; }
}

p {
  line-height: 1.625;
  max-width: 65ch;
}

/* --- Global Header & Layout Fix --- */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Header Container */
header.site-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
}

/* Logo */
header.site-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

header.site-header .logo img {
    display: block;
    height: 36px;
    width: auto;
}

/* Main Navigation Menu */
header.site-header nav.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

header.site-header nav.main-nav a {
    color: #444444;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

header.site-header nav.main-nav a:hover {
    color: #000000;
}

/* Header Actions (Search & Subscribe) */
header.site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

header.site-header .search-box input {
    padding: 8px 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

header.site-header .subscribe-btn {
    background-color: #000000;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* Mobile nav toggle (hidden on desktop; shown by responsive.css) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #111111;
    border-radius: 2px;
}

/* Site footer */
.site-footer {
    border-top: 1px solid #eaeaea;
    background-color: #ffffff;
    padding: 24px 32px;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666666;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #666666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #111111;
}

/* ==========================================
   5. Homepage — hero & article grid
   ========================================== */

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 32px 40px;
    text-align: center;
}

.hero h1 {
    margin-bottom: 12px;
}

.hero p {
    color: var(--muted-foreground);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto;
}

/* --- Hero banner (image + trust bar) --- */

.hero-banner {
    position: relative;
    padding: 90px 24px 130px;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay-tint {
    position: absolute;
    inset: 0;
    background: rgba(30, 41, 59, .82);
    mix-blend-mode: multiply;
}

.hero-overlay-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background) 0%, rgba(248, 250, 252, .7) 10%, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.hero-pill svg {
    width: 14px;
    height: 14px;
    color: var(--secondary);
    flex-shrink: 0;
}

.hero-banner h1 {
    color: #fff;
    font-size: 2.4rem;
    line-height: 1.15;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .hero-banner h1 { font-size: 3.3rem; }
}

@media (min-width: 1024px) {
    .hero-banner h1 { font-size: 4rem; }
}

.hero-banner h1 .accent {
    color: var(--secondary);
    font-style: italic;
}

.hero-sub {
    color: rgba(255, 255, 255, .92);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 34px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-sub { font-size: 1.2rem; }
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

@media (min-width: 600px) {
    .hero-actions { flex-direction: row; }
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s ease, background .2s ease;
}

.btn-hero-primary {
    background: var(--secondary);
    color: #1e293b;
}

.btn-hero-primary:hover { opacity: .9; }

.btn-hero-outline {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
}

.btn-hero-outline:hover { background: rgba(255, 255, 255, .18); }

.trust-bar {
    position: relative;
    z-index: 2;
    max-width: 1040px;
    margin: -64px auto 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 760px) {
    .trust-bar { grid-template-columns: repeat(3, 1fr); }
}

.trust-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

@media (min-width: 760px) {
    .trust-item:not(:first-child) { border-left: 1px solid var(--border); }
}

.trust-item svg {
    width: 26px;
    height: 26px;
    color: var(--secondary);
    margin-bottom: 6px;
}

.trust-item h3 {
    font-size: 1.02rem;
    margin: 0;
}

.trust-item p {
    font-size: 13px;
    color: var(--muted-foreground);
    margin: 2px 0 0;
    max-width: 220px;
}

/* --- Page hero (shorter variant of .hero-banner for inner pages:
   about, categories, write-for-us, community hub, reviews index) --- */

.page-hero {
    position: relative;
    padding: 64px 24px 76px;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #334155 100%);
}

.page-hero.has-bg-image .hero-bg { display: block; }
.page-hero .hero-bg { display: none; }

.page-hero .page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.page-hero .hero-pill {
    margin-bottom: 20px;
}

.page-hero h1 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .page-hero h1 { font-size: 2.6rem; }
}

.page-hero .page-hero-sub {
    color: rgba(255, 255, 255, .88);
    font-size: 1.02rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .page-hero .page-hero-sub { font-size: 1.1rem; }
}

.page-hero .page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 48px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.article-card .thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--muted);
}

.article-card .body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.article-card .cat {
    display: inline-block;
    align-self: flex-start;
    background: var(--accent);
    color: var(--accent-foreground);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 100px;
}

.article-card h3 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
}

.article-card .excerpt {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.5;
    max-width: none;
}

.article-card .meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--muted-foreground);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted-foreground);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--foreground);
    font-size: 14px;
}

.pagination a:hover {
    background: var(--muted);
}

.pagination .current {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* ==========================================
   6. Article page
   ========================================== */

.article-hero {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 0;
}

.article-hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--muted);
}

.article-meta {
    color: var(--muted-foreground);
    font-size: 13px;
    margin: 14px 0 6px;
}

.article-excerpt {
    font-size: 17px;
    color: #333;
    margin-bottom: 24px;
    max-width: none;
}

.article-cta {
    display: inline-block;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin: 8px 0 28px;
}

.article-cta:hover {
    opacity: 0.9;
}

.article-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-size: 16px;
}

.article-body h3 {
    font-size: 19px;
    margin: 28px 0 10px;
}

.article-body ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 6px;
}

table.review-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

table.review-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
}

.article-disclosure {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--muted-foreground);
    margin: 20px auto 0;
    max-width: 820px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.article-tags span {
    background: var(--muted);
    color: #444;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 100px;
}

/* ==========================================
   7. Simple form pages (subscribe, write-for-us)
   ========================================== */

.form-page {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 20px;
}

.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-card h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.form-card > p {
    color: var(--muted-foreground);
    margin-bottom: 24px;
}

.form-row { margin-bottom: 18px; }

.form-row.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.form-row.grid2 > div { margin-bottom: 18px; }

.form-card label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="url"],
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
    box-sizing: border-box;
    font-family: inherit;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
}

.form-card textarea {
    resize: vertical;
    min-height: 160px;
    line-height: 1.6;
}

.form-help {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-top: 4px;
}

.form-submit-btn {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.form-submit-btn:hover {
    opacity: 0.9;
}

.form-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.form-notice.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
}

.form-notice.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.subscribe-inline {
    display: flex;
    gap: 10px;
}

.subscribe-inline input[type="email"] {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row.grid2 { grid-template-columns: 1fr; }
    .subscribe-inline { flex-direction: column; }
}

/* ==========================================
   8. Categories Grid Styles
   ========================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--card-foreground);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.category-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--card-foreground);
}

.category-card .sub-count {
    display: block;
    color: var(--muted-foreground);
    font-size: 13px;
    margin-top: 6px;
}

/* 3-Column Article Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 280px;
    gap: 30px;
    align-items: start;
    padding: 40px 0;
}

/* Sidebars Base */
.article-sidebar {
    position: sticky;
    top: 90px; /* Adjust based on your header/navbar height */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: #d97706;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sidebar-box h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Table of Contents Styling */
#tableOfContents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#tableOfContents li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#tableOfContents a {
    color: var(--muted, #666);
    text-decoration: none;
    transition: color 0.2s;
}

#tableOfContents a:hover {
    color: var(--primary, #000);
}

/* Responsive collapse for tablets and mobile */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
    position: sticky;
}
}

/* ==================================================
   FIXED EDITORS PICKS / FEATURED LAYOUT CSS
   ================================================== */

.featured-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

/* Large Main Card */
.featured-main {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    min-height: 440px;
    background-color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Ensure image displays correctly and is correctly layered */
.featured-main > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Sits at the bottom layer */
    transition: transform 0.4s ease;
}

.featured-main:hover > img {
    transform: scale(1.03);
}

.featured-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Overlay sits on top of the image (z-index: 2) */
.featured-main .overlay {
    position: relative;
    z-index: 2; 
    padding: 35px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.65) 50%, transparent 100%);
    width: 100%;
    box-sizing: border-box;
}

.featured-main .category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #fff;
}

.featured-main h2 {
    font-size: 1.65rem;
    line-height: 1.35;
    margin: 0 0 10px 0;
    color: #ffffff;
    font-weight: 700;
}

.featured-main p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 15px 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-main .meta {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 500;
}

/* Right Side Stack Container */
.featured-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

/* Small Stacked Cards */
.featured-small {
    display: flex;
    gap: 16px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    flex: 1;
}

.featured-small img {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.featured-small .thumb-placeholder {
    width: 85px;
    height: 85px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.featured-small div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-small .category {
    font-size: 0.7rem;
    color: var(--accent, #6366f1);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.featured-small h3 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: #1e293b;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-small small {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
}

.featured-small:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .featured-layout {
        grid-template-columns: 1fr;
    }
    
    .featured-main {
        min-height: 360px;
    }
}
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.featured-small h3 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: #1e293b;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-small small {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
}

.featured-small:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .featured-layout {
        grid-template-columns: 1fr;
    }
    
    .featured-main {
        min-height: 360px;
    }
}
/* ==================================================
   COMMUNITY PAGE FIX: SPACING & TEXT CONTRAST
   ================================================== */

/* 1. Force proper spacing below the page hero/header so it never touches */
.page-hero + .section,
.hero-banner + .section,
section.section:first-of-type {
    margin-top: 60px !important;
    padding-top: 20px !important;
}

.section {
    padding: 60px 0;
}

/* 2. Container safety */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. Grid setup */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 4. Card Styling with high-contrast text and a crisp background */
.article-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important; /* Clearer border so cards pop against white backgrounds */
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #0f172a !important; /* Deep dark slate to fix visibility issues */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #94a3b8 !important;
}

/* Thumbnail */
.article-card img.thumb,
.article-card a img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* Card Body Content */
.article-card .body {
    padding: 24px !important;
    flex-grow: 1;
    background: #ffffff !important;
}

.article-card .cat {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff !important; 
}

.article-card h3 {
    font-size: 1.15rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #0f172a !important; /* Solid dark text */
    font-weight: 700;
}

.article-card h3 a {
    color: #0f172a !important;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #2563eb !important;
}

.article-card .excerpt {
    font-size: 0.95rem;
    color: #334155 !important; /* Darkened gray so text is fully readable on white */
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.article-card .article-body {
    padding: 16px 24px !important;
    border-top: 1px solid #e2e8f0 !important;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc !important; /* Slightly off-white footer for clear sectioning */
}

.article-card .meta {
    font-size: 0.85rem;
    color: #475569 !important;
    font-weight: 600;
}

/* Responsive Layout */
@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}