/*
Theme Name: FreelanceMag - پوسته تخصصی اقتصاد آزادکاری (نسخه ۳.۰.۰ نهایی)
Theme URI: https://freelancemag.ir/
Author: amirhosseinfallah
Author URI: https://freelancemag.ir/
Developer: amirhosseinfallah
Description: نسخه نهایی و ارتقایافته پوسته رسانه تخصصی اقتصاد آزادکاری، ماهنامه دیجیتال آزادکاری، پادکست‌ها، فریلنس شو و شبکه خبرنگاران. دارای تقویم شمسی بومی (بدون نیاز به افزونه)، پست‌تایپ‌های ویدیو، فریلنسر، ماهنامه و رادار با متاباکس‌های اختصاصی، مدیریت نوار خبر فوری، رنگ‌های رسمی لوگو (#22409a و #45b74a)، سازگاری کامل با المنتور (Elementor 4.3+)، ورق‌زن DearFlip و فرم‌ساز گرویتی.
Version: 3.0.0-Final
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: freelancemag
Domain Path: /languages
Tags: news, magazine, rtl-language-support, dark-mode, custom-menu, featured-images, translation-ready, full-width-template, elementor, dearflip
*/

/* ========================================================
   0. FONTS SPECIFICATION (Local / Server Path + Fallback)
   ======================================================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://freelancemag.ir/assistant/Vazirmatn-VariableFont_wght.ttf') format('truetype-variations'),
       url('https://freelancemag.ir/assistant/static/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://freelancemag.ir/assistant/static/Vazirmatn-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://freelancemag.ir/assistant/static/Vazirmatn-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://freelancemag.ir/assistant/static/Vazirmatn-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://freelancemag.ir/assistant/static/Vazirmatn-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Fallback to Google Fonts if offline or not loaded */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  --fm-font-body: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fm-font-serif: 'Noto Naskh Arabic', serif;
  
  /* Official Logo Colors */
  --fm-primary: #22409a;     /* آبی اصلی لوگوی فریلنس‌مگ */
  --fm-accent: #45b74a;      /* سبز فرعی/اکسنت لوگوی فریلنس‌مگ */
  
  --fm-bg: #FAF9F6;
  --fm-surface: #FFFFFF;
  --fm-border: #E7E5E4;
  --fm-text: #1C1917;
  --fm-text-muted: #64748b;
}

html.dark {
  --fm-bg: #0b1120;
  --fm-surface: #1e293b;
  --fm-border: #334155;
  --fm-text: #F8FAFC;
  --fm-text-muted: #94A3B8;
  --fm-primary: #60a5fa;
  --fm-accent: #4ade80;
}

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

html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--fm-font-body);
  background-color: var(--fm-bg);
  color: var(--fm-text);
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
  transition: background-color 0.25s ease, color 0.25s ease;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* ========================================================
   1. SITE HEADER & NAVIGATION BAR
   ======================================================== */
.site-header {
  background: var(--fm-surface);
  border-bottom: 1px solid var(--fm-border);
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  gap: 1rem;
}

.brand-zone {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-img,
.custom-logo {
  height: 48px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.desktop-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.main-menu > li {
  position: relative;
}

.main-menu > li > a {
  display: inline-block;
  padding: 0.5rem 0.65rem;
  color: var(--fm-text);
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.main-menu > li:hover > a {
  background-color: rgba(34, 64, 154, 0.08);
  color: var(--fm-primary);
}

.main-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 0.5rem;
  list-style: none;
  z-index: 1000;
}

.main-menu li:hover > .sub-menu {
  display: block;
  animation: fmFadeIn 0.15s ease-out;
}

.main-menu .sub-menu li a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--fm-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease;
}

.main-menu .sub-menu li a:hover {
  background-color: rgba(34, 64, 154, 0.06);
  color: var(--fm-primary);
}

.action-zone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Header Search Button */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--fm-border);
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fm-text);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}
html.dark .header-search-btn {
  background: rgba(255, 255, 255, 0.06);
}
.header-search-btn:hover {
  background: rgba(34, 64, 154, 0.08);
  border-color: var(--fm-primary);
  color: var(--fm-primary);
}

/* Header Auth & Profile Button */
.header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--fm-border);
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fm-text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
html.dark .header-auth-btn {
  background: rgba(255, 255, 255, 0.06);
}
.header-auth-btn:hover {
  background: rgba(34, 64, 154, 0.1);
  border-color: var(--fm-primary);
  color: var(--fm-primary);
}
.header-auth-logged {
  background: rgba(34, 64, 154, 0.08);
  border-color: rgba(34, 64, 154, 0.3);
  color: var(--fm-primary);
  font-weight: 800;
}

/* Header Submit Button */
.header-submit-btn {
  background: var(--fm-accent, #45b74a);
  color: #ffffff;
  padding: 0.45rem 0.95rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.header-submit-btn:hover {
  background: #399c3e;
  transform: translateY(-1px);
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--fm-border);
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  font-size: 1rem;
}
.theme-toggle-btn:hover {
  background-color: var(--fm-bg);
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--fm-border);
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

/* Search Modal Overlay Styles */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.search-modal-dialog {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 650px;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: fmFadeIn 0.2s ease;
}
.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.search-modal-header h3 {
  font-size: 1.125rem;
  font-weight: 900;
  margin: 0;
  color: var(--fm-text);
}
.search-modal-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fm-text);
}
html.dark .search-modal-close {
  background: rgba(255, 255, 255, 0.1);
}
.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  right: 1rem;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.6;
}
.search-input-field {
  width: 100%;
  padding: 0.85rem 2.75rem 0.85rem 6.5rem;
  border: 2px solid var(--fm-border);
  border-radius: 0.85rem;
  background: var(--fm-bg);
  color: var(--fm-text);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-input-field:focus {
  border-color: var(--fm-primary);
}
.search-input-submit {
  position: absolute;
  left: 0.5rem;
  background: var(--fm-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 800;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.search-modal-shortcuts {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--fm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}

/* Mobile Drawer Top Actions */
.mobile-drawer-top-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--fm-border);
}
.mobile-auth-chip,
.mobile-submit-chip {
  flex: 1;
  text-align: center;
  padding: 0.65rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-auth-chip {
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  color: var(--fm-text);
}
.mobile-submit-chip {
  background: var(--fm-accent);
  color: #fff;
}
@media (max-width: 640px) {
  .desktop-only-text {
    display: none;
  }
}

.mobile-drawer-wrapper {
  display: none;
  background: var(--fm-surface);
  border-top: 1px solid var(--fm-border);
  padding: 1.25rem;
  max-height: 80vh;
  overflow-y: auto;
}

@media (max-width: 1180px) {
  .desktop-nav { display: none !important; }
  .mobile-toggle-btn { display: inline-flex !important; }
}

@keyframes fmFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   2. BREAKING NEWS TICKER BAR (ISOLATED ROW)
   ======================================================== */
.news-ticker-bar {
  background: var(--fm-surface);
  border-bottom: 1px solid var(--fm-border);
  padding: 0.45rem 0;
  font-size: 0.8125rem;
  width: 100%;
  position: relative;
  z-index: 40;
}

.news-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ticker-badge {
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.ticker-badge:hover {
  background: #b91c1c;
}

.ticker-badge-dot {
  font-size: 0.625rem;
  color: #fef08a;
}

.ticker-scroll-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  white-space: nowrap;
}

.ticker-content {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  white-space: nowrap;
  animation: fmTickerScroll 40s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticker-dot {
  color: #45b74a;
  font-weight: 900;
}

.ticker-link {
  color: var(--fm-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.ticker-link:hover {
  color: var(--fm-primary);
  text-decoration: underline;
}

.ticker-separator {
  color: var(--fm-border);
  margin: 0 0.25rem;
}

@keyframes fmTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* ========================================================
   3. RESPONSIVE UTILITIES & CARDS
   ======================================================== */
img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  transition: color 0.2s, opacity 0.2s;
}

button {
  font-family: inherit;
}

/* Responsive Grid Framework for FreelanceMag */
.hero-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (min-width: 992px) {
  .hero-layout-grid {
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }
}

.news-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .news-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .news-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.freelancers-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 520px) {
  .freelancers-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .freelancers-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.clickable-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.clickable-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}

/* ========================================================
   4. NUMBERED PAGINATION STYLING (Point 5)
   ======================================================== */
.freelancemag-pagination {
  margin-top: 3.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  direction: rtl;
}

.freelancemag-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--fm-border);
  background: var(--fm-surface);
  color: var(--fm-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.freelancemag-pagination .page-numbers:hover {
  border-color: var(--fm-primary);
  color: var(--fm-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 64, 154, 0.15);
}

.freelancemag-pagination .page-numbers.current {
  background: var(--fm-primary) !important;
  color: #ffffff !important;
  border-color: var(--fm-primary) !important;
  box-shadow: 0 4px 15px rgba(34, 64, 154, 0.35);
  cursor: default;
}

.freelancemag-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: default;
  color: var(--fm-text-muted);
}

/* ========================================================
   5. MAGAZINE FLIPBOOK VIEWER MODAL (Point 6)
   ======================================================== */
.fm-flipbook-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fm-flipbook-modal.is-active {
  display: flex;
}

.fm-flipbook-container {
  width: 100%;
  max-width: 1100px;
  height: 88vh;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.fm-flipbook-header {
  padding: 0.85rem 1.5rem;
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.fm-flipbook-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #020617;
  padding: 1.5rem;
}

.fm-book-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.fm-flipbook-toolbar {
  padding: 0.75rem 1.5rem;
  background: #090d16;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ========================================================
   6. VOICE & AUDIO CARDS (Point 7)
   ======================================================== */
.voice-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.2s ease;
}

.voice-card:hover {
  border-color: var(--fm-accent);
  box-shadow: 0 10px 30px -8px rgba(69, 183, 74, 0.15);
  transform: translateY(-2px);
}

/* ========================================================
   7. GIG ECONOMY RADAR WIDGETS & SECTIONS
   ======================================================== */
.radar-section-box {
  background: #0f172a;
  color: #ffffff;
  border-radius: 2rem;
  padding: 2.5rem;
  margin-bottom: 3.5rem;
  border: 1px solid #1e293b;
}
.radar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.radar-badge {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.radar-title {
  font-size: 1.625rem;
  font-weight: 900;
  margin: 0.25rem 0 0 0;
  color: #ffffff;
}
.radar-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1024px) {
  .radar-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .radar-metrics-grid { grid-template-columns: 1fr; }
}
.radar-metric-item {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.8);
  padding: 1.25rem;
  border-radius: 1.25rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}
.radar-metric-item:hover {
  background: rgba(30, 41, 59, 1);
  border-color: #f59e0b;
  transform: translateY(-2px);
}
.radar-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #94a3b8;
}
.radar-metric-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  font-family: inherit;
}
.radar-metric-change {
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.radar-metric-change.positive { color: #4ade80; }
.radar-metric-change.neutral { color: #f59e0b; }
.radar-metric-name {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0;
}
.radar-metric-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

/* ========================================================
   8. MEDIA HUB & FREELANCE SHOW EPISODES
   ======================================================== */
.video-episodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 900px) {
  .video-episodes-grid { grid-template-columns: 1fr; }
}
.video-episode-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.video-episode-card:hover {
  border-color: var(--fm-primary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #020617;
  overflow: hidden;
}
.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-episode-card:hover .video-thumb-wrap img {
  transform: scale(1.03);
}
.video-play-badge {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play-badge span {
  width: 44px;
  height: 44px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.video-duration-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}
.video-card-body {
  padding: 1.25rem;
}
.video-card-body h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0.35rem 0 0.5rem 0;
  line-height: 1.5;
  color: var(--fm-text);
}
.video-card-body p {
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
  line-height: 1.6;
  margin: 0;
}
.video-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--fm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}

/* ========================================================
   9. AUDIO TRACKS & PODCASTS CARDS
   ======================================================== */
.audio-tracks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .audio-tracks-grid { grid-template-columns: 1fr; }
}
.audio-track-box {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}
.audio-track-box:hover {
  border-color: var(--fm-accent);
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.08);
}
.audio-track-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fm-primary);
  font-weight: 700;
}
.audio-track-box h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.5;
}
.audio-track-box p {
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
  line-height: 1.6;
  margin: 0;
}
.audio-track-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--fm-border);
  padding-top: 0.75rem;
}
.btn-play-audio {
  background: rgba(34, 64, 154, 0.08);
  border: 1px solid rgba(34, 64, 154, 0.2);
  color: var(--fm-primary);
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.btn-play-audio:hover {
  background: var(--fm-primary);
  color: #ffffff;
}

/* ========================================================
   10. UPCOMING EVENTS & CALENDAR SECTION
   ======================================================== */
.events-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .events-cards-grid { grid-template-columns: 1fr; }
}
.event-card-item {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}
.event-card-item:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}
.event-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.event-type-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
}
html.dark .event-type-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}
.event-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fm-text-muted);
}
.event-card-item h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.5;
}
.event-card-item p {
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
  line-height: 1.6;
  margin: 0;
}
.event-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--fm-border);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}
.event-card-bottom strong {
  color: var(--fm-primary);
}

/* ========================================================
   11. NEWSLETTER SIGNUP BOX (HOMEPAGE)
   ======================================================== */
.newsletter-section-box {
  background: linear-gradient(135deg, rgba(34,64,154,0.08) 0%, rgba(69,183,74,0.08) 100%);
  border: 1px solid var(--fm-border);
  border-radius: 2rem;
  padding: 2.5rem;
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.newsletter-section-box h3 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0.5rem 0 0.75rem 0;
  color: var(--fm-text);
}
.newsletter-section-box p {
  font-size: 0.875rem;
  color: var(--fm-text-muted);
  max-width: 550px;
  line-height: 1.8;
  margin: 0 0 1.5rem 0;
}
.newsletter-form-inline {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
}
.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--fm-border);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--fm-surface);
  color: var(--fm-text);
  outline: none;
}
.newsletter-btn {
  background: var(--fm-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-btn:hover {
  opacity: 0.9;
}

/* ========================================================
   12. USER ACCOUNT & DASHBOARD PAGE STYLES (page-account.php)
   ======================================================== */
.account-page-wrapper {
  background-color: var(--fm-bg);
  min-height: 80vh;
}
.auth-required-card {
  max-width: 550px;
  margin: 3rem auto;
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 2rem;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.auth-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.auth-required-card h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 0.75rem 0;
}
.auth-required-card p {
  font-size: 0.875rem;
  color: var(--fm-text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.auth-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.btn-primary {
  background: var(--fm-primary);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--fm-text);
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}
html.dark .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
}
.plugins-compatibility-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--fm-border);
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}

/* User Account Profile Bar */
.account-header-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.5rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.account-avatar-zone .account-avatar-img,
.account-avatar-zone img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--fm-primary);
  display: block;
}
.account-info-zone {
  flex: 1;
}
.account-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.account-name {
  font-size: 1.375rem;
  font-weight: 900;
  margin: 0;
}
.account-role-badge {
  background: rgba(69, 183, 74, 0.15);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
}
html.dark .account-role-badge {
  background: rgba(69, 183, 74, 0.25);
  color: #4ade80;
}
.account-meta-row {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
  flex-wrap: wrap;
}
.account-action-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.btn-submit-header {
  background: var(--fm-accent);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
}
.btn-logout-header {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

/* Account Grid */
.account-grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .account-grid-layout { grid-template-columns: 1fr; }
}
.account-sidebar {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.5rem;
  padding: 1rem;
  height: fit-content;
}
.account-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.account-tab-btn {
  text-align: right;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: none;
  background: transparent;
  color: var(--fm-text);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.account-tab-btn:hover {
  background: var(--fm-bg);
}
.account-tab-btn.active {
  background: var(--fm-primary);
  color: #ffffff;
}
.account-content-zone {
  min-height: 500px;
}
.account-tab-panel {
  display: none;
}
.account-tab-panel.active {
  display: block;
}

/* Stats Counter Grid */
.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .stats-counter-grid { grid-template-columns: 1fr; }
}
.stat-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--fm-primary);
  font-family: inherit;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
}

.account-section-box {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 1.5rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.account-section-box h3 {
  font-size: 1.125rem;
  font-weight: 900;
  margin: 0 0 1.25rem 0;
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .quick-links-grid { grid-template-columns: 1fr; }
}
.quick-link-item {
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.quick-link-item:hover {
  border-color: var(--fm-primary);
  transform: translateY(-2px);
}
.quick-link-item span {
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--fm-text);
}
.quick-link-item small {
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}

/* Posts Table */
.account-posts-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.account-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 0.75rem;
}
.post-title-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.post-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fm-text);
  text-decoration: none;
}
.post-link:hover {
  color: var(--fm-primary);
}
.post-date {
  font-size: 0.75rem;
  color: var(--fm-text-muted);
}
.badge-published {
  background: rgba(69, 183, 74, 0.15);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
}
.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
}
.subheading-green {
  color: #15803d;
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0.5rem 0 0.75rem 0;
}
.subheading-amber {
  color: #b45309;
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 1.5rem 0 0.75rem 0;
}

/* Edit Profile Form */
.account-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr; }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fm-text);
}
.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--fm-border);
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--fm-bg);
  color: var(--fm-text);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--fm-primary);
}
.plugin-recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.plugin-item-card {
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 1rem;
  padding: 1.25rem;
}
.plugin-item-card h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--fm-primary);
  margin: 0 0 0.35rem 0;
}
.plugin-item-card p {
  font-size: 0.8125rem;
  color: var(--fm-text-muted);
  line-height: 1.7;
  margin: 0;
}



