/* 200love.ir polish — header search + footer ads layout */
@import url("https://cdn.jsdelivr.net/npm/vazirmatn@33.003/Vazirmatn-font-face.css");

body.rtl,
body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
}

/* Hide empty leftover top bar chrome */
#header-top-content:empty,
#header-top-content .header-top-inner:empty {
  display: none !important;
}

/* Masthead: brand + nav + search in one row */
#masthead.site-header {
  min-height: 0;
  padding: 18px 0;
  background: #fff;
  border-bottom: 1px solid #e6ebf0;
  box-shadow: 0 6px 18px rgba(20, 40, 70, 0.05);
}
#masthead > .container {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}
#masthead .site-branding {
  float: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1 1 220px;
  min-width: 180px;
}
#masthead #site-navigation {
  float: none !important;
  margin: 0;
  flex: 2 1 420px;
}
#masthead .main-navigation > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  justify-content: flex-start;
  align-items: center;
}
#masthead .main-navigation a {
  border: 0 !important;
  box-shadow: none !important;
  padding: 8px 12px !important;
  border-radius: 999px;
  font-weight: 650;
}
#masthead .main-navigation .current-menu-item > a,
#masthead .main-navigation a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8 !important;
}

/* Search beside nav inside masthead */
#masthead #header-search-form,
#header-search-form.header-search-inline {
  float: none !important;
  display: block !important;
  max-width: none;
  flex: 0 1 240px;
  min-width: 180px;
  margin: 0;
}
#header-search-form .searchform {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  background: #f3f6fa;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  overflow: hidden;
  margin: 0;
  box-sizing: border-box;
}
#header-search-form input[type="text"],
#header-search-form input.search-field {
  flex: 1;
  min-width: 0;
  height: 40px !important;
  min-height: 40px !important;
  line-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  background: transparent !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  font-family: inherit;
  box-sizing: border-box !important;
}
#header-search-form input[type="submit"],
#header-search-form .search-submit {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 46px !important;
  height: 42px !important;
  line-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #2563eb !important;
  color: #fff !important;
  font-family: FontAwesome !important;
  font-size: 14px !important;
  cursor: pointer;
  box-sizing: border-box !important;
  flex: 0 0 46px;
}
#header-search-form input[type="submit"]:hover,
#header-search-form .search-submit:hover {
  background: #1d4ed8 !important;
}

.site-title a {
  color: #1e3a8a !important;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* Footer */
footer#colophon {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  color: rgba(255, 255, 255, 0.82) !important;
  padding: 28px 0 22px !important;
  border-top: 3px solid #2563eb;
}
footer#colophon .copyright,
footer#colophon .site-info,
footer#colophon .site-info a {
  color: rgba(255, 255, 255, 0.88) !important;
  font-family: inherit !important;
  font-size: 14px !important;
}
footer#colophon .site-info a:hover {
  color: #fff !important;
}
.footer-bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.footer-copy-col,
.footer-info-col {
  float: none !important;
  width: auto !important;
}
.footer-info-col {
  text-align: left;
}
body.rtl .footer-info-col {
  text-align: left;
}
body.rtl .footer-copy-col {
  text-align: right;
}

#footer-nav {
  background: #111827 !important;
  padding: 14px 0 !important;
}
#footer-nav ul li a {
  border: 0 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 6px 12px !important;
  border-radius: 999px;
}
#footer-nav ul li a:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff !important;
}

/* Right sidebar layout (RTL: sidebar on physical right) */
#content.site-content > .container > .row {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
}
body.rtl #sidebar-primary,
body.rtl.global-layout-right-sidebar #sidebar-primary {
  order: -1;
}
#sidebar-primary {
  margin-top: 0;
}
#sidebar-primary .widget {
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(20, 40, 70, 0.05);
}
#sidebar-primary .widget-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #1e3a8a;
}
#sidebar-primary .widget-title span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid #2563eb;
}

/* Behtarinseo ads inside sidebar */
#sidebar-primary .love200-seo-ads .behtarinseo,
#sidebar-primary .behtarinseo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  direction: rtl;
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
}
#sidebar-primary .behtarinseo br {
  display: none !important;
}
#sidebar-primary .behtarinseo > a {
  display: block;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #f5f8fc;
  color: #1f2937 !important;
  text-decoration: none !important;
  box-sizing: border-box;
  word-wrap: break-word;
}
#sidebar-primary .behtarinseo > a:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8 !important;
}
#sidebar-primary .behtarinseo div[style*="display:none"],
#sidebar-primary .behtarinseo div[style*="display: none"] {
  display: none !important;
}
#sidebar-primary .behtarinseo > div:not([style*="display:none"]):not([style*="display: none"]) {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
#sidebar-primary .behtarinseo div[style*="border"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #d7dee8 !important;
  border-radius: 10px !important;
  background: #f5f8fc !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
}
#sidebar-primary .behtarinseo a {
  color: #1f2937 !important;
  text-decoration: none !important;
}

/* Front-page widgets adapt to narrower content column */
#primary.col-sm-8 .service-block-item.col-sm-3,
#primary.col-sm-8 .latest-news-item.col-sm-3,
#primary.col-sm-8 .latest-works-item.col-sm-3 {
  width: 50%;
}

@media (max-width: 991px) {
  #masthead > .container {
    flex-direction: column;
    align-items: stretch;
  }
  #masthead #header-search-form,
  #header-search-form.header-search-inline {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
  #masthead #site-navigation {
    order: 3;
  }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
  }
  body.rtl .footer-copy-col,
  body.rtl .footer-info-col,
  .footer-info-col {
    text-align: center;
  }
  #content.site-content > .container > .row {
    flex-direction: column;
  }
  body.rtl #sidebar-primary {
    order: 0;
    width: 100%;
  }
  #primary.col-sm-8 .service-block-item.col-sm-3,
  #primary.col-sm-8 .latest-news-item.col-sm-3,
  #primary.col-sm-8 .latest-works-item.col-sm-3 {
    width: 50%;
  }
}
