/*
Theme Name: Jahan Music Pro
Theme URI: http://takhribchi68.ir/
Author: Jahan Music
Description: قالب RTL بهینه و مدرن برای جهان موزیک — همان ساختار سه‌ستونه با سایدبار پایدار
Version: 1.0.1
Text Domain: jahan-music-pro
*/

@import url("https://cdn.jsdelivr.net/npm/vazirmatn@33.003/Vazirmatn-font-face.css");

:root {
  --bg: #eef1f5;
  --bg-soft: #f7f8fb;
  --surface: #ffffff;
  --ink: #1a2332;
  --muted: #5b6b7c;
  --line: #dde3ea;
  --accent: #d61f3a;
  --accent-dark: #b0152e;
  --nav: #1b2430;
  --nav-2: #121820;
  --shadow: 0 8px 24px rgba(18, 28, 45, 0.08);
  --radius: 14px;
  --max: 1180px;
  --font: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  --right-w: 240px;
  --left-w: 300px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(214, 31, 58, 0.08), transparent 55%),
    linear-gradient(180deg, #f4f6f9 0%, var(--bg) 40%, #e8ecf2 100%);
  line-height: 1.85;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; border: 0; display: inline-block; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease, background .15s ease; }
a:hover { color: var(--accent-dark); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6rem; line-height: 1.45; color: var(--ink); font-weight: 800; }
p { margin: 0 0 .9rem; }
.clearfix::after, .jm-clear::after { content: ""; display: table; clear: both; }

.jm-wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

/* Top nav */
.jm-topbar {
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  color: #fff;
  border-bottom: 2px solid var(--accent);
}
.jm-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 54px;
  flex-wrap: wrap;
  padding: .45rem 0;
}
.jm-date { color: rgba(255,255,255,.72); font-size: .82rem; white-space: nowrap; }
.jm-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  justify-content: flex-start;
}
.jm-nav a {
  color: rgba(255,255,255,.9);
  font-size: .86rem;
  font-weight: 650;
  padding: .4rem .7rem;
  border-radius: 999px;
}
.jm-nav a:hover { background: rgba(214, 31, 58, 0.22); color: #fff; }
.jm-search {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid transparent;
}
.jm-search input {
  border: 0;
  outline: none;
  padding: .45rem .9rem;
  min-width: 160px;
  font-family: inherit;
  font-size: .85rem;
}
.jm-search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  padding: .45rem .95rem;
  cursor: pointer;
}
.jm-search button:hover { background: var(--accent-dark); }

/* Brand header */
.jm-header {
  padding: 1.1rem 0 1rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.55)),
    radial-gradient(circle at 90% 20%, rgba(214,31,58,.12), transparent 45%);
  border-bottom: 1px solid var(--line);
}
.jm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.jm-brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: inherit;
}
.jm-brand img {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(214,31,58,.25));
}
.jm-brand-name {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.02em;
}
.jm-brand-sub { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.jm-banner {
  flex: 1;
  min-width: 220px;
  text-align: left;
  color: var(--muted);
  font-size: .92rem;
}
.jm-banner h1 { font-size: 1.1rem; margin: 0; color: var(--ink); }

.jm-crumbs {
  padding: .55rem 0;
  font-size: .82rem;
  color: var(--muted);
}
.jm-crumbs a { color: var(--muted); }
.jm-crumbs a:hover { color: var(--accent); }

/* Layout grid — RTL: col1=right sidebar, col2=content, col3=left sidebar */
.jm-layout {
  display: grid !important;
  grid-template-columns: var(--right-w) minmax(0, 1fr) var(--left-w) !important;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0 2rem;
}
.jm-side-right { grid-column: 1; grid-row: 1; min-width: 0; }
.jm-main { grid-column: 2; grid-row: 1; min-width: 0; }
.jm-side-left { grid-column: 3; grid-row: 1; min-width: 0; }

/* Cards / widgets / posts */
.jm-card,
.jm-widget,
.box,
.widget,
.post,
.jm-notice,
.comments {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}
.jm-widget .jm-widget-title,
.box > .title,
.widget .widget-title,
.post > .title,
.comments > .title,
.jm-notice > .title,
h3.jm-widget-title {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border-bottom: 1px solid var(--line);
  padding: .7rem 1rem;
  position: relative;
  margin: -0.9rem -1rem .75rem;
  font-size: .98rem;
  color: var(--accent);
}
.jm-widget .jm-widget-title h3,
.box > .title h3,
.post > .title h2,
.post > .title h3,
.comments > .title,
h3.jm-widget-title {
  margin: 0;
  font-size: .98rem;
  color: var(--accent);
  padding-right: .65rem;
}
.jm-widget .jm-widget-title h3::before,
.box > .title h3::before,
.post > .title h2::before,
.comments > .title::before,
h3.jm-widget-title::before {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: var(--accent);
}
.jm-widget-body,
.box > .content,
.box .contents,
.post .contents,
.comments .content,
.jm-notice .contents {
  padding: .9rem 1rem 1rem;
}
.post .entry-title a { color: var(--ink); }
.post .entry-title a:hover { color: var(--accent); }
.post-more-link { margin-top: .75rem; font-size: .9rem; color: var(--muted); }
.jm-notice h6 { margin: 0 0 .35rem; font-weight: 700; color: var(--ink); font-size: .92rem; }

.jm-side-right .jm-widget a,
.jm-side-left .jm-widget a,
.sidebar-right a,
.sidebar-left a,
.box .content a {
  display: block;
  padding: .35rem 0;
  color: var(--ink);
  border-bottom: 1px dashed #eef1f5;
  font-size: .88rem;
}
.jm-side-right .jm-widget a:last-child,
.box .content li:last-child a { border-bottom: 0; }
.jm-side-right .jm-widget a:hover,
.box .content a:hover { color: var(--accent); }

/* Tag cloud */
.tagcloud a,
.wp-tag-cloud a {
  display: inline-block !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  padding: .2rem .65rem !important;
  margin: .2rem !important;
  background: var(--bg-soft) !important;
  color: var(--muted) !important;
  font-size: .78rem !important;
}
.tagcloud a:hover,
.wp-tag-cloud a:hover {
  background: rgba(214,31,58,.1) !important;
  color: var(--accent) !important;
  border-color: rgba(214,31,58,.25) !important;
}

/* Behtarinseo / ads */
.behtarinseo,
.behtarinseo a,
.execphpwidget,
.custom-html-widget {
  font-size: .86rem;
  line-height: 1.7;
}
.behtarinseo a {
  display: block;
  padding: .4rem .55rem;
  margin: .3rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink) !important;
  text-align: center;
}
.behtarinseo a:hover {
  border-color: rgba(214,31,58,.35);
  background: rgba(214,31,58,.06);
  color: var(--accent) !important;
}
.custom-html-widget a {
  display: block;
  text-align: center;
  padding: .55rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 800;
}
.custom-html-widget a:hover { background: var(--accent-dark); color: #fff !important; }

/* Download buttons */
.download {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0;
}
.download a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(214,31,58,.25);
}
.download a:hover { background: var(--accent-dark); color: #fff !important; }

.jm-socials {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
}
.jm-socials a {
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.jm-socials a:hover { border-color: var(--accent); color: var(--accent); }

.rel_posts ul { display: grid; gap: .35rem; }
.rel_posts a { color: var(--ink); }
.rel_posts a:hover { color: var(--accent); }

/* Pagination */
.pagination,
.jm-pager,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: center;
  margin: 1.2rem 0;
}
.pagination a,
.pagination span,
.jm-pager a,
.jm-pager span,
.nav-links a,
.nav-links span {
  display: inline-flex;
  min-width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  padding: 0 .55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.pagination .current,
.nav-links .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Footer */
.jm-footer {
  background: linear-gradient(180deg, #1b2430 0%, #121820 100%);
  color: rgba(255,255,255,.78);
  padding: 1.6rem 0 1.3rem;
  margin-top: .5rem;
  border-top: 3px solid var(--accent);
}
.jm-footer a { color: rgba(255,255,255,.88); }
.jm-footer a:hover { color: #fff; }
.jm-footer-inner {
  display: grid;
  gap: .85rem;
  text-align: center;
}
.jm-footer-brand { font-weight: 900; color: #fff; font-size: 1.05rem; }
.jm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .85rem;
  justify-content: center;
  font-size: .84rem;
}
.jm-footer-copy { font-size: .82rem; color: rgba(255,255,255,.55); }

/* Content safety */
.jm-main img { max-width: 100%; height: auto; }
.jm-main iframe,
.jm-main video,
.jm-main embed,
.jm-main object { max-width: 100%; }
.jm-main table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }

@media (max-width: 1024px) {
  :root { --right-w: 170px; --left-w: 240px; }
  .jm-layout { gap: .75rem; }
}
@media (max-width: 860px) {
  .jm-layout {
    grid-template-columns: 1fr !important;
  }
  .jm-side-right { grid-column: 1; grid-row: 2; }
  .jm-main { grid-column: 1; grid-row: 1; }
  .jm-side-left { grid-column: 1; grid-row: 3; }
  .jm-brand-name { font-size: 1.2rem; }
  .jm-search { width: 100%; }
  .jm-search input { flex: 1; min-width: 0; }
  .jm-nav { width: 100%; }
}

/* breakout-harden-1.0.1 */
.jm-layout > .jm-side-right,
.jm-layout > .sidebar-right { grid-column: 1 !important; grid-row: 1 !important; }
.jm-layout > .jm-main,
.jm-layout > .page-body { grid-column: 2 !important; grid-row: 1 !important; min-width: 0 !important; }
.jm-layout > .jm-side-left,
.jm-layout > .sidebar-left { grid-column: 3 !important; grid-row: 1 !important; }
/* any escaped posts/articles must stay in the center column */
.jm-layout > .post,
.jm-layout > article,
.jm-layout > .jm-card,
.jm-layout > .jm-notice,
.jm-layout > .comments,
.jm-layout > .pagination,
.jm-layout > .jm-pager,
.jm-layout > nav,
.jm-layout > div:not(.jm-side-right):not(.jm-side-left):not(.jm-main):not(.sidebar-right):not(.sidebar-left) {
  grid-column: 2 !important;
  grid-row: auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.jm-banner:empty { display: none; }
.jm-header-inner { align-items: center; }
@media (max-width: 860px) {
  .jm-layout > .jm-side-right,
  .jm-layout > .sidebar-right,
  .jm-layout > .jm-main,
  .jm-layout > .page-body,
  .jm-layout > .jm-side-left,
  .jm-layout > .sidebar-left,
  .jm-layout > .post,
  .jm-layout > article {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .jm-layout > .jm-main { order: -1; }
}
