/*
Theme Name: Woodmart Child
Theme URI: http://example.com/
Description: قالب فرزند آماده برای Woodmart
Author: Admin
Template: woodmart
Version: 1.0.0
*/

.card{
	transition:transform .25s ease;
}
.card:hover{
	transform:translatey(-6px);
}

/* --- ۱. تنظیمات عمومی کارت --- */
.shafa-card { 
    position: relative; 
    overflow: hidden; 
    text-align: center; 
    border-radius: 16px; 
    transition: all .35s ease; 
}

/* دسکتاپ (مانیتورهای بزرگ) */
@media (min-width: 1201px) {
    .shafa-card { height: 300px !important; min-height: 300px !important; }
}

/* تبلت و موبایل افقی */
@media (max-width: 1200px) {
    .shafa-card { height: 260px !important; min-height: 260px !important; }
}

/* موبایل عمودی (رفع بهم‌ریختگی عکس اول شما) */
@media (max-width: 480px) {
    .shafa-card { 
        height: auto !important; 
        min-height: 250px !important; 
        overflow: visible !important; /* جلوگیری از بریده شدن متن‌ها */
        padding-bottom: 15px !important;
    }
}

/* --- ۲. استایل‌های هاور مخصوص دسکتاپ --- */
@media (min-width: 1201px) {
    .shafa-card:hover { transform: translateY(-6px); }
    .shafa-card::after { 
        content: ""; position: absolute; inset: 0; 
        background: rgba(0,0,0,.85); opacity: 0; 
        transition: .35s ease; z-index: 1; 
        border-radius: 16px; pointer-events: none; 
    }
    .shafa-card:hover::after { opacity: 1; }
    .shafa-card:hover .elementor-widget-heading, 
    .shafa-card:hover .elementor-widget-text-editor { opacity: 0; transform: translateY(10px); }
    
    .shafa-card .shafa-hover-box { 
        position: absolute; top: 50%; left: 50%; 
        transform: translate(-50%,-50%) scale(.9); 
        opacity: 0; z-index: 3; transition: .35s ease; 
    }
    .shafa-card:hover .shafa-hover-box { opacity: 1; transform: translate(-50%,-50%) scale(1); }
    .shafa-card img { transition: transform .4s ease; }
    .shafa-card:hover img { transform: scale(1.05); }
}

/* خط زیر عنوان برای .title-underline (در همه دستگاه‌ها) */
.title-underline::before,
.title-underline::after {
    content: none !important;   /* حذف خط‌های دوطرف */
}

.title-underline .elementor-heading-title::after,
.title-underline h2::after {
    content: "";
    display: block;
    width: 120px;
    height: 2px;
    background-color: #B8001F;
    margin: 8px auto 0;         /* فاصله خط از عنوان */
}
    
    /* ثابت کردن عنوان و حذف افکت‌های جابجایی */
    .shafa-card .elementor-widget-heading,
    .shafa-card .elementor-widget-text-editor { 
        opacity: 1 !important; 
        transform: none !important; 
        position: relative !important;
        top: auto !important;
        left: auto !important;
        visibility: visible !important;
    }
    
    .shafa-card:hover { transform: none !important; }
    .shafa-card img { transform: none !important; }
}



.my-section {
  background: radial-gradient(circle at 90% 20%, rgba(31, 111, 255, 0.08), transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(255, 45, 85, 0.08), transparent 40%);
}

/* ================================
   1. کانتینر اصلی و چیدمان
================================ */
.main-process-container > .e-con-inner {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    direction: rtl !important;
    position: relative;
    padding-top: 40px !important;
}

/* ================================
   2. کارت هر مرحله
================================ */
.step-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ================================
   3. دایره آیکن
================================ */
.step-card .elementor-widget-icon {
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, rgba(56, 75, 112, 0.4), rgba(56, 75, 112, 0.1)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15) !important;
    border-radius: 50% !important;
    position: relative !important;
    margin: 0 auto 25px auto !important;
    z-index: 2;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
}

.step-card .elementor-widget-icon .elementor-icon,
.step-card .elementor-widget-icon .elementor-icon-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

/* ================================
   4. تنظیم آیکن
================================ */
.step-card .elementor-widget-icon i,
.step-card .elementor-widget-icon svg {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 40px !important;
    fill: #000000 !important;
    color: #000000 !important;
}

/* ================================
   5. خطوط رابط
================================ */
.step-card:not(:last-child)::before {
    content: "";
    position: absolute;
    left: -25%;
    top: 40px;
    width: 50%;
    height: 2px;
    background-color: #212121 !important;
    opacity: 0.3;
    transform: translateY(-50%);
    z-index: 0;
}

/* ================================
   6. سیستم شماره‌گذاری
================================ */
.main-process-container { counter-reset: p-step; }
.step-card { counter-increment: p-step; }

.step-card .elementor-widget-icon::after {
    content: "0" counter(p-step);
    position: absolute;
    top: -2px;
    right: -2px;
    background: #384b70 !important;
    color: #fff !important;
    font-size: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    z-index: 10;
}

/* ================================
   7. استایل متون (دسکتاپ)
================================ */
.step-card h3 {
    font-size: 15px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin: 0 !important;
    line-height: 1.6 !important;
    padding: 0 10px !important;
    min-height: 45px;
    color: #333;
}

/* ================================
   8. واکنش‌گرا
================================ */

/* حالت تبلت */
@media (min-width: 768px) and (max-width: 1024px) {
    .main-process-container > .e-con-inner {
        flex-wrap: nowrap !important;
        justify-content: space-evenly !important;
    }
    
    .step-card {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .step-card .elementor-widget-icon {
        width: 70px !important;
        height: 70px !important;
    }

    .step-card h3 {
        font-size: 16px !important; 
        line-height: 1.9em !important;
    }

    .step-card:not(:last-child)::before {
        width: 60% !important;
        left: -30% !important;
        top: 35px !important;
    }
}

/* ✅ حذف خطوط در تبلت عمودی */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .step-card:not(:last-child)::before {
        display: none !important;
    }
}

/* حالت موبایل */
@media (max-width: 767px) {
    .main-process-container > .e-con-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 50px !important;
        padding-top: 20px !important;
    }

    .step-card {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 20px;
    }

    .step-card h3 {
        font-size: 16px !important;
        line-height: 1.9em !important;
        min-height: auto !important;
    }

    .step-card:not(:last-child)::before {
        left: 50% !important;
        top: 85px !important;
        width: 2px !important;
        height: 45px !important;
        transform: translateX(-50%) !important;
    }
}

/* ✅ حذف خطوط فقط در موبایل افقی */
@media (max-width: 767px) and (orientation: landscape) {
    .step-card:not(:last-child)::before {
        display: none !important;
    }
}


/* ==========================================================================
   بخش دسکتاپ - بدون تغییر (طبق درخواست شما)
   ========================================================================== */
.shafa-photo-stack {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    grid-template-rows: repeat(2, 220px) !important; 
    gap: 20px !important;
    height: 460px !important;
    align-items: stretch !important;
    margin-bottom: 30px;
}

.shafa-photo-stack .elementor-widget-image {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

.shafa-photo-stack .img-1 { grid-row: 1 / span 2 !important; grid-column: 1 !important; }
.shafa-photo-stack .img-2 { grid-row: 1 !important; grid-column: 2 !important; }
.shafa-photo-stack .img-3 { grid-row: 2 !important; grid-column: 2 !important; }

.shafa-photo-stack img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 40px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.4s ease-in-out;
}

@media (hover: hover) {
    .shafa-photo-stack img:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    }
}

/* ==========================================================================
   بخش تبلت و موبایل - اصلاح شده برای جلوگیری از کراپ تصویر
   ========================================================================== */
@media (max-width: 1024px) {
    .shafa-photo-stack {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important; /* ارتفاع ردیف‌ها خودکار بر اساس محتوا */
        gap: 15px !important;
        height: auto !important;
        perspective: none !important;
    }

    .shafa-photo-stack .elementor-widget-image {
        position: relative !important;
        width: 100% !important;
        height: auto !important; /* حذف ارتفاع ۱۰۰٪ دسکتاپ */
        transform: none !important;
        filter: none !important;
    }

    .shafa-photo-stack .img-1 { grid-column: 1 / span 2 !important; grid-row: 1 !important; }
    .shafa-photo-stack .img-2 { grid-column: 1 !important; grid-row: 2 !important; }
    .shafa-photo-stack .img-3 { grid-column: 2 !important; grid-row: 2 !important; }

    /* تنظیمات تصویر برای جلوگیری از کراپ */
    .shafa-photo-stack img {
        height: auto !important; /* نمایش کامل ارتفاع عکس بر اساس نسبت واقعی */
        object-fit: contain !important; /* اطمینان از نمایش کل محتوای عکس */
        border-radius: 25px !important; /* گردی لبه‌ها متناسب با سایز موبایل */
    }

    /* غیرفعال سازی کامل هاور در موبایل */
    .shafa-photo-stack img:hover {
        transform: none !important;
    }
}

/* بهینه‌سازی فاصله در موبایل‌های کوچک */
@media (max-width: 480px) {
    .shafa-photo-stack {
        gap: 10px !important;
    }
}


