/* 1. Глобальные цвета и фон (основа стиля) */
:root {
    --baroque-bg: #0b0b0b; /* Глубокий черный, как на фоне картинки */
    --baroque-gold: #d3b57e; /* Теплый золотой оттенок */
    --baroque-silver: #e0e0e0; /* Серебристо-белый для буквы/карнизов */
    --baroque-accent: #2a2a2a; /* Темно-серый для границ */
}

body {
    background-color: var(--baroque-bg);
    color: #dcdcdc; /* Светло-серый текст для читаемости на черном */
    font-family:  'Merriweather', serif; /* Шрифты с засечками для аристократичности */
}
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --silver: #c0c0c0;
    --silver-light: #e8e8e8;
    --silver-dark: #8a8a8a;
   /* --gold: #c9a961;*/
   /* --gold-light: #e6c87a;*/
   /* --gold-dark: #8b7340;*/
    --gold: #997f53;
    --gold-light: #e5d7b1;
    --gold-dark: #a99670;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --border-ornate: 2px solid var(--gold);
    --font-heading: 'Playfair Display', 'Cinzel', Georgia, serif;
    --font-body:  Georgia, serif;


}

body {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 70%);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
}

.container-header {
    background: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    border-bottom: 3px double var(--gold);
    position: relative;
    padding: 0.5rem 0;
}



.site-title,
.site-title a {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(180deg, 
        var(--silver-light) 0%, 
        var(--silver) 40%, 
        var(--silver-dark) 60%, 
        var(--silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    filter: drop-shadow(0 0 8px rgba(192,192,192,0.3));
}

.site-description {
    color: var(--gold);
    font-family: var(--font-heading);
    font-style: italic;
    letter-spacing: 0.1em;
    font-size: 1.1rem;
}


@media (width >= 992px) {
    .container-header .mod-menu>li+li {
        margin-left: 0.55em;
    }
}

.mod-menu > li > a:hover,
.nav-link:hover,
.mod-menu > li.active > a {
    color: var(--gold-light) !important;
    background: linear-gradient(180deg, 
        rgba(201,169,97,0.1) 0%, 
        rgba(201,169,97,0.05) 100%);

}

.mod-menu > li > a:hover::before,
.nav-link:hover::before {
    opacity: 1;
}

.mod-menu .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.9);
}



/* 4. Типографика статей (стиль свитка) */
article p {
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

/* Выделение первых букв абзацев (Drop Cap) - как в старинных книгах */
article p:first-letter {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    padding-right: 10px;
    color: var(--baroque-gold);
    font-family: 'Playfair Display', serif;
}

/* 5. Кнопки (стиль кованого железа) */
.btn-primary, .btn-success, .btn-danger {
    background-color: transparent;
    border: 2px solid var(--baroque-gold);
    color: var(--baroque-gold);
    padding: 10px 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-success:hover, .btn-danger:hover {
    background-color: var(--baroque-gold);
    color: var(--baroque-bg);
    box-shadow: 0 0 15px rgba(197, 160, 90, 0.4);
}

/* 6. Навигация и меню (строгость и золото) */
.navbar-nav .nav-link {
    color: var(--baroque-silver) !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-nav .nav-link:hover {
    color: var(--baroque-gold) !important;
    text-decoration: underline;
}
a:not([class]) {    text-decoration: none !important;}
.com-familytree__birthday-item a:hover {
    background: #4e503a73;
}
/* 7. Декоративные элементы (имитация завитков) */
/* Используем псевдоэлементы для создания легких узоров в углах */
.container::before, .container::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: radial-gradient(circle, var(--baroque-gold) 10%, transparent 20%);
    opacity: 0.05;
    pointer-events: none;
}
.container::before { top: 20px; left: 20px; transform: rotate(45deg); }
.container::after { bottom: 20px; right: 20px; transform: rotate(-45deg); }

hr,
.divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--gold-dark) 20%, 
        var(--gold) 50%, 
        var(--gold-dark) 80%, 
        transparent 100%);
    margin: 3rem 0;
    position: relative;
}

hr::after {

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 0 1.5rem;
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0.5rem;
}
 .container-footer {
    background: linear-gradient(180deg, 
        #0a0a0a 0%, 
        #000000 100%);
    border-top: 3px double var(--gold);
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
}

.container-footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 20px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'><path d='M0,10 Q50,0 100,10 T200,10' fill='none' stroke='%23c9a961' stroke-width='1'/><circle cx='100' cy='10' r='3' fill='%23c9a961'/></svg>") no-repeat center;
}

.footer a {
    color: var(--silver);
}

.footer a:hover {
    color: var(--gold-light);
}

input, textarea, select,
.form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--gold-dark);
    color: var(--silver-light);
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus,
.form-control:focus {
    background: var(--bg-card);
    border-color: var(--gold);
    outline: none;
    box-shadow: 
        0 0 0 2px rgba(201,169,97,0.2),
        inset 0 0 8px rgba(201,169,97,0.1);
}

label {
    font-family: var(--font-heading);
    color: var(--gold-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 8. Адаптивность: на мобильных убираем лишнюю "тяжесть" */
@media (max-width: 768px) {
    :root { --font-body-size: 16px; }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    
    .site-title, .site-title a {
        font-size: 2rem;
    }
    
    .card, .com-content-category__item {
        padding: 1.5rem;
    }
    
    .mod-menu > li > a {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 1rem;
        border-width: 1px;
    }
    h1::after { display: none; }
    .container::before, .container::after { display: none; }
    article p:first-letter { display: inline; font-size: 1rem; }
}
/* Основной контейнер карточки */
.bottom-b.card {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 50%, #141414 100%);
    border: 2px solid var(--gold);
    border-radius: 0;
    padding: 0;
    position: relative;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(201, 169, 97, 0.15),
        inset 0 1px 0 rgba(232, 232, 232, 0.1);
    max-width: 480px;
    margin: 2rem auto;
    overflow: hidden;
}

/* Двойная декоративная рамка */


/* Угловые орнаменты */
.bottom-b.card .card-body {
    position: relative;
    padding: 2.5rem 2rem;
    z-index: 2;
}


.bottom-b.card .card-body::before {
    top: 15px;
    left: 20px;
}

.bottom-b.card .card-body::after {
    top: 15px;
    right: 20px;
    transform: scaleX(-1);
}
.bottom-b.card .card-header {
    background: linear-gradient(180deg, 
        #1a1a1a 0%, 
        #0a0a0a 100%);
    border-bottom: 3px double var(--gold);
    padding: 1.8rem 2rem;
    text-align: center;
    position: relative;
}

.bottom-b.card .card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(180deg, 
        var(--silver-light) 0%, 
        var(--gold-light) 45%, 
        var(--silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    position: relative;
}

/* Декоративная корона над заголовком */
.bottom-b.card .card-header::before {
    content: 'Авторизация';
    display: none;
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    
}

/* Орнаментальная линия под заголовком */
.bottom-b.card .card-header::after {
    content: '';
    display: block;
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 0.3rem;
    margin-top: 0.8rem;
    opacity: 0.8;
}
.mod-login .input-group {
    background: var(--bg-secondary);
    border: 1px solid var(--gold-dark);
    border-radius: 0;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(201, 169, 97, 0.2);
}

.mod-login .input-group:focus-within {
    border-color: var(--gold);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(201, 169, 97, 0.3),
        0 0 0 2px rgba(201, 169, 97, 0.15);
}

.mod-login .form-control {
    background: transparent;
    border: none;
    color: var(--silver-light);
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding: 0.9rem 1rem;
    letter-spacing: 0.05em;
}

.mod-login .form-control::placeholder {
    color: var(--silver-dark);
    font-style: italic;
    opacity: 0.7;
}

.mod-login .form-control:focus {
    background: transparent;
    box-shadow: none;
    outline: none;
    color: var(--silver-light);
}

/* Иконки в полях */
.mod-login .input-group-text {
    background: linear-gradient(180deg, 
        #2a2a2a 0%, 
        #1a1a1a 100%);
    border: none;
    border-left: 1px solid var(--gold-dark);
    color: var(--gold);
    padding: 0 1.2rem;
    font-size: 1.1rem;
}

.mod-login .input-group:focus-within .input-group-text {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201, 169, 97, 0.6);
}

/* Отступы между полями */
.mod-login__username,
.mod-login__password {
    margin-bottom: 1.2rem;
}

.mod-login__username .form-group,
.mod-login__password .form-group {
    margin: 0;
}
.mod-login .input-password-toggle {
    background: linear-gradient(180deg, 
        #2a2a2a 0%, 
        #1a1a1a 100%);
    border: none;
    border-left: 1px solid var(--gold-dark);
    color: var(--gold);
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.mod-login .input-password-toggle:hover {
    background: linear-gradient(180deg, 
        var(--gold-dark) 0%, 
        var(--gold) 100%);
    color: #0a0a0a;
}

.mod-login .input-password-toggle .icon-eye {
    font-size: 1rem;
}
.mod-login__remember {
    margin: 1.5rem 0;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.mod-login .form-check {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mod-login .form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--gold-dark);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mod-login .form-check-input:hover {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(201, 169, 97, 0.3);
}

.mod-login .form-check-input:checked {
    background: linear-gradient(135deg, 
        var(--gold-dark) 0%, 
        var(--gold) 100%);
    border-color: var(--gold-light);
}

.mod-login .form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0a0a0a;
    font-weight: 900;
    font-size: 14px;
}

.mod-login .form-check-label {
    font-family: var(--font-heading);
    color: var(--silver);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mod-login .form-check-label:hover {
    color: var(--gold-light);
}.mod-login__submit {
    margin: 2rem 0 1.5rem;
}

.mod-login__submit .btn-primary {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, 
        #2a2a2a 0%, 
        #1a1a1a 50%, 
        #0f0f0f 100%);
    color: var(--gold-light);
    border: 2px solid var(--gold);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(201, 169, 97, 0.3);
}

/* Декоративные элементы по бокам кнопки */
.mod-login__submit .btn-primary::before,
.mod-login__submit .btn-primary::after {

    color: var(--gold);
    font-size: 0.7rem;
    margin: 0 0.8rem;
    transition: all 0.3s ease;
}

/* Золотой блик при наведении */
.mod-login__submit .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(230, 200, 122, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.mod-login__submit .btn-primary:hover::after {
    left: 100%;
}

.mod-login__submit .btn-primary:hover {
    background: linear-gradient(180deg, 
        var(--gold-dark) 0%, 
        var(--gold) 50%, 
        var(--gold-dark) 100%);
    color: #0a0a0a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);

    transform: translateY(-2px);
    letter-spacing: 0.3em;
}

.mod-login__submit .btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 0 15px rgba(201, 169, 97, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.mod-login__options {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    text-align: center;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
    padding-top: 1.5rem;
}

.mod-login__options li {
    margin: 0.6rem 0;
    display: inline-block;
    margin: 0 1rem;
}



.mod-login__options a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--silver);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-style: italic;
}

.mod-login__options a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
    text-shadow: 0 0 8px rgba(201, 169, 97, 0.5);
}
/* Контейнер системных сообщений */
#system-message-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

/* Базовый стиль joomla-alert */
joomla-alert {
    display: block;
    background: linear-gradient(145deg, 
        #1a1a1a 0%, 
        #0f0f0f 100%);
    border: 2px solid var(--gold);
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(201, 169, 97, 0.2);
    overflow: hidden;
}

/* Декоративная внутренняя рамка */
joomla-alert::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(201, 169, 97, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* Заголовок уведомления */
joomla-alert .alert-heading {
    background: linear-gradient(180deg, 
        #2a2a2a 0%, 
        #1a1a1a 100%);
    border-bottom: 2px solid var(--gold);
    padding: 1rem 3rem 1rem 1.5rem;
    position: relative;
}



joomla-alert .alert-heading .success {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-light);
}

/* Тело уведомления */
joomla-alert .alert-wrapper {
    padding: 1.5rem 3rem 1.5rem 1.5rem;
    position: relative;
    z-index: 2;
}

joomla-alert .alert-message {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--silver-light);
    line-height: 1.6;
    font-style: italic;
}

/* Кнопка закрытия */
joomla-alert .joomla-alert--close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold);
    width: 32px;
    height: 32px;
    border-radius: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    line-height: 1;
}

joomla-alert .joomla-alert--close:hover {
    background: var(--gold);
    color: #0a0a0a;
    border-color: var(--gold-light);
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.6);
    transform: rotate(90deg);
}

joomla-alert .joomla-alert--close span {
    font-weight: 300;
}

/* Варианты уведомлений */
joomla-alert[type="success"] {
    border-color: var(--gold);
}

joomla-alert[type="success"] .alert-heading {
    border-bottom-color: var(--gold);
}

joomla-alert[type="danger"],
joomla-alert[type="error"] {
    border-color: #8b2020;
}

joomla-alert[type="danger"] .alert-heading,
joomla-alert[type="error"] .alert-heading {
    border-bottom-color: #8b2020;
}

joomla-alert[type="danger"] .alert-heading .success::before,
joomla-alert[type="error"] .alert-heading .success::before {
    content: '⚔';
    color: #c0392b;
    text-shadow: 0 0 10px rgba(192, 57, 43, 0.7);
}

joomla-alert[type="warning"] {
    border-color: #8b7340;
}

joomla-alert[type="warning"] .alert-heading {
    border-bottom-color: #8b7340;
}

joomla-alert[type="warning"] .alert-heading .success::before {
    content: '⚠';
    color: var(--gold);
}

joomla-alert[type="info"] {
    border-color: var(--silver-dark);
}

joomla-alert[type="info"] .alert-heading {
    border-bottom-color: var(--silver-dark);
}

joomla-alert[type="info"] .alert-heading .success::before {
    content: 'ℹ';
    color: var(--silver);
}

/* Анимация появления */
joomla-alert[style*="joomla-alert-fade-in"] {
    animation: heraldic-appear 0.6s ease-out;
}

@keyframes heraldic-appear {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    60% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fallback для .alert (noscript) */
.alert {
    background: linear-gradient(145deg, 
        #1a1a1a 0%, 
        #0f0f0f 100%);
    border: 2px solid var(--gold);
    border-radius: 0;
    color: var(--silver-light);
    font-family: var(--font-body);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.alert-success {
    border-color: var(--gold);
    color: var(--gold-light);
}

.alert-danger,
.alert-error {
    border-color: #8b2020;
    color: #e0a0a0;
}

.alert-warning {
    border-color: #8b7340;
    color: var(--gold);
}

.alert-info {
    border-color: var(--silver-dark);
    color: var(--silver);
}


@media (max-width: 576px) {
    .bottom-b.card {
        margin: 1rem;
    }
    
    .bottom-b.card .card-body {
        padding: 2rem 1.2rem;
    }
    
    .bottom-b.card .card-header {
        padding: 1.2rem 1rem;
    }
    
    .bottom-b.card .card-header h3 {
        font-size: 1.4rem;
        letter-spacing: 0.12em;
    }
    
    .mod-login__submit .btn-primary {
        font-size: 0.95rem;
        letter-spacing: 0.15em;
    }
    
    .mod-login__options li {
        display: block;
        margin: 0.8rem 0;
    }
    
    joomla-alert .alert-wrapper,
    joomla-alert .alert-heading {
        padding-right: 3.5rem;
    }
}
/* Лёгкое свечение контейнера при активности внутри */
.bottom-b.card:has(.form-control:focus) {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(201, 169, 97, 0.25),
        inset 0 1px 0 rgba(232, 232, 232, 0.15);
    transition: box-shadow 0.4s ease;
}
joomla-alert {
    animation: heraldic-appear 0.6s ease-out !important;
}
/* Базовый контейнер логотипа */


/* Сама буква "М" */
a.brand-logo span {
        font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1.5rem;
       font-size: 3rem;
    background: linear-gradient(180deg, 
        var(--silver-light) 0%, 
        var(--gold-light) 50%, 
        var(--silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent !important;

    /* 3D-объем и свечение */
    filter: 
        drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.9))
        drop-shadow(0px 0px 12px rgba(192, 192, 192, 0.4));
}




a.brand-logo:hover::after {
    color: var(--gold-light);
}

@media (max-width: 768px) {
    a.brand-logo span {
        font-size: 3rem;
    }
    
    a.brand-logo::before {
        font-size: 1.3rem;
        top: -2px;
    }
    
    a.brand-logo::after {
        font-size: 0.5rem;
        bottom: -8px;
    }
    
    a.brand-logo {
        padding: 10px 15px 5px;
    }
}


/* Дни рождения*/
/* Основной контейнер группы */
.com-familytree__birthday-group {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(201, 169, 97, 0.15);
}



/* Заголовок даты (например, "01 января") */
.com-familytree__birthday-heading {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-light);
    margin: 0 0 2.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold-dark);
    position: relative;
    z-index: 2;
}

/* Фотография аватара (медальон) */
.com-familytree__avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.com-familytree__birthday-item a:hover .com-familytree__avatar {
    transform: scale(1.05);
    box-shadow: 
        0 0 20px rgba(201, 169, 97, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Заглушка аватара с инициалом (стиль сургучной печати или гравировки) */
.com-familytree__avatar--empty {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #151515 100%);
    border: 2px solid var(--gold-dark);
    color: var(--silver);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.8),
        0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.com-familytree__birthday-item a:hover .com-familytree__avatar--empty {
    border-color: var(--gold);
    color: var(--gold-light);

    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

/* Контейнер для текста (чтобы выстроить в колонку) */
.com-familytree__birthday-item a > span:not([class*="avatar"]) {
    display: block;
}

/* Имя персоны */
.com-familytree__birthday-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--silver-light);
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.com-familytree__birthday-item a:hover .com-familytree__birthday-name {
    color: var(--gold-light);
}

/* Год рождения и возраст */
.com-familytree__birthday-year,
.com-familytree__birthday-date {
   
    font-size: 0.95rem;
    color: var(--silver-dark);
    font-style: italic;
    margin-top: 0.3rem;
    display: block;
}

/* Выделение возраста в скобках */


.com-familytree__birthday-card {
    background: linear-gradient(135deg, #1f1f1f 0%, #121212 100%);
    border: 2px solid var(--gold);
    border-radius: 2px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    text-align: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(201, 169, 97, 0.05);
}

/* Угловые орнаменты для карточки */


.com-familytree__birthday-card::before {
    top: 10px;
    left: 15px;
}

.com-familytree__birthday-card::after {
    bottom: 10px;
    right: 15px;
    transform: rotate(180deg);
}

/* Внутренний контейнер информации */
.com-familytree__birthday-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
}

/* Имя в одиночной карточке */
.com-familytree__birthday-card .com-familytree__birthday-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(180deg, var(--silver-light) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Дата */
.com-familytree__birthday-card .com-familytree__birthday-date {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--silver);
    letter-spacing: 0.15em;
    border-bottom: 1px solid var(--gold-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 0.3rem;
}

/* Возраст */
.com-familytree__birthday-card .com-familytree__birthday-age {
  
    font-size: 1rem;
    color: var(--silver-dark);
    font-style: italic;
  background: none;
}

/* Бейдж "через Х дн." */
.com-familytree__birthday-card .com-familytree__birthday-days {
    display: inline-block;
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 0.4rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.8rem;
    position: relative;
    box-shadow: 0 0 10px rgba(201, 169, 97, 0.2);
}

/* Декоративные точки по бокам бейджа */


.com-familytree__birthday-card .com-familytree__birthday-days::before {
    left: 8px;
}

.com-familytree__birthday-card .com-familytree__birthday-days::after {
    right: 8px;
}
@media (max-width: 576px) {
    .com-familytree__birthday-group {
        padding: 1.5rem 1rem;
    }
    
    .com-familytree__birthday-heading {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .com-familytree__birthday-item a {
        padding: 1rem;
        gap: 1rem;
    }
    
    .com-familytree__avatar,
    .com-familytree__avatar--empty {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .com-familytree__birthday-name {
        font-size: 1rem;
    }
    
    .com-familytree__birthday-card .com-familytree__birthday-name {
        font-size: 1.3rem;
    }
    
    .com-familytree__birthday-card::before,
    .com-familytree__birthday-card::after {
        font-size: 1.2rem;
    }
}


/* Базовые настройки шрифта для всех заголовков */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* H1: Главный заголовок страницы (металлический градиент) */
h1 {
    font-size: 3rem;
    background: linear-gradient(180deg, 
        var(--silver-light) 0%, 
        var(--gold-light) 50%, 
        var(--silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent !important;
}

/* H2: Заголовки секций (светлое золото) */
h2 {
    font-size: 2.2rem;
    color: var(--gold-light) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* H3: Подзаголовки (светлое серебро) */
h3 {
    font-size: 1.6rem;
    color: var(--silver-light) !important;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.8);
}

/* H4: Мелкие заголовки и виджеты (приглушенное серебро) */
h4 {
    font-size: 1.2rem;
    color: var(--silver) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* =========================================
   АДАПТИВНОСТЬ
   ========================================= */

/* Планшеты и небольшие десктопы */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.1rem; }
}

/* Мобильные устройства */
@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1rem; }
    
    /* На мобильных немного уменьшаем отступы снизу */
    h1, h2, h3, h4 {
        margin-bottom: 1rem;
    }
}

.com-familytree__birthday-age {
    font-size: 0.95rem;
    color: var(--silver-dark);
    font-style: italic;
    margin-top: 0.3rem;
}


/* =========================================
   1. ФОРМА ПОИСКА
   ========================================= */
.com-familytree__search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.com-familytree__search-input {
    flex: 1;
    min-width: 250px;
    background: #141414;
    border: 1px solid var(--gold-dark);
    color: var(--silver-light);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.com-familytree__search-input::placeholder {
    color: var(--silver-dark);
    font-style: italic;
}

.com-familytree__search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.15);
}

.com-familytree__search-button {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.com-familytree__search-button:hover {
    background: var(--gold);
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(201, 169, 97, 0.4);
}

/* =========================================
   2. АЛФАВИТНЫЙ ФИЛЬТР
   ========================================= */
.com-familytree__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.com-familytree__letter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 169, 97, 0.3);
    color: var(--silver);
    font-family: var(--font-heading);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.com-familytree__letter:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(201, 169, 97, 0.08);
}

/* Активная буква */
.com-familytree__letter.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: #0a0a0a;
    font-weight: 700;
}

/* Счетчик персон рядом с буквой */
.com-familytree__letter-count {
    font-size: 0.8rem;
    opacity: 0.7;
    font-family: var(--font-body);
    font-weight: 400;
}

.com-familytree__letter.is-active .com-familytree__letter-count {
    color: #0a0a0a;
    opacity: 0.8;
}

/* =========================================
   3. СПИСОК И КАРТОЧКИ ПЕРСОН
   ========================================= */
.com-familytree__list {
    display: grid;
    /* Автоматическая сетка: карточки не ниже 320px, заполняют пространство */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: stretch; /* растягивает ячейки по высоте */
}

.com-familytree__card {
    height: 100%; /* карточка занимает всю высоту ячейки */
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
    border: 1px solid rgba(201, 169, 97, 0.25);
    padding: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.com-familytree__card {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
    border: 1px solid rgba(201, 169, 97, 0.25);
    padding: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.com-familytree__card:hover {
    border-color: var(--gold);
    background: linear-gradient(145deg, #222222 0%, #161616 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(201, 169, 97, 0.15);
    transform: translateY(-3px);
}

/* Аватар (фотография) */
.com-familytree__avatar {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid var(--gold-dark);
    border-radius: 4px; /* Слегка скругленные углы для строгого "архивного" вида */
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.com-familytree__card:hover .com-familytree__avatar {
    border-color: var(--gold);
}

/* Заглушка аватара с инициалом */
.com-familytree__avatar--empty {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0f0f;
    border: 2px solid var(--gold-dark);
    border-radius: 4px;
    color: var(--silver);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.com-familytree__card:hover .com-familytree__avatar--empty {
    border-color: var(--gold);
    color: var(--gold-light);
    background: #1a1a1a;
}

/* Контейнер текста внутри карточки */
.com-familytree__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 0; /* Критически важно: предотвращает выход длинных имен за границы карточки */
}

/* Имя персоны */
.com-familytree__name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--silver-light);
    line-height: 1.3;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

.com-familytree__card:hover .com-familytree__name {
    color: var(--gold-light);
}

/* Девичья фамилия (в скобках) */
.com-familytree__maiden {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--silver-dark);
    font-style: italic;
}

/* Даты рождения/смерти */
.com-familytree__dates {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gold-dark);
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

/* =========================================
   4. АДАПТИВНОСТЬ (Мобильные устройства)
   ========================================= */
@media (max-width: 576px) {
    .com-familytree__search {
        flex-direction: column;
    }
    
    .com-familytree__search-input,
    .com-familytree__search-button {
        width: 100%;
    }
    
    .com-familytree__alphabet {
        justify-content: center;
    }
    
    .com-familytree__list {
        grid-template-columns: 1fr; /* Одна колонка на узких экранах */
        gap: 1rem;
    }
    
    .com-familytree__card {
        padding: 1rem;
    }
    
    .com-familytree__avatar,
    .com-familytree__avatar--empty {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .com-familytree__name {
        font-size: 1.05rem;
    }
}

.com-users-login__options.list-group {display: none;}
.com-users-login.login {max-width: 500px;}

/* =========================================
   ПАГИНАЦИЯ (Строго без декора)
   ========================================= */

/* Общий контейнер */
.com-familytree__pagination {
    margin-top: 3rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

/* Список страниц */
.com-familytree__pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Отдельный элемент списка */
.com-familytree__pagination .page-item {
    display: flex;
}

/* Базовый стиль кнопок/ссылок */
.com-familytree__pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.8rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--silver);
    background-color: var(--bg-card); /* #1a1a1a */
    border: 1px solid rgba(201, 169, 97, 0.3);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Состояние при наведении (только для кликабельных элементов) */
.com-familytree__pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    color: var(--gold-light);
    background-color: rgba(201, 169, 97, 0.1);
    border-color: var(--gold);
}

/* Активная страница (текущая) */
.com-familytree__pagination .page-item.active .page-link {
    color: #0a0a0a;
    background-color: var(--gold);
    border-color: var(--gold);
    font-weight: 700;
    cursor: default;
}

/* Неактивные элементы (стрелки, когда идти некуда) */
.com-familytree__pagination .page-item.disabled .page-link {
    color: var(--silver-dark);
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(201, 169, 97, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

/* =========================================
   АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 576px) {
    .com-familytree__pagination .page-link {
        min-width: 38px;
        height: 38px;
        font-size: 0.9rem;
        padding: 0 0.6rem;
    }
    
    .com-familytree__pagination .pagination {
        gap: 0.3rem;
    }
}



/* =========================================
   МЕНЮ — ЗОЛОТЫЕ КНОПКИ С СЕРЕБРЯНЫМ ТЕКСТОМ
   ========================================= */

/* Сброс стилей списка */
.mod-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

/* Каждый пункт меню = кнопка */
.mod-menu .nav-item {
    display: flex;
}

/* Ссылка-кнопка */
.mod-menu .nav-item > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    min-width: 140px;
    text-align: center;

    /* Золотистый фон (металлический градиент) */
 
    /* Серебристая надпись */
    color: var(--silver-light) !important;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;

  
    transition: all 0.25s ease;
    cursor: pointer;
}

/* Наведение — кнопка становится светлее, текст ярче */
.mod-menu .nav-item > a:hover {
     color: var(--gold-dark);
}





/* =========================================
   АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 768px) {
    .mod-menu {
        gap: 0.4rem;
        justify-content: center;
    }

    .mod-menu .nav-item > a {
        min-width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        letter-spacing: 0.08em;
    }
}

@media (max-width: 480px) {
    .mod-menu {
        flex-direction: column;
        align-items: stretch;
    }

    .mod-menu .nav-item {
        width: 100%;
    }

    .mod-menu .nav-item > a {
        width: 100%;
        padding: 0.8rem 1rem;
    }
}

.page-header {
    display: none;
}
.mod-login-logout__login-greeting.login-greeting {
    color: var(--gold);
}
.site-grid {
    grid-gap: 0 !important;
}

.container-header, .container-header .grid-child {
    padding: 0;
}

.grid-child.container-below-top {
        justify-content: center;
}
.logo {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}


a.brand-logo {
    display: none;
}
.m1-item2 {
    display: none;
}
.logo-1 {
    display: block;
    padding: 10px 20px 10px 20px;
}
.m1, .m2 {
    padding: 0 20px 0 20px;
    font-size: 1.4rem;
}
.m1 p, .m2 p{
    margin: 0;
    padding: 0.7rem 1rem;
    border-radius: 2px;
}


.m1-active, .m2-active {
    color: var(--gold-light) !important;
    background: linear-gradient(180deg, rgba(201, 169, 97, 0.1) 0%, rgba(201, 169, 97, 0.05) 100%);
  
}
/*Для мобильной*/
@media (max-width: 768px) {
    .m1-item1 {
        display: none;
    }
    .m1-item2 {
    display: block;
  
    }
    .logo {
        display: flex;
        flex-direction: column;
        align-content: center;
        justify-content: center;
    }
    
}

@media (max-width: 480px) {

}

.mod-login__options.list-unstyled {
    display: none;
}

/* Эффект "обновления" меню #mod-menu1 при клике на .m1 / .m2 (класс навешивает custom.js) */
#mod-menu1.mod-menu-refresh {
    animation: menu-refresh 0.45s ease;
}

@keyframes menu-refresh {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    60% {
        opacity: 1;
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.container-header .navbar-brand {
    display: none;
}
/* Фильтрация пунктов меню по состоянию кнопки (класс на body навешивает custom.js) */

/* Ни m1, ни m2 не выбраны -> в меню виден только item-119 */
#mod-menu1 .nav-item:not(.item-119) {
    display: none;
}

body.menu-state-m1 #mod-menu1 .nav-item,
body.menu-state-m2 #mod-menu1 .nav-item {
    display: flex;
}

/* Нажата m1 -> скрыть пункт группы m2 */
body.menu-state-m1 .nav-item.item-118,
body.menu-state-m1 .nav-item.item-120,
body.menu-state-m1 .nav-item.item-121,
body.menu-state-m1 .nav-item.item-122 {
    display: none !important;
}

/* Нажата m2 -> скрыть пункты группы m1 */

body.menu-state-m2 .nav-item.item-108,
body.menu-state-m2 .nav-item.item-112,
body.menu-state-m2 .nav-item.item-109,
body.menu-state-m2 .nav-item.item-115 {
    display: none !important;
}

/* Всегда показывать item-119 вне зависимости от состояния */
body.menu-state-m1 .nav-item.item-119,
body.menu-state-m2 .nav-item.item-119 {
    display: flex !important;
}


.grid-child.container-below-top {
    border-bottom: 3px double var(--gold);
    max-width: none;
}

.nav-item.item-101 {
        display: none !important;
}

.bottom-b.card, .input-group, .mod-login.input-group, .mod-login.form-check-input, .mod-login__submit.btn-primary {
    border-radius: 3px !important;
}

.mod-list li {padding: 0 !important;}

.com-familytree__person-card {
    background: var(--bg-card);
}

/* =========================================
   СВЕТЛАЯ ТЕМА (белый / золотой / серебро)
   Класс theme-light навешивается на <html> скриптом custom.js
   ========================================= */
html.theme-light {
    /* Основные фоны */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f6f3;
    --bg-card: #ffffff;

    /* Серебро -> в светлой теме это тёмно-серый текст */
    --silver: #4a4a4a;
    --silver-light: #1c1c1c;
    --silver-dark: #8a8a8a;

    /* Золото */
    --gold: #997f53;
    --gold-light: #7a6340;
    --gold-dark: #b8a67e;

    /* Текст */
    --text-primary: #1c1c1c;
    --text-secondary: #5c5c5c;

    /* Барочные цвета */
    --baroque-bg: #ffffff;
    --baroque-gold: #997f53;
    --baroque-silver: #2b2b2b;
    --baroque-accent: #e8e5df;

    /* Bootstrap / Joomla-переменные (задаются инлайном из настроек шаблона) */
    --body-bg: #ffffff;
    --body-bg-rgb: 255, 255, 255;
    --body-color: #1c1c1c;
    --body-color-rgb: 28, 28, 28;
    --link-color: #997f53;
    --link-color-rgb: 153, 127, 83;
    --link-hover-color: #6f5a37;
    --link-hover-color-rgb: 111, 90, 55;
    --cassiopeia-color-link: #997f53;
    --cassiopeia-color-hover: #6f5a37;
}

/* Фон страницы */
html.theme-light body {
    background-color: #ffffff;
    background-image: radial-gradient(ellipse at top, #ffffff 0%, #f3f1ec 70%);
    color: var(--text-primary);
}

/* Шапка — вариант 2: «матовое стекло» (glassmorphism) с перламутром */
html.theme-light .container-header {
    position: relative;
    background:
        radial-gradient(ellipse 90% 140% at 15% -30%, rgba(255, 255, 255, .95) 0%, transparent 55%),
        radial-gradient(ellipse 70% 120% at 85% -20%, rgba(214, 220, 228, .55) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f2f3f5 45%, #e6e8eb 100%);
    border-bottom: 1px solid rgba(160, 168, 178, .45);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 14px 34px rgba(70, 80, 95, .10);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Тонкая «ниточка» света по нижней кромке */
html.theme-light .container-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, .9) 18%,
        var(--gold) 50%,
        rgba(255, 255, 255, .9) 82%,
        transparent 100%);
    pointer-events: none;
}

html.theme-light .grid-child.container-below-top {
     border-bottom: 1px solid var(--gold);
      border-bottom: none;
}
html.theme-light .grid-child.container-nav::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;

    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, .9) 18%,
        var(--gold) 50%,
        rgba(255, 255, 255, .9) 82%,
        transparent 100%);
    pointer-events: none;
    z-index: 99999;
}

html.theme-light .m1, html.theme-light .m2 {
    color: #3a3a3a;
}

html.theme-light .m1-active, html.theme-light .m2-active {background: none;}



/* Текст шапки — глубокий графит на матовом стекле */
html.theme-light .container-header .site-title,
html.theme-light .container-header .site-title a,
html.theme-light .container-header a.brand-logo span {
    background: linear-gradient(180deg,
        #26292d 0%,
        #4a5056 55%,
        #26292d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, .9));
}

html.theme-light .container-header .site-description {
    color: #6b7280;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

/* Текст шапки под серебристый фон — тёмный */
html.theme-light .container-header .site-title,
html.theme-light .container-header .site-title a,
html.theme-light .container-header a.brand-logo span {
    background: linear-gradient(180deg,
        #6e6e6e 0%,
        #3a3a3a 45%,
        #6e6e6e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.6));
}

html.theme-light .container-header .site-description {
    color: #5a5a5a;
}

/* Заголовки: металлический градиент делаем золотым, а не серебристым */
html.theme-light h1,
html.theme-light .site-title,
html.theme-light .site-title a,
html.theme-light a.brand-logo span {
    background: linear-gradient(180deg, #c9b28a 0%, #997f53 55%, #6f5a37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

html.theme-light h2 {
    color: var(--gold-light) !important;
    text-shadow: none;
}

html.theme-light h3 {
    color: #3a3a3a !important;
    text-shadow: none;
}

html.theme-light h4 {
    color: #555555 !important;
    text-shadow: none;
}

/* Меню */
html.theme-light .mod-menu .nav-item > a {
    color: var(--silver-light) !important;
}

html.theme-light .mod-menu .dropdown-menu {
    background: #ffffff;
    border: 1px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

html.theme-light .navbar-nav .nav-link {
    color: var(--silver-light) !important;
}

html.theme-light .m1-active p,
html.theme-light .m2-active p {
    background: linear-gradient(180deg, rgba(153, 127, 83, 0.18) 0%, rgba(153, 127, 83, 0.08) 100%);
}

/* Разделители */
html.theme-light hr::after {
    background: #ffffff;
}

/* Подвал */
html.theme-light .container-footer {
    background: linear-gradient(180deg, #f7f6f3 0%, #ffffff 100%);
}

/* Формы */
html.theme-light input,
html.theme-light textarea,
html.theme-light select,
html.theme-light .form-control {
    background: #ffffff;
    border: 1px solid var(--gold-dark);
    color: var(--text-primary);
}

html.theme-light input:focus,
html.theme-light textarea:focus,
html.theme-light select:focus,
html.theme-light .form-control:focus {
    background: #fffdf8;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(153, 127, 83, 0.18);
}

/* Карточка авторизации */
html.theme-light .bottom-b.card {
    background: linear-gradient(145deg, #ffffff 0%, #f7f6f3 55%, #ffffff 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 0 20px rgba(153, 127, 83, 0.12);
}

html.theme-light .bottom-b.card .card-header {
    background: linear-gradient(180deg, #f7f6f3 0%, #ffffff 100%);
}

html.theme-light .bottom-b.card .card-header h3 {
    background: linear-gradient(180deg, #6f5a37 0%, #997f53 45%, #c9b28a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: none;
}

html.theme-light .mod-login .input-group {
    background: #ffffff;
    border: 1px solid var(--gold-dark);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.08);
}

html.theme-light .mod-login .form-control {
    color: var(--text-primary);
}

html.theme-light .mod-login .form-control::placeholder {
    color: #9a9a9a;
}

html.theme-light .mod-login .input-group-text,
html.theme-light .mod-login .input-password-toggle {
    background: #f2efe9;
    border-left: 1px solid var(--gold-dark);
    color: var(--gold);
}

html.theme-light .mod-login .form-check-input {
    background: #ffffff;
    border: 2px solid var(--gold-dark);
}

html.theme-light .mod-login__submit .btn-primary {
    background: linear-gradient(180deg, #ffffff 0%, #f2efe9 50%, #ffffff 100%);
    color: var(--gold-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html.theme-light .mod-login__submit .btn-primary:hover {
    color: #ffffff;
}

/* Сообщения системы */
html.theme-light joomla-alert,
html.theme-light .alert {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html.theme-light joomla-alert .alert-heading {
    background: #f7f6f3;
}

html.theme-light joomla-alert .alert-message {
    color: var(--text-primary);
}

/* Компонент familytree */
html.theme-light .com-familytree__card,
html.theme-light .com-familytree__birthday-group,
html.theme-light .com-familytree__birthday-card,
html.theme-light .com-familytree__person-card {
    background: #ffffff;
    border-color: var(--gold-dark);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

html.theme-light .com-familytree__card:hover {
    background: #fffdf8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 15px rgba(153, 127, 83, 0.18);
}

html.theme-light .com-familytree__avatar--empty {
    background: #f2efe9 !important;
    color: var(--silver);
}

html.theme-light .com-familytree__name,
html.theme-light .com-familytree__birthday-name {
    color: var(--text-primary);
}

html.theme-light .com-familytree__birthday-card .com-familytree__birthday-name {
    background: linear-gradient(180deg, #6f5a37 0%, #997f53 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.theme-light .com-familytree__birthday-age,
html.theme-light .com-familytree__birthday-year,
html.theme-light .com-familytree__birthday-date {
    color: var(--text-secondary);
}

html.theme-light .com-familytree__birthday-days {
    background: rgba(153, 127, 83, 0.1);
    color: var(--gold-light);
}

html.theme-light .com-familytree__search-input {
    background: #ffffff;
    color: var(--text-primary);
}

html.theme-light .com-familytree__search-button {
    background: #f2efe9;
    color: var(--gold-light);
}

html.theme-light .com-familytree__letter {
    background: rgba(153, 127, 83, 0.05);
    color: var(--silver);
}

html.theme-light .com-familytree__pagination .page-link {
    color: var(--silver);
    background-color: #ffffff;
}

html.theme-light .com-familytree__pagination .page-item.active .page-link {
    color: #ffffff;
}

/* Кнопки */
html.theme-light .btn-primary,
html.theme-light .btn-success,
html.theme-light .btn-danger {
    color: var(--gold-light);
}

html.theme-light .btn-primary:hover,
html.theme-light .btn-success:hover,
html.theme-light .btn-danger:hover {
    color: #ffffff;
}

/* =========================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (кнопка в шапке справа)
   ========================================= */
.ft-theme-toggle {
    position: absolute;
    top: .6rem;
    right: 1rem;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--gold-dark);
    border-radius: 3px;
    color: var(--gold);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: all .25s ease;
}

.ft-theme-toggle:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 12px rgba(153, 127, 83, .3);
}

/* Иконка переключается через data-theme на <html> */
.ft-theme-toggle .ft-theme-toggle__icon--light {
    display: none;
}

html.theme-light .ft-theme-toggle .ft-theme-toggle__icon--light {
    display: inline;
}

html.theme-light .ft-theme-toggle .ft-theme-toggle__icon--dark {
    display: none;
}

html.theme-light .nav-link:hover, html.theme-light .mod-menu > li.active > a {
    color: var(--gold-light) !important;
    background: linear-gradient(180deg, rgb(201 169 97 / 33%) 0%, rgba(201, 169, 97, 0.05) 100%);
}

@media (max-width: 768px) {
    .ft-theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        top: .4rem;
        right: .6rem;
    }
}