/* Стили шаблона terms-template.php. Порядок правил и подключения сохранён; файл кэшируется браузером. */
/* ============================================================
   TERMS PAGE — MIRACLE STYLE
============================================================ */

.terms-wrapper {
    position: relative;
    min-height: calc(100vh - 80px);
    padding: 44px 20px 64px;
    background:
        radial-gradient(circle at top left, rgba(196, 69, 92, 0.10), transparent 420px),
        radial-gradient(circle at top right, rgba(196, 69, 92, 0.07), transparent 360px),
        var(--bg-body, #1a1a1a);
    color: #ffffff;
    overflow: hidden;
}

.terms-wrapper::before {
    content: "MIRACLE";
    position: absolute;
    right: -24px;
    top: 60px;
    color: rgba(255, 255, 255, 0.025);
    font-size: clamp(70px, 12vw, 180px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: 12px;
    pointer-events: none;
}

.terms-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
}

/* Верхний заголовок */

.terms-hero {
    max-width: 920px;
    margin-bottom: 34px;
}

.terms-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(196, 69, 92, 0.14);
    border: 1px solid rgba(196, 69, 92, 0.34);
    color: var(--accent-hover, #d75970);
    font-size: 13px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.terms-title {
    margin: 0;
    max-width: 980px;
    color: #ffffff;
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-transform: none;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 650;
}

/* Контент без большой рамки */

.terms-content {
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    line-height: 1.7;
}

.terms-sections {
    display: grid;
    gap: 18px;
}

/* Секции */

.terms-section {
    position: relative;
    padding: 26px 28px;
    border-radius: var(--radius-xl, 24px);
    background:
        radial-gradient(circle at top right, rgba(196, 69, 92, 0.08), transparent 280px),
        linear-gradient(180deg, rgba(255,255,255,0.038), rgba(255,255,255,0.012)),
        var(--bg-panel, #232220);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.terms-section::before {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent, #c4455c), transparent);
    opacity: 0.75;
}

.terms-section:last-child {
    margin-bottom: 0;
}

.section-title {
    position: relative;
    margin: 0 0 20px;
    padding-bottom: 14px;
    color: #ffffff;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.025em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 72px;
    height: 1px;
    background: var(--accent, #c4455c);
}

.section-number {
    color: var(--accent-hover, #d75970);
    font-weight: 950;
    margin-right: 8px;
}

.subsection {
    margin-bottom: 22px;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    position: relative;
    margin: 0 0 13px;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 17px;
    line-height: 1.5;
    font-weight: 800;
}

.subsection-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent, #c4455c);
}

/* Текст */

.terms-text {
    margin: 0 0 13px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.75;
}

.terms-text:last-child {
    margin-bottom: 0;
}

.terms-text strong {
    color: rgba(255, 255, 255, 0.94);
    font-weight: 850;
}

.terms-link {
    color: var(--accent-hover, #d75970);
    text-decoration: none;
    font-weight: 750;
    border-bottom: 1px solid rgba(215, 89, 112, 0.45);
    transition: color 0.18s ease, border-color 0.18s ease;
}

.terms-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

/* Списки */

.numbered-list {
    list-style: none;
    padding-left: 0;
    margin: 14px 0 0;
    counter-reset: termsItem;
    display: grid;
    gap: 10px;
}

.numbered-item {
    position: relative;
    min-height: 38px;
    padding: 10px 12px 10px 48px;
    border-radius: var(--radius-md, 14px);
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.55;
    counter-increment: termsItem;
}

.numbered-item::before {
    content: counter(termsItem);
    position: absolute;
    left: 12px;
    top: 9px;
    width: 25px;
    height: 25px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 69, 92, 0.14);
    border: 1px solid rgba(196, 69, 92, 0.34);
    color: var(--accent-hover, #d75970);
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
}

/* Контакты */

.contact-info {
    margin-top: 18px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--radius-lg, 20px);
    background:
        radial-gradient(circle at top left, rgba(196, 69, 92, 0.12), transparent 240px),
        rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.contact-info__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 16px;
    color: var(--accent-hover, #d75970);
    background: rgba(196, 69, 92, 0.13);
    border: 1px solid rgba(196, 69, 92, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info__icon svg {
    width: 26px;
    height: 26px;
}

.contact-info__body {
    min-width: 0;
}

.contact-title {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 850;
}

.contact-email {
    color: var(--accent-hover, #d75970);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 750;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.18s ease;
}

.contact-email:hover {
    color: #ffffff;
}

/* Адаптив */

@media (max-width: 1024px) {
    .terms-wrapper {
        padding: 36px 16px 54px;
    }

    .terms-section {
        padding: 24px 22px;
    }
}

@media (max-width: 768px) {
    .terms-wrapper {
        padding: 28px 14px 42px;
    }

    .terms-hero {
        margin-bottom: 24px;
    }

    .terms-title {
        font-size: 34px;
        line-height: 1;
    }

    .last-updated {
        font-size: 12px;
    }

    .terms-sections {
        gap: 14px;
    }

    .terms-section {
        padding: 22px 18px;
        border-radius: var(--radius-lg, 20px);
    }

    .section-title {
        font-size: 21px;
        line-height: 1.3;
    }

    .subsection-title {
        font-size: 16px;
    }

    .terms-text,
    .numbered-item {
        font-size: 14px;
    }

    .contact-info {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .terms-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .terms-kicker {
        font-size: 12px;
    }

    .terms-title {
        font-size: 30px;
    }

    .terms-section {
        padding: 20px 14px;
    }

    .section-title {
        font-size: 20px;
    }

    .numbered-item {
        padding-left: 44px;
    }

    .contact-info {
        flex-direction: column;
        gap: 12px;
    }
}
