/* =========================================================
   Общие стили (дополняют Tailwind)
========================================================= */

body {
    font-family: "Inter", sans-serif;
    background-color: #fff8f4;
    color: #33253d;
}

h1, h2, h3, .font-serif {
    font-family: "Lora", serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* учитываем фиксированную шапку */
}

.is-hidden {
    display: none !important;
}


/* =========================================================
   ФОРМА: ошибки и состояние отправки
========================================================= */

.field-error input,
.field-error textarea {
    border-color: #b45a4a !important;
}

.error-text {
    margin-top: 6px;

    color: #a14c3e;

    font-size: 12px;
    font-weight: 500;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;

    width: 1px;
    height: 1px;

    overflow: hidden;
}

button[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.spinner {
    display: inline-block;

    width: 16px;
    height: 16px;

    margin-left: 8px;

    vertical-align: -3px;

    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* =========================================================
   TOAST — всплывающие уведомления
========================================================= */

.toast-wrap {
    position: fixed;

    right: 24px;
    bottom: 24px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 100;

    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    width: min(380px, calc(100vw - 32px));

    padding: 16px 18px;

    border: 1px solid #fcdcca;
    border-radius: 18px;

    background: #fff;

    box-shadow: 0 20px 50px rgba(51, 37, 61, 0.16);

    pointer-events: auto;

    opacity: 0;
    transform: translateY(16px);

    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #efe8f8;
    color: #60438b;
}

.toast.error .toast-icon {
    background: #f6e3de;
    color: #a14c3e;
}

.toast strong {
    display: block;

    color: #33253d;

    font-family: "Lora", serif;
    font-size: 16px;
    line-height: 1.35;
}

.toast p {
    margin-top: 3px;

    color: #5b4656;

    font-size: 13px;
    line-height: 1.5;
}

.toast-close {
    margin-left: auto;

    border: 0;
    background: none;

    color: #a06e66;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}

@media (max-width: 640px) {
    .toast-wrap {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        width: 100%;
    }
}


/* =========================================================
   БЛОГ: обложки-заглушки (замените на <img>, когда будут фото)
========================================================= */

.post-cover {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.55) 0 14%, transparent 14.5%),
        linear-gradient(140deg, #efe8f8 0%, #ddd0f0 55%, #c5b0e3 100%);

    color: #60438b;
}

.post-cover::before {
    content: "";

    position: absolute;

    width: 70%;
    aspect-ratio: 1;

    left: -22%;
    bottom: -45%;

    border-radius: 50%;

    border: 28px solid rgba(96, 67, 139, 0.08);
}

.post-cover.tone-warm {
    background:
        radial-gradient(circle at 22% 25%, rgba(255, 255, 255, 0.6) 0 12%, transparent 12.5%),
        linear-gradient(150deg, #ffefe5 0%, #fcdcca 60%, #f8c3a7 100%);

    color: #a06e66;
}

.post-cover.tone-deep {
    background:
        radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.14) 0 16%, transparent 16.5%),
        linear-gradient(140deg, #7653a8 0%, #4b356c 100%);

    color: #efe8f8;
}

.post-cover.tone-mix {
    background:
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.45) 0 13%, transparent 13.5%),
        linear-gradient(130deg, #fcdcca 0%, #ddd0f0 100%);
}

.post-cover .cover-icon {
    position: relative;

    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);

    backdrop-filter: blur(6px);

    font-size: 28px;

    transition: transform 0.4s ease;
}

.post-cover.tone-deep .cover-icon {
    background: rgba(255, 255, 255, 0.14);
}

.group:hover .post-cover .cover-icon {
    transform: scale(1.08);
}

.post-cover img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   СТАТЬЯ: типографика текста
========================================================= */

.article-body {
    color: #33253d;

    font-size: 17px;
    line-height: 1.85;
}

.article-body > * + * {
    margin-top: 1.4em;
}

.article-body p,
.article-body li {
    color: #5b4656;
}

.article-body .lead {
    color: #33253d;

    font-family: "Lora", serif;
    font-size: 21px;
    line-height: 1.65;
}

.article-body h2 {
    margin-top: 2.2em;

    color: #33253d;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.article-body h3 {
    margin-top: 1.8em;

    color: #33253d;

    font-size: 21px;
    font-weight: 700;
}

.article-body ul,
.article-body ol {
    padding-left: 0;

    list-style: none;
}

.article-body li {
    position: relative;

    padding-left: 32px;
}

.article-body li + li {
    margin-top: 10px;
}

.article-body ul li::before {
    content: "\f00c"; /* Font Awesome: check */

    position: absolute;

    left: 2px;
    top: 0.1em;

    color: #7653a8;

    font-family: "Font Awesome 6 Free";
    font-size: 13px;
    font-weight: 900;
}

.article-body ol {
    counter-reset: item;
}

.article-body ol li::before {
    counter-increment: item;
    content: counter(item);

    position: absolute;

    left: 0;
    top: 0.3em;

    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #efe8f8;

    color: #60438b;

    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.article-body blockquote {
    margin: 2.2em 0;

    padding: 30px 34px;

    border-left: 4px solid #8f6dbf;
    border-radius: 0 24px 24px 0;

    background: #f8f5fc;

    color: #372852;

    font-family: "Lora", serif;
    font-size: 21px;
    font-style: italic;
    line-height: 1.55;
}

.article-body blockquote cite {
    display: block;

    margin-top: 12px;

    color: #7653a8;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-style: normal;
}

.article-body p a,
.article-body li a {
    color: #60438b;

    text-decoration: underline;
    text-decoration-color: #c5b0e3;
    text-underline-offset: 3px;
}

.article-body p a:hover,
.article-body li a:hover {
    text-decoration-color: #60438b;
}

.article-tip {
    display: flex;
    gap: 16px;

    padding: 22px 24px;

    border: 1px solid #fcdcca;
    border-radius: 20px;

    background: #fff8f4;
}

.article-tip p {
    font-size: 15px;
    line-height: 1.7;
}

/* оглавление */

.toc a {
    display: block;

    padding: 4px 0 4px 14px;

    border-left: 2px solid transparent;

    color: #5b4656;

    transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a:hover {
    color: #60438b;
}

.toc a.active {
    border-left-color: #7653a8;

    color: #372852;

    font-weight: 600;
}

@media (max-width: 640px) {
    .article-body {
        font-size: 16px;
    }

    .article-body .lead {
        font-size: 19px;
    }

    .article-body h2 {
        font-size: 24px;
    }

    .article-body blockquote {
        padding: 22px 22px;

        font-size: 18px;
    }
}
