/* Optimized CSS for Construction Materials Site 
   Focus: Performance, Mobile-First, and Clean DOM
*/

/* ۱. حذف شمارش تعداد پاسخ */
.title-comments{
    display: none !important;
}
/* ۱. تغییر جایگاه متن پرسش را بپرسید */
.comment-reply-title{
    text-align:center !important; font-weight: bold;
}
.comment-reply-title::before {
    content: "( ";
    font-weight: bold;
}

.comment-reply-title::after {
    content: " )";
    font-weight: bold;
}
/* ۱. تجمیع المان‌های پنهان */
.woocommerce-review__dash, 
.says, 
.comment-reply-link, 
.comment-metadata, 
.home p#breadcrumbs, 
.count,
.comment-author .fn span, 
.comment-author .fn a:last-child {
    display: none !important;
}

/* ۲. تنظیمات تایپوگرافی و رنگ‌بندی (EEAT Consistency) */
.woocommerce-review__author,
.comment-author cite, 
.comment-author .fn {
    color: #1a73e8 !important;
    font-weight: bold;
}

.comment-body {
    text-align: justify;
}
/* حذف شماره از لیست‌های پاسخ در بخش کامنت‌ها */
.comment-list .children {
    list-style-type: none !important;
    text-decoration: none;
}
/* حذف دایره یا شماره اضافی در لیست پرسش و پاسخ محصول */ 
.woocommerce-Reviews .commentlist .children {
    list-style-type: none !important;
}
/* ۳. استایل‌های بخش محصولات و دسته‌بندی ووکامرس */
.woocommerce-loop-category__title {
    color: #000000;
    font-weight: bold;
}

.woocommerce ul.products {
    list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    opacity: 1;
}

/* ۴. منوهای موبایل و لیبل‌ها */
.mega-toggle-label-closed, 
.mega-toggle-label-open {
    font-weight: bold;
}

/* ۵. بهینه‌سازی جداول فنی مصالح ساختمانی */
.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
}

/* ۶. تنظیمات محتوای کامنت‌ها */
.comment-content, 
.comment-content p,
.bypostauthor .comment-content, 
.bypostauthor .comment-content p {
    font-weight: normal !important;
    line-height: 2;
    margin-right: 0 !important;
    margin-left: 10px !important;
    padding-right: 0 !important;
    padding-left: 10px !important;
}

/* ۷. اصلاحات اختصاصی موبایل */
@media screen and (max-width: 600px) {
    .comment-content p {
        margin-left: 10px !important;
        padding-left: 10px !important;
    }
}
/* وسط چین کردن تمام تصاویر دارای کلاس aligncenter در ویجت متن */
.elementor-widget-text-editor img.aligncenter {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    clear: both !important;
}
.category-qa {
    margin-top: 20px;
}
.category-qa .qa-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #fafafa;
}
.category-qa .qa-author {
    font-weight: bold;
    color: #222;
    margin-bottom: 4px;
}
.category-qa .qa-question {
    margin-bottom: 6px;
    line-height: 1.5;
}
.category-qa .qa-answer {
    margin-left: 10px;
    color: #555;
    line-height: 1.6;
}
/* --- تنظیمات عمومی لینک‌ها --- */
body a:hover,
body a:active,
body a:focus {
    color: #1a73e8 !important;
    text-decoration: none !important;
}

/* --- سیستم جامع وسط‌چین تصاویر و فیگورها (مهندسی صاد) --- */
.elementor-widget-text-editor img.aligncenter,
.elementor-widget-text-editor .aligncenter img,
img[class*="aligncenter"],
.sad-figure-container {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    clear: both !important;
}

.sad-figure-container {
    display: table; /* تطبیق عرض فیگور با عرض عکس */
    text-align: center;
}

.sad-figcaption {
    display: block;
    text-align: center !important;
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

/* --- بهینه‌سازی ریسپانسیو --- */
@media (max-width: 768px) {
    .sad-figure-container {
        width: 100% !important;
    }
}
/* ==========================================================================
   Elementor SEO CTA Button Styles (WhatsApp Colors + Sticky Bottom Mobile)
   ========================================================================== */

/* نگهدارنده دکمه در حالت دسکتاپ */
.seo-cta-wrapper {
    text-align: center;
    margin: 20px 0;
}

/* استایل‌دهی به دکمه داخلی المنتور */
.seo-cta-wrapper .elementor-button {
    background-color: #25D366 !important;
    color: #ffffff !important;
    padding: 14px 24px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

/* افکت هاور (Hover) دکمه المنتور */
.seo-cta-wrapper .elementor-button:hover,
.seo-cta-wrapper .elementor-button:focus {
    background-color: #128C7E !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

/* افکت کلیک (Active) */
.seo-cta-wrapper .elementor-button:active {
    transform: translateY(0) !important;
}

/* ==========================================================================
   Media Queries (Responsive)
   ========================================================================== */

@media screen and (max-width: 768px) {
    
    /* تبدیل کل ویجت المنتور به نوار چسبان */
    .seo-cta-wrapper {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background-color: #ffffff !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08) !important;
        z-index: 99999 !important;
        margin: 0 !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        will-change: transform !important;
    }

    /* اصلاح عرض نگهدارنده داخلی المنتور در موبایل */
    .seo-cta-wrapper .elementor-widget-container {
        width: 100%;
    }

    /* فول‌سایز کردن دکمه در موبایل */
    .seo-cta-wrapper .elementor-button {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        border-radius: 8px !important;
    }

    /* جلوگیری از رفتن محتوا به زیر نوار دکمه */
    body {
        padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important; 
    }
}
///////////////////
/* معماری یکپارچه و ریسپانسیو جداول شرکت ساختمانی صاد */
.responsive-table-container table {
    width: 100% !important;
    border-collapse: collapse !important;
    text-align: center !important;
    margin-top: 15px !important;
}

.responsive-table-container th {
    padding: 10px 8px !important;
    border: 1px solid #ddd !important;
    font-size: 1.1rem !important;
    text-align: center !important;
    line-height: 1.4rem !important;
    background-color: #fffacd !important;
    font-weight: bold !important;
}

.responsive-table-container td {
    padding: 12px 8px !important;
    border: 1px solid #ddd !important;
    font-size: 1rem !important;
    text-align: center !important;
    line-height: 1.5rem !important;
}

/* بهینه‌سازی اختصاصی پهنای باند و نمایشگر موبایل (عدم تاخیر در LCP) */
@media (max-width: 768px) {
    .responsive-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .responsive-table-container th, 
    .responsive-table-container td {
        font-size: 0.9rem !important;
        padding: 8px 4px !important;
    }
}
/* استایل کادر اصلی دور فهرست */
.saad-toc {
    border: 1px solid #e5e5e5 !important;
    border-radius: 10px !important; /* انحنای لبه های کادر - اختیاری */
    background-color: #ffffff !important;
    margin: 30px 0 !important;
}

/* استایل عنوان */
.saad-toc .saad-toc-title {
    font-size: 22px !important;
    font-weight: bold !important;
    color: #000000 !important;
    padding: 20px !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

/* استایل لیست اعداد */
.saad-toc ol {
    padding-right: 40px !important;
    padding-bottom: 20px !important; /* ایجاد فاصله از پایین کادر */
    margin: 20px 0 !important;
}

.saad-toc ol li {
    margin-bottom: 20px !important;
    line-height: 1.8 !important;
}

.saad-toc ol li a {
    font-size: 20px !important;
    color: #000000 !important;
    text-decoration: none !important;
}
/* وسط‌چین کردن تصاویر محتوا */
.entry-content img,
.elementor-widget-image img,
.wp-block-image img,
.attachment-medium_large,
.size-medium_large,
img.wp-image-13755,
img.webpexpress-processed {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    text-align: center !important;
}

/* اگر تصاویر داخل پاراگراف یا div هستند */
.entry-content p img,
.elementor-widget-container img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.sad-update-date {
    text-align: right;
    text-align: justify;
    direction: rtl;
	line-height: 2 !important;
	margin-bottom: 20px !important;
}
/* ==========================================================================*/
/* Breadcrumb خاص شما */
.elementor-element-985c5db.elementor-widget-breadcrumbs,
.elementor-element-985c5db.elementor-widget-breadcrumbs .elementor-widget-container,
.elementor-element-985c5db.elementor-widget-breadcrumbs nav,
.elementor-element-985c5db.elementor-widget-breadcrumbs a,
.elementor-element-985c5db.elementor-widget-breadcrumbs span,
.elementor-element-985c5db.elementor-widget-breadcrumbs .separator,
.elementor-element-985c5db.elementor-widget-breadcrumbs .last {
    font-family: inherit !important;   /* دقیقاً مثل p */
    font-size: inherit !important;     /* سایز دقیقاً مثل p */
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    color: inherit;                    /* اگر می‌خواید رنگ هم مثل p باشه */
}

/* برای justify */
.elementor-element-985c5db.elementor-widget-breadcrumbs .elementor-widget-container,
.elementor-element-985c5db.elementor-widget-breadcrumbs nav {
    text-align: justify !important;
    width: 100%;
}
