/* ==========================================================
   Sufi Saints of Islam - dark sidebar theme
   Change --accent to re-colour buttons, tabs and links.
   ========================================================== */
:root {
  --accent:#013a63;
  --accent-hover: #38b000;
  --page-bg: white;
  --shell-bg: white;
  --panel: #fafaff;
  --panel-2: white;
  --topbar: #013a63;
  --line: #e5e5e5;
  --text: black;
  --muted: #0f4c5c;
  --heading: navy;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px 38px;
  font-family: "Segoe UI", Roboto, "Noto Sans Bengali", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--page-bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- Shell ---------- */
.shell {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  background: var(--shell-bg);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  overflow: hidden;
  min-height: calc(100vh - 44px);
}

/* ---------- Sidebar ---------- */
.sidebar {
  flex: 0 0 180px;
  width: 380px;
  padding: 20px 18px 24px;
  border-right#: 1px solid var(--line);
  background: #013a63;
}
.brand { display: block; margin: 0 0 14px; }
.brand img { display: block; width: 100%; height: auto; }

.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu li { margin: 0; }
.side-menu a, .side-menu button.sub-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 0;
  font: inherit; font-size: 15px;
  color: #fff;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.side-menu a:hover, .side-menu button.sub-toggle:hover, .side-menu a.active { color:var(--accent-hover); }
.side-menu a.active { font-weight: 600; }
.side-menu .icon { color: #aeb5c7; flex: none; }
.side-menu .chev { margin-left: auto; transition: transform .2s; }
.side-menu .has-sub.open .chev { transform: rotate(90deg); }
.side-menu .sub { list-style: none; margin: 0 0 4px; padding: 0 0 0 24px; display: none; }
.side-menu .has-sub.open .sub { display: block; }
.side-menu .sub a { padding: 5px 0; color: var(--muted); }
.side-menu .sub a:hover{ color: var(--accent-hover); }
.side-menu hr { border: 0; border-top: none; margin: 12px 0; }

.social { display: flex; gap: 14px; padding: 6px 0 0 2px; }
.social a { color: #fff; }
.social a:hover { color: var(--accent-hover); }

/* ---------- Main column ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 14px 0 14px;
  height: 70px;
  background: var(--topbar);
  border-bottom : 1px solid var(--line);
}
.menu-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }
.top-links { display: flex; gap: 20px; }
.top-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;color:#fff;
}
.top-links a:hover { color: var(--accent-hover); }

.search {
  position: relative;
  width: 100%; max-width: 334px;
}
.search input {
  width: 100%; height: 28px;
  padding: 0 34px 0 8px;
  font: inherit; font-size: 11px; color: #fff;
  background: #014f86; border: 1px solid #2a6f97; border-radius: 4px; outline: none;
}
.search input::placeholder { color: #a9d6e5; }
.search input:focus { border-color: #2a6f97; }
.search button {
  position: absolute; right: 2px; top: 0; height: 28px; width: 30px;
  display: grid; place-items: center;
  background: none; border: 0; color: #a9d6e5; cursor: pointer;
}

.content { flex: 1; padding: 20px 14px 10px; }

/* ---------- Advertisement slot ---------- */
.ad-slot {
  display: none; align-items: center; justify-content: center;
  min-height: 68px; margin-bottom: 20px; padding: 10px;
  background: var(--panel-2);
  border: 1px dashed var(--line); border-radius: 6px;
  color: var(--muted); font-size: 11px; font-style: italic;
  overflow: hidden;
}

/* ---------- Section heading bar ---------- */
.section-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 12px; height: 30px; margin-bottom: 14px;
  background: var(--panel); border-radius: 4px; border:1px solid var(--line);
}
.section-bar h2, .section-bar h1 { margin: 0; font-size: 14px; font-weight: 700; color: var(--heading); }
.section-bar .more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; text-transform: uppercase; color: var(--muted);
}
.section-bar .more:hover { color: var(--accent-hover); }

/* ---------- Hero Section ---------- */
.sfs-hero {
    background: #01497c;
    color: #ffffff;
    padding: 64px 20px;
    text-align: center;
    margin-bottom:25px;
    border-radius:10px;
}
.sfs-hero__inner { max-width: 760px; margin: 0 auto; }
.sfs-hero__badge {
   display: inline-block;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    margin-bottom: 16px;
}
.sfs-hero__title { color: #ffffff; font-size: 2.2rem; line-height: 1.25; margin: 0 0 14px; }
.sfs-hero__text { color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; margin: 0 0 24px; }
.sfs-hero__btn {
    display: inline-block;
    background: #ffffff;
    color: #01497c;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}
.sfs-hero__btn:hover { opacity: 0.9; }

.sfs-section-title { color: #01497c; font-size: 1.6rem; margin: 0 0 8px; text-align: center;background: var(--panel); border-radius: 4px; border:1px solid var(--line) }
.sfs-section-sub { color: #555; text-align: center; margin: 0 0 28px; }

.sfs-tariqah { padding: 48px 0px; }
.sfs-tariqah__inner { max-width: 1300px; margin: 0 auto; }
.sfs-tariqah__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.sfs-tariqah__card {
    border: 1px solid #dde5ec;
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
}
.sfs-tariqah__card h3 { color: #01497c; font-size: 1.1rem; margin: 0 0 8px; }
.sfs-tariqah__card p { color: #444; font-size: 0.95rem; line-height: 1.6; margin: 0; }

.sfs-faq { padding: 0px 48px 40px;}
.sfs-faq__inner { max-width: 1300px; margin: 0 auto; }
.sfs-faq__item {
    border-bottom: 1px solid #dde5ec;
    padding: 14px 0;
}
.sfs-faq__item summary {
    cursor: pointer;
    color: #01497c;
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
            }
.sfs-faq__item summary::-webkit-details-marker { display: none; }
.sfs-faq__item summary::after { content: "+"; float: right; font-weight: 400; }
.sfs-faq__item[open] summary::after { content: "\2212"; }
.sfs-faq__item p { color: #444; line-height: 1.7; margin: 10px 0 0; }

.sfs-cta { padding: 48px 20px; text-align: center; background: var(--topbar); border:1px solid var(--line);border-radius:10px;}
.sfs-cta__inner { max-width: 1300px; margin: 0 auto; }
.sfs-cta__title { color: #fff; font-size: 1.5rem; margin: 0 0 8px; }
.sfs-cta__text { color: #fff; margin: 0 0 18px; }
.sfs-cta__btn {
    display: inline-block;
    background: var(--accent-hover);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.sfs-cta__btn:hover { opacity: 0.9; }

@media (max-width: 600px) {
.sfs-hero { padding: 44px 16px; }
.sfs-hero__title { font-size: 1.7rem; }
.sfs-section-title { font-size: 1.4rem; }
}

/* ---------- Post cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.card {
  display: flex; flex-direction: column;
  padding: 16px;
  background: var(--panel); border-radius: var(--radius);border: 1px solid var(--line);
  min-width: 0;
}
.card-head { display: flex; gap: 10px; align-items: flex-start; }
.card-thumb {
  flex: none; width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #efece4;
}
.card-title { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--header); }
.card-title a:hover { color: var(--accent-hover); text-decoration: none; text-underline-offset: 3px; }
.card-meta { margin: 10px 0 6px; font-size: 10px; color: var(--muted); }
.card-meta strong { color: var(--text); text-transform: uppercase; letter-spacing: .01em; }
.card-meta a:hover { color: #fff; }
.card-excerpt {
  flex: 1; margin: 0 0 12px; font-size: 11px; line-height: 1.9; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; justify-content: flex-end; }

.btn {
  display: inline-block; padding: 5px 12px;
  font: inherit; font-size: 10px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 999px; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--accent-hover); }

.load-more-wrap { display: flex; justify-content: center; margin: 22px 0 14px; }
.btn-load {
  padding: 8px 22px; font: inherit; font-size: 11px; color: #fff;
  background: #2c3347; border: 0; border-radius: 4px; cursor: pointer;
}
.btn-load:hover { background: var(--accent-hover); color: #fff; }
.btn-load[disabled] { opacity: .6; cursor: wait; }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 14px 0; padding: 14px 0; margin-bottom: 0;
  background: var(--shell-bg); font-size: 12px;
  border-radius: 0;border-top: 1px solid var(--line);
}
.footer { margin: 12px 0 0; padding: 14px 14px; }
.footer .links { display: flex; gap: 18px; }
.footer .links a { display: inline-flex; align-items: center; gap: 6px; color:var(--text);}
.footer a:hover { color: var(--accent-hover); }
.footer .credit { color: ver(--accent); }

/* ---------- Post page ---------- */
.post-card { background: var(--panel); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.post-header { background: var(--accent); color: var(--text); text-align: center; padding: 14px 16px; }
.post-header h1 { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.7rem); line-height: 1.3; }

.quick-info { padding: 18px; }
.quick-info .thumb {
  display: block; width: 100%; max-width: 260px; margin: 0 auto 16px;
  border-radius: 8px; background: #efece4;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.data-table tbody th { width: 30%; color: #cdd6f4; font-weight: 600; background: var(--panel-2); }
.data-table tbody td { background: #1e2330; }

.tabs {
  display: flex; gap: 4px; padding: 6px 6px 0;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin;
}
.tab {
  flex: 1 0 auto; display: block; text-align: center;
  padding: 10px 16px; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  color: var(--muted); border-radius: 6px 6px 0 0;
  transition: background .2s, color .2s;
}
.tab:hover { background: #2a3144; color: #fff; }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.tab:focus-visible { outline: 2px solid #8fb0ff; outline-offset: -2px; }

.tab-panel { padding: 20px 18px; min-height: 200px; }
.tab-panel h2 { margin: 0 0 14px; padding-bottom: 8px; font-size: 1.15rem; color: var(--heading); border-bottom: 2px solid var(--line); }
.tab-panel h3 { margin: 22px 0 6px; font-size: 1.02rem; color:var(--text); }
.tab-panel p { margin: 0 0 12px; color: Var(--text); text-align: justify; line-height: 1.8; }
.tab-panel a { color: var(--accent); text-decoration: underline; }
.tab-panel ul, .tab-panel ol { color: var(--text); line-height: 1.8; }
.tab-panel img { height: auto; border-radius: 6px; }
.faq-q { margin: 18px 0 4px; font-weight: 600; color: var(--text); }
.faq-a { margin: 0; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.breadcrumb { margin: 0 0 12px; font-size: 11px; color: var(--muted); }
.breadcrumb a:hover { color: #fff; }

.page-body { padding: 18px; background: var(--panel); border-radius: var(--radius); line-height: 1.8; color: #c9cfdd; }
.page-body h2, .page-body h3 { color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  body { padding: 0; }
  .shell { display: block; border-radius: 0; min-height: 100vh; }
  .sidebar {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: 240px; max-width: 80vw;
    overflow-y: auto; transform: translateX(-100%); transition: transform .25s;
  }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .menu-toggle { display: inline-flex; }
  .top-links { display: none; }
  .topbar { padding: 0 10px; }
  .search { max-width: none; }
}
@media (max-width: 599px) {
  .cards { grid-template-columns: 1fr; }
  .content { padding: 14px 10px 6px; }
  .footer { flex-direction: column; align-items: flex-start; }

  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
  .data-table th, .data-table td { border: none; padding: 6px 12px; }
  .data-table tbody th { width: 100%; }
  .data-table tbody td { padding-top: 2px; }
  .tab { padding: 10px 14px; }
}

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1300px; margin: 0 auto; padding: 24px 16px 60px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-bar nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.admin-bar strong {color:Green;font-size: 25px; font-weight: 600;}
.admin-bar a, .admin-bar button.linklike { color: var(--text); font-size: 14px; font-weight: 600; }
.admin-bar a:hover { color: var(--accent-hover); }
.linklike { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.panel { background: none; border-radius: var(--radius); padding: 0px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; color: var(--heading); }
.flash { padding: 10px 14px; margin-bottom: 16px; background: #123524; border: 1px solid #1f6b46; color: #b9f3d2; border-radius: 8px; }
.errors { padding: 10px 14px; margin-bottom: 16px; background: #3a1820; border: 1px solid #7a2a3a; color: #ffc9d3; border-radius: 8px; }
.errors ul { margin: 0; padding-left: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 500; color: var(--text); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=datetime-local],
.field select, .field textarea {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text);
  background: #f8f9fa; border: 1px solid var(--line); border-radius: 6px; outline: none;
}
.field textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { margin-top: 4px; font-size: 11px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.repeat-item { padding: 12px; margin-bottom: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.info-row { display: grid; grid-template-columns: 1fr 1.6fr 1.4fr auto; gap: 8px; margin-bottom: 8px; }
.info-row input { padding: 8px 10px; font: inherit; color: var(--text); background: #f8f9fa; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.btn-sm { padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 600; color: #fff; background: #333c52; border: 0; border-radius: 6px; cursor: pointer; }
.btn-sm:hover { background: #3f4a66; }
.btn-primary { padding: 9px 20px; font: inherit; font-weight: 600; color: #fff; background: var(--accent-hover); border: 0; border-radius: 6px; cursor: pointer; }
.btn-primary:hover { background: #70e000; }
.btn-danger { background: red; }
.btn-danger:hover { background: #9a2a3d; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.badge { display: inline-block; padding: 1px 8px; font-size: 10px; font-weight: 700; border-radius: 999px; background: #e9ecef; }
.badge.ok { background: none; color: #38b000; }
.thumb-sm { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: #efece4; }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.login-box { max-width: 380px; margin: 12vh auto 0; }
.pager { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pager a, .pager span { padding: 4px 10px; background: var(--panel-2); border-radius: 4px; font-size: 12px; }
.pager .current { background: var(--accent); color:#fff;}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; }
}

/* ---------- Admin: post-system switch + rich editor ---------- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.mode-opt:has(input:checked) { border-color: #adb5bd; background: #dee2e6; }
.mode-opt input { margin-top: 4px; }
.mode-opt strong { display: block; font-size: 13px; color: var(--heading); }
.mode-opt small { display: block; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .mode-switch { grid-template-columns: 1fr; } }

.rte { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #e9ecef; }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; background: #f8f9fa; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.rte-toolbar button, .rte-toolbar select { min-width: 34px; height: 34px; padding: 0 8px; font: inherit; font-size: 14px; color: var(--text); background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.rte-toolbar select { background: none; border: 1px solid var(--line); min-width: 96px; }
.rte-toolbar button:hover { background: #e9ecef; }
.rte-toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 380px; max-height: 70vh; overflow: auto; outline: none; background: #fff; color: #222; padding: 16px; }
.rte-area.rich-body { color: #222; background: #fff; font-size: 16px; }
.rte-area h1, .rte-area h2, .rte-area h3, .rte-area h4 { color: #111; border-color: #ddd; }
.rte-area a { color: #1a56db; }
.rte-area table th, .rte-area table td { border: 1px solid #bbb; background: #fff; color: #222; min-width: 60px; }
.rte-area table td:first-child { background: #f4f4f4; }
.rte-area blockquote { background: #f3f4f6; color: #222; }
.rte-source { display: block; width: 100%; min-height: 380px; padding: 14px; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--text); background: #fff; border: 0; outline: none; resize: vertical; }
.rte-source[hidden] { display: none; }
.rte-views { display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--panel-2); border-top: 1px solid var(--line); }
.rte-views button { padding: 5px 14px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.rte-views button.on { color: #fff; background: var(--accent); }
.rte-status { margin-left: auto; font-size: 11px; color: var(--muted); }
.rte-area table td:first-child, .rte-area table th { color: #222; }

/* ---------- Public: Blogger-style post body ---------- */
.rich-body { padding: 18px; color: #c9cfdd; line-height: 1.8; font-size: 14.5px; overflow-x: auto; overflow-wrap: anywhere; }
.rich-body img { max-width: 100%; height: auto; border-radius: 6px; }
.rich-body h1, .rich-body h2 { margin: 22px 0 12px; padding-bottom: 8px; font-size: 1.25rem; color: var(--heading); border-bottom: 2px solid var(--line); }
.rich-body h3 { margin: 20px 0 8px; font-size: 1.08rem; color: #cdd6f4; }
.rich-body h4 { margin: 16px 0 6px; font-size: 1rem; color: #cdd6f4; }
.rich-body p { margin: 0 0 12px; color:var(--text);}
.rich-body a { color: #7ea2ff; text-decoration: underline; }
.rich-body blockquote { margin: 14px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--panel-2); color: #cdd6f4; }
.rich-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.rich-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.rich-body th, .rich-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.rich-body th, .rich-body td:first-child { background: var(--panel-2); }
.rich-body td:first-child { font-weight: 600; color: #cdd6f4; }
.rich-body ul, .rich-body ol { padding-left: 24px;color:var(--text); }

/* ==========================================================
   Post page v2 (Blogger-like): breadcrumb, title, info table, widgets
   ========================================================== */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 26px; align-items: start; }
.post-layout > .widgets {
    position: sticky !important;
    top: 20px !important;
    align-self: start;
    height: fit-content;
}
.post-main { min-width: 0; }
.post-main hr { color: var(--text); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 0 0 10px; font-size: 10.5px; color: var(--muted); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: #aab2c5; overflow-wrap: anywhere; }

.post-title { margin: 4px 0 6px; font-size: 1.5rem; line-height: 1.3; font-weight: 800; color: #0077b6; overflow-wrap: anywhere; margin-bottom:10px; }
.post-meta { margin-bottom: 20px; font-size: 10.5px; color: var(--muted); }
.post-meta strong { color: var(--text); text-transform: uppercase; }

.post-thumb {
  display: flex; width: 100%; height: 300px; aspect-ratio: 1 / 1;
  margin: 0 auto 20px; border-radius: 5px; background: #efece4;
}

.info-table, .rich-body table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 13px; }
.info-table th, .info-table td, .rich-body th, .rich-body td {
  padding: 10px 10px; text-align: left; vertical-align: top;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.info-table th, .rich-body td:first-child, .rich-body th { width: 30%; font-weight: 700; color: var(--accent); background: transparent; }
.info-table td { color: Var(--text); overflow-wrap: anywhere; }
.info-table td a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.info-table td a:hover { color: #fff; }

.post-main .rich-body { padding: 0; font-size: 14px; }
.post-main .rich-body h2, .post-main .tab-panel h2 { margin: 26px 0 10px; padding: 0; font-size: 1.45rem; font-weight: 800; color: grey; border: 0; }
.post-main .rich-body h3, .post-main .tab-panel h3 { margin: 20px 0 8px; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.post-main .rich-body > :first-child { margin-top: 0; }
.post-main .rich-body img { display: block; margin: 12px auto; }
.post-main .post-card { margin-bottom: 20px; }
.post-main .tab-panel { overflow-x: auto; overflow-wrap: anywhere; }
.sections-flat .section-block { margin-bottom: 8px; }
@media (min-width: 769px) {
.post-layout {overflow: visible !important;}
.post-layout > aside.widgets {position: -webkit-sticky !important;position: sticky !important;top: 20px !important;align-self: start !important;height: max-content !important;}
}

/* ---------- SEO Panel ---------- */
.seo-preview { margin-bottom: 16px; padding: 12px 14px; background: #ffffea; border-radius: 8px; font-family: Arial, sans-serif;border:1px solid var(--line); }
.seo-preview .sp-title { color: #1a0dab; font-size: 18px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview .sp-url { color: #006621; font-size: 12.5px; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview .sp-desc { color: #545454; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hint-inline { font-weight: 400; color: var(--muted); font-size: 11px; }
.counter { float: right; font-weight: 500; font-size: 13px; color: var(--muted); }
.counter.ok { color: #55a630; } .counter.bad { color: #ff9aa8; }
.slug-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slug-row span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.slug-row input { flex: 1; min-width: 160px; padding: 9px 11px; font: inherit; color: var(--text); background: #171c27; border: 1px solid var(--line); border-radius: 6px; }
.seo-score { margin-top: 6px; padding: 12px; background: #fff1e6; border: 1px solid var(--line); border-radius: 8px; }
.score-badge { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #333c52; }
.score-badge.good { background: #55a630; color: #fff; } .score-badge.mid { background: #713f12; color: #fde68a; } .score-badge.low { background: #7a1f2e; color: #ffd0d8; }
.seo-checks { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; }
.seo-checks li { padding: 3px 0 3px 22px; position: relative; color: #24272b; }
.seo-checks li::before { position: absolute; left: 0; top: 3px; font-weight: 700; }
.seo-checks li.ok::before { content: "\2714"; color: #55a630; } .seo-checks li.no::before { content: "\2716"; color: #ff9aa8; }

/* ---------- Sidebar widgets ---------- */
.widgets { display: flex; flex-direction: column; gap: 22px; min-width: 0;}
.widget-title { margin: 0 0 12px; padding: 8px 12px; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); border-radius: 3px; }
.widget-search { display: flex; }
.widget-search input { flex: 1; min-width: 0; height: 32px; padding: 0 9px; font: inherit; font-size: 12px; color: #fff; background: #E8F0FE; border: 0; border-radius: 3px 0 0 3px; outline: none; }
.widget-search button { height: 32px; padding: 0 14px; font: inherit; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 0 3px 3px 0; cursor: pointer; }
.widget-search button:hover { background: var(--accent-hover); }

.widget-list { list-style: none; margin: 0; padding: 0 2px; }
.widget-list li { border-bottom: 1px dashed var(--line); }
.widget-list a { position: relative; display: block; padding: 8px 0 8px 12px; font-size: 12px; font-weight: 600; color: var(--text); }
.widget-list a::before { content: "\25B8"; position: absolute; left: 0; top: 8px; font-size: 10px; color: var(--muted); }
.widget-list a:hover { color: var(--accent-hover); }

.widget-social { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: 8px; }
.widget-social a { display: grid; place-items: center; height: 40px; background: var(--accent); border-radius: 3px; color: #fff; }
.widget-social a:hover { background: var(--accent-hover); color: #fff; }

.pop { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.pop img { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 3px; background: #efece4; }
.pop strong { display: block; font-size: 12px; line-height: 1.4; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.pop small { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.pop:hover strong { text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================
   Mobile refinements
   ========================================================== */
.mobile-brand { display: none; }
.backdrop { display: none; }
body { overflow-x: hidden; }

@media (max-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

@media (max-width: 800px) {
  .sidebar.open { box-shadow: none; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .topbar { gap: 8px; height: 54px; position: sticky; top: 0; z-index: 30; }
  .mobile-brand { display: block; flex: none; }
  .mobile-brand img { display: block; height: 32px; width: auto; }
  .menu-toggle { padding: 8px; margin-left: -4px; }
  .search { flex: 1; max-width: none; }
  .search input { height: 34px; font-size: 13px; }
  .search button { height: 34px; }
  .ad-slot { min-height: 56px; }
}

@media (max-width: 599px) {
  .widgets { grid-template-columns: minmax(0, 1fr); }
  .post-title { font-size: 1.25rem; }
  .post-thumb { max-width: 220px; }
  .info-table, .rich-body table { font-size: 12.5px; }
  .info-table th, .info-table td, .rich-body th, .rich-body td { padding: 8px 6px; }
  .info-table th, .rich-body td:first-child, .rich-body th { width: 36%; }
  .post-main .rich-body h2, .post-main .tab-panel h2 { font-size: 1.25rem; }
  .tab-panel { padding: 16px 14px; }
  .tab-panel p, .rich-body p { text-align: left; }
  .btn { padding: 7px 16px; font-size: 11px; }
  .btn-load { padding: 10px 28px; font-size: 12px; }
  .card { padding: 14px; }
  .card-title { font-size: 14px; }
  .card-excerpt { font-size: 12px; }
  .section-bar { height: 34px; }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-wrap { padding: 16px 12px 50px; }
}
