/*
 Theme Name: Hello Elementor Child
 Theme URI: https://elementor.com/
 Description: Child theme for Hello Elementor
 Author: Your Name
 Author URI: https://yourwebsite.com/
 Template: hello-elementor
 Version: 1.0.0
*/

/* Your custom CSS goes here */

@font-face {
  font-family: 'IRANSans'; 
  src: url('https://fooladbartar.com/wp-content/uploads/2017/06/IRANSansWeb.woff2') format('woff'),
     url('https://fooladbartar.com/wp-content/uploads/2017/06/IRANSansWeb.ttf') format('truetype');
  font-weight: normal; 
  font-style: normal;
  font-display: swap; 
}
div, span, p, section, h1, h2, h3, h4, h5, h6, a, input, textarea, label {
  font-family: 'IRANSans', sans-serif !important;
}

a {
  text-decoration: none !important;
}

h3 {
    font-size: 18px;
    font-weight: 600;
}
blockquote {
    background-color: #eee;
    padding: 16px;
    border-right: 8px solid rgba(0, 0, 0, .3);
}

blockquote p { 
  margin: 0;
}

.post .entry-title a {
    text-decoration: none;
    font-size: 1.3rem;
    line-height: 1.4;
    color: #222;
}
.post .entry-title a:hover {
    color: #c40000;
}

.post-conclusion, .post-info {
    text-align: center;
    background-color: #ebebeb;
    padding: 20px;
    margin: 0 !important;
}
.post-info {
    margin-bottom: 60px !important;
}

.post .wp-post-image {
    object-fit: initial;
}

article.post {
    box-shadow: 1px 2px 10px #999;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 24px;
}

.sidebar {
    height: fit-content;
    border: 1px solid #eee;
    margin-left: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    margin-bottom: 75px;
}
.category-accordion .cat-item {
   border-bottom: 0px solid #ddd !important;
    padding: 10px 20px !important;
}
.category-accordion .cat-item a {
    display: inline !important;
}
.category-accordion .cat-item.open > .children {
    padding-right: 0 !important;
}
.category-accordion .cat-item {
    border-bottom: 0px solid #ddd !important;
    list-style: none;
}
.pagination .nav-previous a, .pagination .nav-next a {
    background: #dd0000 !important;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
}
.pagination .nav-previous a:hover, .pagination .nav-next a:hover {
    background: #f71f1f !important;
}

.phone-cta {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10% auto;
}

/* دایره های ضربان */
.phone-cta .wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgb(255 80 80 / 80%);
  animation: pulse 2.5s infinite;
}

/* تاخیر برای موج دوم */
.phone-cta .wave:nth-child(2) {
  animation-delay: 1.25s;
}

/* انیمیشن باز و بسته شدن */
@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  50% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* متن بالاتر از موج ها */
.phone-cta p,
.phone-cta a {
    position: relative;
    z-index: 2;
    font-size: 12px;
    text-align: center;
    margin-top: 12px;
}

/* =========================
   RTL MENU - DESKTOP ONLY
   ========================= */
@media (min-width: 1025px) {

  .hfe-nav-menu .menu-item-has-children .sub-menu {
    right: 0 !important;
    left: auto !important;
  }

  .hfe-nav-menu .menu-item-has-children
  .menu-item-has-children
  .sub-menu {
    right: 100% !important;
    left: auto !important;
  }

  .hfe-nav-menu__layout-horizontal
  .hfe-nav-menu
  .sub-arrow {
    margin-right: 10px;
    margin-left: 0;
  }

  .menu-item a.hfe-sub-menu-item {
    padding-right: calc(15px + 20px) !important;
    padding-left: 15px !important;
    text-align: right;
  }
}

/* =========================
   MOBILE & TABLET FIX
   ========================= */
@media (max-width: 1024px) {

  /* جلوگیری از خروج منو از صفحه */
  .hfe-nav-menu,
  .hfe-nav-menu .sub-menu {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
  }

  /* ساب‌منوی تو در تو */
  .hfe-nav-menu .menu-item-has-children
  .menu-item-has-children
  .sub-menu {
    right: 0 !important;
  }

  /* فاصله مناسب RTL */
  .menu-item a.hfe-sub-menu-item {
    padding-right: 35px !important;
    padding-left: 15px !important;
    text-align: right;
  }
}

/* =========================
   GLOBAL SCROLL SAFETY
   ========================= */
html,
body {
  overflow-x: hidden;
}

/* کانتینر اصلی فرم */
.wpcf7 {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-family: IRANSans, Vazirmatn, sans-serif;
  direction: rtl;
}

/* لیبل‌ها */
.wpcf7 label {
  font-size: 14px;
  color: #444;
  display: block;
  margin-bottom: 6px;
}

/* اینپوت و تکست‌اریا */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: #fafafa;
	margin-top: 12px;
}

/* فوکوس */
.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: #6366f1;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* فاصله پاراگراف‌ها */
.wpcf7 p {
  margin-bottom: 20px;
}

/* دکمه ارسال */
.wpcf7 input[type="submit"] {
  background: linear-gradient(135deg, #eb7c7c, #ff1800);
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* هاور دکمه */
.wpcf7 input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,70,229,0.3);
}

/* پیام موفقیت */
.wpcf7-response-output {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
}

.wpcf7-mail-sent-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* پیام خطا */
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ریسپانسیو */
@media (max-width: 600px) {
  .wpcf7 {
    padding: 20px;
  }
}

.archive .page-content,
.blog .page-content,
.search .page-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.archive .page-content article.post,
.blog .page-content article.post,
.search .page-content article.post {
    flex: 0 0 calc(33.333% - 16px);
    box-sizing: border-box;
}

/* Tablet – 2 columns */
@media (max-width: 1024px) {
    .archive .page-content .post,
.blog .page-content .post,
.search .page-content .post {
        flex: 0 0 calc(50% - 12px);
    }
}

/* Mobile – 1 column */
@media (max-width: 600px) {
    .archive .page-content .post,
.blog .page-content .post,
.search .page-content .post {
        flex: 0 0 100%;
    }
}

.related-posts {
    margin: 50px auto;
    box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 20%);
    padding: 20px;
    border-radius: 16px;
    max-width: 1140px;
}
.related-title {
    font-size: 22px;
    margin-bottom: 20px;
}
.related-posts-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.related-post {
    flex: 0 0 calc(24.5% - 16px);
}
.related-post img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}
.related-post h4 {
    font-size: 16px;
    line-height: 1.6;
}

/* Tablet */
@media (max-width: 1024px) {
    .related-post {
        flex: 0 0 calc(50% - 12px);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .related-post {
        flex: 0 0 100%;
    }
}

.wp-singular:not(.home) main#content {
    background-color: #fff !important;
    box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 20%);
    padding: 20px;
    border-radius: 16px;
}