/* Современный светлый дизайн - версия 2.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Принудительное применение светлой темы */
html {
    height: 100% !important;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.25) 58%),
        radial-gradient(circle at 84% 74%, rgba(226, 232, 240, 0.55) 0%, rgba(248, 250, 252, 0.12) 60%),
        repeating-linear-gradient(128deg,
            rgba(148, 163, 184, 0.10) 0px,
            rgba(148, 163, 184, 0.10) 1px,
            transparent 1px,
            transparent 34px
        ),
        repeating-linear-gradient(22deg,
            rgba(100, 116, 139, 0.07) 0px,
            rgba(100, 116, 139, 0.07) 1px,
            transparent 1px,
            transparent 46px
        ),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 35%, #e2e8f0 70%, #f8fafc 100%) !important;
    background-attachment: fixed !important;
}

/* Переопределение Bootstrap для светлой темы - АГРЕССИВНОЕ */
body.bg-dark,
.bg-dark,
body[class*="dark"],
[class*="dark"] {
    background-color: #f8fafc !important;
    color: #1f2937 !important;
}

/* Переопределение белого текста на темный для светлой темы */
.text-white:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info),
.text-light:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    color: #1f2937 !important;
}

/* Принудительно светлый фон для всех элементов */
body,
html,
main,
section,
.container,
.container-fluid {
    background-color: transparent !important;
}

/* Переопределение всех темных цветов текста */
.text-dark,
.text-body,
.text-body-emphasis {
    color: #111827 !important;
}

/* Убеждаемся что все карточки светлые */
.card,
.card-body,
.card-header,
.card-footer {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #374151 !important;
}

/* Мягкие карточки/плашки для главной и промо-блоков */
.mem-soft-card {
    border-radius: 28px !important;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mem-soft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.mem-soft-panel {
    border-radius: 22px !important;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mem-soft-card .card-body,
.mem-soft-card .card-header,
.mem-soft-card .card-footer {
    background: transparent !important;
}

.mem-soft-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
}

/* FAQ (accordion) на главной: убрать «квадратность» элементов */
.accordion {
    --bs-accordion-border-radius: 16px;
}

.accordion-item {
    border-radius: 16px !important;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.accordion-body {
    background: transparent !important;
}

.accordion-item + .accordion-item {
    margin-top: 10px;
}

.accordion-button {
    background: transparent !important;
}

.accordion-button:not(.collapsed) {
    box-shadow: none !important;
}

/* Плейсхолдер на главной */
.placeholder-image {
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.55) 0%, rgba(248, 250, 252, 0.6) 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Компактный аудио-плеер в хидере */
.mem-audio-player {
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
}

/* Современный липкий хидер */
header.mem-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
}

header.mem-header .navbar {
    padding-top: 14px;
    padding-bottom: 14px;
}

header.mem-header .navbar-nav {
    gap: 6px;
}

@media (min-width: 992px) {
    header.mem-header .navbar-collapse {
        flex-wrap: nowrap;
    }

    header.mem-header .navbar-nav {
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
    }

    header.mem-header .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    header.mem-header .navbar-nav .nav-item {
        flex: 0 0 auto;
    }

    header.mem-header .nav-link {
        padding: 7px 10px;
        font-size: 0.95rem;
    }
}

.mem-brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
}

/* Хидер: ссылки как современные pill-кнопки */
header.mem-header .nav-link {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

header.mem-header .nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
}

header.mem-header .nav-link.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.22);
    color: rgba(37, 99, 235, 0.98) !important;
}

/* Кнопки в хидере: pill + одинаковый стиль */
header.mem-header .btn {
    border-radius: 999px !important;
}

.mem-header__cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98) 0%, rgba(99, 102, 241, 0.98) 100%) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

.mem-header__cta:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.mem-brand__title {
    font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
    line-height: 1.1;
    color: #0f172a;
}

.mem-brand__subtitle {
    font-size: 0.78rem;
    line-height: 1.1;
    color: rgba(71, 85, 105, 0.95);
}

.mem-header__cta {
    border-radius: 999px !important;
    padding-left: 14px;
    padding-right: 14px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.mem-header__user {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

header.mem-header .nav-link {
    color: rgba(15, 23, 42, 0.82);
    font-weight: 500;
}

header.mem-header .nav-link:hover {
    color: rgba(37, 99, 235, 0.95);
}

header.mem-header .navbar-toggler {
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.35);
}

@media (max-width: 991.98px) {
    header.mem-header .navbar-collapse {
        margin-top: 10px;
        padding: 12px;
        border-radius: 18px;
        border: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    }
}

.mem-audio-player__btn {
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 1;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-color: rgba(148, 163, 184, 0.55) !important;
    background: rgba(255, 255, 255, 0.75) !important;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.mem-audio-player__btn:hover {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    transform: translateY(-1px);
}

.mem-audio-player__btn:active {
    transform: translateY(0);
}

.mem-audio-player__volume {
    width: 86px;
    margin: 0;
}

.mem-audio-player__audio {
    display: none;
}

/* Убеждаемся что все формы светлые */
.form-control,
.form-select,
textarea {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #1f2937 !important;
    border-color: rgba(226, 232, 240, 0.8) !important;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    color: #1f2937 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    /* Мраморный фон (глобально) */
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.25) 58%),
        radial-gradient(circle at 84% 74%, rgba(226, 232, 240, 0.55) 0%, rgba(248, 250, 252, 0.12) 60%),
        repeating-linear-gradient(128deg,
            rgba(148, 163, 184, 0.10) 0px,
            rgba(148, 163, 184, 0.10) 1px,
            transparent 1px,
            transparent 34px
        ),
        repeating-linear-gradient(22deg,
            rgba(100, 116, 139, 0.07) 0px,
            rgba(100, 116, 139, 0.07) 1px,
            transparent 1px,
            transparent 46px
        ),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 35%, #e2e8f0 70%, #f8fafc 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    position: relative !important;
    line-height: 1.6 !important;
}

/* Декоративные элементы фона */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 26% 30%, rgba(148, 163, 184, 0.10) 0%, transparent 46%),
        radial-gradient(circle at 72% 70%, rgba(100, 116, 139, 0.08) 0%, transparent 48%),
        repeating-linear-gradient(160deg,
            rgba(148, 163, 184, 0.06) 0px,
            rgba(148, 163, 184, 0.06) 1px,
            transparent 1px,
            transparent 58px
        );
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.00) 42%,
            rgba(15, 23, 42, 0.16) 70%,
            rgba(15, 23, 42, 0.00) 100%
        ),
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.16) 0px,
            rgba(255, 255, 255, 0.16) 1px,
            rgba(15, 23, 42, 0.06) 1px,
            rgba(15, 23, 42, 0.06) 4px
        );
    opacity: 0.18;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
    color: #1f2937;
    flex: 1;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: #111827 !important;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p, li, span, div, a:not(.nav-link):not(.navbar-brand):not(.btn) {
    color: #374151 !important;
}

.text-muted {
    color: #6b7280 !important;
}

/* Светлый стеклянный хедер */
header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    position: relative;
}

header .navbar {
    background-color: transparent !important;
}

header .navbar-brand {
    color: #111827 !important;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

header .navbar-brand:hover {
    color: #6366f1 !important;
    transform: translateY(-1px);
}

header .nav-link {
    color: #4b5563 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
}

header .nav-link:hover {
    color: #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.1);
}

header .navbar-toggler {
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

header .navbar-toggler:hover {
    border-color: #6366f1 !important;
    background-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

header .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    border-color: #6366f1 !important;
    outline: none;
}

header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2899, 102, 241, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em;
    height: 1.5em;
}

header .btn-outline-secondary {
    border: 2px solid rgba(148, 163, 184, 0.5);
    color: #4b5563;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

header .btn-outline-secondary:hover {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header .btn-outline-primary {
    border: 2px solid #6366f1;
    color: #6366f1;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

header .btn-outline-primary:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

header .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

header .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

header .navbar-text {
    color: #6b7280 !important;
    font-weight: 500;
}

.hero-card .placeholder-image,
.placeholder-image {
    width: 100%;
    padding-top: 56.25%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(56, 189, 248, 0.15) 100%) !important;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6) !important;
}

/* Карточки */
.card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

.card-body {
    color: #374151 !important;
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    border: 2px solid #6366f1 !important;
    color: #6366f1 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.btn-outline-secondary {
    border: 2px solid rgba(148, 163, 184, 0.6) !important;
    color: #4b5563 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.3s ease !important;
}

.btn-outline-secondary:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn-lg {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
}

/* Современные формы хай-тек */
.form-control {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    color: #1f2937 !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 1) !important;
    border-color: #6366f1 !important;
    color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

.form-label {
    color: #374151 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

/* Ссылки */
a:not(.nav-link):not(.navbar-brand):not(.btn) {
    color: #6366f1 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:not(.nav-link):not(.navbar-brand):not(.btn):hover {
    color: #4f46e5 !important;
    text-decoration: underline;
}

/* Современные Alert */
.alert {
    border: none !important;
    border-radius: 12px !important;
    border-left: 4px solid !important;
    padding: 1rem 1.25rem !important;
}

.alert-success {
    background-color: rgba(220, 252, 231, 0.9) !important;
    border-left-color: #22c55e !important;
    color: #166534 !important;
}

.alert-danger {
    background-color: rgba(254, 226, 226, 0.9) !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}

.alert-info {
    background-color: rgba(224, 242, 254, 0.9) !important;
    border-left-color: #3b82f6 !important;
    color: #1e40af !important;
}

.alert-warning {
    background-color: rgba(254, 243, 199, 0.9) !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

/* Таблицы */
.table {
    color: #374151 !important;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.table thead th {
    border-bottom: 2px solid rgba(226, 232, 240, 0.8) !important;
    color: #111827 !important;
    font-weight: 600;
    background-color: rgba(249, 250, 251, 0.9);
}

.table tbody tr {
    border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Изображения */
img {
    border-radius: 16px;
}

.img-thumbnail {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px !important;
    padding: 0.5rem !important;
}

/* Декоративные элементы */
.memory-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #6366f1, transparent);
    margin: 2rem 0;
    border-radius: 2px;
}

/* Тени для карточек */
.shadow-sm {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

/* Улучшенная читаемость */
.lead {
    color: #4b5563 !important;
    font-size: 1.25rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Стили для списков */
ul, ol {
    color: #374151 !important;
}

/* Стили для выделенного текста */
mark {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.25) 100%) !important;
    color: #111827 !important;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Дополнительные элементы */
.bg-light {
    background-color: rgba(249, 250, 251, 0.95) !important;
    backdrop-filter: blur(10px);
}

.border {
    border-color: rgba(226, 232, 240, 0.8) !important;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeIn 0.4s ease-out;
}

/* Футер в светлой теме */
footer {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 2px solid rgba(99, 102, 241, 0.2) !important;
    color: #374151 !important;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

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

footer h5, footer h6 {
    color: #111827 !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer .text-muted {
    color: #6b7280 !important;
}

footer a {
    color: #6b7280 !important;
    transition: all 0.3s ease;
    text-decoration: none;
}

footer a:hover {
    color: #6366f1 !important;
    text-decoration: none;
    transform: translateX(2px);
}

footer .border-top {
    border-top-color: rgba(99, 102, 241, 0.15) !important;
}

footer ul {
    margin-bottom: 0;
}

footer li {
    margin-bottom: 0.5rem;
}

/* Промо Дзена на главной */
.dzen-home-promo {
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dzen-home-promo__img {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dzen-home-promo__btn {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(133, 94, 245, 0.22);
}

.dzen-home-promo__pill {
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

/* Герой-блок на главной */
.hero-section {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.hero-section .hero-card {
    border-radius: 22px !important;
}

.hero-section .hero-card img {
    border-radius: 18px;
}

/* Страница памяти (публичная) — тема "Мрамор" */
.mem-page {
    position: relative;
}

.mem-page.mem-marble {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 252, 0.2) 55%),
        radial-gradient(circle at 85% 70%, rgba(226, 232, 240, 0.6) 0%, rgba(248, 250, 252, 0.1) 55%),
        linear-gradient(135deg, rgba(248, 250, 252, 0.92) 0%, rgba(241, 245, 249, 0.88) 35%, rgba(226, 232, 240, 0.9) 70%, rgba(248, 250, 252, 0.94) 100%) !important;
    background-attachment: fixed !important;
}

.mem-marble-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(249, 250, 251, 0.86) 55%, rgba(241, 245, 249, 0.9) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

.mem-marble-hero__inner {
    padding: 1.25rem;
}

.mem-marble-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
    display: block;
}

.mem-marble-photo--placeholder {
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.55) 0%, rgba(241, 245, 249, 0.9) 100%);
}

.mem-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.mem-subtitle {
    color: #6b7280 !important;
}

.mem-card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06) !important;
}

.mem-page .mem-card,
.mem-page .mem-card__body,
.mem-page .mem-kv__value,
.mem-page .mem-title,
.mem-page p,
.mem-page div {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.mem-card__body {
    padding: 1.25rem;
}

.mem-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.mem-kv__item {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(249, 250, 251, 0.85);
}

.mem-kv__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280 !important;
    margin-bottom: 0.15rem;
}

.mem-kv__value {
    font-weight: 600;
    color: #111827 !important;
}

.mem-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mem-gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    display: block;
}

.mem-animate-in {
    animation: fadeIn 0.5s ease-out;
}

.mem-editor-preview {
    padding-bottom: 1rem;
}

.mem-editor-preview__frame {
    box-shadow: 0 12px 44px rgba(15, 23, 42, 0.10);
}

@media (min-width: 768px) {
    .mem-kv {
        grid-template-columns: 1fr 1fr;
    }
    .mem-marble-hero__inner {
        padding: 1.5rem;
    }
    .mem-card__body {
        padding: 1.5rem;
    }
}

/* Модальное окно для изображений */
#imageModal .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#imageModal .modal-dialog {
    max-width: 95vw;
}

#imageModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.85) !important;
}

#imageModal .btn-close {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50%;
    opacity: 1;
    padding: 0.5rem;
}

#imageModal .btn-close:hover {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.image-zoom {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.image-zoom:hover {
    transform: scale(1.02);
}

/* Мобильная адаптация */
@media (max-width: 767.98px) {
    body {
        font-size: 0.98rem;
    }

    header .navbar {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }

    header .navbar-brand {
        font-size: 1.25rem;
    }

    header .nav-link {
        padding: 0.4rem 0.75rem !important;
        margin: 0.1rem 0;
    }

    .hero-section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .hero-section .lead {
        font-size: 1.02rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .hero-section .btn-lg {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.65rem;
    }

    .hero-section .col-lg-6:first-child {
        margin-bottom: 1.75rem;
    }

    .card {
        border-radius: 18px !important;
    }

    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    footer {
        padding: 2rem 0 !important;
    }

    footer .row > div {
        margin-bottom: 1.5rem;
    }

    footer h5, footer h6 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    footer .border-top {
        border-top: 1px solid rgba(99, 102, 241, 0.15) !important;
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
    }

    footer ul li {
        margin-bottom: 0.4rem;
    }
}

/* Аккордеон FAQ */
.accordion-button {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #374151 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 1) !important;
    color: #111827 !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.15);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

.accordion-button::after {
    filter: none;
}

.accordion-body {
    background-color: rgba(249, 250, 251, 0.9) !important;
    color: #374151 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-top: none !important;
    font-size: 1rem;
    line-height: 1.7;
    padding: 1.25rem 1.5rem !important;
}

.accordion-item {
    background-color: transparent !important;
}

/* Улучшение видимости FAQ на мобильных устройствах */
@media (max-width: 767.98px) {
    .accordion-button {
        font-size: 1rem !important;
        padding: 1rem 1.25rem !important;
        font-weight: 600 !important;
        color: #111827 !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        border: 2px solid rgba(99, 102, 241, 0.3) !important;
    }

    .accordion-button:not(.collapsed) {
        background-color: rgba(255, 255, 255, 1) !important;
        color: #111827 !important;
        border-color: #6366f1 !important;
        box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.2) !important;
    }

    .accordion-body {
        background-color: rgba(249, 250, 251, 0.95) !important;
        color: #374151 !important;
        font-size: 1rem !important;
        line-height: 1.8 !important;
        padding: 1.5rem 1.25rem !important;
        border: 2px solid rgba(99, 102, 241, 0.2) !important;
        border-top: none !important;
    }

    .accordion-body a {
        color: #6366f1 !important;
        font-weight: 500;
        text-decoration: underline;
    }

    .accordion-body a:hover {
        color: #4f46e5 !important;
    }

    .accordion-item {
        margin-bottom: 1rem !important;
    }

    /* Улучшение видимости гамбургера на мобильных */
    header .navbar-toggler {
        border: 2px solid rgba(99, 102, 241, 0.4) !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        padding: 0.6rem 0.85rem !important;
    }

    header .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2899, 102, 241, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 1.75em !important;
        height: 1.75em !important;
    }

    header .navbar-toggler:hover,
    header .navbar-toggler:focus {
        border-color: #6366f1 !important;
        background-color: rgba(255, 255, 255, 1) !important;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    }
}


