/* ===== Balvardi Theme Fixes =====
   استایل منوی وردپرسی + ابزارهایی که در بیلد تیلویند نیستند */

/* ---------- Comments (posts/pages) ---------- */
.comments-area { margin-top: 3.5rem; }
.comments-area .comments-title,
.comments-area .comment-reply-title {
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 4px;
}
.comments-area .comments-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9b45b, transparent);
}

ol.comment-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 26px 0 0 !important;
}
ol.comment-list > li.comment,
ol.comment-list > li.pingback,
ol.comment-list > li.trackback {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 20px !important;
  margin-bottom: 14px;
  list-style: none;
}
ol.comment-list .children {
  list-style: none !important;
  margin: 14px 0 0 !important;
  padding: 0 22px 0 0 !important;
  border-right: 1px dashed rgba(255, 255, 255, 0.12);
}
ol.comment-list .children > li.comment {
  background: #0e1526;
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px !important;
  margin-bottom: 10px;
}
li.bypostauthor > .comment-body .comment-author::before,
li.bypostauthor .comment-author .fn::after { content: " ✦"; color: #d9b45b; }

.comment-body .comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comment-body img.avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(217, 180, 91, 0.35) !important;
  background: transparent !important;
  padding: 0 !important;
}
.comment-body .fn { color: #fff !important; font-style: normal; font-weight: 800; font-size: 14px; }
.comment-body .fn a { color: #ebce7a !important; }
.comment-body .comment-metadata {
  font-size: 11px;
  color: #64748b !important;
  margin: 2px 56px 0;
  padding: 0 !important;
}
.comment-body .comment-metadata a { color: #64748b !important; }
.comment-body .comment-metadata a:hover { color: #d9b45b !important; }
.comment-body .comment-content {
  color: #cbd5e1 !important;
  font-size: 13.5px;
  line-height: 2.2;
  margin-top: 10px;
}
.comment-body .comment-content p:last-child { margin-bottom: 0; }
.comment-body .reply { margin: 12px 0 0; }
.comment-body .reply a {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ebce7a !important;
  background: rgba(217, 180, 91, 0.08);
  border: 1px solid rgba(217, 180, 91, 0.25);
  transition: all .2s ease;
}
.comment-body .reply a:hover {
  background: rgba(217, 180, 91, 0.18);
  color: #fff !important;
}

/* فرم پاسخ */
#respond {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 28px !important;
  margin-top: 26px;
}
.comment-reply-title small a {
  font-size: 12px;
  font-weight: 700;
  color: #fb7185 !important;
  margin-right: 10px;
}
#respond .comment-notes,
#respond .logged-in-as { color: #64748b !important; font-size: 12px; line-height: 2; }
#respond .logged-in-as a { color: #ebce7a !important; }
.comment-form label { color: #cbd5e1 !important; font-size: 13px; font-weight: 600; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  background: #131c31 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: #e2e8f0 !important;
  padding: 12px 16px !important;
  transition: border-color .2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: rgba(217, 180, 91, 0.5) !important; outline: none; }
.comment-form textarea {
  width: 100%;
  min-height: 130px;
  background: #131c31 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  color: #e2e8f0 !important;
  padding: 14px 16px !important;
  resize: vertical;
}
.comment-form .submit,
.comment-form input[type="submit"] {
  background: linear-gradient(to left, #be953d, #d9b45b) !important;
  color: #070b14 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 13px 42px !important;
  font-family: Vazirmatn, sans-serif !important;
  font-size: 14px;
  font-weight: 900 !important;
  cursor: pointer;
  box-shadow: 0 0 40px -10px rgba(217, 180, 91, .35);
  transition: filter .2s ease;
}
.comment-form .submit:hover,
.comment-form input[type="submit"]:hover { filter: brightness(1.1); }

.comment-navigation { margin-top: 22px; }
.comment-navigation .nav-links a {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.comment-navigation .nav-links a:hover { color: #d9b45b !important; }

.no-comments { color: #64748b !important; font-size: 13px; }

/* ---------- Mobile Sidebar Menu (WP native markup) ---------- */
#mobileSidebar ul.bv-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 16px !important;
  list-style: none !important;
}
#mobileSidebar ul.bv-sidebar-menu li { list-style: none; }
#mobileSidebar ul.bv-sidebar-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 13px 17px;
  font-size: 14px;
  font-weight: 700;
  color: #cbd5e1;
  text-decoration: none !important;
  transition: all .2s ease;
}
#mobileSidebar ul.bv-sidebar-menu li a:hover,
#mobileSidebar ul.bv-sidebar-menu li a:focus {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
#mobileSidebar ul.bv-sidebar-menu li.current-menu-item > a,
#mobileSidebar ul.bv-sidebar-menu li.current_page_item > a,
#mobileSidebar ul.bv-sidebar-menu li.current-menu-ancestor > a {
  background: rgba(217, 180, 91, 0.10);
  color: #ebce7a !important;
  box-shadow: inset 0 0 0 1px rgba(217, 180, 91, 0.3);
}
#mobileSidebar ul.bv-sidebar-menu li.current-menu-item > a::after,
#mobileSidebar ul.bv-sidebar-menu li.current_page_item > a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d9b45b;
}
#mobileSidebar ul.bv-sidebar-menu ul.sub-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 6px !important;
  padding: 0 14px 0 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  list-style: none !important;
}
#mobileSidebar ul.bv-sidebar-menu ul.sub-menu a {
  padding: 10px 14px;
  font-size: 13px;
  color: #94a3b8;
}

/* ---------- Desktop Menu (WP native markup) ---------- */
#siteHeader nav ul,
#siteHeader nav .menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#siteHeader nav ul li { position: relative; }
#siteHeader nav ul li a {
  display: block;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: all .2s ease;
}
#siteHeader nav ul li a:hover,
#siteHeader nav ul li a:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
#siteHeader nav ul li.current-menu-item > a,
#siteHeader nav ul li.current_page_item > a,
#siteHeader nav ul li.current-menu-ancestor > a {
  color: #ebce7a !important;
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Dropdown ---------- */
#siteHeader nav ul li ul.sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 210px;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(217, 180, 91, 0.25);
  background: rgba(14, 21, 38, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
}
#siteHeader nav ul li:hover > ul.sub-menu,
#siteHeader nav ul li:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
#siteHeader nav ul li ul.sub-menu li a {
  padding: 9px 14px;
  font-size: 13px;
}
#siteHeader nav ul li ul.sub-menu li a:hover {
  background: rgba(217, 180, 91, 0.12);
  color: #ebce7a;
}

/* ---------- Line clamp (Tailwind core missing in build) ---------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- WP core helpers ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
}
body:not(.custom-logo-link) img.custom-logo { height: 40px; width: auto; }

/* search widget / form inside content */
.wp-block-search__input, input[type="search"] {
  background: #131c31 !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 10px !important;
  color: #e2e8f0 !important;
}

/* sticky header shadow helper */
#siteHeader.shadow-card { box-shadow: 0 20px 50px -25px rgba(0,0,0,.7); }
