/**
 * صفحه اصلی — فقط سکشن‌های مشخص داخل main، دسکتاپ/تبلت (≥768px)
 * کانتینر: site-container.css — عرض 1400px سراسری
 */

@media (min-width: 768px) {
    body.home main {
        --h-navy: var(--hpb-theme-brand-deep, #0d48a2);
        --h-navy-deep: var(--hpb-theme-brand-deep, #1a2d5c);
        --h-cyan: var(--hpb-theme-cyan, #5ec8f0);
        --h-muted: var(--hpb-theme-text-muted, #5a6b7d);
        --h-border: var(--hpb-theme-border, #e2eaf4);
        --h-card: var(--hpb-theme-surface, #fff);
        --h-radius: 16px;
        --h-grad: linear-gradient(135deg, #5ec8f0 0%, #a78bfa 55%, #673ab7 100%);
    }

    
    .freebox_image {
        justify-content: center;
        align-items: center;
        height: 170px;
        border-radius: 50px 100px 50px 10px;
        background: linear-gradient(45deg, #F44336, #673AB7);
        margin: 40px 0px 30px  0px;
    }

    .freebox_image .image_branch {
        height: 200px;
        display: flex;
        align-items: center;
    }

    .freebox_image .image_branch img {
        width: 320px;
        filter: drop-shadow(4px 11px 33px #fff);
    }

    .freebox_image>div:first-child {
        justify-content: center;
        align-items: center;
        display: flex;
        flex-wrap: wrap;
    }

    .freebox_image>div:first-child * {
        width: 100%;
        text-align: center;
        color: #fff;
        margin: 0;
        text-shadow: 1px 1px BLACK;
    }

    .freebox_image>div:last-child {
        justify-content: flex-end;
        display: flex;
        padding: 0 0 50px 120px;
    }

    .freebox_image>div:first-child a {
        background: #fff;
        width: max-content;
        border-radius: 5px;
        margin: 10px 0 0 0;
        color: #000;
        padding: 10px 30px;
        text-shadow: unset;
        box-shadow: 10px 10px 10px -10px #000;
    }

    body.home main .home_mega_categoies .circle {
        display: none;
    }

    body.home main .home_mega_categoies .image_branch {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 240px;
    }

    body.home main .home_mega_categoies .image_branch img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* ─── فرم مشاوره ─── */

    .request_consultant {
        background: linear-gradient(45deg, #f1f1f1, #fff);
        border-radius: 10px;
        border: 1px solid #f1f1f1;
        padding: 0;
        background-image: url(/wp-content/uploads/2025/04/bank-note.svg);
        background-repeat: repeat;
        background-size: 66px;
        background-color: rebeccapurple;
        overflow: hidden;
        position: relative;
    }
    
    .form_boxer {
        padding: 30px;
        color: #fff;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        align-content: center;
        z-index: 2;
    }
    
    .inner_title>div {
        font-size: 20px;
        color: #fff;
        font-weight: 900;
    }
    .the_form_container {
        display: flex;
        justify-content: stretch;
        flex-wrap: wrap;
        padding: 40px;
        z-index: 2;
    }

    .the_form_container .hpb-home-consultation-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: relative;
        z-index: 2;
    }

    .the_form_container .hpb-home-consultation-form label {
        color: #fff;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    
    .the_form_container input,
    .the_form_container select {
        width: 100% !important;
        height: 50px !important;
        border-radius: 5px !important;
        border: 1px solid gainsboro !important;
        background: #fff !important;
    }
    
    .the_form_container button,
    .the_form_container button[type="submit"] {
        background: #fff;
        padding: 10px 40px;
        margin: 20px 0 0 0;
        border-radius: 5px;
        color: rebeccapurple;
        border: none;
        cursor: pointer;
        font-weight: 700;
    }

    .the_form_container .hpb-cta-newsletter__form-message {
        display: none;
        margin-top: 8px;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 14px;
        line-height: 1.6;
        position: relative;
        z-index: 2;
    }

    .the_form_container .hpb-cta-newsletter__form-message.is-visible.is-success {
        display: block;
        background: #ecfdf5;
        color: #166534;
    }

    .the_form_container .hpb-cta-newsletter__form-message.is-visible.is-error {
        display: block;
        background: #fef2f2;
        color: #b91c1c;
    }
    
    select[name="br_topic"],
    .hpb-home-consultation-form select[name="topic"] {
        background: #fff;
        border-radius: 5px;
        border: 1px solid gainsboro;
        height: 50px;
        position: relative;
    }
    
    select[name="br_topic"]:before,
    .hpb-home-consultation-form select[name="topic"]:before {
        content: '' !important;
        border-top: 10px solid rebeccapurple;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        position: absolute;
        left: 0px !important;
        top: 0px;
        z-index: 1;
        display: flex !important;
    }
    
    .request_consultant:before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent , #ffff);
        left: 0;
        right: 0;
        z-index: 1;
    }
    
    .request_consultant:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, #9C27B0, #3f51b5a8);
        left: 0;
        z-index: 1;
    }
    
    .the_form_container lebel {
        color: #fff !important;
    }
    .the_form_container label {
        color: #fff;
    }
    
    
    
    .mega_tab_inner>ul {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        margin: 0;
        padding: 0;
        border-bottom: 2px solid #9C27B0;
        min-height: 60px;
    }
    
    .mega_tab_inner>ul>li {
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }
    
    .mega_tab_inner>ul>li>button.active {
        background: #9C27B0;
        border-radius: 5px 5px 0px 0px;
        color: #fff;
    }
    
    .mega_tab_inner>ul>li>button {
        transition: auto;
    }
    
    .mega_tab_inner>ul>li>button {
        transition: all 0.5s;
        height: 42px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #000;
        border: none;
        background: none;
        font-weight: 400;
    }
    
    .mega_tab_inner .tab-content {
        border-bottom: 2px solid #9C27B0;
        margin: 0 0 35px 0;
    }
    
    /* ─── اخبار و مقالات (desktopnews + Woodmart / HPB) ─── */
    body.home main .desktopnews {
        padding-block: 40px 48px;
    }

    /* هدر سکشن */
    body.home main .desktopnews .hpb-module-title {
        --hpb-title-highlight: var(--h-navy);
        --hpb-title-rest: var(--h-navy-deep);
        margin-bottom: 28px;
    }

    body.home main .desktopnews .hpb-module-title__heading {
        font-size: 1.5rem !important;
        font-weight: 800 !important;
        color: var(--h-navy-deep) !important;
        padding-bottom: 12px;
        position: relative;
    }

    body.home main .desktopnews .hpb-module-title__heading::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: 0;
        width: 48px;
        height: 3px;
        border-radius: 2px;
        background: var(--h-grad);
    }

    body.home main .desktopnews .hpb-module-title__highlight,
    body.home main .desktopnews .hpb-module-title__rest {
        color: var(--h-navy-deep) !important;
    }

    body.home main .desktopnews .hpb-module-title__link,
    body.home main .desktopnews .hpb-module-title__row > a,
    body.home main .desktopnews .woodmart-title-container > a,
    body.home main .desktopnews .title-wrapper > a,
    body.home main .desktopnews > .container > a,
    body.home main .desktopnews .view-all-posts {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 9px 20px;
        font-size: 13px;
        font-weight: 700;
        color: var(--h-navy) !important;
        background: rgba(13, 72, 162, 0.08);
        border: 1px solid var(--h-border);
        border-radius: 999px;
        text-decoration: none !important;
        transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    body.home main .desktopnews .hpb-module-title__link:hover,
    body.home main .desktopnews .hpb-module-title__row > a:hover,
    body.home main .desktopnews .woodmart-title-container > a:hover,
    body.home main .desktopnews .title-wrapper > a:hover,
    body.home main .desktopnews > .container > a:hover,
    body.home main .desktopnews .view-all-posts:hover {
        color: #fff !important;
        background: var(--h-navy);
        border-color: var(--h-navy);
    }

    /* کاروسل — ارتفاع یکسان کارت‌ها */
    body.home main .desktopnews .hpb-carousel__frame,
    body.home main .desktopnews .swiper {
        padding-bottom: 8px;
    }

    body.home main .desktopnews .swiper-wrapper {
        align-items: stretch;
    }

    body.home main .desktopnews .swiper-slide {
        height: auto;
        display: flex;
    }

    body.home main .desktopnews .swiper-slide > * {
        width: 100%;
    }

    body.home main .desktopnews article,
    body.home main .desktopnews .post-slide,
    body.home main .desktopnews .blog-post,
    body.home main .desktopnews .wd-post {
        display: flex;
        flex-direction: column;
        height: 100%;
        margin: 0;
        background: var(--h-card);
        border: 1px solid var(--h-border);
        border-radius: var(--h-radius);
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(13, 72, 162, 0.06);
        transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    }

    body.home main .desktopnews article:hover,
    body.home main .desktopnews .post-slide:hover,
    body.home main .desktopnews .blog-post:hover {
        border-color: #c5d9f0;
        box-shadow: 0 14px 36px rgba(13, 72, 162, 0.1);
        transform: translateY(-3px);
    }

    /* تصویر */
    body.home main .desktopnews .post-image,
    body.home main .desktopnews .post-img-wrapper,
    body.home main .desktopnews .hover-img,
    body.home main .desktopnews .wd-post-thumb {
        position: relative;
        flex-shrink: 0;
        margin: 0;
        overflow: hidden;
        aspect-ratio: 16 / 10;
        background: #f0f7fc;
    }

    body.home main .desktopnews .post-image img,
    body.home main .desktopnews .post-img-wrapper img,
    body.home main .desktopnews .hover-img img,
    body.home main .desktopnews .wd-post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0 !important;
        transition: transform 0.35s ease;
    }

    body.home main .desktopnews article:hover img {
        transform: scale(1.04);
    }

    /* بج تاریخ روی تصویر */
    body.home main .desktopnews .wd-post-date,
    body.home main .desktopnews .post-date-label,
    body.home main .desktopnews .created-date {
        background: rgba(255, 255, 255, 0.95) !important;
        color: var(--h-navy-deep) !important;
        border: 1px solid var(--h-border) !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px rgba(13, 72, 162, 0.08);
    }

    /* بدنه کارت */
    body.home main .desktopnews .post-content,
    body.home main .desktopnews .article-body,
    body.home main .desktopnews .wd-post-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 18px 20px 20px;
        gap: 10px;
    }

    /* دسته‌ها */
    body.home main .desktopnews .post-category,
    body.home main .desktopnews .wd-post-cat,
    body.home main .desktopnews .meta-post a[rel="category"],
    body.home main .desktopnews .post-categories a {
        font-size: 12px;
        font-weight: 600;
        color: var(--h-navy) !important;
        text-decoration: none !important;
        line-height: 1.5;
    }

    body.home main .desktopnews .post-category a:hover,
    body.home main .desktopnews .wd-post-cat a:hover {
        color: var(--h-cyan) !important;
    }

    /* عنوان — جایگزین آبی تم */
    body.home main .desktopnews .entry-title,
    body.home main .desktopnews .post-title,
    body.home main .desktopnews .wd-entities-title,
    body.home main .desktopnews h3.title {
        margin: 0;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.55;
        min-height: 2.95em;
    }

    body.home main .desktopnews .entry-title a,
    body.home main .desktopnews .post-title a,
    body.home main .desktopnews .wd-entities-title a,
    body.home main .desktopnews h3.title a {
        color: var(--h-navy-deep) !important;
        text-decoration: none !important;
        transition: color 0.2s ease;
    }

    body.home main .desktopnews .entry-title a:hover,
    body.home main .desktopnews .post-title a:hover,
    body.home main .desktopnews .wd-entities-title a:hover,
    body.home main .desktopnews h3.title a:hover {
        color: var(--h-navy) !important;
    }

    /* متا (نویسنده، تاریخ، دیدگاه) */
    body.home main .desktopnews .meta-post,
    body.home main .desktopnews .post-meta,
    body.home main .desktopnews .wd-post-meta {
        margin: 0;
        font-size: 12px;
        line-height: 1.6;
        color: var(--h-muted) !important;
    }

    body.home main .desktopnews .meta-post a,
    body.home main .desktopnews .post-meta a {
        color: var(--h-muted) !important;
        text-decoration: none;
    }

    body.home main .desktopnews .meta-post a:hover {
        color: var(--h-navy) !important;
    }

    /* خلاصه */
    body.home main .desktopnews .entry-summary,
    body.home main .desktopnews .post-excerpt,
    body.home main .desktopnews p.excerpt {
        margin: 0;
        font-size: 13px;
        line-height: 1.75;
        color: var(--h-muted);
        flex: 1;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ادامه مطلب */
    body.home main .desktopnews .read-more-section,
    body.home main .desktopnews .wd-more-desc,
    body.home main .desktopnews a.read-more {
        margin-top: auto;
        padding-top: 4px;
        font-size: 13px;
        font-weight: 700;
        color: var(--h-navy) !important;
        text-decoration: none !important;
    }

    body.home main .desktopnews a.read-more:hover,
    body.home main .desktopnews .wd-more-desc a:hover {
        color: var(--h-cyan) !important;
    }

    /* فلش‌های کاروسل */
    body.home main .desktopnews .swiper-button-prev,
    body.home main .desktopnews .swiper-button-next {
        width: 40px !important;
        height: 40px !important;
        background: var(--h-card) !important;
        border: 1px solid var(--h-border) !important;
        border-radius: 50% !important;
        color: var(--h-navy) !important;
        box-shadow: 0 4px 14px rgba(13, 72, 162, 0.1) !important;
    }

    body.home main .desktopnews .swiper-pagination-progressbar-fill {
        background: var(--h-grad) !important;
    }
}
