/*
Theme Name: AlkaFlow
Theme URI: https://turtlebin.com/alkaflow
Author: AlkaFlow Team
Author URI: https://turtlebin.com
Description: A modern financial news WordPress theme with Liquid Glass design, auto dark/light mode, fully responsive, bilingual (EN/ID), AdSense ready, infinite scroll, mega menu, and more.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alkaflow
Tags: blog, news, finance, responsive, dark-mode, mega-menu, rtl-language-support, translation-ready, custom-colors, featured-images, infinite-scroll
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (TOKENS)
   ============================================================ */
:root {
  --green:        #1a7a4a;
  --green-mid:    #22a05a;
  --green-light:  #34c978;
  --gold:         #c9a227;
  --gold-light:   #f0c84a;
  --navy:         #0a1628;
  --navy-mid:     #112240;
  --navy-light:   #1a3a6e;

  --glass-bg:     rgba(255,255,255,0.60);
  --glass-border: rgba(255,255,255,0.80);
  --glass-blur:   blur(20px) saturate(180%);
  --glass-shadow: 0 8px 32px rgba(10,22,40,0.10);

  --bg:           #e8f2ec;
  --bg-grad:      linear-gradient(135deg,#d4ead9 0%,#e8f0e0 40%,#dde8f0 100%);
  --surface:      rgba(255,255,255,0.60);
  --surface2:     rgba(255,255,255,0.40);
  --text:         #0a1628;
  --text2:        #2a4060;
  --text3:        #6b829a;
  --border:       rgba(255,255,255,0.60);
  --card-border:  rgba(255,255,255,0.70);
  --tag-bg:       rgba(26,122,74,0.10);
  --tag-text:     #1a7a4a;
  --up:           #1a7a4a;
  --down:         #c0392b;
  --up-bg:        rgba(26,122,74,0.10);
  --down-bg:      rgba(192,57,43,0.10);
  --radius:       16px;
  --radius-sm:    10px;
  --radius-pill:  20px;
  --transition:   all 0.25s ease;
}

@media (prefers-color-scheme:dark) {
  :root {
    --glass-bg:     rgba(15,30,20,0.60);
    --glass-border: rgba(255,255,255,0.10);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.45);
    --bg:           #070e18;
    --bg-grad:      linear-gradient(135deg,#070e18 0%,#0a1a10 40%,#0a1220 100%);
    --surface:      rgba(20,40,28,0.65);
    --surface2:     rgba(15,28,20,0.50);
    --text:         #e8f5ee;
    --text2:        #9ab8a8;
    --text3:        #5a7a68;
    --border:       rgba(255,255,255,0.08);
    --card-border:  rgba(255,255,255,0.09);
    --tag-bg:       rgba(52,201,120,0.12);
    --tag-text:     #34c978;
    --up:           #34c978;
    --down:         #ff5040;
    --up-bg:        rgba(52,201,120,0.12);
    --down-bg:      rgba(255,80,60,0.12);
    --gold:         #f0c84a;
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: -apple-system, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--green); text-decoration: none; transition: var(--transition); }
a:hover { opacity: .85; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:rgba(26,122,74,.35); border-radius:3px; }

/* ============================================================
   GLASS UTILITY
   ============================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.af-container { max-width:1200px; margin:0 auto; padding:0 20px; }
.af-grid-main { display:grid; grid-template-columns:1fr 300px; gap:28px; }
.af-section { margin-bottom:36px; }

/* ============================================================
   TOPBAR
   ============================================================ */
#af-topbar {
  background: linear-gradient(90deg,var(--navy) 0%,var(--green) 65%,var(--gold) 100%);
  color:#fff; font-size:12px; font-weight:500; padding:7px 0;
  position:relative; overflow:hidden;
}
#af-topbar::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.07),transparent);
  animation:shimmer 3s infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.af-topbar-inner { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.af-ticker { display:flex; align-items:center; gap:10px; overflow:hidden; flex:1; min-width:0; }
.af-ticker-label {
  background:rgba(255,255,255,.18); backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.25); border-radius:var(--radius-pill);
  padding:3px 10px; font-weight:700; font-size:11px; white-space:nowrap;
}
.af-ticker-track { overflow:hidden; flex:1; min-width:0; }
.af-ticker-text { white-space:nowrap; animation:ticker 30s linear infinite; display:inline-block; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.af-topbar-links { display:flex; gap:14px; flex-shrink:0; }
.af-topbar-links a { color:rgba(255,255,255,.8); font-size:12px; font-weight:500; }
.af-topbar-links a:hover { color:#fff; opacity:1; }

/* ============================================================
   HEADER
   ============================================================ */
#af-header {
  position: sticky; top:0; z-index:500;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(10,22,40,.10);
  transition: var(--transition);
}
.af-header-inner {
  display:flex; align-items:center; height:66px; gap:24px;
}
/* LOGO */
.af-logo { display:flex; align-items:center; gap:8px; flex-shrink:0; text-decoration:none; }
.af-logo-icon {
  width:36px; height:36px; border-radius:10px;
  background:linear-gradient(135deg,var(--green),var(--gold));
  display:flex; align-items:center; justify-content:center;
  font-size:18px; box-shadow:0 3px 12px rgba(26,122,74,.35);
}
.af-logo-text { font-size:22px; font-weight:900; color:var(--text); letter-spacing:-.5px; }
.af-logo-text span { color:var(--green); }

/* NAV */
#af-nav { display:flex; align-items:center; gap:2px; flex:1; }
#af-nav > li > a {
  display:block; color:var(--text2); font-size:13.5px; font-weight:600;
  padding:7px 13px; border-radius:var(--radius-sm); transition:var(--transition);
  white-space:nowrap;
}
#af-nav > li > a:hover,
#af-nav > li.current-menu-item > a,
#af-nav > li.current-menu-ancestor > a { color:var(--green); background:rgba(26,122,74,.09); }

/* MEGA MENU */
#af-nav .menu-item-has-children { position:relative; }
#af-nav .menu-item-has-children > a::after { content:' ▾'; font-size:10px; }
#af-nav .sub-menu {
  display:none; position:absolute; top:calc(100% + 8px); left:0;
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-border); border-radius:var(--radius);
  box-shadow:0 24px 60px rgba(10,22,40,.18);
  padding:12px; min-width:200px; z-index:600;
}
#af-nav .menu-item-has-children:hover > .sub-menu { display:block; }
#af-nav .sub-menu li a {
  display:block; padding:9px 12px; border-radius:var(--radius-sm);
  font-size:13px; font-weight:600; color:var(--text2); transition:var(--transition);
}
#af-nav .sub-menu li a:hover { background:rgba(26,122,74,.08); color:var(--green); }
.af-mega-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; width:500px; }
.af-mega-item {
  display:flex; align-items:center; gap:10px; padding:10px;
  border-radius:var(--radius-sm); transition:var(--transition); color:var(--text);
}
.af-mega-item:hover { background:rgba(26,122,74,.08); }
.af-mega-icon {
  width:36px; height:36px; border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center;
  font-size:17px; flex-shrink:0;
}
.af-mega-icon.green { background:rgba(26,122,74,.12); }
.af-mega-icon.gold  { background:rgba(201,162,39,.15); }
.af-mega-icon.navy  { background:rgba(26,58,110,.12); }
.af-mega-label { font-size:12.5px; font-weight:700; color:var(--text); }
.af-mega-sub   { font-size:11px; color:var(--text3); }

/* HEADER RIGHT */
.af-header-right { display:flex; align-items:center; gap:10px; margin-left:auto; flex-shrink:0; }
.af-search-wrap {
  display:flex; align-items:center; gap:8px;
  background:var(--surface2); backdrop-filter:blur(12px);
  border:1px solid var(--card-border); border-radius:12px; padding:8px 13px;
  transition:var(--transition);
}
.af-search-wrap:focus-within { border-color:rgba(26,122,74,.4); box-shadow:0 0 0 3px rgba(26,122,74,.10); }
.af-search-wrap input { background:none; border:none; outline:none; color:var(--text); font-size:13px; width:130px; }
.af-search-wrap input::placeholder { color:var(--text3); }
.af-search-wrap svg { flex-shrink:0; color:var(--text3); }
.af-btn-subscribe {
  background:linear-gradient(135deg,var(--green),var(--green-mid));
  color:#fff; border:none; padding:9px 18px; border-radius:12px;
  font-size:13px; font-weight:700; transition:var(--transition);
  box-shadow:0 3px 12px rgba(26,122,74,.30); white-space:nowrap;
}
.af-btn-subscribe:hover { transform:translateY(-1px); box-shadow:0 5px 18px rgba(26,122,74,.40); }

/* HAMBURGER */
.af-hamburger {
  display:none; flex-direction:column; gap:5px;
  background:none; border:none; padding:6px; cursor:pointer;
}
.af-hamburger span {
  display:block; width:22px; height:2px;
  background:var(--text); border-radius:2px; transition:var(--transition);
}
.af-hamburger.active span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.af-hamburger.active span:nth-child(2) { opacity:0; }
.af-hamburger.active span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }


/* HEADER SCROLL STATES */
#af-header { transition: transform 0.3s ease, box-shadow 0.3s ease; }
#af-header.af-scrolled { box-shadow: 0 6px 32px rgba(10,22,40,0.20); }
#af-header.af-hidden { transform: translateY(-100%); }

/* MOBILE NAV */
#af-mobile-nav {
  display:none; position:fixed; inset:0; z-index:800;
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  padding:80px 24px 24px; overflow-y:auto;
}
#af-mobile-nav.open { display:block; }
#af-mobile-nav ul { list-style:none; }
#af-mobile-nav ul li a {
  display:block; padding:14px 0; font-size:16px; font-weight:700;
  color:var(--text); border-bottom:1px solid var(--border);
}
#af-mobile-nav ul li a:hover { color:var(--green); }
.af-mobile-close {
  position:absolute; top:18px; right:20px;
  background:none; border:none; font-size:24px; color:var(--text); padding:6px;
}

/* LANG SWITCHER */
.af-lang-switch {
  display:flex; gap:4px;
}
.af-lang-btn {
  padding:5px 10px; border-radius:var(--radius-pill); font-size:12px; font-weight:700;
  border:1px solid var(--card-border); background:var(--surface2); color:var(--text2);
  transition:var(--transition);
}
.af-lang-btn.active,
.af-lang-btn:hover { background:var(--green); color:#fff; border-color:var(--green); }

/* ============================================================
   WAVY DIVIDER
   ============================================================ */
.af-wave { width:100%; overflow:hidden; line-height:0; display:block; }
.af-wave svg { display:block; width:100%; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.af-hero { padding:24px 0; }
.af-hero-grid { display:grid; grid-template-columns:1fr 320px; gap:18px; }

.af-hero-main {
  position:relative; border-radius:22px; overflow:hidden; min-height:420px;
  display:flex; flex-direction:column; justify-content:flex-end; padding:30px;
  cursor:pointer;
  background:linear-gradient(135deg,var(--navy) 0%,#0d2e10 50%,var(--green) 100%);
}
.af-hero-bg {
  position:absolute; inset:0;
  background:
    radial-gradient(ellipse at 30% 50%,rgba(26,122,74,.4) 0%,transparent 60%),
    radial-gradient(ellipse at 80% 20%,rgba(201,162,39,.25) 0%,transparent 50%);
}
.af-hero-img {
  position:absolute; inset:0; object-fit:cover; width:100%; height:100%; opacity:.25;
}
.af-hero-overlay {
  position:absolute; inset:0;
  background:linear-gradient(0deg,rgba(10,22,40,.85) 0%,rgba(10,22,40,.2) 100%);
}
.af-hero-content { position:relative; z-index:2; }
.af-hero-breaking {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(26,122,74,.35); backdrop-filter:blur(10px);
  border:1px solid rgba(52,201,120,.35); color:#34c978;
  font-size:11px; font-weight:700; padding:4px 12px; border-radius:var(--radius-pill);
  margin-bottom:14px; text-transform:uppercase; letter-spacing:.6px;
}
.af-pulse { width:6px; height:6px; background:#34c978; border-radius:50%; animation:pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.5)} }
.af-hero-main h2 {
  font-size:28px; font-weight:900; color:#fff; line-height:1.25;
  margin-bottom:14px; text-shadow:0 2px 20px rgba(0,0,0,.3);
}
.af-hero-meta { display:flex; align-items:center; gap:10px; }
.af-hero-av {
  width:30px; height:30px; border-radius:50%;
  background:linear-gradient(135deg,var(--green),var(--gold));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:11px; font-weight:700;
  border:2px solid rgba(255,255,255,.3);
  overflow:hidden; flex-shrink:0;
}
.af-hero-av img { width:100%; height:100%; object-fit:cover; }
.af-hero-meta-text { font-size:12.5px; color:rgba(255,255,255,.75); }
.af-hero-meta-text strong { color:#fff; }
.af-hero-pills {
  position:absolute; bottom:20px; right:20px; z-index:2;
  display:flex; gap:8px;
}
.af-hero-pill {
  background:rgba(255,255,255,.12); backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.20); border-radius:var(--radius-pill);
  padding:5px 12px; color:#fff; font-size:11.5px; font-weight:600;
}
/* Slider dots */
.af-hero-dots { position:absolute; bottom:20px; left:30px; z-index:2; display:flex; gap:6px; }
.af-hero-dot {
  width:8px; height:8px; border-radius:50%;
  background:rgba(255,255,255,.4); cursor:pointer; transition:var(--transition); border:none;
}
.af-hero-dot.active { background:#fff; width:24px; border-radius:4px; }

/* HERO SIDE */
.af-hero-side { display:flex; flex-direction:column; gap:12px; }
.af-hero-side-card {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--card-border); border-radius:var(--radius);
  overflow:hidden; display:flex; cursor:pointer; transition:var(--transition);
}
.af-hero-side-card:hover { transform:translateY(-2px); box-shadow:0 12px 32px rgba(26,122,74,.15); }
.af-hero-side-thumb {
  width:88px; flex-shrink:0; display:flex; align-items:center;
  justify-content:center; font-size:28px; min-height:80px;
}
.af-hero-side-thumb img { width:100%; height:100%; object-fit:cover; }
.af-hero-side-body { padding:12px; flex:1; }
.af-side-cat { font-size:10.5px; font-weight:700; color:var(--green); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; }
.af-side-title { font-size:13px; font-weight:700; color:var(--text); line-height:1.35; }
.af-side-date { font-size:11px; color:var(--text3); margin-top:5px; }

/* ============================================================
   AD SLOTS
   ============================================================ */
.af-ad-slot {
  background:var(--surface2); backdrop-filter:blur(10px);
  border:1px dashed rgba(26,122,74,.25); border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  color:var(--text3); font-size:11.5px; font-weight:600; letter-spacing:.4px;
  text-align:center; overflow:hidden;
}
.af-ad-banner { height:90px; margin-bottom:22px; }
.af-ad-between { height:80px; margin-bottom:20px; }
.af-ad-sidebar { height:250px; margin-bottom:18px; }
.af-ad-slot ins { width:100%; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.af-section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.af-section-title { font-size:16px; font-weight:800; color:var(--text); display:flex; align-items:center; gap:10px; }
.af-section-bar { width:3px; height:18px; border-radius:2px; background:linear-gradient(180deg,var(--green),var(--gold)); flex-shrink:0; }
.af-see-all { font-size:12.5px; font-weight:600; color:var(--green); }
.af-see-all:hover { text-decoration:underline; opacity:1; }

/* ============================================================
   FILTER TABS
   ============================================================ */
.af-filter-tabs { display:flex; gap:6px; margin-bottom:18px; flex-wrap:wrap; }
.af-filter-tab {
  padding:6px 14px; border-radius:var(--radius-pill);
  font-size:12.5px; font-weight:600; cursor:pointer; transition:var(--transition);
  background:var(--surface2); backdrop-filter:blur(8px);
  border:1px solid var(--card-border); color:var(--text2);
}
.af-filter-tab:hover,
.af-filter-tab.active {
  background:linear-gradient(135deg,var(--green),var(--green-mid));
  color:#fff; border-color:transparent;
  box-shadow:0 3px 10px rgba(26,122,74,.25);
}

/* ============================================================
   POST CARDS
   ============================================================ */
.af-post-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-bottom:22px; }

/* grid view shrink toggle */
body.af-shrink-posts .af-post-card .af-post-body { display:none; }
body.af-shrink-posts .af-post-card .af-post-thumb { height:200px; }
body.af-shrink-posts .af-post-card { position:relative; overflow:hidden; }
body.af-shrink-posts .af-post-card .af-post-thumb-title {
  display:flex; position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(0deg,rgba(10,22,40,.9),transparent);
  padding:12px; color:#fff; font-size:12.5px; font-weight:700; line-height:1.3;
}

.af-post-card {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--card-border); border-radius:var(--radius);
  overflow:hidden; cursor:pointer; transition:var(--transition);
}
.af-post-card:hover { transform:translateY(-4px); box-shadow:0 16px 40px rgba(26,122,74,.14); border-color:rgba(26,122,74,.25); }
.af-post-thumb {
  height:160px; display:flex; align-items:center; justify-content:center;
  font-size:36px; position:relative; overflow:hidden;
}
.af-post-thumb img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.af-post-thumb::after {
  content:''; position:absolute; top:0; left:0; right:0; height:50%;
  background:linear-gradient(180deg,rgba(255,255,255,.07),transparent);
}
.af-post-thumb-title { display:none; }
.af-post-body { padding:14px; }
.af-post-tag {
  display:inline-block; background:var(--tag-bg); color:var(--tag-text);
  font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:var(--radius-pill);
  text-transform:uppercase; letter-spacing:.4px; margin-bottom:8px;
  border:1px solid rgba(26,122,74,.15);
}
.af-post-tag.gold { background:rgba(201,162,39,.12); color:var(--gold); border-color:rgba(201,162,39,.2); }
.af-post-title { font-size:13.5px; font-weight:700; color:var(--text); line-height:1.4; margin-bottom:8px; }
.af-post-title a { color:var(--text); }
.af-post-title a:hover { color:var(--green); opacity:1; }
.af-post-excerpt { font-size:12px; color:var(--text2); line-height:1.55; margin-bottom:10px; }
.af-post-footer { display:flex; align-items:center; justify-content:space-between; }
.af-post-author { display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text3); font-weight:500; }
.af-post-av {
  width:22px; height:22px; border-radius:50%; overflow:hidden;
  background:linear-gradient(135deg,var(--green),var(--navy-light));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:9px; font-weight:700; flex-shrink:0;
}
.af-post-av img { width:100%; height:100%; object-fit:cover; }
.af-post-read { font-size:11px; color:var(--text3); }

/* WIDE POST CARD */
.af-post-wide {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--card-border); border-radius:var(--radius);
  overflow:hidden; display:grid; grid-template-columns:220px 1fr;
  margin-bottom:14px; cursor:pointer; transition:var(--transition);
}
.af-post-wide:hover { transform:translateY(-3px); box-shadow:0 16px 40px rgba(26,122,74,.14); }
.af-post-wide .af-post-thumb { height:100%; min-height:140px; border-radius:0; }
.af-post-wide .af-post-body { padding:18px; }
.af-post-wide .af-post-title { font-size:15px; }

/* VIEW TOGGLE */
.af-view-toggle { display:flex; gap:6px; align-items:center; }
.af-view-btn {
  width:32px; height:32px; border-radius:8px; display:flex; align-items:center;
  justify-content:center; border:1px solid var(--card-border);
  background:var(--surface2); color:var(--text3); transition:var(--transition); font-size:15px;
}
.af-view-btn.active,
.af-view-btn:hover { background:var(--green); color:#fff; border-color:var(--green); }

/* ============================================================
   LOAD MORE / INFINITE SCROLL
   ============================================================ */
.af-load-more-wrap { text-align:center; margin:24px 0; }
.af-load-more-btn {
  background:linear-gradient(135deg,var(--green),var(--green-mid));
  color:#fff; border:none; padding:12px 32px; border-radius:var(--radius-pill);
  font-size:14px; font-weight:700; transition:var(--transition);
  box-shadow:0 4px 14px rgba(26,122,74,.30);
}
.af-load-more-btn:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(26,122,74,.40); }
.af-load-more-btn:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.af-spinner {
  width:24px; height:24px; border:3px solid var(--border);
  border-top-color:var(--green); border-radius:50%;
  animation:spin .7s linear infinite; margin:0 auto;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ============================================================
   SIDEBAR
   ============================================================ */
.af-sidebar { }
.af-widget {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--card-border); border-radius:var(--radius);
  padding:18px; margin-bottom:18px;
}
.af-widget-sticky { position:sticky; top:80px; }
.af-widget-title {
  font-size:13.5px; font-weight:800; color:var(--text);
  margin-bottom:14px; padding-bottom:10px;
  border-bottom:2px solid transparent;
  border-image:linear-gradient(90deg,var(--green),var(--gold)) 1;
  display:flex; align-items:center; gap:7px;
}

/* MARKET WIDGET */
.af-market-item {
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 0; border-bottom:1px solid var(--border);
}
.af-market-item:last-child { border-bottom:none; }
.af-market-name { font-size:13px; font-weight:700; color:var(--text); }
.af-market-sym  { font-size:10.5px; color:var(--text3); }
.af-market-val  { font-size:13px; font-weight:700; color:var(--text); text-align:right; }
.af-badge { font-size:11.5px; font-weight:700; padding:2px 8px; border-radius:var(--radius-pill); }
.af-badge.up { color:var(--up); background:var(--up-bg); }
.af-badge.dn { color:var(--down); background:var(--down-bg); }

/* POPULAR */
.af-pop-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); align-items:flex-start; }
.af-pop-item:last-child { border-bottom:none; }
.af-pop-num { font-size:20px; font-weight:900; color:var(--green); opacity:.25; width:24px; flex-shrink:0; line-height:1.1; }
.af-pop-title { font-size:13px; font-weight:600; color:var(--text); line-height:1.4; }
.af-pop-title a { color:var(--text); }
.af-pop-title a:hover { color:var(--green); opacity:1; }
.af-pop-meta { font-size:11px; color:var(--text3); margin-top:3px; }

/* NEWSLETTER WIDGET */
.af-nl-widget {
  border-radius:var(--radius); padding:20px; margin-bottom:18px; overflow:hidden; position:relative;
  background:linear-gradient(135deg,var(--navy) 0%,#0a2a10 60%,var(--green) 100%);
}
.af-nl-widget::before {
  content:''; position:absolute; top:-30px; right:-30px; width:120px; height:120px;
  background:radial-gradient(circle,rgba(201,162,39,.25),transparent 70%);
}
.af-nl-content { position:relative; z-index:1; }
.af-nl-widget h3 { font-size:15px; font-weight:800; color:#fff; margin-bottom:5px; }
.af-nl-widget p  { font-size:12.5px; color:rgba(255,255,255,.75); margin-bottom:14px; line-height:1.5; }
.af-nl-input {
  width:100%; padding:10px 13px; border-radius:10px;
  border:1px solid rgba(255,255,255,.20); font-size:13px; margin-bottom:8px;
  outline:none; background:rgba(255,255,255,.10); backdrop-filter:blur(8px); color:#fff;
}
.af-nl-input::placeholder { color:rgba(255,255,255,.50); }
.af-nl-btn {
  width:100%; padding:10px;
  background:linear-gradient(135deg,var(--gold-light),var(--gold));
  color:var(--navy); border:none; border-radius:10px;
  font-size:13px; font-weight:800; transition:var(--transition);
}
.af-nl-btn:hover { opacity:.9; }

/* TAGS */
.af-tags-cloud { display:flex; flex-wrap:wrap; gap:6px; }
.af-tag {
  background:var(--surface2); backdrop-filter:blur(8px);
  border:1px solid var(--card-border);
  color:var(--text2); font-size:12px; font-weight:600;
  padding:5px 11px; border-radius:var(--radius-pill); transition:var(--transition);
}
.af-tag:hover { background:linear-gradient(135deg,var(--green),var(--green-mid)); color:#fff; border-color:transparent; opacity:1; }
.af-tag.gold { border-color:rgba(201,162,39,.25); color:var(--gold); }
.af-tag.gold:hover { background:linear-gradient(135deg,var(--gold),var(--gold-light)); color:var(--navy); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.af-single-wrap { max-width:800px; margin:0 auto; }
.af-single-header { margin-bottom:28px; }
.af-single-cat { margin-bottom:12px; }
.af-single-title {
  font-size:32px; font-weight:900; line-height:1.2;
  color:var(--text); margin-bottom:16px;
}
.af-single-meta { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.af-single-author { display:flex; align-items:center; gap:8px; }
.af-single-author-av { width:36px; height:36px; border-radius:50%; overflow:hidden; }
.af-single-author-av img { width:100%; height:100%; object-fit:cover; }
.af-single-author-name { font-size:13.5px; font-weight:700; color:var(--text); }
.af-single-author-role { font-size:11.5px; color:var(--text3); }
.af-single-date { font-size:13px; color:var(--text3); }
.af-single-read  { font-size:13px; color:var(--text3); }
.af-single-thumb {
  width:100%; border-radius:var(--radius); overflow:hidden;
  margin-bottom:28px; aspect-ratio:16/9;
}
.af-single-thumb img { width:100%; height:100%; object-fit:cover; }
/* POST CONTENT */
.af-entry-content { font-size:16px; line-height:1.8; color:var(--text2); }
.af-entry-content h2 { font-size:22px; font-weight:800; color:var(--text); margin:28px 0 12px; }
.af-entry-content h3 { font-size:18px; font-weight:700; color:var(--text); margin:22px 0 10px; }
.af-entry-content p  { margin-bottom:18px; }
.af-entry-content ul, .af-entry-content ol { padding-left:20px; margin-bottom:18px; }
.af-entry-content li { margin-bottom:6px; }
.af-entry-content blockquote {
  border-left:4px solid var(--green); padding:14px 20px;
  background:var(--tag-bg); border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  font-style:italic; margin:20px 0; color:var(--text2);
}
.af-entry-content img { border-radius:var(--radius-sm); margin:16px 0; }
.af-entry-content a { color:var(--green); text-decoration:underline; }
.af-entry-content code {
  background:var(--surface2); padding:2px 6px; border-radius:4px;
  font-size:13.5px; color:var(--green-light);
}
.af-entry-content pre {
  background:var(--navy); color:#e8f5ee; padding:20px; border-radius:var(--radius-sm);
  overflow-x:auto; margin:20px 0; font-size:13.5px; line-height:1.6;
}
/* TOP/MID/BOT AD in post */
.af-post-ad-top, .af-post-ad-mid, .af-post-ad-bot { margin:24px 0; }

/* SHARE BAR */
.af-share { display:flex; align-items:center; gap:10px; margin:28px 0; flex-wrap:wrap; }
.af-share-label { font-size:13px; font-weight:700; color:var(--text3); }
.af-share-btn {
  padding:8px 16px; border-radius:var(--radius-pill); font-size:12.5px; font-weight:700;
  border:none; cursor:pointer; transition:var(--transition); display:flex; align-items:center; gap:6px;
}
.af-share-tw { background:#000; color:#fff; }
.af-share-fb { background:#1877f2; color:#fff; }
.af-share-wa { background:#25d366; color:#fff; }
.af-share-li { background:#0077b5; color:#fff; }
.af-share-cp { background:var(--surface2); color:var(--text2); border:1px solid var(--card-border); }

/* RELATED POSTS */
.af-related { margin:32px 0; }
.af-related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.af-comments { margin-top:36px; }
.af-comments-title { font-size:18px; font-weight:800; margin-bottom:20px; }
.af-comment-item {
  display:flex; gap:12px; padding:16px 0; border-bottom:1px solid var(--border);
}
.af-comment-av { width:38px; height:38px; border-radius:50%; overflow:hidden; flex-shrink:0; }
.af-comment-av img { width:100%; height:100%; object-fit:cover; }
.af-comment-author { font-size:13.5px; font-weight:700; color:var(--text); }
.af-comment-date   { font-size:11px; color:var(--text3); margin-bottom:6px; }
.af-comment-text   { font-size:13.5px; color:var(--text2); line-height:1.6; }
.af-comment-form { margin-top:24px; }
.af-comment-form h3 { font-size:16px; font-weight:800; margin-bottom:14px; }
.af-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.af-form-field {
  padding:11px 14px; border-radius:10px; border:1px solid var(--card-border);
  background:var(--surface2); backdrop-filter:blur(8px); color:var(--text);
  font-size:13.5px; font-family:inherit; outline:none; width:100%; transition:var(--transition);
}
.af-form-field:focus { border-color:rgba(26,122,74,.4); box-shadow:0 0 0 3px rgba(26,122,74,.10); }
.af-form-field::placeholder { color:var(--text3); }
textarea.af-form-field { height:110px; resize:vertical; margin-bottom:12px; }
.af-form-submit {
  background:linear-gradient(135deg,var(--green),var(--green-mid));
  color:#fff; border:none; padding:11px 28px; border-radius:var(--radius-pill);
  font-size:14px; font-weight:700; transition:var(--transition);
  box-shadow:0 3px 12px rgba(26,122,74,.30);
}
.af-form-submit:hover { transform:translateY(-1px); box-shadow:0 5px 18px rgba(26,122,74,.40); }
/* Disqus */
#disqus_thread { margin-top:24px; }

/* ============================================================
   ARCHIVE / SEARCH / CATEGORY
   ============================================================ */
.af-archive-header {
  background:linear-gradient(135deg,var(--navy),var(--green));
  border-radius:var(--radius); padding:28px 24px; margin-bottom:24px; color:#fff;
}
.af-archive-header h1 { font-size:24px; font-weight:900; margin-bottom:6px; }
.af-archive-header p { font-size:13px; color:rgba(255,255,255,.75); }

/* ============================================================
   PAGINATION
   ============================================================ */
.af-pagination { display:flex; justify-content:center; gap:6px; margin:28px 0; flex-wrap:wrap; }
.af-page-link, .af-page-current {
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border-radius:var(--radius-sm); font-size:13.5px; font-weight:700; transition:var(--transition);
}
.af-page-link {
  background:var(--surface2); border:1px solid var(--card-border); color:var(--text2);
}
.af-page-link:hover { background:var(--green); color:#fff; border-color:var(--green); opacity:1; }
.af-page-current { background:var(--green); color:#fff; border:1px solid var(--green); }
.af-page-prev, .af-page-next { width:auto; padding:0 14px; }

/* ============================================================
   404 PAGE
   ============================================================ */
.af-404 { text-align:center; padding:60px 20px; }
.af-404-num { font-size:120px; font-weight:900; color:var(--green); opacity:.15; line-height:1; margin-bottom:-20px; }
.af-404-title { font-size:28px; font-weight:900; margin-bottom:10px; }
.af-404-text  { font-size:15px; color:var(--text2); margin-bottom:24px; }
.af-404-random { margin-top:40px; }

/* ============================================================
   SHORTCODES
   ============================================================ */
/* TABS */
.af-tabs-nav { display:flex; gap:4px; margin-bottom:16px; border-bottom:2px solid var(--border); }
.af-tab-btn {
  padding:8px 16px; border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  font-size:13px; font-weight:600; background:none; border:none; color:var(--text3);
  cursor:pointer; transition:var(--transition); margin-bottom:-2px;
}
.af-tab-btn.active { color:var(--green); border-bottom:2px solid var(--green); }
.af-tab-panel { display:none; }
.af-tab-panel.active { display:block; }
/* ACCORDION */
.af-accordion-item { border:1px solid var(--card-border); border-radius:var(--radius-sm); margin-bottom:8px; overflow:hidden; }
.af-accordion-head {
  display:flex; justify-content:space-between; align-items:center;
  padding:13px 16px; cursor:pointer; font-size:14px; font-weight:700;
  background:var(--surface2); transition:var(--transition);
}
.af-accordion-head:hover { background:rgba(26,122,74,.08); }
.af-accordion-arrow { transition:transform .2s; }
.af-accordion-item.open .af-accordion-arrow { transform:rotate(180deg); }
.af-accordion-body { display:none; padding:14px 16px; font-size:14px; color:var(--text2); line-height:1.6; border-top:1px solid var(--border); }
.af-accordion-item.open .af-accordion-body { display:block; }
/* ALERTS */
.af-alert { padding:13px 16px; border-radius:var(--radius-sm); font-size:14px; margin-bottom:14px; border-left:4px solid; }
.af-alert-info    { background:rgba(26,110,255,.08); border-color:#1a6eff; color:#0a3a8a; }
.af-alert-success { background:var(--up-bg); border-color:var(--green); color:var(--green); }
.af-alert-warning { background:rgba(201,162,39,.12); border-color:var(--gold); color:#7a5a00; }
.af-alert-danger  { background:var(--down-bg); border-color:var(--down); color:var(--down); }

/* ============================================================
   FOOTER
   ============================================================ */
#af-footer {
  background:linear-gradient(180deg,var(--navy) 0%,#050d08 100%);
  position:relative; overflow:hidden; margin-top:52px;
}
#af-footer::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,var(--green),var(--gold),var(--green),transparent);
}
.af-footer-top {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:32px;
  padding:44px 0 32px;
}
.af-footer-logo { font-size:22px; font-weight:900; color:#fff; display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.af-footer-logo span { color:var(--green-light); }
.af-footer-desc { font-size:13px; color:rgba(255,255,255,.50); line-height:1.7; margin-bottom:18px; }
.af-socials { display:flex; gap:8px; }
.af-soc {
  width:36px; height:36px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12); color:rgba(255,255,255,.7);
  font-size:15px; transition:var(--transition); text-decoration:none;
}
.af-soc:hover { background:var(--green); color:#fff; border-color:var(--green); opacity:1; }
.af-footer-col h4 { font-size:11.5px; font-weight:800; color:rgba(255,255,255,.85); margin-bottom:14px; text-transform:uppercase; letter-spacing:.8px; }
.af-footer-col ul li { margin-bottom:9px; }
.af-footer-col ul li a { font-size:13px; color:rgba(255,255,255,.50); transition:var(--transition); }
.af-footer-col ul li a:hover { color:var(--green-light); opacity:1; }
.af-footer-bottom {
  border-top:1px solid rgba(255,255,255,.07); padding:16px 0;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
}
.af-footer-bottom p { font-size:12px; color:rgba(255,255,255,.35); }
.af-disclaimer { font-size:11px; color:rgba(255,255,255,.25); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1024px) {
  .af-hero-grid { grid-template-columns:1fr; }
  .af-hero-side { flex-direction:row; overflow-x:auto; gap:12px; }
  .af-hero-side-card { min-width:260px; }
  .af-grid-main { grid-template-columns:1fr; }
  .af-sidebar { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  .af-widget-sticky { position:static; }
  .af-footer-top { grid-template-columns:1fr 1fr; }
  .af-related-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width:768px) {
  #af-nav { display:none; }
  .af-hamburger { display:flex; }
  .af-search-wrap { display:none; }
  .af-header-inner { gap:12px; }
  .af-logo-text { font-size:18px; }

  .af-hero-main { min-height:320px; padding:20px; }
  .af-hero-main h2 { font-size:20px; }
  .af-hero-pills { display:none; }

  .af-post-grid { grid-template-columns:1fr; }
  .af-post-wide { grid-template-columns:1fr; }
  .af-post-wide .af-post-thumb { height:180px; }

  .af-sidebar { grid-template-columns:1fr; }

  .af-footer-top { grid-template-columns:1fr; gap:20px; }
  .af-footer-bottom { flex-direction:column; text-align:center; }

  .af-single-title { font-size:22px; }
  .af-related-grid { grid-template-columns:1fr; }
  .af-form-row { grid-template-columns:1fr; }

  .af-topbar-links { display:none; }
  .af-topbar-inner { justify-content:flex-start; }
}

@media (max-width:480px) {
  .af-container { padding:0 14px; }
  .af-hero-main h2 { font-size:17px; }
  .af-hero-main { min-height:260px; padding:16px; }
  .af-hero-side { display:none; }
  .af-filter-tabs { gap:4px; }
  .af-filter-tab { font-size:11.5px; padding:5px 10px; }
  .af-section-title { font-size:14px; }
  .af-404-num { font-size:80px; }
}

/* RTL SUPPORT */
[dir="rtl"] .af-section-bar { order:-1; }
[dir="rtl"] .af-post-wide { direction:rtl; }
[dir="rtl"] .af-entry-content blockquote { border-left:none; border-right:4px solid var(--green); }
[dir="rtl"] #af-nav { flex-direction:row-reverse; }
[dir="rtl"] .af-footer-top { direction:rtl; }
