@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

.bw-canvas{max-width:900px;margin:0 auto;padding:24px 16px}

.bw-block-wrap{margin-bottom:0}
.bw-block-wrap:not(.bw-width-full){max-width:900px;margin-left:auto;margin-right:auto;padding:8px 16px}
.bw-block-wrap.bw-width-full{width:100vw;position:relative;right:50%;left:50%;margin-right:-50vw;margin-left:-50vw;padding:16px calc(50vw - 450px)}
@media(max-width:900px){.bw-block-wrap.bw-width-full{padding:16px 16px}}

/* ردیف‌های چندستونه (مثلا هدر: لوگو + منو + دکمه‌ها در یک خط) */
.bw-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.bw-row .bw-cell{min-width:0}
.bw-row-cols-1 > .bw-cell{flex:1 1 100%}
.bw-row-cols-2 > .bw-cell,.bw-row-cols-3 > .bw-cell,.bw-row-cols-4 > .bw-cell,
.bw-row-cols-5 > .bw-cell,.bw-row-cols-6 > .bw-cell,.bw-row-cols-7 > .bw-cell{flex:1 1 140px}
.bw-row .bw-cell .bw-block-wrap{max-width:none;padding:4px 0;margin:0}
@media(max-width:700px){
  /* موبایل: هر ستون در یک ردیف جدا، زیر هم (حتی اگر ۷ ستون پر شده باشد) */
  .bw-row{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:10px}
  .bw-row > .bw-cell,
  .bw-row-cols-2 > .bw-cell,.bw-row-cols-3 > .bw-cell,.bw-row-cols-4 > .bw-cell,
  .bw-row-cols-5 > .bw-cell,.bw-row-cols-6 > .bw-cell,.bw-row-cols-7 > .bw-cell{flex:0 0 auto;width:100%}
  /* آیتم‌های منوی هدر هم هرکدام در یک خط جدا */
  .site-builder-header .bw-menu,
  .site-builder-header .bw-menu.align-left{flex-direction:column;flex-wrap:nowrap;gap:8px;align-items:flex-start}
  .site-builder-header .bw-menu.align-center{align-items:center}
  .site-builder-header .bw-menu.align-left{align-items:flex-end}
  .site-builder-header .bw-menu a{display:block}
}

.bw-heading{margin:0 0 16px;font-family:'Vazirmatn',Tahoma,sans-serif}
.bw-heading a{color:inherit;text-decoration:none}
.bw-heading a:hover{text-decoration:underline}
.bw-heading.align-center{text-align:center}
.bw-heading.align-left{text-align:left}

.bw-text{line-height:1.9;margin-bottom:16px;color:var(--text,#1d2327)}

.bw-image{margin-bottom:16px}
.bw-image.align-center{text-align:center}
.bw-image.align-left{text-align:left}
.bw-image img{max-width:100%;border-radius:8px}
.bw-image-caption{text-align:center;font-size:16px;font-weight:bold;color:var(--text,#1d2327);margin-top:10px;font-family:'Vazirmatn',Tahoma,sans-serif}

.bw-carousel{position:relative;margin-bottom:16px;border-radius:8px;overflow:hidden}
.bw-carousel-track{display:flex;transition:transform .4s ease}
.bw-carousel-slide{min-width:100%}
.bw-carousel-slide img{width:100%;display:block}
.bw-carousel-prev,.bw-carousel-next{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.5);color:#fff;border:0;width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:18px}
.bw-carousel-prev{right:10px}
.bw-carousel-next{left:10px}

/* ---------- کروسل آگهی‌های جدید ---------- */
.bw-lcarousel{position:relative;margin-bottom:16px;padding:0 44px;box-sizing:border-box}
.bw-lcarousel-track{display:flex;transition:transform .4s ease;overflow:hidden}
.bw-lcarousel-page{display:flex;gap:14px;min-width:100%;box-sizing:border-box}
.bw-lcarousel .bw-carousel-prev,.bw-lcarousel .bw-carousel-next{background:var(--primary,#2271b1)}
@media(max-width:900px){.bw-lcarousel-page{flex-wrap:wrap}.bw-lcarousel-page .bw-lcard{flex:0 0 calc(50% - 7px) !important;max-width:calc(50% - 7px) !important}}
@media(max-width:520px){.bw-lcarousel-page{flex-wrap:wrap}.bw-lcarousel-page .bw-lcard{flex:0 0 100% !important;max-width:100% !important}.bw-lcarousel{padding:0 36px}}
.bw-lcard{display:block;background:var(--bg-elevated,#fff);border:1px solid var(--border,#e2e2e4);border-radius:8px;overflow:hidden;color:var(--text,#1d2327);text-decoration:none;box-sizing:border-box}
.bw-lcard:hover{border-color:var(--primary,#2271b1);text-decoration:none}
.bw-lcard-img-wrap{position:relative}
.bw-lcard img{width:100%;height:150px;object-fit:cover;display:block;background:var(--bg,#f6f7f7)}
.bw-lcard-noimg{width:100%;height:150px;background:var(--bg,#f6f7f7);display:flex;align-items:center;justify-content:center;color:var(--text-muted,#8c8f94);font-size:12px}
.bw-lcard-body{padding:10px 12px}
.bw-lcard-cat{font-size:11px;color:var(--text-muted,#8c8f94);margin-bottom:4px}
.bw-lcard-title{font-size:14px;font-weight:bold;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.bw-lcard-price{color:var(--primary,#2271b1);font-weight:bold;font-size:15px}
.bw-lcard-price-caption{font-size:11px;color:var(--text-muted,#8c8f94);margin-bottom:8px}
.bw-lcard-meta{font-size:11px;color:var(--text-muted,#8c8f94);display:flex;flex-direction:column;gap:3px}
.bw-lcard.featured{border-color:#e0b400}
.bw-lcard-featured-badge{position:absolute;top:8px;right:8px;background:#fff3cd;color:#7a5c00;font-size:11px;padding:2px 8px;border-radius:10px}
.bw-lcard-new-badge{position:absolute;top:8px;right:8px;background:var(--primary,#0f5c72);color:#fff;font-size:11px;padding:2px 10px;border-radius:6px;font-weight:bold}

.bw-menu{display:flex;gap:18px;margin-bottom:16px;flex-wrap:wrap}
.bw-menu.align-center{justify-content:center}
.bw-menu.align-left{justify-content:flex-start;flex-direction:row-reverse}
.bw-menu a{color:inherit;font-size:14px}

.bw-logo{margin-bottom:16px}
.bw-logo.align-center{text-align:center}
.bw-logo.align-left{text-align:left}
.bw-logo img{display:inline-block}

.bw-accordion{margin-bottom:16px;border:1px solid var(--border,#e2e2e4);border-radius:8px;overflow:hidden}
.bw-accordion-item{border-bottom:1px solid var(--border,#e2e2e4)}
.bw-accordion-item:last-child{border-bottom:0}
.bw-accordion-toggle{width:100%;text-align:right;background:var(--bg-elevated,#fff);border:0;padding:14px 16px;font-size:14px;font-weight:bold;cursor:pointer;display:flex;justify-content:space-between;color:var(--text,#1d2327)}
.bw-accordion-content{max-height:0;overflow:hidden;padding:0 16px;transition:max-height .3s ease, padding .3s ease}
.bw-accordion-item.open .bw-accordion-content{max-height:5000px;padding:0 16px 16px}

.bw-table{width:100%;border-collapse:collapse;margin-bottom:16px}
.bw-table th,.bw-table td{border:1px solid var(--border,#e2e2e4);padding:10px 12px;font-size:13px;text-align:right}
.bw-table th{background:var(--bg,#f6f7f7);font-weight:bold}

.bw-tabs{margin-bottom:16px}
.bw-tab-nav{display:flex;gap:6px;border-bottom:2px solid var(--border,#e2e2e4);margin-bottom:14px;flex-wrap:wrap}
.bw-tab-btn{background:none;border:0;padding:10px 16px;font-size:13px;cursor:pointer;color:var(--text-muted,#646970);border-bottom:2px solid transparent;margin-bottom:-2px}
.bw-tab-btn.active{color:var(--primary,#2271b1);border-bottom-color:var(--primary,#2271b1);font-weight:bold}
.bw-tab-panel{display:none}
.bw-tab-panel.active{display:block}
.bw-tab-text{line-height:1.8;margin-bottom:10px}
.bw-tab-images{display:flex;gap:8px;flex-wrap:wrap}
.bw-tab-img{width:140px;height:100px;object-fit:cover;border-radius:6px}

/* ---------- خط جداکننده ---------- */
.bw-divider{margin:20px auto;border:0;border-top:1px solid #dcdcde}

/* ---------- دکمه ---------- */
.bw-button-wrap{display:flex;margin:6px 0}
.bw-button-wrap.align-right{justify-content:flex-start}
.bw-button-wrap.align-center{justify-content:center}
.bw-button-wrap.align-left{justify-content:flex-end}
.bw-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box;transition:filter .15s,transform .15s}
.bw-button:hover{filter:brightness(1.08);transform:translateY(-1px)}
.bw-button:active{transform:translateY(0)}
.bw-button-text{padding:12px 28px;border-radius:10px;font-size:15px;font-weight:600;min-width:140px}
.bw-button-icon{width:52px;height:52px;border-radius:50%}
.bw-button-icon svg{width:22px;height:22px}

/* ---------- لیست دسته‌بندی نوشته‌ها (کارت‌های شیشه‌ای برجسته) ---------- */
.bw-catlist{display:flex;flex-direction:column;gap:12px}
.bw-catlist-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  box-sizing:border-box;
  padding:16px 22px;
  border-radius:14px;
  text-decoration:none;
  color:var(--text,#1d2327);
  font-size:16px;
  font-weight:600;
  background:rgba(255,255,255,.55);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(0,0,0,.06);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 3px 10px rgba(0,0,0,.06);
  transition:transform .15s, box-shadow .15s;
}
.bw-catlist-item:hover{
  transform:translateY(-2px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 6px 16px rgba(0,0,0,.1);
}
.bw-catlist-item:active{transform:translateY(0)}
.bw-catlist-item-arrow{color:var(--text-muted,#8c8f94);font-size:18px}
.bw-catlist-empty{color:var(--text-muted,#8c8f94);padding:14px 0}

[data-theme="dark"] .bw-catlist-item{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.1);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 3px 10px rgba(0,0,0,.25);
}

.bw-audio{background:var(--bg-elevated,#fff);border:1px solid var(--border,#e2e2e4);border-radius:8px;padding:14px 16px;margin-bottom:16px}
.bw-audio-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:bold}
.bw-audio-download{background:var(--primary,#2271b1);color:#fff;padding:6px 14px;border-radius:6px;font-size:12px;text-decoration:none}

.site-builder-header.is-sticky{position:sticky;top:0;z-index:200;background:var(--bg-elevated,#fff);box-shadow:0 1px 4px rgba(0,0,0,.06)}

/* ارتفاع هدر همیشه استاندارد بماند، حتی اگر عکس/لوگوی بزرگی داخلش گذاشته شود */
.site-builder-header{padding:10px 24px}
.site-builder-header .bw-logo,.site-builder-header .bw-image{margin-bottom:0}
.site-builder-header .bw-logo img,.site-builder-header .bw-image img{
  max-height:56px;
  width:auto !important;
  max-width:220px;
}
.site-builder-footer .bw-logo img,.site-builder-footer .bw-image img{
  max-height:56px;
  width:auto !important;
  max-width:220px;
}

/* ---------- ویجت آکورد گیتار ---------- */
.bw-chords{margin-bottom:16px;border:1px solid var(--border,#e2e2e4);border-radius:10px;overflow:hidden;background:var(--bg-elevated,#fff);max-width:100%}
.bw-chords-toolbar{padding:12px 16px;border-bottom:1px solid var(--border,#e2e2e4);text-align:left}
.bw-chord-guide-btn{background:#0f5c72;color:#fff;border:0;padding:9px 18px;border-radius:6px;cursor:pointer;font-size:13px}
.bw-chord-guide-btn:hover{background:#0c4a5c}

.bw-chord-guide-panel{display:none;padding:20px;border-bottom:1px solid var(--border,#e2e2e4);background:var(--bg,#f7f7f8)}
.bw-chord-guide-panel.open{display:flex;flex-direction:column;gap:20px;max-width:440px;margin:0 auto}
.bw-chord-guide-item{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%}
.bw-chord-guide-item img{width:100%;max-width:400px;height:auto;object-fit:contain;background:#fff;border:1px solid var(--border,#e2e2e4);border-radius:10px}
.bw-chord-guide-item span{font-size:17px;font-weight:bold;direction:ltr}
.bw-chord-guide-loading,.bw-chord-guide-empty{color:var(--text-muted,#646970);font-size:13px;padding:6px}

.bw-chords-body{display:flex;max-width:100%}
.bw-chord-grids{flex:1;min-width:0;padding:24px;min-height:160px}
.bw-chord-grid{display:none;flex-wrap:wrap;gap:14px}
.bw-chord-grid.active{display:flex}
.bw-chord-box{
  background:var(--bg,#f7f7f8);
  border:2px solid #0f5c72;
  border-radius:10px;
  padding:16px 22px;
  font-size:22px;
  font-weight:bold;
  direction:ltr;
  color:#0f5c72;
  min-width:80px;
  text-align:center;
  line-height:1.3;
  word-break:break-word;
}

.bw-chord-keys{width:70px;flex-shrink:0;background:#0f5c72;display:flex;flex-direction:column;border-right:1px solid rgba(255,255,255,.15)}
.bw-chord-key-btn{background:none;border:0;border-bottom:1px solid rgba(255,255,255,.15);color:#cfe9ef;padding:12px 6px;font-size:14px;cursor:pointer;direction:ltr}
.bw-chord-key-btn:hover{background:rgba(255,255,255,.08)}
.bw-chord-key-btn.active{background:#fff;color:#0f5c72;font-weight:bold}

@media(max-width:640px){
  .bw-chord-box{font-size:16px;padding:12px 14px;min-width:60px}
  .bw-chord-keys{width:50px}
  .bw-chord-key-btn{font-size:11px;padding:8px 2px}
}

/* ---------- حالت «متن کامل ترانه + آکورد» ---------- */
.bw-chord-grids--sheet{padding:24px}
.bw-chord-grid--sheet{display:none;flex-direction:column;gap:4px}
.bw-chord-grid--sheet.active{display:flex}
.bw-chordsheet-line{direction:rtl}
.bw-chordsheet-blank{height:18px}
.bw-chordsheet-lyriconly{font-size:16px;line-height:2;color:var(--text,#1d2327)}
.bw-chordsheet-chordonly{
  direction:ltr;
  text-align:right;
  font-family:monospace;
  font-weight:bold;
  font-size:14px;
  color:#c62828;
  white-space:pre;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  margin:6px 0;
  padding-bottom:4px;
}
/* جفت «خط آکورد + خط شعر» با هم در یک محفظه‌ی اسکرول‌شونده‌ی افقی قرار می‌گیرند
   تا روی موبایل، وقتی خط بلندتر از عرض صفحه است، هر دو خط با هم و هم‌تراز
   اسکرول شوند و آکورد دقیقا بالای بخش مربوط به خودش در شعر بماند. */
.bw-chordsheet-couplet{
  margin-bottom:14px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
}
.bw-chordsheet-chordline{
  direction:ltr;
  text-align:right;
  font-family:monospace;
  font-weight:bold;
  font-size:14px;
  line-height:1.6;
  color:#c62828;
  white-space:pre;
  width:max-content;
  min-width:100%;
}
.bw-chordsheet-lyricline{
  direction:rtl;
  text-align:right;
  font-size:16px;
  line-height:1.9;
  color:var(--text,#1d2327);
  white-space:pre;
  width:max-content;
  min-width:100%;
}

@media(max-width:640px){
  .bw-chord-grids{padding:14px}
  .bw-chord-grids--sheet{padding:10px}
  .bw-chordsheet-chordline,.bw-chordsheet-chordonly{font-size:13px}
  .bw-chordsheet-lyriconly,.bw-chordsheet-lyricline{font-size:14px}
  .bw-chord-guide-panel.open{max-width:100%}
  .bw-chords-body{flex-wrap:wrap}
  .bw-chord-keys{order:-1;width:100%;flex-direction:row;flex-wrap:wrap;border-right:0;border-bottom:1px solid rgba(255,255,255,.15)}
  .bw-chord-grids{flex:1 1 100%}
  .bw-chord-key-btn{flex:1 1 auto;border-bottom:0;border-left:1px solid rgba(255,255,255,.15)}
}

/* ---------- بزرگ‌نمایی عکس با کلیک (ویجت عکس / کروسل) ---------- */
[data-bw-zoom]{cursor:zoom-in}
.bw-lightbox-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.82);
  z-index:9999;
  align-items:center;
  justify-content:center;
  padding:30px;
}
.bw-lightbox-overlay.open{display:flex}
.bw-lightbox-overlay img{max-width:min(90vw,520px);max-height:85vh;border-radius:10px;background:#fff;box-shadow:0 10px 40px rgba(0,0,0,.4)}
.bw-lightbox-close{
  position:absolute;
  top:20px;
  left:24px;
  background:rgba(255,255,255,.15);
  color:#fff;
  border:0;
  width:40px;
  height:40px;
  border-radius:50%;
  font-size:20px;
  cursor:pointer;
  line-height:1;
}
.bw-lightbox-close:hover{background:rgba(255,255,255,.3)}
.bw-lightbox-caption{position:absolute;bottom:24px;color:#fff;font-size:14px;direction:ltr}
.bw-lightbox-counter{position:absolute;top:24px;right:24px;color:#fff;font-size:13px;direction:ltr;background:rgba(255,255,255,.15);padding:4px 12px;border-radius:20px}
.bw-lightbox-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.15);
  color:#fff;
  border:0;
  width:46px;
  height:46px;
  border-radius:50%;
  font-size:26px;
  cursor:pointer;
  line-height:1;
}
.bw-lightbox-nav:hover{background:rgba(255,255,255,.3)}
.bw-lightbox-prev{right:20px}
.bw-lightbox-next{left:20px}
@media (max-width:600px){
  .bw-lightbox-nav{width:38px;height:38px;font-size:20px}
  .bw-lightbox-prev{right:8px}
  .bw-lightbox-next{left:8px}
}
.bw-search-box{display:flex;gap:8px;max-width:420px}
.bw-search-box input{flex:1;padding:10px 14px;border:1px solid #dcdcde;border-radius:8px;font-family:inherit}
.bw-search-box button{padding:10px 16px;border:0;border-radius:8px;background:#2271b1;color:#fff;cursor:pointer;font-family:inherit}
.bw-search-box button:hover{background:#195d8f}

/* موبایل: چون ستون‌های هدر زیر هم قرار می‌گیرند و هدر بلند می‌شود، حالت چسبان (sticky) در موبایل غیرفعال است */
@media(max-width:700px){
  .site-builder-header.is-sticky{position:static}
  .site-builder-header{padding:10px 14px}
}