
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0f0e0a;
    --bg-card: #1e1c17;
    --bg-card-alt: #2a261e;
    --gold: #d4af37;
    --gold-light: #f3e3a2;
    --gold-dark: #a67c00;
    --text-light: #f2eee9;
    --text-muted: #bfb9aa;
    --border-dim: #3a3529;
    --transition: all 0.3s ease-in-out;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* ---------- Типографика ---------- */
h1, h2, h3, .nav-links a, .header-subtitle {
    font-family: 'Playfair Display', serif;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, #b87c00 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.3px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
}

.subsection-title {
    font-size: 1.5rem;
    color: var(--gold-light);
    margin: 3rem 0 1.5rem;
    font-weight: 600;
}

/* ---------- Раскладка ---------- */
.section {
    padding: 5rem 1.5rem;
    border-bottom: 1px solid var(--border-dim);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}

/* ---------- Навигация ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 14, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dim);
    padding: 1rem;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--gold), #f5e18b);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    font-size: 1.25rem;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ---------- Шапка ---------- */
#header {
    background: radial-gradient(circle at 10% 30%, #2a241a, #050403);
    text-align: center;
    padding: 5rem 1.5rem 6rem;
}

.logo-img {
    width: 50%;
    display: block;
    margin: 0;
    padding: 2px;    
}

.header-subtitle {
    font-size: 1.3rem;
    color: var(--gold-light);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    font-weight: 400;
}

.header-text {
    max-width: 700px;
    margin: 1.5rem auto 0;
    color: var(--text-muted);
}

/* ---------- Изображения и статьи ---------- */
.section-img {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--border-dim);
    display: block;
}

.attribution {
    text-align: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article_title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.article_authors {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
    color: var(--gold-light);
    letter-spacing: 0.3px;
}

.article_description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------- Компактные карточки статей ---------- */
.articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.article-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 1.25rem;
    text-align: left;
    min-height: 160px;
}

.article-card h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin: 0 0 1rem;
    text-align: left;
    color: var(--text-light);
}

.article-card .read-more-btn {
    align-self: flex-start;
    margin-top: auto;
}

/* ---------- Карточки (вебинары и руководители) ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card,
.person-card {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-dim);
    transition: var(--transition);
}

.card:hover,
.person-card:hover {
    border-color: var(--gold);
}

.card h3,
.person-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0 1rem;
    color: var(--text-light);
    line-height: 1.35;
}

.card-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Кнопка «i» */
.info-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--gold);
    padding: 0;
    transition: var(--transition);
}

.info-toggle-btn:hover {
    transform: scale(1.15);
    color: var(--gold-light);
}

/* Раскрывающийся блок об авторе */
.author-info {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-card-alt);
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: left;
    color: var(--text-muted);
}

.author-info.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Карточка руководителя практики */
.person-photo {
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--bg-card-alt);
    border: 2px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 3rem;
    overflow: hidden;
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-info {
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--bg-card-alt);
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: left;
    color: var(--text-muted);
}

.person-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.person-info p:last-child {
    margin-bottom: 0;
}

.person-info i {
    color: var(--gold);
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---------- Футер ---------- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-dim);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom {
    margin-top: 1rem;
}

footer a {
    color: var(--gold);
    text-decoration: none;
}

footer a:hover {
    color: var(--gold-light);
}

/* ---------- Кнопка «наверх» ---------- */
.scroll-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--gold-dark);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f0e0a;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    cursor: pointer;
    z-index: 99;
}

.scroll-top.show {
    opacity: 0.9;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--gold);
    transform: scale(1.05);
}

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .nav-links {
        gap: 1rem;
        justify-content: center;
    }
    .nav-links a {
        font-size: 1rem;
    }
    .navbar {
        padding: 0.8rem 1rem;
    }
    .section {
        padding: 3rem 1rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Кнопка «Читать статью» ---------- */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.2rem;
    padding: 0.6rem 1.4rem;
    border: 2px solid var(--gold);
    border-radius: 40px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.read-more-btn:hover {
    background: var(--gold);
    color: #0f0e0a;
    transform: translateY(-2px);
}

/* ---------- Кнопка «Смотреть вебинар» ---------- */
.video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.2rem;
    padding: 0.6rem 1.4rem;
    border: 2px solid var(--gold);
    border-radius: 40px;
    background: transparent;
    color: var(--gold);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.video-btn:hover {
    background: var(--gold);
    color: #0f0e0a;
    transform: translateY(-2px);
}

/* ---------- Модальное окно для видео ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.open {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease;
    z-index: 1;
}

.video-modal.open .video-modal-content {
    transform: translateY(0) scale(1);
}

.video-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-dim);
    background: var(--bg-card-alt);
    color: var(--gold);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-modal-close:hover {
    background: var(--gold);
    color: #0f0e0a;
    border-color: var(--gold);
}

.video-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--gold-light);
    margin: 0 3rem 1rem 0;
    text-align: left;
    line-height: 1.35;
}

.video-modal-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.video-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-external {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.video-modal-external:hover {
    color: var(--gold);
}

/* Блокировка скролла страницы при открытой модалке */
body.modal-open {
    overflow: hidden;
}

/* Мобильная адаптация модалки */
@media (max-width: 768px) {
    .video-modal {
        padding: 0.8rem;
    }
    .video-modal-content {
        padding: 1rem;
        border-radius: 18px;
    }
    .video-modal-title {
        font-size: 1rem;
        margin-right: 2.5rem;
    }
    .video-modal-close {
        width: 34px;
        height: 34px;
        top: 0.6rem;
        right: 0.6rem;
    }
}

/* ---------- Раздел «Семинары»: вводный текст ---------- */
.creative-intro {
    max-width: 900px;
    margin-bottom: 1rem;
}

.creative-intro p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ---------- Раздел «Семинары»: текстовый контент ---------- */
.creative-content {
    width: 100%;
}

.creative-content > p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Первый абзац — это заголовок статьи, дадим ему вид заголовка */
.creative-content > p:first-of-type {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.3px;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.creative-topics {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-muted);
}

.creative-topics li {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

/* ---------- Блок галереи ---------- */
.gallery-block {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-dim);
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.3s ease;
}

.gallery-block:hover {
    border-color: var(--gold-dark);
}

.gallery-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-toggle:hover {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.gallery-toggle-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-toggle-text i {
    color: var(--gold);
    font-size: 1.1rem;
}

.gallery-toggle-icon {
    color: var(--gold);
    font-size: 1rem;
    transition: transform 0.35s ease;
    flex-shrink: 0;
}

/* Поворот стрелки, когда блок раскрыт */
.gallery-block.open .gallery-toggle-icon {
    transform: rotate(180deg);
}

/* Анимируемое тело */
.gallery-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease;
}

.gallery-block.open .gallery-body {
    /* max-height выставляется через JS, здесь только запасной вариант */
    max-height: 5000px;
}

/* Внутренние отступы для сетки */
.gallery-body .gallery-grid {
    padding: 0.5rem 1.5rem 1.5rem;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--gold-light);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-title i {
    color: var(--gold);
}

/* ---------- Сетка превью ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-dim);
    transition: var(--transition);
    background: var(--bg-card);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* ---------- Модалка для фото ---------- */
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-modal.open {
    opacity: 1;
    visibility: visible;
}

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.photo-modal-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 1;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.photo-modal.open .photo-modal-content {
    transform: scale(1);
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.photo-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-dim);
    background: var(--bg-card-alt);
    color: var(--gold);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.photo-modal-close:hover {
    background: var(--gold);
    color: #0f0e0a;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }
    .photo-modal-close {
        top: -44px;
    }
}