/* ============================================================
   Стили для информационных страниц (agreement-стиль)
   Используется в: partner_agreement.html, user_info.html
   ============================================================ */

/* Анимации */
@keyframes cinematic-fade-up {
    from {
        opacity: 0;
        transform: translate3d(0, 36px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes cinematic-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero секция */
.agreement-hero {
    background:
        radial-gradient(circle at top center, rgba(96, 165, 250, 0.24) 0%, rgba(96, 165, 250, 0) 34%),
        linear-gradient(145deg, #081526 0%, #11243f 32%, #1c3f70 68%, #2563eb 100%);
    color: #fff;
    padding: 3.9rem 0 3.25rem;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.agreement-hero::before {
    content: "";
    position: absolute;
    inset: auto -8% -32% auto;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(191, 219, 254, 0.22) 0%, rgba(191, 219, 254, 0) 70%);
    pointer-events: none;
}

.agreement-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 38%, rgba(2, 6, 23, 0.16) 100%);
    pointer-events: none;
}

.agreement-hero .container {
    position: relative;
    z-index: 1;
}

.agreement-hero-title {
    font-size: 1.78rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    text-shadow: 0 10px 28px rgba(3, 7, 18, 0.42);
}

.agreement-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.92);
    max-width: 760px;
    margin-bottom: 0;
}

/* Контейнер карточки */
.agreement-shell {
    margin-top: -2.1rem;
    margin-bottom: 3.75rem;
    position: relative;
    z-index: 1;
}

/* Карточка */
.agreement-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.45rem;
    box-shadow:
        0 30px 80px rgba(2, 6, 23, 0.22),
        0 12px 30px rgba(30, 64, 175, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset,
        0 0 34px rgba(96, 165, 250, 0.12);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.agreement-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.78) 50%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.agreement-card::after {
    content: "";
    position: absolute;
    inset: -22% auto auto -10%;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.16) 0%, rgba(147, 197, 253, 0) 72%);
    pointer-events: none;
}

/* Заголовок карточки */
.agreement-card-header {
    position: relative;
    padding: 1.5rem 1.85rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.92) 100%),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid rgba(44, 82, 130, 0.1);
    backdrop-filter: blur(12px);
}

/* Хлебные крошки */
.agreement-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.agreement-breadcrumb a {
    color: #2c5282;
    text-decoration: none;
}

.agreement-breadcrumb a:hover {
    text-decoration: underline;
}

/* Метка времени обновления */
.agreement-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.92rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.72) 100%);
    color: #163767;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}

/* Тело карточки */
.agreement-card-body {
    padding: 2.1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(248, 250, 252, 0.8) 100%);
}

/* Контентная область */
.agreement-content {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.96) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.15rem;
    padding: 2.15rem 2.25rem;
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.95;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 18px 42px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.46);
}

.agreement-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 42%);
    pointer-events: none;
}

.agreement-content > :first-child {
    margin-top: 0;
}

.agreement-content > :last-child {
    margin-bottom: 0;
}

.agreement-content > * {
    position: relative;
    z-index: 1;
    max-width: 44rem;
}

/* Типографика контента */
.agreement-content h1,
.agreement-content h2,
.agreement-content h3,
.agreement-content h4,
.agreement-content h5,
.agreement-content h6 {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.01em;
    margin: 2.2rem 0 1rem;
    text-wrap: balance;
}

.agreement-content h1 {
    font-size: 1.95rem;
}

.agreement-content h2 {
    font-size: 1.62rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.18);
}

.agreement-content h3 {
    font-size: 1.24rem;
    color: #1d4ed8;
}

.agreement-content p {
    margin: 0 0 1.35rem;
    color: #334155;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
}

.agreement-content ul,
.agreement-content ol {
    margin: 0 0 1.5rem;
    padding-left: 1.45rem;
}

.agreement-content li {
    margin-bottom: 0.8rem;
    padding-left: 0.15rem;
    color: #334155;
    line-height: 1.85;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
}

.agreement-content li::marker {
    color: #2563eb;
}

.agreement-content a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 0.18em;
}

.agreement-content a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.agreement-content strong,
.agreement-content b {
    color: #0f172a;
    font-weight: 700;
}

.agreement-content blockquote {
    margin: 1.6rem 0;
    padding: 1.15rem 1.2rem;
    border-left: 4px solid #3b82f6;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 0.85rem;
    color: #1e3a8a;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.08);
}

.agreement-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

/* Исправление inline-стилей */
.agreement-content [style*="display: flex"] {
    gap: 0.5rem;
    margin-bottom: 0.8rem !important;
}

.agreement-content [style*="padding-left: 16px"] {
    padding-left: 0 !important;
}

.agreement-content [style*="font-size: 13px"] {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Анимации (с учетом prefers-reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
    .agreement-hero {
        animation: cinematic-fade-in 0.7s ease-out both;
    }

    .agreement-card {
        animation: cinematic-fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
    }

    .agreement-content > * {
        animation: cinematic-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .agreement-content > *:nth-child(1) { animation-delay: 0.14s; }
    .agreement-content > *:nth-child(2) { animation-delay: 0.2s; }
    .agreement-content > *:nth-child(3) { animation-delay: 0.26s; }
    .agreement-content > *:nth-child(4) { animation-delay: 0.32s; }
    .agreement-content > *:nth-child(5) { animation-delay: 0.38s; }
    .agreement-content > *:nth-child(6) { animation-delay: 0.44s; }
    .agreement-content > *:nth-child(7) { animation-delay: 0.5s; }
    .agreement-content > *:nth-child(8) { animation-delay: 0.56s; }
}

@media (prefers-reduced-motion: reduce) {
    .agreement-hero,
    .agreement-card,
    .agreement-content > * {
        animation: none !important;
        transition: none !important;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 991px) {
    .agreement-hero {
        padding: 3rem 0 2.5rem;
    }

    .agreement-hero-title {
        font-size: 1.5rem;
    }

    .agreement-card-body {
        padding: 1.6rem;
    }

    .agreement-content {
        padding: 1.65rem 1.75rem;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
    .agreement-shell {
        margin-top: -1.15rem;
        margin-bottom: 2.6rem;
    }

    .agreement-card {
        border-radius: 1rem;
        box-shadow: 0 14px 32px rgba(2, 6, 23, 0.14);
    }

    .agreement-card::after {
        display: none;
    }

    .agreement-card-header,
    .agreement-card-body {
        padding: 1.2rem;
    }

    .agreement-hero-title {
        font-size: 1.34rem;
    }

    .agreement-hero-subtitle,
    .agreement-content {
        font-size: 0.98rem;
    }

    .agreement-content {
        padding: 0;
        line-height: 1.82;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .agreement-content::before {
        display: none;
    }

    .agreement-content > * {
        max-width: 100%;
    }

    .agreement-content h1 {
        font-size: 1.6rem;
    }

    .agreement-content h2 {
        font-size: 1.38rem;
    }

    .agreement-content h3 {
        font-size: 1.12rem;
    }

    .agreement-content p,
    .agreement-content li {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        overflow-wrap: break-word;
        word-break: normal;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 575px) {
    .agreement-shell {
        margin-top: -0.85rem;
        margin-bottom: 2.3rem;
    }

    .agreement-card {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        overflow: visible;
    }

    .agreement-card::before,
    .agreement-card::after {
        display: none;
    }

    .agreement-card-header {
        padding: 1rem 0 0.95rem;
        background: transparent;
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
        backdrop-filter: none;
    }

    .agreement-card-body {
        padding: 1rem 0 0;
        background: transparent;
    }

    .agreement-content {
        padding: 0;
        line-height: 1.78;
    }

    .agreement-content h1,
    .agreement-content h2,
    .agreement-content h3,
    .agreement-content h4,
    .agreement-content h5,
    .agreement-content h6 {
        margin-top: 1.7rem;
    }
}

