.mag-page {
    --mag-ink: #1c1524;
    --mag-muted: #6f657a;
    --mag-line: rgba(84, 3, 139, .12);
    --mag-brand: #7b2cff;
    --mag-deep: #4c1d95;
    direction: rtl;
    font-family: bym, yekan, Tahoma, sans-serif;
    color: var(--mag-ink);
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 14px 80px;
    box-sizing: border-box;
}
.mag-page *,
.mag-page *::before,
.mag-page *::after { box-sizing: border-box; }
.mag-page a { color: inherit; text-decoration: none; }

.mag-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--mag-muted);
    margin-bottom: 18px;
}
.mag-crumb a:hover { color: var(--mag-brand); }

.mag-hero {
    padding: 22px 22px 20px;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(520px 220px at 100% 0%, rgba(255, 110, 199, .28), transparent 58%),
        linear-gradient(135deg, #2b0050 0%, #52108f 48%, #7b2cff 100%);
    box-shadow: 0 18px 50px rgba(76, 29, 149, .16);
    margin-bottom: 22px;
}
.mag-hero__kicker {
    margin: 0 0 8px;
    font-size: 13px;
    opacity: .85;
}
.mag-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.45;
}
.mag-hero p {
    margin: 0;
    max-width: 640px;
    font-size: 14.5px;
    line-height: 1.9;
    color: rgba(255,255,255,.86);
}

.mag-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}
.mag-cats a {
    padding: 8px 14px;
    border-radius: 999px;
    background: #f6f0ff;
    border: 1px solid var(--mag-line);
    font-size: 13.5px;
}
.mag-cats a.is-on,
.mag-cats a:hover {
    background: var(--mag-brand);
    color: #fff;
    border-color: transparent;
}

.mag-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.mag-grid--more { margin-top: 8px; }
.mag-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--mag-line);
    box-shadow: 0 10px 28px rgba(76, 29, 149, .07);
    min-height: 100%;
}
.mag-card__img {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f4ecff;
}
.mag-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mag-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}
.mag-card__cat,
.mag-article__head .mag-card__cat {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3e8ff;
    color: var(--mag-deep);
    font-size: 12px;
}
.mag-card__title {
    font-size: 17px;
    line-height: 1.6;
}
.mag-card__excerpt {
    color: var(--mag-muted);
    font-size: 13.5px;
    line-height: 1.8;
}
.mag-card__date {
    color: #8b8096;
    font-size: 12.5px;
}
.mag-card:hover { transform: translateY(-2px); }
.mag-empty {
    padding: 40px 18px;
    text-align: center;
    color: var(--mag-muted);
    background: #faf7ff;
    border-radius: 20px;
}

.mag-pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.mag-pager a {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f6f0ff;
}
.mag-pager a.is-on {
    background: var(--mag-brand);
    color: #fff;
}

.mag-article__head { margin-bottom: 18px; }
.mag-article__head h1 {
    margin: 10px 0 8px;
    font-size: 30px;
    line-height: 1.5;
}
.mag-article__meta {
    display: flex;
    gap: 12px;
    color: var(--mag-muted);
    font-size: 13.5px;
    margin: 0;
}
.mag-article__cover {
    margin: 0 0 22px;
    border-radius: 24px;
    overflow: hidden;
}
.mag-article__cover img {
    width: 100%;
    height: auto;
    display: block;
}
.mag-body {
    font-size: 16.5px;
    line-height: 2;
    color: #2a2233;
}
.mag-body h2,
.mag-body h3 {
    margin: 28px 0 10px;
    line-height: 1.5;
    color: var(--mag-deep);
}
.mag-body p { margin: 0 0 14px; }
.mag-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 12px 0;
}
.mag-body a { color: var(--mag-brand); text-decoration: underline; }
.mag-body ul,
.mag-body ol { padding-right: 22px; margin: 0 0 16px; }
.mag-body li { margin: 6px 0; }

.mag-products,
.mag-faq,
.mag-more {
    margin-top: 36px;
    padding-top: 8px;
    border-top: 1px solid var(--mag-line);
}
.mag-products--inline {
    margin: 22px 0 28px;
    padding: 14px;
    border: 1px solid var(--mag-line);
    border-radius: 18px;
    background: #fcfaff;
    border-top: 1px solid var(--mag-line);
}
.mag-products__label {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--mag-brand);
}
.mag-products h2,
.mag-faq h2,
.mag-more h2 {
    margin: 0 0 14px;
    font-size: 20px;
}
.mag-products__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.mag-product {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--mag-line);
    background: #fff;
}
.mag-product img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    background: #f6f0ff;
}
.mag-product strong { font-size: 13.5px; line-height: 1.6; }
.mag-product span { color: var(--mag-brand); font-size: 13px; }

.mag-faq details {
    border: 1px solid var(--mag-line);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fcfaff;
}
.mag-faq summary {
    cursor: pointer;
    font-weight: 700;
}
.mag-faq p {
    margin: 10px 0 0;
    color: var(--mag-muted);
    line-height: 1.9;
}

@media (min-width: 780px) {
    .mag-page { padding: 24px 8px 90px; }
    .mag-hero h1 { font-size: 34px; }
    .mag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mag-products__track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mag-article { max-width: 820px; margin: 0 auto; }
}

.home-mag {
    margin: 8px 0 18px;
}
.home-mag .mag-grid { margin-top: 4px; }
.home-mag .home-row__title { margin: 0; }
