/* ============ ОСНОВА ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #1a1613;
    --panel: #221d18;
    --gold: #d4a574;
    --gold-dark: #b8895a;
    --cream: #f2ede4;
    --muted: #8a7f70;
    --line: rgba(212, 165, 116, .18);
    --line-strong: rgba(212, 165, 116, .5);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--cream);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(212, 165, 116, .08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 165, 116, .06), transparent 45%);
    background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: 'Marcellus', Georgia, serif; font-weight: 400; }

section { padding: 0; }

/* ============ НАВИГАЦИЯ ============ */
.navbar {
    background: rgba(26, 22, 19, .85) !important;
    backdrop-filter: blur(12px);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}
.navbar-brand {
    font-family: 'Marcellus', Georgia, serif !important;
    font-weight: 400 !important;
    font-size: 1.15rem !important;
    letter-spacing: .28em !important;
    text-transform: uppercase !important;
    color: var(--cream) !important;
}
.navbar-brand span { color: var(--gold) !important; font-weight: 400 !important; }

.nav-link {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: .72rem !important;
    letter-spacing: .28em !important;
    text-transform: uppercase !important;
    color: var(--muted) !important;
    padding: .6rem 1rem !important;
    margin: 0 .15rem !important;
    transition: color .3s, background .3s;
    background: transparent !important;
}
.nav-link:hover,
.nav-link.active {
    color: var(--gold) !important;
    background: transparent !important;
}

.navbar-toggler { border-color: var(--line-strong); }
.navbar-toggler-icon { filter: invert(.85) sepia(.3) saturate(2); }

/* ============ HERO / ОБО МНЕ ============ */
.hero-section {
    min-height: auto;
    padding: 100px 0 60px;
    background: transparent;
    display: block;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}
@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 72px; padding: 40px 0 60px; }
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: .7rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.5rem;
}
.hero-kicker::before {
    content: "";
    width: 40px; height: 1px;
    background: var(--gold);
}

.hero-title {
    font-family: 'Marcellus', Georgia, serif;
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: .02em;
    color: var(--cream);
    margin-bottom: 1rem;
}

.hero-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
    width: 100%;
    max-width: 300px;
    margin: 1.5rem 0;
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 1rem;
}
.hero-desc + .hero-desc { margin-top: .5rem; }

.hero-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #2a231d;
    padding: 14px;
    border: 1px solid var(--line-strong);
    overflow: hidden;
}
@media (min-width: 900px) { .hero-photo { aspect-ratio: 3 / 4; } }

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid var(--line);
    pointer-events: none;
    z-index: 2;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(.9) brightness(.88);
    transition: filter .8s ease, transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.hero-photo:hover img {
    filter: contrast(1.05) saturate(1) brightness(.95);
    transform: scale(1.03);
}

/* ============ ЗАГОЛОВОК СЕКЦИИ С НОМЕРОМ ============ */
.section-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-strong);
    margin-bottom: 1rem;
}
.section-num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--gold);
    letter-spacing: .06em;
}
.section-title {
    font-family: 'Marcellus', Georgia, serif;
    font-size: clamp(1.6rem, 3.8vw, 2.4rem);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cream);
    line-height: 1.1;
    position: static;
    display: block;
    margin: 0;
}
.section-title::after { content: none !important; }

/* ============ КНОПКИ ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 34px;
    background: var(--gold);
    color: var(--bg);
    border: 1px solid var(--gold);
    font-family: 'Marcellus', Georgia, serif;
    font-size: .78rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    transition: background .3s, color .3s, gap .3s, transform .3s, box-shadow .3s;
    cursor: pointer;
    border-radius: 0 !important;
    box-shadow: 0 8px 24px rgba(212, 165, 116, .18);
}
.btn::after { content: "→"; font-family: 'Inter', sans-serif; font-size: 1rem; transition: transform .3s; }
.btn:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    box-shadow: 0 14px 36px rgba(212, 165, 116, .4);
    gap: 18px;
}
.btn:hover::after { transform: translateX(3px); }
.btn:active { transform: scale(.98); }

.btn-outline-beige {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--line-strong);
    font-family: 'Marcellus', Georgia, serif;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    transition: background .3s, color .3s, border-color .3s, transform .3s, box-shadow .3s;
    cursor: pointer;
    border-radius: 0 !important;
}
.btn-outline-beige:hover {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
    box-shadow: 0 8px 24px rgba(212, 165, 116, .25);
}
.btn-outline-beige:active { transform: scale(.98); }

.btn-training-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gold);
    color: var(--bg);
    border: 1px solid var(--gold);
    padding: 15px 30px;
    font-family: 'Marcellus', Georgia, serif;
    font-size: .78rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .3s, box-shadow .3s;
    margin-top: 1.5rem;
    box-shadow: 0 8px 24px rgba(212, 165, 116, .18);
}
.btn-training-wa:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    box-shadow: 0 14px 36px rgba(212, 165, 116, .4);
}

.btn-toggle-procedures {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 34px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    font-family: 'Marcellus', Georgia, serif;
    font-size: .78rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    transition: .3s;
    cursor: pointer;
    border-radius: 0 !important;
    margin-top: 2rem;
}
.btn-toggle-procedures:hover {
    background: var(--gold);
    color: var(--bg);
    box-shadow: 0 12px 32px rgba(212, 165, 116, .3);
}

/* ============ НАПРАВЛЕНИЯ ============ */
.services-grid {
    background: var(--panel);
    padding: 2.5rem;
    border: 1px solid var(--line);
    box-shadow: none;
    position: relative;
}
.services-grid h4 {
    font-family: 'Marcellus', Georgia, serif;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cream);
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: anywhere;
}
.services-grid p { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.services-grid .bi { color: var(--gold) !important; }

@media (max-width: 991px) {
    .services-grid h4 { font-size: .85rem; letter-spacing: .05em; }
}
@media (max-width: 575px) {
    .services-grid h4 { font-size: .78rem; letter-spacing: .03em; }
    .services-grid { padding: 1.5rem; }
}

/* ============ КАРТОЧКИ ПРОЦЕДУР ============ */
.procedure-card {
    background: var(--panel);
    padding: 1.5rem;
    transition: border-color .35s, transform .35s, box-shadow .35s;
    box-shadow: none;
    border: 1px solid var(--line);
    margin-bottom: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.procedure-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}

.procedure-img {
    width: 100%;
    height: 200px;
    background: #2a231d;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .85rem;
    overflow: hidden;
    border: 1px solid var(--line);
}
.procedure-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(.9) brightness(.9);
    transition: filter .6s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.procedure-card:hover .procedure-img img {
    transform: scale(1.04);
    filter: contrast(1.05) saturate(1) brightness(.98);
}

.procedure-title {
    font-family: 'Marcellus', Georgia, serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: .06em;
    margin-bottom: .5rem;
    color: var(--cream);
    line-height: 1.25;
}
.price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gold);
    margin: .8rem 0;
}
.text-muted-light { color: var(--muted) !important; }
.text-cert { color: var(--muted) !important; font-weight: 400; }

/* ============ ОБУЧЕНИЕ ============ */
.training-card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 2rem 1.5rem;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color .35s, transform .35s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.training-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.training-title {
    font-family: 'Marcellus', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: .06em;
    color: var(--cream);
    margin-bottom: 1rem;
    line-height: 1.3;
}
.training-hint {
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
}
.training-price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--gold);
    text-align: right;
    margin-top: auto;
}
.course-num {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 2.5rem;
    color: rgba(212, 165, 116, .18);
    line-height: 1;
    pointer-events: none;
}

/* ============ КОНТАКТЫ ============ */
.contact-cell {
    padding: 28px 24px;
    border: 1px solid var(--line);
    transition: border-color .35s, transform .35s, box-shadow .35s;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    text-decoration: none;
    color: inherit;
}
.contact-cell:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.contact-icon-wrap {
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    transition: background .3s, color .3s, border-color .3s;
}
.contact-cell:hover .contact-icon-wrap {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}
.contact-label {
    font-family: 'Inter', sans-serif;
    font-size: .68rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .7rem;
    font-weight: 600;
}
.contact-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cream);
    text-decoration: none;
    transition: color .3s;
    display: inline-block;
    line-height: 1.3;
}
.contact-cell:hover .contact-link { color: var(--gold); }
.contact-hint {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .5rem;
}

/* ============ КНОПКА НАВЕРХ ============ */
#goTopBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 99;
    border-radius: 50% !important;
}
#goTopBtn.show { opacity: 1; visibility: visible; }
#goTopBtn:hover { background: var(--gold); color: var(--bg); }

/* ============ ПОДВАЛ ============ */
footer {
    background: transparent;
    color: var(--muted);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--line);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    letter-spacing: .06em;
    font-size: .95rem;
}

/* ============ АНИМАЦИИ REVEAL ============ */
.reveal {
    opacity: 0;
    transform: translateX(-22px);
    transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--d, 0ms);
    will-change: opacity, transform;
}
.reveal.from-right { transform: translateX(22px); }
.reveal.in { opacity: 1; transform: translateX(0); }

.fade-up {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity .75s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1);
    will-change: opacity, transform;
}
.fade-up.appear { opacity: 1; transform: translate3d(0, 0, 0); }

/* ============ МОДАЛКИ ============ */
.modal-content {
    background: var(--panel);
    border: 1px solid var(--line-strong);
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    color: var(--cream);
}
.modal-header { border-bottom: 1px solid var(--line); padding: 1.2rem 2rem; }
.modal-title {
    font-family: 'Marcellus', Georgia, serif !important;
    font-size: 1.1rem !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
    color: var(--cream) !important;
}
.modal-body { padding: 2rem; }
.modal-footer { border-top: 1px solid var(--line); padding: 1.2rem 2rem; }
.btn-close { filter: invert(1); opacity: .5; }
.btn-close:hover { opacity: 1; }

.modal-details h3 {
    font-family: 'Marcellus', Georgia, serif;
    font-size: 1.8rem;
    letter-spacing: .06em;
    margin-bottom: 1rem;
    color: var(--cream);
    text-transform: uppercase;
}
.modal-details p { color: var(--muted); margin-bottom: .5rem; }
.modal-details strong {
    color: var(--gold);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.modal-details ul { padding-left: 1.2rem; }
.modal-details li { color: var(--cream); padding: .3rem 0; }

.modal.fade .modal-dialog {
    transform: translate3d(0, 22px, 0) scale(.985);
    opacity: 0;
    transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .28s ease;
}
.modal.show .modal-dialog { transform: translate3d(0,0,0) scale(1); opacity: 1; }
.modal-backdrop.show { opacity: .8; }

/* ============ ТАБЛИЦА ЦЕН ============ */
.price-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.price-table td {
    padding: .8rem .5rem;
    border-bottom: 1px solid var(--line);
    color: var(--cream);
    transition: background .3s, padding .3s;
}
.price-table td:last-child {
    text-align: right;
    color: var(--cream);
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
}
.price-table tr:hover td { background: rgba(212, 165, 116, .04); }

.price-table.has-volumes { table-layout: fixed; }
.price-table.has-volumes th {
    padding: .5rem .5rem .75rem;
    border-bottom: 1px solid var(--line-strong);
    color: var(--gold);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.price-table.has-volumes th:first-child { width: 56%; text-align: left; }
.price-table.has-volumes th:not(:first-child) { width: 22%; text-align: right; }
.price-table.has-volumes td { padding: .75rem .5rem; vertical-align: middle; }
.price-table.has-volumes td:not(:first-child) {
    text-align: right;
    color: var(--cream);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
}
.price-table.has-volumes td:first-child { color: var(--cream); }
.price-table .price-empty { color: #5a5147 !important; }

/* ============ АДАПТИВ ============ */
@media (max-width: 768px) {
    .hero-section { padding: 3rem 0; }
    .section-title { font-size: 1.5rem; }
    .hero-title { font-size: 2.6rem; }
    .hero-desc { font-size: .95rem; }
    .price-table.has-volumes { font-size: .85rem; }
    .price-table.has-volumes th:first-child { width: 48%; }
    .price-table.has-volumes th:not(:first-child) { width: 26%; }
    .price-table.has-volumes td,
    .price-table.has-volumes th { padding-left: .3rem; padding-right: .3rem; }
    .modal-body { padding: 1.2rem; }
    .modal-header, .modal-footer { padding: 1rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .fade-up { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
/* ============ REVEAL В МОДАЛКАХ ============ */
/* ============ REVEAL ВНУТРИ МОДАЛОК ============ */
/* В модалках используем CSS-анимацию вместо transition+observer */
/* Строки видимы всегда, анимация — приятный бонус */
/* ============ REVEAL ВНУТРИ МОДАЛОК ============ */
/* Убираем !important — он перебивал @keyframes и анимация не работала */
.modal .reveal {
    opacity: 0;
    animation: revealInLeft .7s cubic-bezier(.2,.7,.2,1) both;
    animation-delay: var(--d, 0ms);
}
.modal .reveal.from-right {
    animation-name: revealInRight;
}
@keyframes revealInLeft {
    from { opacity: 0; transform: translateX(-22px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealInRight {
    from { opacity: 0; transform: translateX(22px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .modal .reveal,
    .modal .reveal.from-right {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}