/* =========================================================
   Пользовательские стили сайта «Виталий Потехин»
   Шаблон: Cassiopeia_cassiopeia_potehin (дочерний)
   Файл: /media/templates/site/cassiopeia_cassiopeia_potehin/css/user.css
   ========================================================= */

:root {
    --hue: 90;
    --template-bg-light: #f5f2eb;
    --template-text-dark: #2b2b2b;
    --template-special-color: #5c6b5a;
    --cassiopeia-color-primary: #5c6b5a;
    --cassiopeia-color-link: #5c6b5a;
    --link-color: #5c6b5a;
    --link-color-rgb: 92, 107, 90;
    --cassiopeia-color-hover: #3f4a3d;
    --link-hover-color: #3f4a3d;
    --link-hover-color-rgb: 63, 74, 61;
    --template-link-color: #5c6b5a;
    --template-link-hover-color: #3f4a3d;
    --template-contrast: #5c6b5a;
}
html {
    background-color: #f5f2eb !important;
    overflow-x: hidden !important;
}
body.site {
    background-color: #f5f2eb !important;
    color: #2b2b2b !important;
    font-family: Georgia, serif !important;
    line-height: 1.7;
    overflow-x: hidden !important;
}
* {
    box-sizing: border-box;
}
img, iframe, video {
    max-width: 100% !important;
    height: auto;
}
.header, .container-header, header.header {
    background-color: #ebe6dc !important;
    background-image: none !important;
    border-bottom: 1px solid #d8d0c0 !important;
    padding: 20px 30px !important;
}
.navbar-brand, .navbar-brand a, .brand-logo, .brand-logo span {
    color: #5c6b5a !important;
    font-family: Georgia, serif !important;
}
.site-description {
    color: #6b5d4a !important;
    font-style: italic;
}
a {
    color: #5c6b5a !important;
    text-decoration: none;
}
a:hover {
    color: #3f4a3d !important;
    text-decoration: underline;
}
.container-component, .com-content-article {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}
.com-content-article__body p {
    margin-bottom: 1.1em !important;
}
.com-content-article__body hr {
    border: none;
    border-top: 1px solid #d8d0c0;
    margin: 1.8em 0 !important;
}
.com-content-article__body .h1-name {
    font-size: 1.9em !important;
    color: #5c6b5a !important;
    font-weight: normal !important;
    display: block;
    margin-bottom: 0.3em !important;
    line-height: 1.3;
    text-align: center;
}
.com-content-article__body .lead {
    font-size: 1.15em !important;
    color: #2b2b2b !important;
    font-weight: normal !important;
    margin-bottom: 1em !important;
}
.com-content-article__body h2.block-title {
    font-size: 1.5em !important;
    color: #5c6b5a !important;
    font-weight: normal !important;
    text-align: center;
    margin-top: 1.5em !important;
    margin-bottom: 1em !important;
    padding-bottom: 0;
    border: none;
    position: relative;
}
.com-content-article__body h2.block-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background-color: #5c6b5a;
    margin: 0.5em auto 0;
}
.com-content-article__body .topic {
    font-size: 1.1em !important;
    color: #3a3a3a !important;
    font-weight: bold !important;
    display: block;
    margin-bottom: 0.3em;
}
.topics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 1.3em 0;
}
.topic-card {
    background-color: #ffffff;
    border: 1px solid #e8e0d5;
    border-radius: 8px;
    padding: 16px 18px;
}
.topic-card .topic {
    color: #5c6b5a !important;
    font-size: 1.05em !important;
    margin-bottom: 0.4em;
}
.topic-card p {
    margin: 0 !important;
    font-size: 0.95em;
    color: #4a4a4a;
}
.btn {
    display: inline-block;
    padding: 14px 28px;
    margin: 8px 8px 8px 0;
    border-radius: 6px;
    font-family: Georgia, serif;
    font-size: 1em;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #5c6b5a;
}
.btn-primary {
    background-color: #5c6b5a !important;
    color: #ffffff !important;
    font-size: 1.1em !important;
    padding: 16px 32px !important;
}
.btn-primary:hover {
    background-color: #3f4a3d !important;
    border-color: #3f4a3d !important;
    color: #ffffff !important;
}
.btn-secondary {
    background-color: transparent !important;
    color: #5c6b5a !important;
    font-size: 0.95em !important;
    padding: 12px 24px !important;
}
.btn-secondary:hover {
    background-color: #5c6b5a !important;
    color: #ffffff !important;
}
.btn-link {
    padding: 6px 0;
    margin: 4px 0;
    border: none;
    background: transparent !important;
    color: #5c6b5a !important;
    text-decoration: underline !important;
    font-size: 0.95em;
}
.btn-link:hover {
    color: #3f4a3d !important;
}
.btn-two-line {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    padding: 14px 32px !important;
    line-height: 1.3;
    text-align: center;
    font-size: 1em !important;
}
.btn-two-line .btn-main {
    font-size: 1.1em;
    font-weight: normal;
    display: block;
}
.btn-two-line .btn-sub {
    font-size: 0.8em;
    opacity: 0.9;
    margin-top: 4px;
    display: block;
    font-style: italic;
}
.com-content-article__body p.center {
    text-align: center;
    margin: 1.8em 0;
}
.price-box {
    background-color: #ffffff;
    border: 2px solid #5c6b5a;
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    margin: 1.3em 0;
}
.price-box .price {
    font-size: 1.8em;
    color: #5c6b5a;
    font-weight: bold;
    display: block;
    margin-bottom: 0.3em;
}
.price-box .price-desc {
    font-size: 0.95em;
    color: #4a4a4a;
}
.price-box .free {
    color: #5c6b5a;
    font-weight: bold;
    margin-top: 0.8em;
    display: block;
}
.price-box .price-item {
    padding: 15px 0;
    border-bottom: 1px solid #e8e0d5;
}
.price-box .price-item:last-child {
    border-bottom: none;
}
.format-list {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}
.format-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e8e0d5;
}
.format-list li:last-child {
    border-bottom: none;
}
.com-contact__form form {
    max-width: 500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.site footer.container-footer,
body.site .container-footer,
body.site footer.footer,
footer.container-footer,
footer.footer,
.container-footer {
    background-color: #ebe6dc !important;
    background: #ebe6dc !important;
    background-image: none !important;
    padding: 20px 30px !important;
    border-top: 1px solid #d8d0c0 !important;
    margin-top: 2em !important;
}
body.site footer.container-footer *,
body.site .container-footer *,
footer.container-footer *,
footer.footer *,
.container-footer * {
    background-color: transparent !important;
    background-image: none !important;
}
body.site .footer-note,
.footer-note {
    text-align: center !important;
    font-size: 0.95em !important;
    color: #5c6b5a !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
    display: block !important;
    width: 100% !important;
}
body.site .footer-note a,
.footer-note a {
    color: #5c6b5a !important;
    text-decoration: none !important;
    padding: 0 6px !important;
    display: inline-block !important;
}
body.site .footer-note a:hover,
.footer-note a:hover {
    text-decoration: underline !important;
}
body.site footer.container-footer,
body.site .container-footer,
body.site footer.footer,
body.site footer.container-footer .grid-child,
body.site .container-footer .grid-child,
body.site footer.footer .grid-child,
body.site #mod-custom111,
body.site .mod-custom111,
body.site .mod-custom {
    text-align: center !important;
}
.com-contact__form .control-group:has(#jform_contact_emailmsg) {
    display: none !important;
}
.com-contact h2,
.com-contact__form legend,
.com-contact__form fieldset legend {
    display: none !important;
}
.com-contact__form .field-spacer {
    display: none !important;
}
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}
.container-banner {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
body.itemid-114 .site-grid {
    padding-top: 30px !important;
}
#mod-custom112 .com-content-article__body {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* FAQ — гармошка */
.faq-list {
    max-width: 800px;
    margin: 2em auto;
}
.faq-item {
    background-color: #ffffff;
    border: 1px solid #e8e0d5;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.faq-item:hover {
    box-shadow: 0 2px 8px rgba(92, 107, 90, 0.08);
}
.faq-item[open] {
    border-color: #5c6b5a;
    box-shadow: 0 2px 12px rgba(92, 107, 90, 0.12);
}
.faq-question {
    display: block;
    padding: 18px 22px;
    font-family: Georgia, serif;
    font-size: 1.1em;
    color: #5c6b5a;
    cursor: pointer;
    position: relative;
    padding-right: 50px;
    list-style: none;
    transition: background-color 0.2s;
    user-select: none;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    color: #5c6b5a;
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] .faq-question::after {
    content: "−";
}
.faq-question:hover {
    background-color: #f5f2eb;
}
.faq-item[open] .faq-question {
    background-color: #f5f2eb;
}
.faq-answer {
    padding: 0 22px 20px 22px;
    color: #2b2b2b;
    font-family: Georgia, serif;
    line-height: 1.7;
}
.faq-answer p {
    margin-bottom: 1em;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Образование — сетка дипломов */
.diploma-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 1.5em auto 2.5em;
    max-width: 900px;
}
.diploma-item {
    text-align: center;
}
.diploma-img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
}
.diploma-img-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 7 / 5;    /* ← добавили */
    object-fit: contain;     /* ← добавили */
    border-radius: 8px;
    border: 1px solid #e8e0d5;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 1px 4px rgba(92, 107, 90, 0.06);
    display: block;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.diploma-img-wrap img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(92, 107, 90, 0.15);
    border-color: #5c6b5a;
}
.diploma-caption {
    margin-top: 10px !important;
    font-size: 0.9em !important;
    color: #5c6b5a !important;
    line-height: 1.4;
}
.diploma-caption span {
    font-size: 0.85em !important;
    color: #6b5d4a !important;
    font-style: italic;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.lightbox.lightbox-open {
    display: flex;
}
.lightbox-wrap {
    position: relative;
    display: inline-block;
    max-width: 90%;
    max-height: 90vh;
    line-height: 0;
    transition: transform 0.15s ease-out;
}
.lightbox-wrap .lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
    cursor: default;
    transition: none;
}

/* ВОДЯНОЙ ЗНАК */
.lightbox-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    place-items: center;
    overflow: hidden;
    z-index: 2;
    line-height: 1;
}
.lightbox-watermark .watermark-text {
    position: relative;
    font-family: Georgia, serif;
    font-size: 1.15em;
    font-weight: normal;
    letter-spacing: 1.5px;
    transform: rotate(-30deg);
    white-space: nowrap;
    padding: 8px 16px;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    line-height: 1;
    color: rgba(255, 255, 255, 0.30);
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.32),
        0 0 3px rgba(0, 0, 0, 0.15);
}
.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.15s ease-out;
    cursor: default;
}
.lightbox-img:active {
    cursor: grabbing;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: color 0.2s;
    user-select: none;
    z-index: 2;
}
.lightbox-close:hover {
    color: #c8d0c5;
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 60px;
    line-height: 1;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: color 0.2s, background-color 0.2s;
    user-select: none;
    padding: 10px 20px;
    border-radius: 6px;
    z-index: 2;
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #5c6b5a;
    background-color: rgba(255, 255, 255, 0.1);
}
.lightbox-zoom-in,
.lightbox-zoom-out {
    position: absolute;
    top: 28px;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background-color 0.2s;
    user-select: none;
    padding: 6px 14px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    z-index: 2;
}
.lightbox-zoom-in {
    right: 90px;
}
.lightbox-zoom-out {
    right: 140px;
}
.lightbox-zoom-in:hover,
.lightbox-zoom-out:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* =========================================================
   Кнопка «Записаться» в шапке
   ========================================================= */
.mod-menu .nav-btn a,
.mod-menu li.nav-btn a,
.mod-menu a.nav-btn,
.mod-menu .metismenu-item .nav-btn {
    background-color: #5c6b5a !important;
    color: #ffffff !important;
    padding: 10px 22px !important;
    border-radius: 6px !important;
    margin-left: 8px !important;
    font-weight: normal !important;
    text-decoration: none !important;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-block;
    line-height: 1.2;
}
.mod-menu .nav-btn a:hover,
.mod-menu li.nav-btn a:hover,
.mod-menu a.nav-btn:hover,
.mod-menu .metismenu-item .nav-btn:hover {
    background-color: #3f4a3d !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* =========================================================
   Пункты меню — старые И новые классы (MetisMenu)
   ========================================================= */
.mod-menu .nav-item a:not(.nav-btn) {
    color: #5c6b5a !important;
    padding: 6px 8px !important;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    text-decoration: none !important;
}
.mod-menu .nav-item a:not(.nav-btn):hover {
    color: #3f4a3d !important;
    text-decoration: underline !important;
    background-color: rgba(92, 107, 90, 0.10);
}
.mod-menu .nav-item.current a:not(.nav-btn),
.mod-menu .nav-item.active a:not(.nav-btn) {
    font-weight: bold !important;
    color: #3f4a3d !important;
}
.mod-menu .metismenu-item a:not(.nav-btn) {
    color: #5c6b5a !important;
    padding: 6px 8px !important;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    text-decoration: none !important;
}
.mod-menu .metismenu-item a:not(.nav-btn):hover {
    color: #3f4a3d !important;
    text-decoration: underline !important;
    background-color: rgba(92, 107, 90, 0.10);
}
.mod-menu .metismenu-item.current a:not(.nav-btn),
.mod-menu .metismenu-item.active a:not(.nav-btn) {
    font-weight: bold !important;
    color: #3f4a3d !important;
}

/* =========================================================
   МОНОГРАММА «П» перед именем в шапке
   ========================================================= */
.navbar-brand .brand-logo::before {
    content: "П";
    display: inline-block;
    width: 42px;
    height: 42px;
    background-color: #5c6b5a;
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.05em;
    font-weight: bold;
    text-align: center;
    line-height: 42px;
    margin-right: 10px;
    vertical-align: middle;
    font-family: Georgia, serif;
    letter-spacing: 0;
}

/* =========================================================
   ТЕЛЕФОН В ШАПКЕ — круглая иконка с раскрытием
   ========================================================= */
.phone-header-wrapper {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}
.phone-header-btn {
    background-color: #5c6b5a;
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    padding: 0;
    vertical-align: middle;
    line-height: 1;
}
.phone-header-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}
.phone-header-btn:hover {
    background-color: #3f4a3d;
    transform: translateY(-1px);
}
.phone-header-revealed {
    display: none;
    background-color: #5c6b5a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: Georgia, serif;
    font-size: 0.95em;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.2s;
}
.phone-header-revealed.is-visible {
    display: inline-block;
}
.phone-header-revealed a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: normal;
}
.phone-header-revealed a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* =========================================================
   МОБИЛЬНЫЕ — выравнивание и симметрия
   ========================================================= */
@media (max-width: 992px) {
    .container-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .container-nav .navbar {
        display: contents !important;
    }
    .container-nav #mod-custom110 {
        order: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }
    .container-nav .phone-header-btn {
        width: 36px !important;
        height: 36px !important;
    }
    .container-nav .phone-header-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    .container-nav .navbar-toggler,
    .container-nav .navbar-toggler-right {
        display: inline-flex !important;
        order: 2 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        width: 36px !important;
        height: 36px !important;
        border: none !important;
        border-radius: 50% !important;
        background-color: #5c6b5a !important;
        color: #ffffff !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        float: none !important;
        flex: 0 0 auto !important;
        box-shadow: none !important;
        transition: background-color 0.2s, transform 0.1s !important;
        box-sizing: border-box !important;
    }
    .container-nav .navbar-toggler:hover,
    .container-nav .navbar-toggler:focus {
        background-color: #3f4a3d !important;
        transform: translateY(-1px) !important;
        outline: none !important;
        box-shadow: none !important;
    }
    .container-nav .navbar-toggler .icon-menu {
        color: #ffffff !important;
        font-size: 1.05em !important;
        line-height: 1 !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
    .container-nav .navbar-collapse {
        display: none !important;
        order: 3 !important;
        flex-basis: 100% !important;
        width: 100% !important;
    }
    .container-nav .navbar-collapse.show,
    .container-nav .navbar-collapse.collapsing {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-top: 10px !important;
        text-align: center !important;
        background: transparent !important;
        width: 100% !important;
        flex-basis: 100% !important;
    }
    .container-nav .navbar-collapse ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 10px 0 !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .container-nav .navbar-collapse li {
        margin: 0 !important;
    }
    .container-nav .navbar-collapse li a {
        padding: 12px 24px !important;
        font-size: 1em !important;
        display: inline-block !important;
        min-width: 200px !important;
        text-align: center !important;
    }
    .navbar-brand .brand-logo::before {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85em !important;
        line-height: 36px !important;
        margin-right: 8px !important;
    }
}

/* =========================================================
   Планшеты и телефоны (≤ 768px)
   ========================================================= */
@media (max-width: 768px) {
    .container-header {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px 10px !important;
    }
    .container-header .grid-child {
        width: 100% !important;
        text-align: center !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .navbar-brand {
        text-align: center !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .brand-logo, .brand-logo span {
        font-size: 1.2em !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.3 !important;
        display: block !important;
    }
    .site-description {
        font-size: 0.9em !important;
    }
    .container-nav {
        margin-top: 10px !important;
        width: 100% !important;
    }
    .container-component,
    .com-content-article {
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
    }
    .com-content-article__body .h1-name {
        font-size: 1.4em !important;
        line-height: 1.3 !important;
    }
    .com-content-article__body .lead {
        font-size: 1em !important;
    }
    .com-content-article__body h2.block-title {
        font-size: 1.25em !important;
        margin-top: 1.2em !important;
        margin-bottom: 0.8em !important;
    }
    .topics-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    body.site footer.container-footer,
    body.site .container-footer,
    body.site footer.footer,
    footer.container-footer,
    footer.footer,
    .container-footer {
        padding: 15px 10px !important;
    }
    .format-list {
        width: 100% !important;
        max-width: 100% !important;
        margin: 1em 0 !important;
    }
    .price-box {
        padding: 16px !important;
    }
    .faq-question {
        font-size: 1em !important;
        padding: 16px 50px 16px 18px !important;
    }
    .faq-question::after {
        right: 18px !important;
        font-size: 1.3em !important;
    }
    .faq-answer {
        padding: 0 18px 16px 18px !important;
    }
    .diploma-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }
    .diploma-caption {
        font-size: 0.85em !important;
    }
    .lightbox-wrap {
        max-width: 95% !important;
        max-height: 75vh !important;
    }
    .lightbox-wrap .lightbox-img {
        max-width: 100% !important;
        max-height: 75vh !important;
    }
    .lightbox-close {
        top: 12px !important;
        right: 16px !important;
        font-size: 34px !important;
    }
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px !important;
        padding: 8px 14px !important;
    }
    .lightbox-prev {
        left: 8px !important;
    }
    .lightbox-next {
        right: 8px !important;
    }
    .lightbox-img {
        max-width: 95% !important;
        max-height: 75vh !important;
    }
    .lightbox-zoom-in,
    .lightbox-zoom-out {
        top: 16px !important;
        font-size: 20px !important;
        padding: 5px 10px !important;
    }
    .lightbox-zoom-in {
        right: 60px !important;
    }
    .lightbox-zoom-out {
        right: 100px !important;
    }
    .lightbox-watermark {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    .lightbox-watermark .watermark-text {
        font-size: 1em;
        color: rgba(255, 255, 255, 0.32);
        letter-spacing: 1px;
        text-shadow:
            0 0 1px rgba(0, 0, 0, 0.30),
            0 0 3px rgba(0, 0, 0, 0.15);
    }
    .mod-menu .nav-btn a,
    .mod-menu li.nav-btn a,
    .mod-menu a.nav-btn,
    .mod-menu .metismenu-item .nav-btn {
        padding: 12px 24px !important;
        font-size: 1em !important;
        display: inline-block !important;
        min-width: 200px !important;
        text-align: center !important;
    }
}

/* =========================================================
   КНОПКА «НАВЕРХ» (#back-top) — стилизация под сайт
   ========================================================= */
#back-top.back-to-top-link {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    inset-inline-end: 30px !important;
    z-index: 9980 !important;

    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background-color: #ffffff !important;
    background-image: none !important;
    color: #5c6b5a !important;
    border: 2px solid #5c6b5a !important;

    box-shadow: 0 2px 8px rgba(92, 107, 90, 0.15) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1 !important;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease,
                visibility 0.25s ease,
                background-color 0.2s ease, border-color 0.2s ease,
                color 0.2s ease, box-shadow 0.2s ease !important;
}

#back-top.back-to-top-link.visible,
#back-top.back-to-top-link.is-visible,
#back-top.back-to-top-link[style*="opacity: 1"],
#back-top.back-to-top-link[style*="opacity:1"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

#back-top.back-to-top-link .icon-arrow-up,
#back-top.back-to-top-link .icon-fw {
    color: #5c6b5a !important;
    font-size: 18px !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
}

#back-top.back-to-top-link:hover,
#back-top.back-to-top-link:focus,
#back-top.back-to-top-link:active {
    background-color: #5c6b5a !important;
    background-image: none !important;
    border-color: #5c6b5a !important;
    color: #ffffff !important;
    text-decoration: none !important;
    outline: none !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(92, 107, 90, 0.35) !important;
}

#back-top.back-to-top-link:hover .icon-arrow-up,
#back-top.back-to-top-link:hover .icon-fw,
#back-top.back-to-top-link:focus .icon-arrow-up,
#back-top.back-to-top-link:focus .icon-fw,
#back-top.back-to-top-link:active .icon-arrow-up,
#back-top.back-to-top-link:active .icon-fw {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    #back-top.back-to-top-link {
        width: 42px !important;
        height: 42px !important;
        bottom: 18px !important;
        right: 18px !important;
        inset-inline-end: 18px !important;
    }
    #back-top.back-to-top-link .icon-arrow-up,
    #back-top.back-to-top-link .icon-fw {
        font-size: 16px !important;
    }
}

/* =========================================================
   ПЛАВНЫЙ СКРОЛЛ для всех якорных ссылок
   (включая кнопку «Наверх»)
   ========================================================= */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* =========================================================
   Ряд кнопок для страницы «Контакты»
   ========================================================= */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 1.5em 0;
}

.contact-buttons .btn {
    margin: 0;
}

@media (max-width: 768px) {
    .contact-buttons {
        gap: 8px;
        margin: 1.2em 0;
    }
}

/* =========================================================
   ФОТО НА СТРАНИЦАХ
   ========================================================= */

/* Общий враппер */
.photo-main-wrapper,
.photo-about-wrapper {
    text-align: center;
    margin: 1.5em 0;
    line-height: 0;
}

/* Общие стили для фото */
.photo-main,
.photo-about {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Фото на главной */
.photo-main {
    max-width: 400px !important;
}

/* Фото в «Обо мне» */
.photo-about {
    max-width: 500px !important;
}

/* Планшеты — чуть больше */
@media (min-width: 768px) and (max-width: 992px) {
    .photo-main {
        max-width: 450px !important;
    }
    .photo-about {
        max-width: 550px !important;
    }
}

/* Мобильные — на всю ширину */
@media (max-width: 576px) {
    .photo-main,
    .photo-about {
        max-width: 100% !important;
        border-radius: 6px;
    }
}

/* Тёмная тема — усилить тень */
@media (prefers-color-scheme: dark) {
    .photo-main,
    .photo-about {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
}

/* =========================================================
   СТРАНИЦА «ОТЗЫВЫ» — сетка скриншотов
   ========================================================= */
.otzyvy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto;
}
.otzyv-item {
    text-align: center;
}
.otzyv-img-wrap {
    background: #ffffff;
    border: 1px solid #e8e0d5;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 1px 4px rgba(92, 107, 90, 0.06);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    line-height: 0;
}
.otzyv-img-wrap:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(92, 107, 90, 0.15);
    border-color: #5c6b5a;
}
.otzyv-img-wrap img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.otzyv-caption {
    margin-top: 10px !important;
    font-size: 0.9em !important;
    color: #5c6b5a !important;
    line-height: 1.4;
}
@media (max-width: 900px) {
    .otzyvy-grid {
        gap: 24px;
        margin: 32px auto;
    }
}
@media (max-width: 768px) {
    .otzyvy-grid {
        gap: 18px;
        margin: 24px auto;
    }
    .otzyv-img-wrap {
        padding: 5px;
    }
    .otzyv-caption {
        font-size: 0.85em !important;
        margin-top: 8px !important;
    }
}
@media (max-width: 600px) {
    .otzyvy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 24px auto;
        max-width: 100%;
    }
    .otzyv-img-wrap {
        padding: 6px;
    }
}
@media (max-width: 360px) {
    .otzyvy-grid {
        gap: 16px;
    }
    .otzyv-img-wrap {
        padding: 4px;
    }
}

/* =========================================================
   FONT-DISPLAY SWAP — быстрая загрузка шрифтов
   ========================================================= */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-display: swap;
}
@font-face {
    font-family: 'FontAwesome';
    font-display: swap;
}

/* =========================================================
   ЗАМЕТКИ — стилизация категорий и подкатегорий
   ========================================================= */
   
   /* Заголовок категории */
.content-category h1 {
    font-size: 1.9em !important;
    color: #5c6b5a !important;
    font-weight: normal !important;
    text-align: center !important;
    margin-bottom: 0.5em !important;
    line-height: 1.3 !important;
    font-family: Georgia, serif !important;
}

/* Описание категории */
.content-category > .category-desc {
    font-size: 1.15em !important;
    color: #2b2b2b !important;
    text-align: center !important;
    margin-bottom: 2em !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    line-height: 1.7 !important;
    font-family: Georgia, serif !important;
}

/* Скрыть заголовок "Подкатегории" */
.cat-children > h3:first-child {
    display: none !important;
}

/* Сетка подкатегорий */
.cat-children {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
    margin: 1.5em auto !important;
    max-width: 900px !important;
}

/* Карточка подкатегории */
.com-content-category__children {
    background-color: #ffffff !important;
    border: 1px solid #e8e0d5 !important;
    border-radius: 8px !important;
    padding: 20px 22px !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
}

.com-content-category__children:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(92, 107, 90, 0.12) !important;
    border-color: #5c6b5a !important;
}

/* Заголовок подкатегории */
.com-content-category__children .page-header {
    margin: 0 0 0.5em 0 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1.15em !important;
    font-weight: normal !important;
    line-height: 1.3 !important;
    font-family: Georgia, serif !important;
}

.com-content-category__children .page-header a {
    color: #5c6b5a !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.com-content-category__children .page-header a:hover {
    color: #3f4a3d !important;
    text-decoration: underline !important;
}

/* Описание подкатегории */
.com-content-category__children .category-desc {
    font-size: 0.95em !important;
    color: #6b5d4a !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    font-family: Georgia, serif !important;
}

/* Скрыть выпадающий список "Кол-во строк" */
.com-content-category__pagination {
    display: none !important;
}

/* Скрыть "Нет материалов для отображения" */
.content-category .alert-info {
    display: none !important;
}

/* Планшеты — 768–992 */
@media (max-width: 992px) {
    .cat-children {
        max-width: 100% !important;
        gap: 16px !important;
    }
    .content-category h1 {
        font-size: 1.7em !important;
    }
    .content-category > .category-desc {
        font-size: 1.05em !important;
    }
}

/* Мобильные — до 768 */
@media (max-width: 768px) {
    .cat-children {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .content-category h1 {
        font-size: 1.4em !important;
    }
    .content-category > .category-desc {
        font-size: 1em !important;
        margin-bottom: 1.5em !important;
    }
    .com-content-category__children {
        padding: 16px 18px !important;
    }
    .com-content-category__children .page-header {
        font-size: 1.05em !important;
    }
}

/* Выровнять высоту карточек подкатегорий */
.com-content-category__children {
    display: flex !important;
    flex-direction: column !important;
}

/* =========================================================
   ЗАМЕТКИ — универсальные стили для всех категорий
   ========================================================= */

/* Заголовок категории */
body [class*="com-content-category"] h1 {
    font-size: 1.9em !important;
    color: #5c6b5a !important;
    font-weight: normal !important;
    text-align: center !important;
    margin-bottom: 0.5em !important;
    line-height: 1.3 !important;
    font-family: Georgia, serif !important;
}

/* Описание категории */
body [class*="com-content-category"] > .category-desc {
    font-size: 1.15em !important;
    color: #2b2b2b !important;
    text-align: center !important;
    margin-bottom: 2em !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    line-height: 1.7 !important;
    font-family: Georgia, serif !important;
}

/* Скрыть "Нет материалов для отображения" */
body [class*="com-content-category"] .alert-info {
    display: none !important;
}

/* Скрыть выпадающий список "Кол-во строк" */
body [class*="com-content-category"] .com-content-category__pagination {
    display: none !important;
}

/* Мобильные */
@media (max-width: 768px) {
    body [class*="com-content-category"] h1 {
        font-size: 1.4em !important;
    }
    body [class*="com-content-category"] > .category-desc {
        font-size: 1em !important;
        margin-bottom: 1.5em !important;
    }
}