/* =========================================================
   Poetici.com — внутренние промоблоки
   Форматы:
   1) square      — компактный квадратный/почти квадратный блок
   2) horizontal  — широкий тонкий блок
   3) vertical    — высокий прямоугольный блок
   ========================================================= */

.poetici-promo {
    --promo-bg-color: #fff;
    --promo-bg-image: none;
    --promo-bg-position: center center;
    --promo-bg-size: cover;
    --promo-overlay-color: #fff;
    --promo-overlay-opacity: 0;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(29, 33, 62, .08);
    border-radius: 22px;
    background: var(--promo-bg-color);
    box-shadow: 0 16px 42px rgba(17, 21, 44, .07);
}

.poetici-promo__background,
.poetici-promo__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.poetici-promo__background {
    z-index: -2;
    background-color: var(--promo-bg-color);
    background-image: var(--promo-bg-image);
    background-position: var(--promo-bg-position);
    background-size: var(--promo-bg-size);
    background-repeat: no-repeat;
}

.poetici-promo__overlay {
    z-index: -1;
    background: var(--promo-overlay-color);
    opacity: var(--promo-overlay-opacity);
}

.poetici-promo__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.poetici-promo__badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #a83440;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.poetici-promo__title {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.12;
}

.poetici-promo__text {
    margin: 0;
    line-height: 1.55;
}

.poetici-promo__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin-top: 18px;
    padding: 9px 18px;
    border: 1px solid #ff3138;
    border-radius: 10px;
    background: rgba(255,255,255,.78);
    color: #ff3138 !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: .18s ease;
    backdrop-filter: blur(5px);
}

.poetici-promo__button:hover {
    color: #fff !important;
    background: #ff3138;
    transform: translateY(-1px);
}

.poetici-promo__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------------------------
   1. КВАДРАТНЫЙ
   По типу "Поэзия рядом"
   --------------------------- */

.poetici-promo--square {
    min-height: 320px;
    aspect-ratio: 1 / 1;
}

.poetici-promo--square .poetici-promo__inner {
    display: flex;
    align-items: center;
    padding: 34px 38px;
}

.poetici-promo--square .poetici-promo__content {
    max-width: 85%;
}

.poetici-promo--square .poetici-promo__title {
    font-size: 30px;
}

.poetici-promo--square .poetici-promo__text {
    font-size: 16px;
}

/* ---------------------------
   2. ГОРИЗОНТАЛЬНЫЙ
   По типу "Стих на каждый день"
   --------------------------- */

.poetici-promo--horizontal {
    min-height: 150px;
}

.poetici-promo--horizontal .poetici-promo__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 30px 38px;
}

.poetici-promo--horizontal .poetici-promo__content {
    max-width: 760px;
}

.poetici-promo--horizontal .poetici-promo__title {
    font-size: 30px;
}

.poetici-promo--horizontal .poetici-promo__text {
    max-width: 690px;
    font-size: 16px;
}

.poetici-promo--horizontal .poetici-promo__visual {
    width: 220px;
    height: 105px;
    overflow: hidden;
    border-radius: 15px;
}


/* Внутреннее изображение в горизонтальном блоке: правая половина целиком */
.poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__content {
    max-width: none;
    padding: 30px 38px;
}

.poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__visual {
    width: 100%;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    border-radius: 0;
}

.poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__visual img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* ---------------------------
   3. ВЕРТИКАЛЬНЫЙ
   Для боковых колонок / sidebar
   --------------------------- */

.poetici-promo--vertical {
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
}

.poetici-promo--vertical .poetici-promo__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 0;
    height: auto;
    padding: 20px 30px 28px;
}

.poetici-promo--vertical .poetici-promo__content {
    width: 100%;
    margin-top: 0;
    max-width: 100%;
}

.poetici-promo--vertical .poetici-promo__title {
    margin-top: 0;
    font-size: 30px;
}

.poetici-promo--vertical .poetici-promo__text {
    font-size: 16px;
}

.poetici-promo--vertical .poetici-promo__visual {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.poetici-promo--vertical .poetici-promo__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(255,255,255,.94) 0%,
        rgba(255,255,255,.70) 42%,
        rgba(255,255,255,.06) 78%
    );
}

/* Тёмный/светлый текст в зависимости от выбранного фона */

.poetici-promo--text-dark {
    color: #11152c;
}

.poetici-promo--text-dark .poetici-promo__title {
    color: #11152c;
}

.poetici-promo--text-dark .poetici-promo__text {
    color: #4f566e;
}

.poetici-promo--text-light {
    color: #fff;
}

.poetici-promo--text-light .poetici-promo__title,
.poetici-promo--text-light .poetici-promo__text {
    color: #fff;
}

.poetici-promo--text-light .poetici-promo__badge {
    background: rgba(10,14,34,.36);
    color: #fff;
}

.poetici-promo--text-light .poetici-promo__button {
    border-color: rgba(255,255,255,.92);
    background: rgba(10,14,34,.20);
    color: #fff !important;
}

.poetici-promo--text-light .poetici-promo__button:hover {
    background: #fff;
    color: #11152c !important;
}

@media (max-width: 767px) {
    .poetici-promo {
        border-radius: 18px;
    }

    .poetici-promo--square {
        aspect-ratio: auto;
        min-height: 300px;
    }

    .poetici-promo--vertical {
        aspect-ratio: auto;
        min-height: 0;
        height: auto;
    }

    .poetici-promo--square .poetici-promo__inner,
    .poetici-promo--vertical .poetici-promo__inner {
        padding: 28px 24px;
    }

    .poetici-promo--horizontal {
        min-height: 0;
    }

    .poetici-promo--horizontal .poetici-promo__inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 26px 24px;
    }

    .poetici-promo--horizontal .poetici-promo__visual {
        width: 100%;
        height: 150px;
    }


    .poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__inner {
        grid-template-columns: 1fr;
    }

    .poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__content {
        padding: 26px 24px;
    }

    .poetici-promo--horizontal.poetici-promo--has-image .poetici-promo__visual {
        height: 180px;
        min-height: 180px;
    }

    .poetici-promo__button {
        width: 100%;
    }
}

/* =========================================================
   DARK THEME — Poetici.com
   Промоблок автоматически подстраивается под ночную тему.
   Фоновая картинка креатива не отключается и не заменяется.
   ========================================================= */

body.dark .poetici-promo,
body.dark-theme .poetici-promo,
body.theme-dark .poetici-promo,
html.dark .poetici-promo,
html[data-theme="dark"] .poetici-promo {
    --promo-bg-color: #171923 !important;

    border-color: rgba(255,255,255,.09);
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
}

/* Креатив с тёмным текстом в ночной теме автоматически становится светлым */
body.dark .poetici-promo--text-dark,
body.dark-theme .poetici-promo--text-dark,
body.theme-dark .poetici-promo--text-dark,
html.dark .poetici-promo--text-dark,
html[data-theme="dark"] .poetici-promo--text-dark {
    color: #f5f6fa;
}

body.dark .poetici-promo--text-dark .poetici-promo__title,
body.dark-theme .poetici-promo--text-dark .poetici-promo__title,
body.theme-dark .poetici-promo--text-dark .poetici-promo__title,
html.dark .poetici-promo--text-dark .poetici-promo__title,
html[data-theme="dark"] .poetici-promo--text-dark .poetici-promo__title {
    color: #f5f6fa;
}

body.dark .poetici-promo--text-dark .poetici-promo__text,
body.dark-theme .poetici-promo--text-dark .poetici-promo__text,
body.theme-dark .poetici-promo--text-dark .poetici-promo__text,
html.dark .poetici-promo--text-dark .poetici-promo__text,
html[data-theme="dark"] .poetici-promo--text-dark .poetici-promo__text {
    color: #c8ccd8;
}

body.dark .poetici-promo--text-dark .poetici-promo__badge,
body.dark-theme .poetici-promo--text-dark .poetici-promo__badge,
body.theme-dark .poetici-promo--text-dark .poetici-promo__badge,
html.dark .poetici-promo--text-dark .poetici-promo__badge,
html[data-theme="dark"] .poetici-promo--text-dark .poetici-promo__badge {
    background: rgba(10,14,34,.48);
    color: #fff;
}

body.dark .poetici-promo--text-dark .poetici-promo__button,
body.dark-theme .poetici-promo--text-dark .poetici-promo__button,
body.theme-dark .poetici-promo--text-dark .poetici-promo__button,
html.dark .poetici-promo--text-dark .poetici-promo__button,
html[data-theme="dark"] .poetici-promo--text-dark .poetici-promo__button {
    border-color: #ff3138;
    background: rgba(23,25,35,.78);
    color: #ff6267 !important;
}

body.dark .poetici-promo--text-dark .poetici-promo__button:hover,
body.dark-theme .poetici-promo--text-dark .poetici-promo__button:hover,
body.theme-dark .poetici-promo--text-dark .poetici-promo__button:hover,
html.dark .poetici-promo--text-dark .poetici-promo__button:hover,
html[data-theme="dark"] .poetici-promo--text-dark .poetici-promo__button:hover {
    background: #ff3138;
    color: #fff !important;
}

/* У вертикального блока светлый градиент внизу заменяем на тёмный */
body.dark .poetici-promo--vertical .poetici-promo__visual::after,
body.dark-theme .poetici-promo--vertical .poetici-promo__visual::after,
body.theme-dark .poetici-promo--vertical .poetici-promo__visual::after,
html.dark .poetici-promo--vertical .poetici-promo__visual::after,
html[data-theme="dark"] .poetici-promo--vertical .poetici-promo__visual::after {
    background: linear-gradient(
        to top,
        rgba(17,19,27,.96) 0%,
        rgba(17,19,27,.76) 42%,
        rgba(17,19,27,.08) 78%
    );
}

