/* Презентация советов по размещению объявлений: карточки советов и синий вводный блок
   в палитре страницы продажи сайта. Все правила ограничены обёрткой .article-tips. */
.content .article-tips {
    --article-tips-primary: #336b98;
    --article-tips-deep: #123654;
    --article-tips-ink: #163b59;
    --article-tips-accent: #f39b68;
    --article-tips-line: #d7e2ec;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    color: var(--article-tips-ink);
    font: 1.7rem/1.7 Arial, Helvetica, sans-serif;
    overflow-wrap: break-word;
    counter-reset: article-tip;
}

.content .article-tips *,
.content .article-tips *::before,
.content .article-tips *::after {
    box-sizing: border-box;
}

.content .article-tips > section {
    min-width: 0;
    padding: 30px;
    border: 1px solid var(--article-tips-line);
    border-radius: 16px;
    background: #edf2f8;
}

.content .article-tips > section:not(:first-child) {
    counter-increment: article-tip;
}

.content .article-tips > section:nth-child(odd):not(:first-child) {
    border-color: #ebd6c7;
    background: #fff5ed;
}

.content .article-tips > section:not(:first-child)::before {
    content: counter(article-tip, decimal-leading-zero);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    border: 1px solid #c3d3e2;
    border-radius: 12px;
    background: #ffffffb3;
    color: var(--article-tips-primary);
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 700;
}

.content .article-tips h2 {
    margin: 0 0 18px;
    color: var(--article-tips-deep);
    font-size: 2.4rem;
    line-height: 1.3;
    font-weight: 700;
    text-wrap: balance;
}

.content .article-tips p {
    margin: 0 0 16px;
}

.content .article-tips p:last-child {
    margin-bottom: 0;
}

.content .article-tips a {
    color: var(--article-tips-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content .article-tips a:hover {
    color: var(--article-tips-deep);
    text-decoration-thickness: 2px;
}

.content .article-tips :is(b, strong) {
    color: var(--article-tips-deep);
}

.content .article-tips a:focus-visible {
    outline: 3px solid var(--article-tips-primary);
    outline-offset: 4px;
}

/* Вводный блок занимает обе колонки. Щит и орбиты декоративные, текст лежит поверх них. */
.content .article-tips > section:first-child {
    position: relative;
    isolation: isolate;
    grid-column: 1 / -1;
    min-height: 300px;
    overflow: hidden;
    padding: 48px 370px 48px 44px;
    border-color: #375a76;
    border-radius: 20px;
    background: radial-gradient(ellipse at 85% 45%, #36729b88, transparent 55%), linear-gradient(125deg, #102d48, #173f60);
    color: #d3e2ed;
}

.content .article-tips > section:first-child > * {
    position: relative;
    z-index: 1;
}

.content .article-tips > section:first-child h2 {
    margin-bottom: 22px;
    color: #fff;
    font-size: 3.8rem;
    line-height: 1.15;
    text-wrap: initial;
}

.content .article-tips > section:first-child a {
    color: #ffc299;
}

.content .article-tips > section:first-child a:hover {
    color: #fff;
}

.content .article-tips > section:first-child a:focus-visible {
    outline-color: var(--article-tips-accent);
}

.content .article-tips > section:first-child::before,
.content .article-tips > section:first-child::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.content .article-tips > section:first-child::before {
    top: calc(50% - 140px);
    right: 44px;
    width: 280px;
    height: 280px;
    border: 1px solid #91bee447;
    border-radius: 50%;
    background: radial-gradient(circle at 15% 15%, #ffc299 0 3px, transparent 4px), radial-gradient(circle at 91% 74%, #8cc9f0 0 4px, transparent 5px), radial-gradient(circle at 50% 50%, transparent 52%, #8cc9f033 52.5%, transparent 53.5%);
    box-shadow: 0 0 0 24px #8cc9f00a, 0 0 0 25px #8cc9f01a, inset 0 0 55px #6cb3ec12;
}

.content .article-tips > section:first-child::after {
    top: calc(50% - 112px);
    right: 93px;
    width: 182px;
    height: 224px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 182 224' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='shield' x1='20' y1='20' x2='156' y2='200' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%235d94be'/%3E%3Cstop offset='1' stop-color='%23153655'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M91 8 174 39v60c0 55-31 93-83 117C39 192 8 154 8 99V39L91 8Z' fill='url(%23shield)' stroke='%2398c7eb' stroke-width='2'/%3E%3Cpath d='m91 23 68 26v50c0 45-24 78-68 102-44-24-68-57-68-102V49l68-26Z' stroke='%23b9dbf2' stroke-opacity='.3'/%3E%3Cpath d='m91 8 83 31v60c0 55-31 93-83 117V8Z' fill='%230b2943' fill-opacity='.2'/%3E%3Ccircle cx='91' cy='103' r='43' fill='%23133350' stroke='%23ffc299' stroke-width='3'/%3E%3Cpath d='m61 73 60 60' stroke='%23ffc299' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='m39 56 24-9' stroke='%23d9edf9' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 18px 24px #071d3580) drop-shadow(0 0 22px #81b9e433);
}

/* Ссылки на изображения открывает штатная галерея frontend-article-view.js. */
.content .article-tips a:has(img) {
    display: block;
    width: fit-content;
    max-width: 100%;
    border: 1px solid #c3d3e2;
    border-radius: 8px;
    cursor: zoom-in;
}

.content .article-tips a:has(img):hover {
    border-color: var(--article-tips-primary);
}

.content .article-tips img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 7px;
}

@media (prefers-reduced-motion: no-preference) {
    .content .article-tips > section:first-child::before {
        animation: article-tips-orbit 28s linear infinite;
    }

    .content .article-tips > section:first-child::after {
        animation: article-tips-shield 6s ease-in-out infinite;
    }
}

@keyframes article-tips-orbit {
    to { transform: rotate(360deg); }
}

@keyframes article-tips-shield {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@media screen and (width <= 1000px) {
    .content .article-tips > section {
        padding: 26px;
    }

    .content .article-tips > section:first-child {
        padding: 36px 310px 36px 32px;
    }

    .content .article-tips > section:first-child h2 {
        font-size: 3.4rem;
    }

    .content .article-tips > section:first-child::before {
        right: 20px;
        top: calc(50% - 125px);
        width: 250px;
        height: 250px;
    }

    .content .article-tips > section:first-child::after {
        right: 63px;
        top: calc(50% - 102px);
        width: 164px;
        height: 204px;
    }
}

@media screen and (width <= 780px) {
    .content .article-tips {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .content .article-tips > section:first-child {
        padding: 32px 240px 32px 28px;
    }

    .content .article-tips > section:first-child::before {
        right: 10px;
        top: calc(50% - 100px);
        width: 200px;
        height: 200px;
    }

    .content .article-tips > section:first-child::after {
        right: 45px;
        top: calc(50% - 80px);
        width: 130px;
        height: 160px;
    }
}

@media screen and (width <= 600px) {
    .content .article-tips {
        font-size: 1.6rem;
    }

    .content .article-tips > section {
        padding: 24px 20px;
    }

    .content .article-tips h2 {
        font-size: 2.2rem;
    }

    .content .article-tips > section:first-child {
        min-height: 0;
        padding: 138px 24px 30px;
        border-radius: 16px;
    }

    .content .article-tips > section:first-child h2 {
        font-size: 3rem;
    }

    .content .article-tips > section:first-child::before {
        top: -28px;
        right: -24px;
        width: 200px;
        height: 200px;
    }

    .content .article-tips > section:first-child::after {
        top: 22px;
        right: 34px;
        width: 84px;
        height: 104px;
    }
}
