/* ============================================================
   MARKETING — click accordion in the site's wireframe language
   ============================================================ */

.marketing-section {
    /* خطوط خاکستری، هم‌رنگ بقیه سکشن‌ها */
    --m-green: var(--text-muted);
    --m-green-line: var(--line-strong);
    --m-green-glow: transparent;
    --m-green-tint: rgba(255, 255, 255, 0.012);
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

/* آکاردئون کلیکی: بدون چسبندگی و اسکرول‌هیجکینگ */
.marketing-section,
.marketing-section .container,
.marketing-section .inner {
    overflow: visible !important;
}

/* ====== Scroll track ====== */
.marketing-scroll {
    position: relative;
    height: auto;
}

.marketing-pin {
    position: static;
    min-height: 0;
    display: block;
    padding: 0;
}

/* ====== عنوان داخل کادر خط‌کشی ====== */
#marketing .marketing-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 34px !important;
    padding: 22px 32px !important;
    position: relative !important;
    text-align: center !important;
    overflow: visible !important;
}

#marketing .marketing-header::before {
    content: '' !important;
    position: absolute !important;
    left: calc(-1 * var(--line-ext)) !important;
    right: calc(-1 * var(--line-ext)) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid var(--line-strong) !important;
    border-bottom: 1px solid var(--line-strong) !important;
    background: none !important;
    pointer-events: none;
}

#marketing .marketing-header::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border: 0 !important;
    border-left: 1px solid var(--line-strong) !important;
    border-right: 1px solid var(--line-strong) !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

#marketing .marketing-header h2 {
    margin: 0 0 6px !important;
    font-size: 2rem !important;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

#marketing .marketing-header p {
    max-width: 560px;
    margin: 0 auto !important;
    font-size: 0.82rem !important;
    opacity: 0.45;
}

/* ============================================================
   BOARD — green frame with corner nodes
   ============================================================ */
.marketing-board {
    position: relative;
    border: 1px solid var(--m-green-line);
    z-index: 2;
}

/* Top edge rules run out to both page edges */
.marketing-board::before,
.marketing-board::after {
    content: '';
    position: absolute;
    top: -1px;
    height: 1px;
    background: var(--m-green-line);
    pointer-events: none;
    z-index: 3;
}

.marketing-board::before { left: 100%; right: calc(-1 * var(--line-ext)); }
.marketing-board::after { right: 100%; left: calc(-1 * var(--line-ext)); }

/* ============================================================
   LIST / ROWS
   ============================================================ */
.marketing-list {
    display: flex;
    flex-direction: column;
}

.marketing-item {
    position: relative;
    border-bottom: 1px solid var(--m-green-line);
    background: transparent;
    transition: background 0.35s ease;
}

.marketing-item:last-child {
    border-bottom: 0;
}

/* Every row rule runs out to both page edges */
.marketing-item::before,
.marketing-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    height: 1px;
    background: var(--m-green-line);
    pointer-events: none;
    z-index: 3;
}

.marketing-item::before { left: 100%; right: calc(-1 * var(--line-ext)); }
.marketing-item::after { right: 100%; left: calc(-1 * var(--line-ext)); }

.marketing-item.active {
    background: var(--m-green-tint);
}

/* ============================================================
   QUESTION ROW
   ============================================================ */
.marketing-q {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 18px;
    padding: 20px 26px 20px 30px;
    min-height: 82px;
    background: transparent;
    border: 0;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    transition: background 0.3s ease;
}

.marketing-q:hover {
    background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .marketing-q:hover {
    background: rgba(0, 0, 0, 0.015);
}

.marketing-item.active .marketing-q {
    background: transparent;
}

.mq-num {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 0.5px;
    color: var(--m-green);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.marketing-item.active .mq-num {
    opacity: 1;
}

.mq-text {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.2px;
    color: var(--text);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.marketing-item.active .mq-text {
    opacity: 1;
}

.mq-text em {
    font-style: normal;
    color: var(--text);
    font-weight: 600;
}

/* Chevron inside a corner-bracket frame (same language as the team rows) */
.mq-chev {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: var(--m-green);
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.mq-chev svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.marketing-item.active .mq-chev,
.marketing-item:hover .mq-chev {
    opacity: 1;
    transform: translateX(2px);
    filter: drop-shadow(0 0 6px var(--m-green-glow));
}

/* ============================================================
   ANSWER — opens via grid rows
   ============================================================ */
.marketing-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.marketing-item.active .marketing-a {
    grid-template-rows: 1fr;
}

.ma-inner {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: stretch;
    gap: 28px;
    padding: 0 26px 0 106px;
    opacity: 0;
    transition: opacity 0.4s ease, padding 0.5s ease;
}

.marketing-item.active .ma-inner {
    opacity: 1;
    padding: 4px 26px 26px 106px;
    transition-delay: 0.08s;
}

.ma-body {
    display: flex;
    gap: 18px;
    min-width: 0;
}

.ma-rail {
    flex: 0 0 auto;
    width: 2px;
    background: var(--m-green);
    opacity: 0.5;
}

.ma-content {
    flex: 1;
    min-width: 0;
}

.ma-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0 0 18px;
}

.ma-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 26px;
}

.ma-points li {
    position: relative;
    padding-left: 18px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.ma-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 5px;
    height: 5px;
    border: 1px solid var(--m-green);
    transform: rotate(45deg);
    opacity: 0.65;
}

.ma-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 10px;
    border: 1px solid var(--m-green-line);
    background-image:
        linear-gradient(var(--line-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
    background-size: 26px 26px;
    background-color: transparent;
}

.ma-visual img {
    display: block;
    width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .ma-inner,
    .marketing-item.active .ma-inner {
        grid-template-columns: 1fr;
        padding-left: 30px;
        padding-right: 24px;
    }

    .marketing-item.active .ma-inner {
        padding-bottom: 22px;
    }

    .ma-visual { min-height: 150px; }
    .ma-visual img { max-height: 150px; }
}

@media (max-width: 600px) {
    .marketing-section { padding: 40px 0; }
    #marketing .marketing-header {
        margin-bottom: 24px !important;
        padding: 18px 16px !important;
    }

    #marketing .marketing-header::before {
        left: -1200px !important;
        right: -1200px !important;
    }

    #marketing .marketing-header h2 { font-size: 1.4rem !important; }
    #marketing .marketing-header p { font-size: 0.8rem !important; }

    .marketing-q {
        grid-template-columns: 40px minmax(0, 1fr) 30px;
        gap: 12px;
        padding: 16px 16px 16px 18px;
        min-height: 68px;
    }

    .mq-text { font-size: 0.9rem; }
    .mq-num { font-size: 1rem; }
    .mq-chev { width: 28px; height: 28px; }

    .ma-inner,
    .marketing-item.active .ma-inner {
        padding-left: 18px;
        padding-right: 16px;
    }

    .marketing-item.active .ma-inner {
        padding-bottom: 18px;
    }

    .ma-points {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ma-text { font-size: 0.84rem; margin-bottom: 14px; }
    .ma-points li { font-size: 0.78rem; }
    .ma-visual { min-height: 130px; }
    .ma-visual img { max-height: 130px; }
}

/* No pinning for reduced motion: plain click accordion */


/* ============================================================
