/* ============================================================
   FOMLAR THEME — MAIN STYLESHEET
   Target: Arabic RTL magazine, WordPress 6.4+
   ============================================================ */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  --ink:            #2C2C2A;
  --ink-soft:       #3A3A37;
  --paper:          #FFFFFF;
  --paper-warm:     #FAFAF7;
  --paper-warm2:    #F4F2EC;
  --red:            #A8191D;
  --red-deep:       #8C1418;
  --gold:           #B89668;
  --muted:          #6B6863;
  --line:           #E8E4DA;
  --line-dark:      #3A3A37;
  --px:             64px;
  --body-size:      16px;
  --heading-weight: 700;

  /* ── Type scale — change these to resize text across the site ── */
  --nav-size:             15px;  /* header navigation links */
  --filter-size:          12px;  /* category filter pills (homepage, posts page) */
  --card-title-size:      17px;  /* post card titles */
  --section-heading-size: 30px;  /* section sub-headings (قراءات حديثة, etc.) */
}

/* ---------- RESET / BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { direction: rtl; scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: var(--body-size); line-height: 1.6;
  color: var(--ink); background: var(--paper);
  direction: rtl;
}
h1,h2,h3,h4,h5,h6 { font-weight: var(--heading-weight); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1,h2,h3,h4,h5,h6 { margin: 0; }
p { margin: 0; }
button { cursor: pointer; border: none; background: none; font-family: inherit; padding: 0; }
input, textarea, select { font-family: inherit; }

/* ---------- UTILITY STRIP ---------- */
.fomlar-utility-strip {
  background: var(--ink); color: #CFC9BE;
  padding: 8px var(--px); font-size: 12px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line-dark);
}
.fomlar-utility-strip__right { display: flex; gap: 18px; align-items: center; }
.fomlar-utility-strip__left  { display: flex; gap: 14px; align-items: center; }
.fomlar-utility-strip a { color: #CFC9BE; }
.fomlar-utility-strip a:hover { color: #F4E9D1; }
.fomlar-utility-strip__divider { color: #6B6863; }
.fomlar-utility-strip__lang-active { color: var(--gold); }
.fomlar-utility-strip a.lang-inactive { color: #9B958A; }

/* ---------- SITE HEADER ---------- */
.fomlar-header { background: var(--ink); color: #EDE9DF; position: relative; z-index: 100; }
.fomlar-header__inner {
  padding: 20px var(--px);
  display: flex; align-items: center; justify-content: space-between;
}
.fomlar-header__logo a,
.fomlar-header__logo { display: flex; align-items: center; }
.fomlar-header__logo img,
.fomlar-header__logo .custom-logo {
  height: 86px; width: auto; filter: brightness(1.05); display: block;
}
/* Sticky header */
.has-sticky-header .fomlar-header {
  position: sticky; top: 0; z-index: 200;
}

.fomlar-header__nav { display: flex; align-items: center; gap: 28px; font-size: var(--nav-size); }

/* Direct links and buttons (categories dropdown button) */
.fomlar-header__nav > a,
.fomlar-header__nav-btn {
  color: #CFC9BE; cursor: pointer;
  padding-bottom: 6px; position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--nav-size); background: none; border: none;
  transition: color .2s; white-space: nowrap;
}
.fomlar-header__nav > a::after,
.fomlar-header__nav-btn::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s ease;
}
.fomlar-header__nav > a:hover,
.fomlar-header__nav-btn:hover { color: #F4E9D1; }
.fomlar-header__nav > a:hover::after,
.fomlar-header__nav-btn:hover::after,
.fomlar-header__nav-btn.is-active::after { width: 100%; }
.fomlar-header__nav-btn.is-active { color: #F4E9D1; }

/* wp_nav_menu() output — <ul class="fomlar-header__nav-list"> */
.fomlar-header__nav-list {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: center; gap: 28px;
  list-style: none; padding: 0; margin: 0;
}
.fomlar-header__nav-list > li { position: relative; list-style: none; display: list-item; }
.fomlar-header__nav-list > li > a {
  color: #CFC9BE; cursor: pointer;
  padding-bottom: 6px; position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--nav-size);
  transition: color .2s;
  white-space: nowrap;
}
.fomlar-header__nav-list > li > a::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s ease;
}
.fomlar-header__nav-list > li > a:hover { color: #F4E9D1; }
.fomlar-header__nav-list > li > a:hover::after { width: 100%; }
.fomlar-header__nav-list > li.current-menu-item > a,
.fomlar-header__nav-list > li.current-menu-ancestor > a,
.fomlar-header__nav-list > li.current_page_parent > a {
  color: #F4E9D1;
}
.fomlar-header__nav-list > li.current-menu-item > a::after,
.fomlar-header__nav-list > li.current-menu-ancestor > a::after,
.fomlar-header__nav-list > li.current_page_parent > a::after,
.fomlar-header__nav-btn.is-active {
  width: 100%; color: #F4E9D1;
}

/* Sub-menu dropdowns — shared base */
.fomlar-header__nav-list .sub-menu {
  position: absolute;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); min-width: 220px;
  padding: 8px 0; box-shadow: 0 18px 40px rgba(0,0,0,.25);
  z-index: 200; display: none; list-style: none;
}

/* Level-1: opens below parent with a 14px visual gap */
.fomlar-header__nav-list > li > .sub-menu {
  top: calc(100% + 14px); right: 0;
}
/* Invisible bridge fills the 14px gap so the mouse doesn't "escape" */
.fomlar-header__nav-list > li > .sub-menu::before {
  content: '';
  position: absolute; top: -16px; right: 0; left: 0; height: 16px;
}

/* Level-2: opens to the side (right → left in RTL layout) */
.fomlar-header__nav-list .sub-menu .sub-menu {
  top: -8px; right: 100%; left: auto; min-width: 200px;
}
/* Side bridge for level-2 */
.fomlar-header__nav-list .sub-menu .sub-menu::before {
  content: '';
  position: absolute; top: 0; bottom: 0; right: -14px; width: 14px; height: auto;
}

/* Show triggers — use > so only the direct child sub-menu appears */
.fomlar-header__nav-list > li:hover > .sub-menu,
.fomlar-header__nav-list > li:focus-within > .sub-menu { display: block; }
.fomlar-header__nav-list .sub-menu li:hover > .sub-menu,
.fomlar-header__nav-list .sub-menu li:focus-within > .sub-menu { display: block; }

/* All sub-menu list items need relative positioning for nested dropdowns */
.fomlar-header__nav-list .sub-menu li { position: relative; }
.fomlar-header__nav-list .sub-menu li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 20px; font-size: 14px; color: var(--ink); border-bottom: none;
}
.fomlar-header__nav-list .sub-menu li a:hover { background: var(--paper-warm); }

/* Arrow inside sub-menu items that have a deeper level */
.fomlar-header__nav-list .sub-menu .menu-item-has-children > a::after {
  content: '←'; font-size: 11px; color: var(--muted); flex-shrink: 0;
}

/* JS-injected dropdown indicator in top-level items */
.nav-dropdown-arrow {
  font-size: 10px; opacity: .65; display: inline-block;
  transition: transform .2s ease; margin-right: 2px;
}
.fomlar-header__nav-list > li.is-dropdown-open > a .nav-dropdown-arrow {
  transform: rotate(-180deg);
}

/* Utility strip nav (wp_nav_menu output) */
.fomlar-utility-strip__nav {
  display: flex; gap: 18px; align-items: center;
  list-style: none; padding: 0; margin: 0;
}
.fomlar-utility-strip__nav li { list-style: none; }
.fomlar-utility-strip__nav a { color: #CFC9BE; }
.fomlar-utility-strip__nav a:hover { color: #F4E9D1; }

/* Dropdown */
.fomlar-header__dropdown-wrap { position: relative; }
.fomlar-header__dropdown {
  position: absolute; top: calc(100% + 16px); right: 0;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); min-width: 280px; padding: 12px 0;
  box-shadow: 0 18px 40px rgba(0,0,0,.25); z-index: 200;
  display: none;
}
.fomlar-header__dropdown.is-open { display: block; }
.fomlar-header__dropdown-title {
  padding: 8px 20px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--red); letter-spacing: 3px; font-weight: 700;
}
.fomlar-header__dropdown a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 20px; font-size: 14px; color: var(--ink);
  border-bottom: none;
}
.fomlar-header__dropdown a:hover { background: var(--paper-warm); }
.fomlar-header__dropdown-count { font-size: 11px; color: var(--muted); }

/* Actions */
.fomlar-header__actions { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #9B958A; }
.fomlar-header__search-btn { color: #9B958A; font-size: 13px; }
.fomlar-header__search-btn:hover { color: #F4E9D1; }
.fomlar-header__join {
  padding: 8px 18px; border: 1px solid var(--gold);
  color: #F4E9D1; font-size: 13px; display: inline-block;
}
.fomlar-header__join:hover { background: rgba(184,150,104,.15); }

/* Search bar */
.fomlar-header__searchbar {
  padding: 16px var(--px) 18px;
  background: #222220; border-top: 1px solid var(--line-dark);
  display: none;
}
.fomlar-header__searchbar.is-open { display: block; }
.fomlar-header__searchbar input[type="search"],
.fomlar-header__searchbar input[type="text"] {
  width: 100%; padding: 14px 18px;
  background: transparent; border: 1px solid var(--gold);
  color: #F4E9D1; font-size: 16px; outline: none; direction: rtl;
}
.fomlar-header__searchbar input::placeholder { color: #6B6863; }
.fomlar-header__rule { height: 2px; background: var(--red); }

/* ---------- BREADCRUMB ---------- */
.fomlar-breadcrumb {
  background: var(--ink); padding: 14px var(--px);
  font-size: 12px; color: #9B958A; letter-spacing: .5px;
  border-bottom: 1px solid var(--line-dark);
}
.fomlar-breadcrumb a { color: #9B958A; }
.fomlar-breadcrumb a:hover { color: #F4E9D1; }
.fomlar-breadcrumb__sep { margin: 0 10px; color: #4A4A47; }
.fomlar-breadcrumb__current { color: var(--gold); }

/* ---------- SIDEBAR HEADING ---------- */
.sidebar-heading { margin-bottom: 18px; }
.sidebar-heading__eyebrow {
  font-size: 10px; font-weight: 700; color: var(--red);
  letter-spacing: 4px; margin-bottom: 8px; text-transform: uppercase;
}
.sidebar-heading__title {
  font-size: 19px; font-weight: 700; margin: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--red);
  color: var(--ink); line-height: 1.3;
}

/* ---------- POST CARD ---------- */
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.08); }
.post-card a { display: flex; flex-direction: column; flex: 1; color: inherit; }
.post-card__thumb {
  height: 170px; position: relative; overflow: hidden; flex-shrink: 0;
}
.post-card--lg .post-card__thumb { height: 220px; }
.post-card__thumb img,
.post-card__thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__cat-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--red); color: #fff;
  font-size: 10px; letter-spacing: 1.5px; padding: 4px 10px;
  font-weight: 600; text-transform: uppercase;
}
.post-card__body {
  padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1;
}
.post-card--lg .post-card__body { padding: 20px 24px 22px; }
.post-card__title {
  font-size: var(--card-title-size); line-height: 1.4; font-weight: 600;
  margin: 0 0 10px; color: var(--ink); text-wrap: pretty;
}
.post-card--lg .post-card__title { font-size: 20px; }
.post-card__excerpt {
  font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__meta {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; font-size: 12px;
}
.post-card__author-meta { display: flex; flex-direction: column; line-height: 1.25; }
.post-card__author-name { color: var(--ink); font-weight: 500; }
.post-card__date { color: var(--muted); font-size: 11px; }
.post-card__read { margin-right: auto; color: var(--red); font-size: 11px; font-weight: 600; }

/* ---------- AVATAR ---------- */
.fomlar-avatar {
  border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 500; flex-shrink: 0; overflow: hidden;
  vertical-align: middle;
}
.fomlar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- SIDEBAR WIDGETS ---------- */
.fomlar-sidebar {
  min-width: 0;
}
.fomlar-sidebar > * + * { margin-top: 8px; }

/* News */
.sidebar-news { margin-bottom: 36px; }
.sidebar-news__item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sidebar-news__item:last-child { border-bottom: none; }
.sidebar-news__date { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 4px; }
.sidebar-news__title { font-size: 14px; color: var(--ink); font-weight: 500; line-height: 1.5; cursor: pointer; }
.sidebar-news__title a { color: var(--ink); }
.sidebar-news__title a:hover { color: var(--red); }

/* Events */
.sidebar-events {
  margin-bottom: 36px; background: var(--paper-warm);
  padding: 22px; border: 1px solid var(--line);
}
.sidebar-events__item {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-events__item:last-child { border-bottom: none; }
.sidebar-events__meta { display: flex; align-items: center; gap: 8px; }
.sidebar-events__kind {
  font-size: 10px; font-weight: 600; color: var(--red);
  letter-spacing: 1.5px; text-transform: uppercase;
  border-right: 2px solid var(--red); padding-right: 8px;
}
.sidebar-events__when { font-size: 11px; color: var(--muted); }
.sidebar-events__title { font-size: 14px; color: var(--ink); font-weight: 500; line-height: 1.45; }
.sidebar-events__title a { color: var(--ink); }
.sidebar-events__title a:hover { color: var(--red); }
.sidebar-events__all {
  display: inline-block; margin-top: 14px;
  font-size: 12px; color: var(--red);
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
  font-weight: 600; letter-spacing: .5px;
}

/* Categories */
.sidebar-categories { margin-bottom: 36px; }
.sidebar-categories__item {
  padding: 10px 0; border-bottom: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--ink); font-weight: 500;
}
.sidebar-categories__item:last-child { border-bottom: none; }
.sidebar-categories__item a { color: var(--ink); flex: 1; }
.sidebar-categories__item a:hover { color: var(--red); }
.sidebar-categories__count {
  font-size: 11px; color: var(--muted); background: var(--paper-warm);
  padding: 2px 8px; border-radius: 999px; min-width: 28px; text-align: center;
}

/* Recent posts */
.sidebar-recent { margin-bottom: 36px; }
.sidebar-recent__item {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 12px;
}
.sidebar-recent__item:last-child { border-bottom: none; }
.sidebar-recent__thumb {
  width: 64px; height: 64px; flex-shrink: 0; overflow: hidden; border-radius: 4px;
}
.sidebar-recent__thumb img,
.sidebar-recent__thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.sidebar-recent__info { min-width: 0; }
.sidebar-recent__title {
  font-size: 13px; color: var(--ink); line-height: 1.4;
  font-weight: 500; display: block; margin-bottom: 4px;
}
.sidebar-recent__title a { color: var(--ink); }
.sidebar-recent__title a:hover { color: var(--red); }
.sidebar-recent__meta { font-size: 11px; color: var(--muted); }

/* Membership CTA */
.sidebar-membership {
  background: var(--ink); color: #F4E9D1;
  padding: 26px 22px 24px; border-top: 2px solid var(--red);
}
.sidebar-membership__eyebrow {
  font-size: 11px; letter-spacing: 3px; color: var(--gold);
  margin-bottom: 10px; font-weight: 600;
}
.sidebar-membership__title { font-size: 19px; font-weight: 600; margin: 0 0 10px; color: #fff; }
.sidebar-membership__text { font-size: 13px; line-height: 1.7; color: #CFC9BE; margin: 0 0 16px; }
.sidebar-membership__btn {
  display: inline-block; padding: 9px 20px;
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 500; letter-spacing: .5px;
}
.sidebar-membership__btn:hover { background: var(--red-deep); color: #fff; }

/* Google Calendar Widget */
.sidebar-gcal { margin-bottom: 36px; }
.sidebar-gcal__list { list-style: none; margin: 0; padding: 0; }
.sidebar-gcal__item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.sidebar-gcal__item:last-child { border-bottom: none; }
.sidebar-gcal__date-chip {
  flex-shrink: 0; width: 44px; text-align: center;
  background: var(--red); color: #fff;
  padding: 7px 4px 8px; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center;
  line-height: 1;
}
.sidebar-gcal__day   { font-size: 20px; font-weight: 700; }
.sidebar-gcal__month { font-size: 10px; font-weight: 600; margin-top: 3px; letter-spacing: .5px; text-transform: uppercase; opacity: .88; }
.sidebar-gcal__info  { min-width: 0; flex: 1; }
.sidebar-gcal__title { font-size: 13px; color: var(--ink); font-weight: 500; line-height: 1.45; margin-bottom: 4px; }
.sidebar-gcal__title a { color: var(--ink); transition: color .15s; }
.sidebar-gcal__title a:hover { color: var(--red); }
.sidebar-gcal__meta  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sidebar-gcal__time  { font-size: 11px; color: var(--muted); }
.sidebar-gcal__sep   { font-size: 11px; color: var(--line); }
.sidebar-gcal__loc   { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.sidebar-gcal__more  {
  display: inline-block; margin-top: 14px;
  font-size: 12px; color: var(--red);
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
  font-weight: 600; letter-spacing: .5px; transition: color .15s;
}
.sidebar-gcal__more:hover { color: var(--red-deep); }
.sidebar-gcal__empty { text-align: center; padding: 20px 0; font-size: 13px; color: var(--muted); }
.sidebar-gcal__loading { display: flex; gap: 6px; justify-content: center; padding: 28px 0; }
.sidebar-gcal__loading span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  animation: gcal-bounce 1.2s infinite ease-in-out;
}
.sidebar-gcal__loading span:nth-child(2) { animation-delay: .2s; }
.sidebar-gcal__loading span:nth-child(3) { animation-delay: .4s; }
@keyframes gcal-bounce {
  0%, 80%, 100% { transform: scale(.55); opacity: .35; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ---------- HOMEPAGE HERO ---------- */
.fomlar-hero {
  background: var(--ink); color: #F4E9D1;
  padding: 84px var(--px) 96px; text-align: center;
  position: relative; overflow: hidden;
}
.fomlar-hero__backdrop {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 520px; font-weight: 700; color: #34342F;
  opacity: .55; line-height: 1; pointer-events: none; user-select: none;
}
.fomlar-hero.has-bg-image .fomlar-hero__backdrop { opacity: .08; }
.fomlar-hero__inner { position: relative; max-width: 980px; margin: 0 auto; }
.fomlar-hero__eyebrow {
  font-size: 12px; letter-spacing: 6px; color: var(--gold);
  margin-bottom: 22px; text-transform: uppercase;
}
.fomlar-hero__title {
  font-size: 64px; font-weight: 700; margin: 0 0 22px;
  line-height: 1.15; text-wrap: balance;
}
.fomlar-hero__sub {
  font-size: 22px; line-height: 1.75; max-width: 760px;
  margin: 0 auto; color: #D4CFC2; font-weight: 400;
}
.fomlar-hero__sub strong { color: #F4E9D1; font-weight: 400; }
.fomlar-hero__accent {
  margin-top: 44px; display: flex; justify-content: center; align-items: center;
}
.fomlar-hero__accent-line { width: 100px; height: 1px; background: var(--gold); opacity: .7; }
.fomlar-hero__accent-diamond {
  width: 8px; height: 8px; transform: rotate(45deg);
  background: var(--red); margin: 0 14px;
}
.fomlar-hero__btns {
  margin-top: 40px; display: flex; justify-content: center; gap: 14px;
}
.fomlar-hero__btn-primary {
  padding: 12px 30px; background: var(--red); color: #fff;
  font-size: 14px; letter-spacing: .5px; font-weight: 500;
}
.fomlar-hero__btn-primary:hover { background: var(--red-deep); color: #fff; }
.fomlar-hero__btn-secondary {
  padding: 12px 30px; color: #F4E9D1;
  font-size: 14px; letter-spacing: .5px; border: 1px solid #4A4A47;
}
.fomlar-hero__btn-secondary:hover { border-color: var(--gold); color: #F4E9D1; }

/* ---------- AUTHORS MARQUEE ---------- */
.fomlar-marquee {
  background: var(--paper-warm); padding: 56px 0 60px;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.fomlar-marquee__header {
  padding: 0 var(--px); display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 32px;
}
.fomlar-marquee__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--red); margin-bottom: 6px; font-weight: 600;
}
.fomlar-marquee__title { font-size: 28px; font-weight: 600; margin: 0; color: var(--ink); }
.fomlar-marquee__link {
  font-size: 13px; color: var(--red);
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
}
.fomlar-marquee__link:hover { color: var(--red-deep); }
.fomlar-marquee__mask {
  position: relative; width: 100%;
  overflow: hidden; /* contains the width:max-content animated track — prevents iOS horizontal scroll */
  -webkit-mask-image: linear-gradient(to right,transparent,black 6%,black 94%,transparent);
  mask-image: linear-gradient(to right,transparent,black 6%,black 94%,transparent);
}
.fomlar-marquee__track {
  display: flex; gap: 56px;
  animation: fomlar-marquee 70s linear infinite;
  width: max-content;
}
.fomlar-marquee__track:hover { animation-play-state: paused; }
.fomlar-marquee__author {
  display: flex; flex-direction: column; align-items: center;
  width: 126px; flex-shrink: 0; text-decoration: none; color: inherit;
}
.fomlar-marquee__author:hover .fomlar-marquee__author-name { color: var(--red); }
/* Override global circle shape — use rounded square (app-icon style) in the marquee */
.fomlar-marquee__author .fomlar-avatar {
  border-radius: 21px;
  box-shadow: 0 3px 10px rgba(0,0,0,.13);
  transition: transform .2s, box-shadow .2s;
}
.fomlar-marquee__author:hover .fomlar-avatar {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.fomlar-marquee__author-name {
  font-size: 14px; margin-top: 10px; color: var(--ink);
  text-align: center; line-height: 1.3; font-weight: 500; transition: color .15s;
}
.fomlar-marquee__author-count { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .5px; }

@keyframes fomlar-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

/* ---------- POSTS SECTION (homepage) ---------- */
.fomlar-posts-section { padding: 64px var(--px) 80px; background: var(--paper); }
.fomlar-posts-section__layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 56px;
  max-width: 1280px; margin: 0 auto;
}
.fomlar-posts-section__header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px;
}
.fomlar-posts-section__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--red); margin-bottom: 6px; font-weight: 600;
}
.fomlar-posts-section__title { font-size: var(--section-heading-size); font-weight: 600; margin: 0; }
.fomlar-posts-section__filter { display: flex; gap: 22px; font-size: 13px; color: var(--muted); }
.fomlar-posts-section__filter-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--muted); padding: 0 0 4px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.fomlar-posts-section__filter-btn:hover { color: var(--ink); }
.fomlar-posts-section__filter-active {
  color: var(--ink) !important; border-bottom-color: var(--red) !important; font-weight: 500;
}
.fomlar-posts-section__grid--loading { opacity: .45; pointer-events: none; transition: opacity .2s; }
.fomlar-posts-section__rule { height: 1px; background: var(--red); opacity: .4; margin: 20px 0 20px; }

/* Category filter pills */
.fomlar-posts-section__cat-filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px;
}
.fomlar-posts-section__cat-btn {
  background: none; border: 1px solid var(--line); cursor: pointer;
  font-family: inherit; font-size: var(--filter-size); color: var(--ink);
  padding: 5px 14px; border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.fomlar-posts-section__cat-btn:hover { border-color: var(--red); color: var(--red); }
.fomlar-posts-section__cat-btn--active {
  background: var(--ink); color: #fff !important; border-color: var(--ink);
}
.fomlar-posts-section__grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 24px;
}
/* Wrapper used by the all-posts page template for JS category filtering — acts as the grid cell */
.fomlar-posts-section__card-wrap { display: flex; flex-direction: column; }
.fomlar-posts-section__more { margin-top: 40px; text-align: center; }
.fomlar-posts-section__more a {
  display: inline-block; padding: 12px 32px;
  border: 1px solid var(--ink); color: var(--ink);
  font-size: 13px; letter-spacing: 1px; font-weight: 500;
}
.fomlar-posts-section__more a:hover { background: var(--ink); color: var(--paper); }

/* ---------- SEMINARS SECTION ---------- */
.fomlar-seminars { background: #111110; padding: 48px var(--px) 52px; color: #f0ede6; }
.fomlar-seminars__inner { max-width: 1280px; margin: 0 auto; }
.fomlar-seminars__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px; gap: 16px;
}
.fomlar-seminars__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--gold);
  margin-bottom: 8px; font-weight: 700;
}
.fomlar-seminars__title { font-size: 34px; font-weight: 700; margin: 0; color: #f4ead1; line-height: 1.1; }
.fomlar-seminars__yt-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gold);
  border: 1px solid rgba(184,150,104,.3); padding: 8px 18px;
  border-radius: 999px; font-weight: 600;
  transition: border-color .2s, background .2s; white-space: nowrap; flex-shrink: 0;
}
.fomlar-seminars__yt-link:hover { background: rgba(184,150,104,.1); border-color: var(--gold); }

/* Stage — player (right, 1fr) | playlist (left, 260px) in RTL */
.fomlar-seminars__stage {
  display: grid; grid-template-columns: 1fr 260px;
  align-items: stretch;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,.6);
}

/* ── Player wrap (right column in RTL) ── */
.fomlar-seminars__player-wrap {
  background: #0c0c0b; display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.05);
}
.fomlar-seminars__player {
  aspect-ratio: 16 / 9; flex: none; width: 100%;
  position: relative; overflow: hidden; background: #000;
}
.fomlar-seminars__facade {
  position: absolute; inset: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.fomlar-seminars__facade img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform .35s ease;
}
.fomlar-seminars__facade:hover img { transform: scale(1.03); }
.fomlar-seminars__facade-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(0,0,0,.75) 0%,rgba(0,0,0,.15) 55%,transparent 100%);
  pointer-events: none;
}
/* Circular play button with backdrop blur */
.fomlar-seminars__play-btn {
  position: relative; z-index: 2;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(168,25,29,.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: transform .22s ease, box-shadow .22s;
  box-shadow: 0 0 0 0 rgba(168,25,29,.35); pointer-events: none;
}
.fomlar-seminars__facade:hover .fomlar-seminars__play-btn {
  transform: scale(1.1);
  box-shadow: 0 0 0 12px rgba(168,25,29,.12);
}
.fomlar-seminars__play-icon {
  width: 0; height: 0;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  border-left: 17px solid #fff; margin-left: 4px;
}
.fomlar-seminars__iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
/* Meta bar */
.fomlar-seminars__player-meta {
  padding: 12px 16px 16px; flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.fomlar-seminars__player-counter {
  font-size: 10px; color: rgba(255,255,255,.3);
  letter-spacing: 1px; margin-bottom: 6px; font-family: ui-monospace, monospace;
}
.fomlar-seminars__player-meta-title {
  font-size: 14px; font-weight: 600; color: #f4ead1; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 6px;
}
.fomlar-seminars__player-meta-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,.4);
}
.fomlar-seminars__player-meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,.3); flex-shrink: 0;
}

/* ── Playlist (left column in RTL) ── */
.fomlar-seminars__playlist {
  background: #1a1a17; display: flex; flex-direction: column; overflow: hidden;
}
.fomlar-seminars__playlist-head {
  padding: 14px 14px 12px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.fomlar-seminars__playlist-eyebrow {
  font-size: 9px; letter-spacing: 3px; color: var(--red); font-weight: 700; margin-bottom: 4px;
}
.fomlar-seminars__playlist-head-title {
  font-size: 13px; font-weight: 600; color: #f0ede6; margin-bottom: 8px;
}
.fomlar-seminars__playlist-count {
  display: inline-flex; align-items: center;
  background: rgba(168,25,29,.15); color: var(--red);
  border: 1px solid rgba(168,25,29,.25); font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px;
}
.fomlar-seminars__playlist-scroll {
  flex: 1;
  max-height: 434px; /* ~7 tracks visible; scrolls for more */
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
.fomlar-seminars__playlist-scroll::-webkit-scrollbar { width: 4px; }
.fomlar-seminars__playlist-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12); border-radius: 2px;
}

/* Track item */
.fomlar-seminars__track {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 8px; cursor: pointer;
  border-right: 3px solid transparent; transition: background .15s;
}
.fomlar-seminars__track:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,.04); }
.fomlar-seminars__track:hover { background: rgba(255,255,255,.04); }
.fomlar-seminars__track.is-active {
  background: rgba(168,25,29,.08); border-right-color: var(--red);
}
.fomlar-seminars__track-num {
  font-size: 11px; color: rgba(255,255,255,.2); font-weight: 700;
  min-width: 20px; text-align: center; flex-shrink: 0; font-family: ui-monospace, monospace;
}
.fomlar-seminars__track.is-active .fomlar-seminars__track-num { color: var(--red); }

/* Thumbnail */
.fomlar-seminars__track-thumb {
  width: 76px; height: 44px; flex-shrink: 0;
  position: relative; border-radius: 4px; overflow: hidden; background: #000;
}
.fomlar-seminars__track-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Overlay (hover / active / playing) */
.fomlar-seminars__track-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); opacity: 0; transition: opacity .15s;
}
.fomlar-seminars__track:hover .fomlar-seminars__track-overlay,
.fomlar-seminars__track.is-active .fomlar-seminars__track-overlay { opacity: 1; }
.fomlar-seminars__track.is-active .fomlar-seminars__track-overlay { background: rgba(168,25,29,.25); }
/* Animated equalizer (is-playing) */
.fomlar-seminars__track-bars {
  display: none; align-items: flex-end; gap: 2.5px; height: 16px;
}
.fomlar-seminars__track-bars span {
  display: block; width: 3px; background: #fff; border-radius: 1px;
  animation: sm-bar .75s ease-in-out infinite;
}
.fomlar-seminars__track-bars span:nth-child(2) { animation-delay: .18s; }
.fomlar-seminars__track-bars span:nth-child(3) { animation-delay: .36s; }
@keyframes sm-bar {
  0%, 100% { height: 4px; }
  50%       { height: 14px; }
}
.fomlar-seminars__track.is-playing .fomlar-seminars__track-overlay {
  opacity: 1; background: rgba(168,25,29,.3);
}
.fomlar-seminars__track.is-playing .fomlar-seminars__track-bars { display: flex; }
/* Static play triangle */
.fomlar-seminars__track-play-tri {
  width: 0; height: 0;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  border-left: 12px solid #fff; margin-left: 2px;
}
.fomlar-seminars__track.is-playing .fomlar-seminars__track-play-tri { display: none; }
/* Duration badge */
.fomlar-seminars__track-duration {
  position: absolute; bottom: 3px; left: 4px;
  background: rgba(0,0,0,.85); color: #fff;
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  font-family: ui-monospace, monospace; z-index: 3;
}
/* Track text */
.fomlar-seminars__track-info { min-width: 0; flex: 1; }
.fomlar-seminars__track-title {
  font-size: 11px; font-weight: 500; color: rgba(240,237,230,.7); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 2px;
}
.fomlar-seminars__track.is-active .fomlar-seminars__track-title { color: #f4ead1; }
.fomlar-seminars__track-meta { font-size: 9px; color: rgba(255,255,255,.3); }

/* Responsive */
@media (max-width: 700px) {
  .fomlar-seminars__stage { grid-template-columns: 1fr; min-height: 0; }
  .fomlar-seminars__player-wrap { order: -1; }
  .fomlar-seminars__player { min-height: 0; aspect-ratio: 16/9; flex: none; }
  .fomlar-seminars__playlist { max-height: 280px; }
  .fomlar-seminars__player-wrap { border-left: none; border-bottom: 1px solid rgba(255,255,255,.05); }
}
@media (max-width: 440px) {
  .fomlar-seminars__stage { border-radius: 8px; }
  .fomlar-seminars__track-thumb { width: 60px; height: 36px; }
  .fomlar-seminars__player-meta-title { font-size: 13px; }
  .fomlar-seminars__track-num { display: none; }
}

/* ---------- FOOTER ---------- */
.fomlar-footer {
  background: var(--ink); color: #9B958A;
  padding: 52px var(--px) 26px; border-top: 1px solid var(--red);
}
.fomlar-footer__main {
  display: flex; align-items: flex-start; gap: 40px; margin-bottom: 40px;
}
.fomlar-footer__logo { height: 70px; width: auto; filter: brightness(1.1); flex-shrink: 0; }
.fomlar-footer__tagline {
  font-size: 14px; line-height: 1.8; margin: 0; color: #CFC9BE;
  align-self: center; flex: 1; white-space: nowrap;
}
.fomlar-footer__bottom {
  padding-top: 20px; border-top: 1px solid #3A3A37;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 11px; color: #6B6863; letter-spacing: .5px;
}

/* ---------- ARTICLE PAGE ---------- */
.fomlar-article-hero {
  background: var(--ink); color: #F4E9D1;
  padding: 56px var(--px); position: relative; overflow: hidden;
}
.fomlar-article-hero__inner { max-width: 820px; margin: 0 auto; text-align: center; position: relative; }
.fomlar-article-hero__cat {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 11px; letter-spacing: 2px; padding: 5px 14px;
  font-weight: 600; text-transform: uppercase; margin-bottom: 22px;
}
.fomlar-article-hero__cat:hover { background: var(--red-deep); color: #fff; }
.fomlar-article-hero__title {
  font-size: 44px; font-weight: 700; margin: 0 0 22px;
  line-height: 1.25; text-wrap: balance;
}
.fomlar-article-hero__excerpt {
  font-size: 19px; line-height: 1.7; color: #CFC9BE;
  max-width: 720px; margin: 0 auto 28px; text-wrap: pretty;
}
.fomlar-article-hero__meta {
  display: inline-flex; align-items: center; gap: 16px;
  padding-top: 24px; border-top: 1px solid #3A3A37; margin-top: 20px;
}
.fomlar-article-hero__meta-author {
  display: inline-flex; align-items: center; gap: 10px;
}
.fomlar-article-hero__meta-author:hover .fomlar-article-hero__meta-name { color: var(--gold); }
.fomlar-article-hero__meta-name { font-size: 14px; color: #F4E9D1; font-weight: 500; }
.fomlar-article-hero__meta-sep { width: 1px; height: 18px; background: #3A3A37; }
.fomlar-article-hero__meta-date,
.fomlar-article-hero__meta-time { font-size: 13px; color: #9B958A; }

/* Article cover */
.fomlar-article-cover { background: var(--paper-warm); padding: 0 var(--px); }
.fomlar-article-cover__img {
  max-width: 1080px; margin: 0 auto; margin-top: -36px;
  height: 360px; position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.fomlar-article-cover__img img,
.fomlar-article-cover__img .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }

/* Article layout */
.fomlar-article-body { background: var(--paper); padding: 56px var(--px); }
.fomlar-article-body__layout {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 56px; max-width: 1280px; margin: 0 auto;
}
.fomlar-article-content { min-width: 0; }
.fomlar-article-content__toolbar {
  padding: 0 0 22px; border-bottom: 1px solid var(--red); margin-bottom: 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.fomlar-article-content__label { font-size: 11px; color: var(--red); letter-spacing: 3px; }
.fomlar-article-content__actions { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); }
.article-toolbar-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--muted); padding: 0;
  transition: color .15s;
}
.article-toolbar-btn:hover { color: var(--ink); }
.article-toolbar-btn--bold { font-weight: 700; color: var(--ink); }
.fomlar-article-content__body p {
  font-size: 18px; line-height: 2; color: #1f1f1d;
  margin: 0 0 22px; text-wrap: pretty; text-align: justify;
}
.fomlar-article-content__body .drop-cap::first-letter {
  float: right; font-size: 64px; line-height: .9;
  margin-left: 14px; margin-top: 6px; color: var(--red); font-weight: 700;
}
.fomlar-article-content__pullquote {
  margin: 40px 0; padding: 28px 28px 28px 0;
  border-right: 3px solid var(--red); background: var(--paper-warm);
  font-size: 22px; line-height: 1.7; color: var(--ink);
  font-style: italic; font-weight: 500; text-wrap: pretty;
}
.fomlar-article-content__pullquote-source {
  font-style: normal; font-size: 13px; color: var(--muted); margin-top: 12px; letter-spacing: 1px;
}

/* Tags */
.fomlar-article-tags {
  padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.fomlar-article-tags__label {
  font-size: 11px; color: var(--muted); letter-spacing: 2px; font-weight: 700; margin-left: 4px;
}
.fomlar-article-tags__tag {
  font-size: 13px; padding: 4px 12px;
  border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; text-decoration: none;
}
.fomlar-article-tags__tag:hover { background: var(--paper-warm); color: var(--ink); }

/* Author bio card */
.fomlar-author-bio-card {
  background: var(--paper-warm); padding: 24px;
  border: 1px solid var(--line); border-radius: 8px;
  display: flex; gap: 20px; align-items: center; margin-bottom: 40px;
  text-decoration: none; color: inherit;
}
.fomlar-author-bio-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.fomlar-author-bio-card__info { flex: 1; min-width: 0; }
.fomlar-author-bio-card__eyebrow {
  font-size: 10px; font-weight: 700; color: var(--red);
  letter-spacing: 3px; margin-bottom: 6px;
}
.fomlar-author-bio-card__name { font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.fomlar-author-bio-card__role { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.fomlar-author-bio-card__bio { font-size: 14px; line-height: 1.7; color: #3a3a37; margin: 0; }
.fomlar-author-bio-card__btn {
  padding: 10px 18px; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}

/* Article sidebar */
.fomlar-article-sidebar { min-width: 0; }
.fomlar-article-sidebar__sticky { position: sticky; top: 24px; }
.fomlar-article-sidebar__toc {
  padding: 20px; border: 1px solid var(--line);
  background: var(--paper-warm); margin-bottom: 28px;
}
.fomlar-article-sidebar__toc-list {
  font-size: 13px; display: flex; flex-direction: column; gap: 8px; margin-top: 14px;
}
.fomlar-article-sidebar__toc-list li { color: var(--muted); cursor: pointer; padding-right: 8px; }
.fomlar-article-sidebar__toc-list li:hover { color: var(--ink); }
.fomlar-article-sidebar__toc-list li.is-active {
  color: var(--ink); font-weight: 600; border-right: 2px solid var(--red);
}

/* Related in sidebar */
.sidebar-related__item {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 10px;
}
.sidebar-related__item:last-child { border-bottom: none; }
.sidebar-related__item a { display: flex; gap: 10px; color: inherit; }
.sidebar-related__item a:hover .sidebar-related__title { color: var(--red); }
.sidebar-related__thumb { width: 56px; height: 56px; flex-shrink: 0; overflow: hidden; border-radius: 4px; }
.sidebar-related__thumb img,
.sidebar-related__thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.sidebar-related__title { font-size: 13px; color: var(--ink); line-height: 1.4; font-weight: 500; display: block; margin-bottom: 4px; transition: color .15s; }
.sidebar-related__date { font-size: 11px; color: var(--muted); }

/* Comments */
.fomlar-comments { margin-top: 40px; }
.comment-body-wrap { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.comment-time { font-size: 11px; color: var(--muted); }
.comment-text p { font-size: 15px; line-height: 1.7; color: #3a3a37; }
.comment-reply-link { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--red); font-weight: 600; }
.fomlar-comments__form { margin-top: 18px; }
.fomlar-comments__form textarea {
  width: 100%; padding: 12px 14px; min-height: 90px;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; resize: vertical; direction: rtl; outline: none;
}
.fomlar-comments__form textarea:focus { border-color: var(--gold); }
.fomlar-comments__form-submit { margin-top: 10px; text-align: left; }
.fomlar-comments__submit-btn {
  padding: 10px 22px; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600; border: none; cursor: pointer;
}
.fomlar-comments__submit-btn:hover { background: var(--red-deep); }

/* ---------- CATEGORY PAGE ---------- */
.fomlar-cat-hero {
  background: var(--ink); color: #F4E9D1;
  padding: 60px var(--px) 64px; position: relative; overflow: hidden;
}
.fomlar-cat-hero__backdrop {
  position: absolute; top: 50%; left: 80px; transform: translateY(-50%);
  font-size: 280px; font-weight: 700; opacity: .65;
  line-height: 1; pointer-events: none; user-select: none; white-space: nowrap;
}
.fomlar-cat-hero__inner { position: relative; max-width: 1240px; margin: 0 auto; }
.fomlar-cat-hero__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--gold); margin-bottom: 12px; font-weight: 600;
}
.fomlar-cat-hero__title { font-size: 56px; font-weight: 700; margin: 0 0 12px; line-height: 1.1; text-wrap: balance; }
.fomlar-cat-hero__stats { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.fomlar-cat-hero__count {
  padding: 8px 16px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 1px;
}
.fomlar-cat-hero__stat { font-size: 14px; color: #9B958A; }
.fomlar-cat-hero__desc {
  font-size: 17px; line-height: 1.8; color: #D4CFC2; margin: 24px 0 0; max-width: 760px; text-wrap: pretty;
}
.fomlar-cat-hero__sisters { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fomlar-cat-hero__sisters-label {
  font-size: 11px; letter-spacing: 3px; color: var(--gold); font-weight: 700; margin-left: 8px;
}
.fomlar-cat-hero__sister {
  font-size: 13px; padding: 5px 12px; color: #CFC9BE;
  border: 1px solid #4A4A47; border-radius: 4px;
}
.fomlar-cat-hero__sister:hover,
.fomlar-cat-hero__sister.is-active { border-color: var(--gold); color: #F4E9D1; background: rgba(184,150,104,.12); }

/* Category posts */
.fomlar-cat-posts { padding: 48px var(--px) 56px; background: var(--paper); }
.fomlar-cat-posts__inner { min-width: 0; }
.fomlar-cat-posts__toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--red); margin-bottom: 32px;
}
.fomlar-cat-posts__toolbar-label { font-size: 11px; letter-spacing: 3px; color: var(--red); font-weight: 700; }
.fomlar-cat-posts__toolbar-count { font-size: 15px; color: var(--muted); margin-top: 4px; }
.fomlar-cat-posts__toolbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.fomlar-cat-posts__sort { cursor: pointer; }
.fomlar-cat-posts__sort.is-active {
  color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--red); padding-bottom: 4px;
}
.fomlar-cat-posts__sep { width: 1px; height: 18px; background: var(--line); display: inline-block; vertical-align: middle; }
.fomlar-cat-posts__view-btn { cursor: pointer; color: var(--muted); font-weight: 600; }
.fomlar-cat-posts__view-btn.is-active { color: var(--red); }

/* Featured wide card */
.fomlar-cat-featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; margin-bottom: 40px;
  text-decoration: none; color: inherit;
}
.fomlar-cat-featured:hover .fomlar-cat-featured__body-title { color: var(--red); }
.fomlar-cat-featured__thumb { height: 380px; position: relative; }
.fomlar-cat-featured__thumb img,
.fomlar-cat-featured__thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.fomlar-cat-featured__badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--ink); color: #F4E9D1;
  font-size: 10px; letter-spacing: 2px; padding: 5px 12px; font-weight: 700; text-transform: uppercase;
}
.fomlar-cat-featured__body { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.fomlar-cat-featured__body-meta { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 14px; font-weight: 500; }
.fomlar-cat-featured__body-title { font-size: 32px; line-height: 1.3; font-weight: 700; margin: 0 0 18px; text-wrap: pretty; transition: color .15s; }
.fomlar-cat-featured__body-excerpt { font-size: 17px; line-height: 1.75; color: var(--muted); margin: 0 0 22px; }
.fomlar-cat-featured__body-author { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.fomlar-cat-featured__body-author-name { font-size: 14px; color: var(--ink); font-weight: 500; }
.fomlar-cat-featured__read-link {
  font-size: 13px; color: var(--red); font-weight: 600;
  border-bottom: 1px solid var(--gold); padding-bottom: 4px; align-self: flex-start; letter-spacing: .5px;
}

/* Grid / list views */
.fomlar-cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.fomlar-cat-list { display: flex; flex-direction: column; }
.fomlar-cat-list__item {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  align-items: center; text-decoration: none; color: inherit;
}
.fomlar-cat-list__item:hover .fomlar-cat-list__title { color: var(--red); }
.fomlar-cat-list__thumb { height: 130px; overflow: hidden; border-radius: 4px; }
.fomlar-cat-list__thumb img,
.fomlar-cat-list__thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.fomlar-cat-list__meta { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.fomlar-cat-list__title { font-size: 22px; line-height: 1.35; font-weight: 600; margin: 0 0 8px; transition: color .15s; }
.fomlar-cat-list__excerpt {
  font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fomlar-cat-list__author { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fomlar-cat-list__author-name { color: var(--ink); font-weight: 500; }
.fomlar-cat-list__read { font-size: 13px; color: var(--red); font-weight: 600; white-space: nowrap; }

/* Pagination */
.fomlar-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  direction: ltr;
}
/* Direct children: the <a> and <span class="page-numbers"> elements */
.fomlar-pagination > .page-numbers,
.fomlar-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1;
  flex-shrink: 0;
}
.fomlar-pagination .page-numbers.current {
  background: var(--red); color: #fff; border-color: var(--red); font-weight: 600;
}
.fomlar-pagination a.page-numbers:hover {
  border-color: var(--red); color: var(--red);
}
.fomlar-pagination .page-numbers.prev,
.fomlar-pagination .page-numbers.next {
  min-width: 48px;
  background: var(--paper-warm);
  font-size: 16px;
}
.fomlar-pagination .page-numbers.dots {
  border-color: transparent;
  color: var(--muted);
  min-width: 32px;
}
@media (max-width: 480px) {
  .fomlar-pagination { gap: 6px; }
  .fomlar-pagination .page-numbers { min-width: 36px; height: 36px; font-size: 13px; }
}

/* ---------- AUTHOR PAGE ---------- */
.fomlar-author-hero {
  background: var(--author-hero-bg, var(--ink));
  color: var(--author-hero-color, #F4E9D1);
  padding: var(--author-hero-padding, 64px) var(--px) var(--author-hero-padding, 72px);
  position: relative;
  overflow: hidden;
}
.fomlar-author-hero__inner {
  position: relative; display: grid; grid-template-columns: auto 1fr;
  gap: 48px; align-items: center; max-width: 1240px; margin: 0 auto;
}
.fomlar-author-hero__avatar-wrap { position: relative; }
.fomlar-author-hero__avatar {
  width: 220px; height: 220px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 92px; font-weight: 600;
  border: 2px solid var(--gold); box-shadow: 0 18px 50px rgba(0,0,0,.4); overflow: hidden;
}
.fomlar-author-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.fomlar-author-hero__avatar-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--red); opacity: .4; pointer-events: none;
}
.fomlar-author-hero__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--gold); margin-bottom: 12px; font-weight: 600;
}
.fomlar-author-hero__name { font-size: var(--author-hero-name-size, 52px); font-weight: 700; margin: 0 0 12px; line-height: 1.1; }
.fomlar-author-hero__role { font-size: 18px; color: #CFC9BE; margin-bottom: 4px; font-weight: 500; }
.fomlar-author-hero__affiliation { font-size: 15px; color: #9B958A; }
.fomlar-author-hero__bio { font-size: 16px; line-height: 1.8; color: #D4CFC2; margin: 24px 0 0; max-width: 720px; }
.fomlar-author-hero__stats {
  margin-top: 30px; display: flex;
  border-top: 1px solid #3A3A37; border-bottom: 1px solid #3A3A37; max-width: 560px;
}
.fomlar-author-hero__stat { padding: 16px 24px; flex: 1; border-right: 1px solid #3A3A37; }
.fomlar-author-hero__stat:first-child { border-right: none; }
.fomlar-author-hero__stat-n { font-size: 30px; font-weight: 700; color: #F4E9D1; line-height: 1; }
.fomlar-author-hero__stat-l { font-size: 11px; color: var(--gold); letter-spacing: 2px; margin-top: 6px; font-weight: 600; }
.fomlar-author-hero__topics { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.fomlar-author-hero__topics-line { width: 50px; height: 1px; background: var(--red); }
.fomlar-author-hero__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.fomlar-author-hero__tag {
  font-size: 13px; padding: 4px 12px; border: 1px solid #4A4A47;
  color: #CFC9BE; border-radius: 999px;
}

/* Author posts section */
.fomlar-author-posts { padding: 56px var(--px) 80px; background: var(--paper); }
.fomlar-author-posts__layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 56px;
  max-width: 1280px; margin: 0 auto;
}
.fomlar-author-posts__layout > main,
.fomlar-author-posts__layout > aside { min-width: 0; }
.fomlar-author-posts__header { display: flex; align-items: baseline; justify-content: space-between; }
.fomlar-author-posts__eyebrow {
  font-size: 11px; letter-spacing: 4px; color: var(--red); margin-bottom: 6px; font-weight: 600;
}
.fomlar-author-posts__title { font-size: 26px; font-weight: 600; margin: 0; }
.fomlar-author-posts__title .count { color: var(--muted); font-weight: 400; }
.fomlar-author-posts__filter { display: flex; gap: 8px; }
.fomlar-author-posts__filter-btn {
  font-size: 13px; padding: 5px 12px; color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}
.fomlar-author-posts__filter-btn.is-active {
  color: #fff; background: var(--red); border-color: var(--red); font-weight: 600;
}
.fomlar-author-posts__rule { height: 1px; background: var(--red); opacity: .4; margin: 20px 0 32px; }
.fomlar-author-posts__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }

/* Author sidebar */
.fomlar-author-sidebar__about {
  background: var(--paper-warm); padding: 24px; border: 1px solid var(--line); margin-bottom: 32px;
}
.fomlar-author-sidebar__about-list { font-size: 13px; display: flex; flex-direction: column; gap: 10px; }
.fomlar-author-sidebar__about-item {
  display: flex; justify-content: space-between;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.fomlar-author-sidebar__about-item:last-child { border-bottom: none; padding-bottom: 0; }
.fomlar-author-sidebar__about-label { color: var(--muted); }
.fomlar-author-sidebar__about-val { font-weight: 600; color: var(--ink); }
.fomlar-author-sidebar__contact-btn {
  display: block; margin-top: 16px; padding: 10px 0; text-align: center;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .5px;
}
.fomlar-author-sidebar__contact-btn:hover { background: var(--red-deep); color: #fff; }

/* Related authors */
.sidebar-related-authors { margin-bottom: 32px; }
.sidebar-related-authors__list { display: flex; flex-direction: column; gap: 14px; }
.sidebar-related-authors__item a { display: flex; align-items: center; gap: 12px; color: inherit; }
.sidebar-related-authors__item a:hover .sidebar-related-authors__name { color: var(--red); }
.sidebar-related-authors__info { min-width: 0; }
.sidebar-related-authors__name { font-size: 14px; color: var(--ink); font-weight: 500; transition: color .15s; }
.sidebar-related-authors__role { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sidebar-related-authors__count { font-size: 11px; color: var(--red); margin-top: 4px; font-weight: 600; }

/* ---------- CONTACT / MEMBERSHIP PAGE ---------- */
.fomlar-contact-section { padding: 72px var(--px) 96px; background: var(--paper); }
.fomlar-contact-section__inner { max-width: 860px; margin: 0 auto; }
.fomlar-contact-section__intro { margin-bottom: 48px; }

.fomlar-contact-form-wrap { background: var(--paper-warm); padding: 48px; border: 1px solid var(--line); }
.fomlar-contact-form-wrap__eyebrow {
  font-size: 10px; font-weight: 700; color: var(--red);
  letter-spacing: 4px; margin-bottom: 8px;
}
.fomlar-contact-form-wrap__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 32px; }

.fomlar-contact-msg {
  padding: 14px 18px; border-radius: 4px; font-size: 14px;
  margin-bottom: 24px; line-height: 1.5;
}
.fomlar-contact-msg.is-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.fomlar-contact-msg.is-error   { background: #fdecea; color: #b71c1c; border: 1px solid #ef9a9a; }

.fomlar-contact-form__row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;
}
.fomlar-contact-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.fomlar-contact-form__field:last-of-type { margin-bottom: 0; }
.fomlar-contact-form__field label {
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.fomlar-contact-form__field label span { color: var(--red); margin-right: 2px; }
.fomlar-contact-form__field input,
.fomlar-contact-form__field select,
.fomlar-contact-form__field textarea {
  padding: 12px 16px; border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 15px; color: var(--ink);
  direction: rtl; outline: none;
  transition: border-color .2s;
}
.fomlar-contact-form__field input:focus,
.fomlar-contact-form__field select:focus,
.fomlar-contact-form__field textarea:focus { border-color: var(--gold); }
.fomlar-contact-form__field textarea { resize: vertical; min-height: 140px; }
.fomlar-contact-form__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
}
.fomlar-contact-form__required-note { font-size: 12px; color: var(--muted); }
.fomlar-contact-form__submit {
  padding: 13px 36px; background: var(--red); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; letter-spacing: .5px;
  transition: background .15s;
}
.fomlar-contact-form__submit:hover { background: var(--red-deep); }
.fomlar-contact-form__submit:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 800px) {
  .fomlar-contact-form-wrap { padding: 28px 20px; }
  .fomlar-contact-form__row { grid-template-columns: 1fr; gap: 0; }
  .fomlar-contact-form__footer { flex-direction: column-reverse; gap: 16px; align-items: flex-start; }
}

/* ---------- AUTHORS LIST PAGE ---------- */
.fomlar-authors-list { padding: 64px var(--px) 80px; background: var(--paper); }
.fomlar-authors-list__grid {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}
.fomlar-authors-list__card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 32px 20px;
  background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.fomlar-authors-list__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.09);
}
.fomlar-authors-list__name {
  margin-top: 16px; font-size: 18px; font-weight: 600; color: var(--ink);
}
.fomlar-authors-list__role {
  font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4;
}
.fomlar-authors-list__count {
  margin-top: 12px; font-size: 12px; color: var(--red); font-weight: 600;
  letter-spacing: .5px;
}
.fomlar-authors-list__empty {
  max-width: 1280px; margin: 0 auto; color: var(--muted); font-size: 16px; text-align: center;
}
@media (max-width: 800px) {
  .fomlar-authors-list__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
}

/* ---------- STATIC PAGE ---------- */
.fomlar-page { padding: 60px var(--px); background: var(--paper); }
.fomlar-page__layout { max-width: 1280px; margin: 0 auto; }
.fomlar-page__body { min-width: 0; }
.fomlar-page__title { font-size: 40px; font-weight: 700; margin-bottom: 32px; color: var(--ink); }
.entry-content { font-size: 17px; line-height: 1.8; color: #3a3a37; }
.entry-content p { margin-bottom: 18px; }

/* ---------- SEARCH RESULTS ---------- */
.fomlar-search-section { padding: 56px var(--px) 80px; background: var(--paper); }
.fomlar-search-section__layout { max-width: 1280px; margin: 0 auto; }
.fomlar-search-body { min-width: 0; }
.entry-content h2 { font-size: 26px; margin: 32px 0 12px; }
.entry-content h3 { font-size: 20px; margin: 28px 0 10px; }
.entry-content a { color: var(--red); text-decoration: underline; }
.entry-content blockquote {
  margin: 28px 0; padding: 20px 20px 20px 0;
  border-right: 3px solid var(--red); background: var(--paper-warm);
  font-style: italic; font-size: 18px; line-height: 1.7;
}

/* ---- Article & page content: prevent user-generated HTML from overflowing ---- */
.fomlar-article-content__body,
.entry-content,
.fomlar-page__body {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
/* Tables: wrap in a scrollable container */
.fomlar-article-content__body table,
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}
/* Pre / code blocks */
.fomlar-article-content__body pre,
.fomlar-article-content__body code,
.entry-content pre,
.entry-content code {
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
/* WordPress block embeds / iframes */
.fomlar-article-content__body .wp-block-embed,
.fomlar-article-content__body .wp-block-image,
.fomlar-article-content__body figure,
.entry-content .wp-block-embed,
.entry-content figure {
  max-width: 100%;
}
.fomlar-article-content__body img,
.entry-content img { max-width: 100%; height: auto; }
.fomlar-article-content__body iframe,
.entry-content iframe { max-width: 100%; }

/* ---------- SEARCH ---------- */
.fomlar-search-header {
  background: var(--ink); color: #F4E9D1; padding: 56px var(--px); text-align: center;
}
.fomlar-search-header h1 { font-size: 42px; margin-bottom: 12px; }
.fomlar-search-header .search-count { color: #9B958A; font-size: 16px; }
.fomlar-search-results { padding: 56px var(--px); }
.fomlar-search-results .search-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.fomlar-no-results { padding: 80px var(--px); text-align: center; }
.fomlar-no-results h2 { font-size: 28px; margin-bottom: 16px; }
.fomlar-no-results p { color: var(--muted); font-size: 16px; }

/* ---------- 404 ---------- */
.fomlar-404 {
  background: var(--ink); color: #F4E9D1;
  min-height: 50vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 80px var(--px);
}
.fomlar-404__inner { max-width: 500px; }
.fomlar-404__code { font-size: 120px; font-weight: 700; color: var(--red); line-height: 1; margin-bottom: 16px; }
.fomlar-404__title { font-size: 32px; margin-bottom: 16px; }
.fomlar-404__text { font-size: 17px; color: #9B958A; margin-bottom: 32px; }
.fomlar-404__home-btn {
  padding: 14px 32px; background: var(--red); color: #fff; font-size: 15px; display: inline-block;
}
.fomlar-404__home-btn:hover { background: var(--red-deep); color: #fff; }

/* ---------- SEARCH FORM ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"],
.search-form input[type="text"] {
  flex: 1; padding: 14px 18px;
  background: transparent; border: 1px solid var(--gold);
  color: #F4E9D1; font-size: 16px; outline: none; direction: rtl;
}
.search-form input::placeholder { color: #6B6863; }
.search-form button[type="submit"] {
  padding: 0 24px; background: var(--red); color: #fff;
  font-size: 14px; border: none; cursor: pointer; white-space: nowrap;
}
.search-form button[type="submit"]:hover { background: var(--red-deep); }

/* ---------- THUMBNAIL PLACEHOLDER ---------- */
.thumb-placeholder {
  width: 100%; height: 100%; display: block;
  background: repeating-linear-gradient(
    45deg,
    var(--paper-warm) 0px, var(--paper-warm) 8px,
    var(--line) 8px, var(--line) 14px
  );
}

/* ---------- YOUTUBE SVG ---------- */
.yt-logo { display: inline-block; vertical-align: middle; }

/* ---------- MORE BY AUTHOR GRID (single.php) ---------- */
.fomlar-more-by-author__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .fomlar-more-by-author__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .fomlar-more-by-author__grid { grid-template-columns: 1fr; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  :root { --px: 32px; }
  .fomlar-posts-section__layout { grid-template-columns: 1fr; }
  .fomlar-posts-section__grid { grid-template-columns: repeat(2,1fr); }
  /* .fomlar-seminars__stage responsive rules are inside the seminars block */
  .fomlar-footer__main { flex-direction: column; gap: 20px; }
  .fomlar-footer__tagline { white-space: normal; }
  .fomlar-article-body__layout { grid-template-columns: 1fr; gap: 40px; }
  .fomlar-author-posts__layout { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  :root { --px: 20px; }
  .fomlar-utility-strip { display: none; }
  .fomlar-header__nav { display: none; }
  .fomlar-hero__title { font-size: 40px; }
  .fomlar-posts-section__grid { grid-template-columns: 1fr; }
  .fomlar-footer__bottom { flex-direction: column; gap: 6px; }
  .fomlar-cat-grid { grid-template-columns: 1fr; }
  .fomlar-cat-list__item { grid-template-columns: 120px 1fr; }
  .fomlar-cat-list__read { display: none; }
  .fomlar-cat-featured { grid-template-columns: 1fr; }
  .fomlar-cat-featured__thumb { height: 240px; }
  .fomlar-author-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .fomlar-author-hero__avatar-wrap { margin: 0 auto; }
  .fomlar-author-hero__stats { max-width: 100%; }
  .fomlar-author-hero__topics { justify-content: center; }
  .fomlar-author-posts__grid { grid-template-columns: 1fr; }
  .fomlar-article-hero__title { font-size: 32px; }
  .fomlar-author-hero__name { font-size: 36px; }
  .fomlar-search-results .search-grid { grid-template-columns: 1fr; }
}

/* ---------- SIDEBAR POSITION ---------- */

/*
 * All two-column layouts: 1fr 340px by default.
 * RTL: column 1 (1fr) = visual RIGHT (content), column 2 (340px) = visual LEFT (sidebar).
 *
 * sidebar-pos-right: switch to 340px 1fr + explicit grid-column placement.
 * Using grid-column (not order) avoids RTL auto-placement ordering ambiguity.
 *
 * sidebar-pos-none: sidebar.php returns early; grid collapses to 1fr.
 */

/* ── sidebar-pos-right: sidebar on visual RIGHT (RTL column 1 = rightmost) ── */
body.sidebar-pos-right .fomlar-posts-section__layout,
body.sidebar-pos-right .fomlar-article-body__layout,
body.sidebar-pos-right .fomlar-author-posts__layout {
  grid-template-columns: 340px 1fr;
}

body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-sidebar,
body.sidebar-pos-right .fomlar-posts-section__layout > #secondary,
body.sidebar-pos-right .fomlar-article-body__layout > .fomlar-sidebar,
body.sidebar-pos-right .fomlar-article-body__layout > #secondary,
body.sidebar-pos-right .fomlar-author-posts__layout > .fomlar-sidebar,
body.sidebar-pos-right .fomlar-author-posts__layout > #secondary {
  grid-column: 1;
  grid-row: 1;
}

body.sidebar-pos-right .fomlar-posts-section__layout > main,
body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-cat-posts__inner,
body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-page__body,
body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-search-body,
body.sidebar-pos-right .fomlar-article-body__layout > article,
body.sidebar-pos-right .fomlar-author-posts__layout > main {
  grid-column: 2;
  grid-row: 1;
}

/* ── sidebar-pos-none: full width, no sidebar rendered ── */
body.sidebar-pos-none .fomlar-posts-section__layout,
body.sidebar-pos-none .fomlar-article-body__layout,
body.sidebar-pos-none .fomlar-author-posts__layout {
  grid-template-columns: 1fr;
}

/*
 * Sidebar position RESPONSIVE OVERRIDE.
 * body.sidebar-pos-right has higher specificity than the plain
 * @media max-width rules, so without !important the 340px column
 * never collapses — causing the sidebar to be 340px wide on a
 * 375px phone and pushing all page content off-screen.
 */
@media (max-width: 1100px) {
  body.sidebar-pos-right .fomlar-posts-section__layout,
  body.sidebar-pos-right .fomlar-article-body__layout,
  body.sidebar-pos-right .fomlar-author-posts__layout { grid-template-columns: 1fr !important; }

  /* Reset explicit grid placements so items flow naturally in 1-column grid */
  body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-sidebar,
  body.sidebar-pos-right .fomlar-posts-section__layout > #secondary,
  body.sidebar-pos-right .fomlar-article-body__layout  > .fomlar-sidebar,
  body.sidebar-pos-right .fomlar-article-body__layout  > #secondary,
  body.sidebar-pos-right .fomlar-author-posts__layout  > .fomlar-sidebar,
  body.sidebar-pos-right .fomlar-author-posts__layout  > #secondary { grid-column: auto !important; grid-row: auto !important; }

  body.sidebar-pos-right .fomlar-posts-section__layout > main,
  body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-cat-posts__inner,
  body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-page__body,
  body.sidebar-pos-right .fomlar-posts-section__layout > .fomlar-search-body,
  body.sidebar-pos-right .fomlar-article-body__layout  > article,
  body.sidebar-pos-right .fomlar-author-posts__layout  > main { grid-column: auto !important; grid-row: auto !important; }
}

/* ---------- FOOTER SOCIAL LINKS ---------- */
.fomlar-footer__social {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.fomlar-footer__social li { list-style: none; }
.fomlar-footer__social a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  font-size: 12px;
  color: #CFC9BE;
  transition: border-color .2s, color .2s;
}
.fomlar-footer__social a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- HOME WIDGET AREAS ---------- */
.fomlar-home-widget-area {
  padding: 32px var(--px);
}
.fomlar-home-widget-area__inner {
  max-width: 1280px; margin: 0 auto;
}
.fomlar-home-widget-area .widget-title {
  font-size: 14px; font-weight: 600;
  color: var(--muted); letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 12px;
}
@media (max-width: 800px) {
  .fomlar-home-widget-area { padding: 24px 20px; }
}

/* ============================================================
   BOOK LIBRARY (fomlar_book)
   ============================================================ */

.fomlar-library-sortbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.fomlar-library-sortbar__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.fomlar-library-sortbar__btn {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.fomlar-library-sortbar__btn:hover { border-color: var(--ink); color: var(--ink); }
.fomlar-library-sortbar__btn.is-active {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}
.fomlar-library-sortbar__count {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted);
}

.fomlar-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.fomlar-book-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  transition: border-color .18s, box-shadow .18s;
}
.fomlar-book-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(44,44,42,.1);
}

/* Cover image area */
.fomlar-book-card__cover {
  height: 200px;
  background: var(--paper-warm2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.fomlar-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.fomlar-book-card:hover .fomlar-book-card__cover img {
  transform: scale(1.04);
}
.fomlar-book-card__cover-placeholder {
  color: var(--gold);
  opacity: .4;
}

/* Card body */
.fomlar-book-card__body {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fomlar-book-card__type {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 10px;
}

.fomlar-book-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fomlar-book-card__title a {
  color: inherit;
  text-decoration: none;
}
.fomlar-book-card__title a:hover { color: var(--red); }

.fomlar-book-card__meta {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.4;
}

.fomlar-book-card__footer { margin-top: auto; }

.fomlar-book-card__dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--ink);
  text-decoration: none;
  letter-spacing: .03em;
  transition: background .15s, color .15s, border-color .15s;
}
.fomlar-book-card__dl:hover {
  background: var(--ink);
  color: #F4E9D1;
}

.fomlar-book-card__no-pdf {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  display: block;
  text-align: center;
  padding: 8px 0;
}

.fomlar-library-empty { padding: 48px 0; color: var(--muted); }

@media (max-width: 800px) {
  .fomlar-library-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 600px) {
  .fomlar-library-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fomlar-book-card__cover { height: 150px; }
}

/* ---------- BOOK SINGLE PAGE ---------- */
.fomlar-book-single__hero {
  background: var(--paper-warm); padding: 56px var(--px) 64px;
  border-bottom: 1px solid var(--line);
}
.fomlar-book-single__hero-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start;
}
.fomlar-book-single__cover {
  width: 220px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); flex-shrink: 0;
  border: 1px solid var(--line);
}
.fomlar-book-single__cover img { width: 100%; height: auto; display: block; }
.fomlar-book-single__cover-placeholder {
  width: 220px; height: 300px; background: var(--paper-warm2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); opacity: .4;
}
.fomlar-book-single__genre {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.fomlar-book-single__genre span {
  font-size: 10px; letter-spacing: 2px; font-weight: 700;
  color: var(--red); background: rgba(168,25,29,.06);
  border: 1px solid rgba(168,25,29,.18); padding: 2px 10px; border-radius: 999px;
}
.fomlar-book-single__title {
  font-size: 36px; font-weight: 700; line-height: 1.25; margin: 0 0 20px; color: var(--ink);
}
.fomlar-book-single__meta {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px;
  font-size: 14px; color: var(--muted);
}
.fomlar-book-single__author { font-weight: 600; color: var(--ink); }
.fomlar-book-single__dl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: var(--red); color: #fff;
  font-size: 15px; font-weight: 700; border-radius: 6px;
  text-decoration: none; margin-bottom: 16px;
  transition: background .18s;
}
.fomlar-book-single__dl-btn:hover { background: var(--red-deep); color: #fff; }
.fomlar-book-single__no-pdf { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.fomlar-book-single__back {
  display: inline-block; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.fomlar-book-single__back:hover { color: var(--red); border-color: var(--red); }

/* Description */
.fomlar-book-single__desc { padding: 48px var(--px) 64px; }
.fomlar-book-single__desc-inner { max-width: 900px; margin: 0 auto; }
.fomlar-book-single__desc-heading {
  font-size: 20px; font-weight: 700; color: var(--ink);
  margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.fomlar-book-single__desc-body { font-size: 16px; line-height: 1.9; color: var(--ink-soft); }

@media (max-width: 700px) {
  .fomlar-book-single__hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .fomlar-book-single__cover { width: 100%; max-width: 200px; }
  .fomlar-book-single__cover-placeholder { width: 100%; max-width: 200px; height: 240px; }
  .fomlar-book-single__title { font-size: 26px; }
}


/* ============================================================
   MOBILE MENU — BURGER + MOBILE NAV PANEL
   ============================================================ */

/* ---- Burger button ---- */
.fomlar-burger {
  display: none; /* shown only at ≤800px — see media query below */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  min-width: 40px; /* never crushed by flex layout */
  background: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .2s;
  /* Eliminate iOS 300 ms tap delay and remove tap highlight */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.fomlar-burger:hover { border-color: rgba(255,255,255,.4); }
.fomlar-burger__line {
  display: block;
  width: 20px;
  height: 2px;
  background: #CFC9BE;
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.fomlar-burger.is-open .fomlar-burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.fomlar-burger.is-open .fomlar-burger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.fomlar-burger.is-open .fomlar-burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile nav panel ---- */
/*
 * ALWAYS hidden by default via display:none !important so that WordPress
 * default nav { display:block } or any plugin stylesheet cannot override it.
 * The HTML `hidden` attribute provides a second layer of protection.
 * Only revealed on mobile (≤800px) when JS adds .is-open.
 */
.fomlar-mobile-nav {
  display: none !important;
  background: #1c1c19;
  border-top: 1px solid rgba(255,255,255,.07);
  overflow-y: auto;
  max-height: 75vh;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Shown only on mobile when burger is clicked */
@media (max-width: 800px) {
  .fomlar-mobile-nav.is-open { display: block !important; }
}

/* List items — flex so expand button sits beside the link */
.fomlar-mobile-nav__list,
.fomlar-mobile-nav__list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fomlar-mobile-nav__list > li,
.fomlar-mobile-nav__list .sub-menu li {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.fomlar-mobile-nav__list > li:last-child,
.fomlar-mobile-nav__list .sub-menu li:last-child {
  border-bottom: none;
}

/* Links */
.fomlar-mobile-nav__list > li > a,
.fomlar-mobile-nav__list .sub-menu li > a {
  flex: 1;
  padding: 14px 20px;
  color: #CFC9BE;
  font-size: 15px;
  font-weight: 500;
  display: block;
  min-width: 0;
  transition: color .15s, background .15s;
}
.fomlar-mobile-nav__list > li > a:hover,
.fomlar-mobile-nav__list .sub-menu li > a:hover {
  color: #F4E9D1;
  background: rgba(255,255,255,.04);
}
.fomlar-mobile-nav__list > li.current-menu-item > a,
.fomlar-mobile-nav__list > li.current-menu-ancestor > a {
  color: #F4E9D1;
}

/* Level-2 sub-menu indent */
.fomlar-mobile-nav__list .sub-menu li > a {
  font-size: 14px;
  color: #9B958A;
  padding-right: 36px;
}
/* Level-3 */
.fomlar-mobile-nav__list .sub-menu .sub-menu li > a {
  padding-right: 52px;
  font-size: 13px;
  color: #6B6863;
}

/* Sub-menu containers — hidden until parent is expanded */
.fomlar-mobile-nav__list .sub-menu {
  flex-basis: 100%;
  width: 100%;
  background: rgba(0,0,0,.22);
  display: none;
}
.fomlar-mobile-nav__list .menu-item-has-children.is-expanded > .sub-menu {
  display: block;
}

/* Expand toggle button (injected by JS) */
.fomlar-mobile-nav__expand {
  flex-shrink: 0;
  width: 48px;
  background: rgba(255,255,255,.03);
  border: none;
  border-right: 1px solid rgba(255,255,255,.07);
  color: #6B6863;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.fomlar-mobile-nav__expand:hover {
  color: var(--gold);
  background: rgba(255,255,255,.06);
}
.fomlar-mobile-nav__list .menu-item-has-children.is-expanded > .fomlar-mobile-nav__expand {
  color: var(--gold);
}
.fomlar-mobile-nav__list .menu-item-has-children.is-expanded > .fomlar-mobile-nav__expand span {
  display: inline-block;
  transform: rotate(180deg);
}

/* CTA join link at the bottom of mobile nav */
.fomlar-mobile-nav__cta {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.fomlar-mobile-nav__cta a {
  display: inline-block;
  padding: 11px 24px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
}
.fomlar-mobile-nav__cta a:hover { background: var(--red-deep); }

/* Prevent body scroll while mobile nav is open */
body.mobile-nav-open { overflow: hidden; }

@media (max-width: 800px) {
  /* Burger: always visible on mobile */
  .fomlar-burger { display: flex !important; position: relative; z-index: 5; }
  /* Logo: allow it to shrink so it never pushes the burger off-screen */
  .fomlar-header__logo { flex-shrink: 1; min-width: 0; }
  .fomlar-header__logo img,
  .fomlar-header__logo .custom-logo {
    height: 48px; width: auto; max-width: 120px; object-fit: contain;
  }
  /* Actions must never shrink — burger must always be reachable */
  .fomlar-header__actions { flex-shrink: 0; gap: 10px; }
  /* Join link is in the mobile nav; hide it from the header bar on mobile */
  .fomlar-header__join { display: none; }
  .fomlar-header__inner { padding: 10px var(--px); }
  /* Higher z-index so the open mobile-nav panel sits above Elementor sections */
  .fomlar-header { z-index: 300; }
}

@media (min-width: 801px) {
  /* On desktop: hide mobile elements even if .is-open is somehow added by JS */
  .fomlar-mobile-nav,
  .fomlar-mobile-nav.is-open { display: none !important; }
  .fomlar-burger              { display: none !important; }
}

/* Hide join link from header actions on very small screens; it lives in mobile nav */
@media (max-width: 420px) {
  .fomlar-header__join { display: none; }
}

/* ============================================================
   ADDITIONAL RESPONSIVE FIXES
   ============================================================ */

/* ---- ≤800px ---- */
@media (max-width: 800px) {

  /* Hero section: reduce vertical padding */
  .fomlar-hero { padding: 44px var(--px) 52px; }

  /* Authors marquee: reduce the large padding so posts section reaches the screen sooner */
  .fomlar-marquee { padding: 32px 0 36px; }
  .fomlar-marquee__header { margin-bottom: 20px; }
  .fomlar-marquee__title { font-size: 20px; }

  /* Posts section: reduce padding so content is visible without excessive scrolling */
  .fomlar-posts-section { padding: 36px var(--px) 52px; }

  /* Category hero: reduce title + vertical padding */
  .fomlar-cat-hero { padding: 36px var(--px) 40px; }
  .fomlar-cat-hero__title { font-size: 36px; }

  /* Featured category card: reduce body padding when stacked */
  .fomlar-cat-featured__body { padding: 24px 22px; }
  .fomlar-cat-featured__body-title { font-size: 24px; }

  /* Category posts toolbar: allow wrapping */
  .fomlar-cat-posts__toolbar { flex-wrap: wrap; gap: 8px; }

  /* Posts section header: stack title + filter vertically on mobile */
  .fomlar-posts-section__header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fomlar-posts-section__filter { flex-wrap: wrap; gap: 12px; }

  /* Author posts header: same pattern */
  .fomlar-author-posts__header { flex-wrap: wrap; gap: 8px; }
  .fomlar-author-posts__filter { flex-wrap: wrap; }

  /* Author bio card: stack avatar + info + button vertically */
  .fomlar-author-bio-card { flex-direction: column; text-align: center; align-items: center; }
  .fomlar-author-bio-card__btn { align-self: stretch; text-align: center; }

  /* Marquee header row: stack title + link on separate lines */
  .fomlar-marquee__header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Contact section: reduce vertical padding */
  .fomlar-contact-section { padding: 40px var(--px) 52px; }
  .fomlar-contact-form-wrap__title { font-size: 22px; }

  /* Article hero: reduce vertical padding */
  .fomlar-article-hero { padding: 40px var(--px) 44px; }

  /* Article cover: remove negative margin and reduce height on mobile */
  .fomlar-article-cover__img { margin-top: 0; height: 220px; }
  /* Article body: tighter padding on mobile */
  .fomlar-article-body { padding: 40px var(--px); }
  /* Ensure article layout is single-column on all mobile widths */
  .fomlar-article-body__layout { grid-template-columns: 1fr !important; width: 100%; }

  /* Author section: reduce padding */
  .fomlar-author-hero { padding: 44px var(--px) 52px; }

  /* Seminars section: reduce padding */
  .fomlar-seminars { padding: 36px var(--px) 40px; }

  /* Search header: reduce */
  .fomlar-search-header { padding: 40px var(--px); }
  .fomlar-search-header h1 { font-size: 30px; }

  /* 404: reduce */
  .fomlar-404 { padding: 60px var(--px); }
  .fomlar-404__code { font-size: 80px; }
  .fomlar-404__title { font-size: 24px; }

  /* Static page */
  .fomlar-page { padding: 40px var(--px); }
  .fomlar-page__title { font-size: 28px; }

  /* Authors list section */
  .fomlar-authors-list { padding: 40px var(--px) 56px; }
}

/* ---- ≤600px ---- */
@media (max-width: 600px) {

  /* Hero title */
  .fomlar-hero__title { font-size: 30px; }
  .fomlar-hero__sub   { font-size: 17px; }
  .fomlar-hero__btns  { flex-direction: column; align-items: center; gap: 10px; }
  .fomlar-hero__btn-primary,
  .fomlar-hero__btn-secondary { width: 100%; max-width: 280px; text-align: center; }

  /* Category hero */
  .fomlar-cat-hero__title { font-size: 28px; }
  .fomlar-cat-hero__desc  { font-size: 15px; }

  /* Article hero */
  .fomlar-article-hero__title   { font-size: 26px; }
  .fomlar-article-hero__excerpt { font-size: 15px; }
  /* Article meta row: stack on very narrow */
  .fomlar-article-hero__meta { flex-direction: column; gap: 8px; }
  .fomlar-article-hero__meta-sep { display: none; }

  /* Article content toolbar: allow wrapping + tighter gap */
  .fomlar-article-content__toolbar { flex-wrap: wrap; gap: 10px; }
  .fomlar-article-content__actions { gap: 8px; font-size: 12px; }
  .article-toolbar-btn { font-size: 12px; }

  /* Author name */
  .fomlar-author-hero__name { font-size: 30px; }

  /* Author stats: reduce number size */
  .fomlar-author-hero__stat-n { font-size: 24px; }
  .fomlar-author-hero__stat   { padding: 12px 14px; }

  /* Section headings */
  .fomlar-posts-section__title,
  .fomlar-author-posts__title { font-size: 22px; }

  /* Marquee: reduce track size */
  .fomlar-marquee__author { width: 96px; }
  .fomlar-marquee__track  { gap: 36px; }

  /* Cat list: tighten on small screens */
  .fomlar-cat-list__item { grid-template-columns: 90px 1fr; gap: 14px; }
  .fomlar-cat-list__thumb { height: 100px; }
  .fomlar-cat-list__title { font-size: 16px; }

  /* Seminars heading */
  .fomlar-seminars__title { font-size: 24px; }
  .fomlar-seminars__header { flex-direction: column; align-items: flex-start; }

  /* Category page toolbar for view toggle */
  .fomlar-cat-posts__toolbar-right { flex-wrap: wrap; gap: 10px; }

  /* Search grid */
  .fomlar-search-results { padding: 36px var(--px); }

  /* Book grid: already 2-col — no change needed */
}

/* ---- ≤480px ---- */
@media (max-width: 480px) {

  /* Hero */
  .fomlar-hero { padding: 40px var(--px) 48px; }
  .fomlar-hero__title { font-size: 26px; }
  .fomlar-hero__eyebrow { font-size: 10px; letter-spacing: 4px; }

  /* Article hero */
  .fomlar-article-hero__title { font-size: 22px; line-height: 1.3; }

  /* Category hero */
  .fomlar-cat-hero__title { font-size: 24px; }

  /* Author */
  .fomlar-author-hero__name { font-size: 26px; }
  .fomlar-author-hero__avatar { width: 160px; height: 160px; font-size: 68px; }
  .fomlar-author-posts__grid { gap: 16px; }

  /* Author bio card (single article) */
  .fomlar-author-bio-card__name { font-size: 16px; }
  .fomlar-author-bio-card__bio  { font-size: 13px; }

  /* Pagination: tighter on very small screens */
  .fomlar-pagination .page-numbers { min-width: 32px; height: 32px; font-size: 12px; padding: 0 8px; }

  /* Search form: stack on tiny screens */
  .fomlar-header__searchbar { padding: 12px var(--px) 14px; }

  /* Footer bottom: extra tightening */
  .fomlar-footer__bottom { font-size: 10px; }

  /* Article cover: shorter on very small screens */
  .fomlar-article-cover__img { height: 160px; }

  /* Logo: tighter on very small screens */
  .fomlar-header__logo img,
  .fomlar-header__logo .custom-logo { max-width: 100px; height: 42px; }
}

/* ---- ≤375px ---- */
@media (max-width: 375px) {
  .fomlar-hero__title { font-size: 23px; }
  .fomlar-article-hero__title { font-size: 20px; }
  .fomlar-cat-hero__title { font-size: 21px; }
  .fomlar-author-hero__name { font-size: 23px; }
  .fomlar-hero__sub { font-size: 15px; }
  .fomlar-article-cover__img { height: 130px; }
  .fomlar-header__logo img,
  .fomlar-header__logo .custom-logo { max-width: 96px; height: 40px; }
}

/* ---- ≤320px ---- */
@media (max-width: 320px) {
  .fomlar-hero__title { font-size: 21px; }
  .fomlar-hero__sub   { font-size: 14px; }
  .fomlar-article-hero__title { font-size: 18px; line-height: 1.3; }
  .fomlar-cat-hero__title { font-size: 19px; }
  .fomlar-author-hero__name { font-size: 20px; }
  .fomlar-article-cover__img { height: 110px; }
  .fomlar-header__logo img,
  .fomlar-header__logo .custom-logo { max-width: 88px; height: 38px; }
  /* Tighten hero padding to reduce blank space before content */
  .fomlar-hero { padding: 32px var(--px) 40px; }
  .fomlar-article-hero { padding: 28px var(--px) 32px; }
  .fomlar-cat-hero { padding: 28px var(--px) 32px; }
}

/* ---- Defensive content-visibility rules (prevent Elementor overrides) ---- */
/*
 * Ensure primary page sections are never display:none on mobile.
 * These rules do NOT use !important so they don't fight intentional Customizer overrides,
 * but they DO provide a fallback for common plugin zeroing patterns.
 */
@media (max-width: 800px) {
  .fomlar-hero,
  .fomlar-article-hero,
  .fomlar-cat-hero,
  .fomlar-author-hero,
  .fomlar-article-body,
  .fomlar-posts-section,
  .fomlar-cat-posts,
  .fomlar-author-posts {
    visibility: visible;
    opacity: 1;
  }
  /* Ensure grid layouts never create a sub-zero first column on mobile */
  .fomlar-posts-section__layout,
  .fomlar-cat-posts__inner { width: 100%; }
}

/* ============================================================
   HORIZONTAL OVERFLOW — SYSTEMATIC FIX
   Each rule below targets a confirmed overflow source.
   overflow-x on body is a last-resort safety net.
   ============================================================ */

/*
 * overflow-x: clip on <html> clips content that escapes the viewport
 * WITHOUT creating a scroll container — so position:sticky still works.
 * This is necessary because iOS Safari ignores overflow-x:hidden on <body>.
 */
html { overflow-x: clip; }
body { overflow-x: hidden; }

/* ---- Footer logo: custom logo has no size constraint in the footer ---- */
.fomlar-footer__logo-link { display: inline-block; }
.fomlar-footer__logo-link img,
.fomlar-footer__logo-link .custom-logo {
  max-width: 200px;
  height: auto;
}

/* ---- Footer: ensure tagline wraps on all mobile sizes ---- */
@media (max-width: 800px) {
  .fomlar-footer__tagline {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .fomlar-footer { overflow-x: hidden; }
}

/* ---- Category filter pills: allow wrapping on very narrow screens ---- */
@media (max-width: 480px) {
  .fomlar-posts-section__cat-btn { white-space: normal; }
  .fomlar-posts-section__cat-filter { gap: 6px; }
}

/* ---- Search form: stack on very narrow screens so it doesn't overflow ---- */
@media (max-width: 480px) {
  .search-form { flex-direction: column; }
  .search-form input[type="search"],
  .search-form input[type="text"] { width: 100%; }
  .search-form button[type="submit"] { width: 100%; padding: 12px; text-align: center; }
}

/* ---- Breadcrumb: allow it to scroll horizontally if path is very deep ---- */
@media (max-width: 800px) {
  .fomlar-breadcrumb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* ---- Sidebar grid items: guarantee min-width:0 so they never push past the grid ---- */
.fomlar-posts-section__layout > *,
.fomlar-article-body__layout > *,
.fomlar-author-posts__layout > * { min-width: 0; }

/* ---- Category list: ensure list items never exceed viewport on very narrow screens ---- */
@media (max-width: 360px) {
  .fomlar-cat-list__item { grid-template-columns: 80px 1fr; gap: 10px; }
  .fomlar-cat-list__thumb { height: 80px; }
}

/* ---- Author stats bar: scroll horizontally if it doesn't fit ---- */
@media (max-width: 480px) {
  .fomlar-author-hero__stats { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---- Pagination: tighten further on very small screens ---- */
@media (max-width: 360px) {
  .fomlar-pagination { gap: 4px; }
  .fomlar-pagination .page-numbers { min-width: 28px; height: 28px; font-size: 11px; padding: 0 4px; }
}

/* ---- Sections: guarantee no section is wider than the viewport ---- */
@media (max-width: 800px) {
  .fomlar-hero,
  .fomlar-article-hero,
  .fomlar-cat-hero,
  .fomlar-author-hero,
  .fomlar-article-body,
  .fomlar-posts-section,
  .fomlar-cat-posts,
  .fomlar-author-posts,
  .fomlar-marquee,
  .fomlar-seminars,
  .fomlar-footer { max-width: 100%; overflow-x: hidden; }
}
