/*
Theme Name: Choy Theme
Author: Alexey Choy
Version: 1.0
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0b0b0b; color: #e0e0e0; font-family: 'Vela Sans', sans-serif; font-weight: 300; line-height: 1.6; }
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: 0.02em; }

/* Hero блок: высота равна высоте видео, но не больше высоты окна */
.hero {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 100vh;
    max-height: 100svh;
    overflow: hidden;
    background: #000;
}
.hero-video {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    max-height: 100vh;
    max-height: 100svh;
    object-fit: cover;
    background: #000;
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2;
}
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}
.hero-title {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.7);
}
.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.hero-button,
.hero-button:link,
.hero-button:visited {
    display: inline-block;
    background: #c9a84c;
    color: #0b0b0b;
    padding: 16px 40px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(201,168,76,0.3);
    border: none;
    cursor: pointer;
}
.hero-button:hover {
    background: #e0c75c;
    color: #0b0b0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,168,76,0.5);
}

/* Первый экран на низких экранах: телефон в горизонтальной ориентации */
@media (max-height: 520px) and (orientation: landscape) {
    .hero { max-height: 100svh; }
    .hero-title { font-size: 2.4rem; margin-bottom: 10px; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 16px; }
    .hero-button { padding: 10px 24px; font-size: 0.95rem; }
    .hero-content { padding: 12px; }
}

/* Заголовки разделов */
.section-title {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
}

/* Сетка */
.container { max-width: 1400px; margin: 0 auto; padding: 40px 20px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.project-card {
    background: #161616;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s;
    border: 1px solid #2a2a2a;
    display: block;
    text-decoration: none;
    color: #e0e0e0;
}
.project-card:link, .project-card:visited { color: #e0e0e0; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.6); border-color: #444; color: #e0e0e0; }
.project-card img { width: 100%; height: 200px; object-fit: cover; display: block; background: #222; }
.project-card .card-body { padding: 20px; }
.project-card h3 { font-size: 1.5rem; margin-bottom: 8px; color: #fff; }
.project-card .role { color: #c9a84c; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.project-card .meta { color: #888; font-size: 0.9rem; margin-top: 8px; }

/* Планшет и крупный телефон в горизонтальной ориентации: три колонки вместо двух */
@media (min-width: 769px) and (max-width: 987px) {
    .projects-grid, .events-grid { grid-template-columns: repeat(3, 1fr); }
    .project-card img { height: 150px; }
    .event-thumb { height: 140px; }
    .project-card h3 { font-size: 1.2rem; }
    .project-card .card-body { padding: 14px; }
    .event-card { padding: 14px; }
    .event-date { font-size: 1.3rem; }
    .event-title { font-size: 1rem; }
    .skeleton-thumb { height: 150px; }
}

/* ===== Скелетоны загрузки ===== */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.9; }
}
.skeleton-card {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
}
.skeleton-thumb,
.skeleton-line,
.skeleton-chip,
.skeleton-hero,
.skeleton-section-title {
    background: #262626;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-thumb { width: 100%; height: 200px; display: block; }
.skeleton-body { padding: 20px; }
.skeleton-line { height: 14px; border-radius: 4px; margin-bottom: 10px; }
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.lg { height: 24px; width: 70%; }
.skeleton-line.md { width: 55%; }
.skeleton-line.sm { width: 35%; }
.skeleton-chip {
    display: inline-block;
    width: 96px;
    height: 32px;
    border-radius: 999px;
    margin: 0 8px 8px 0;
}
.skeleton-hero {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    margin-bottom: 30px;
}
.skeleton-section-title {
    height: 36px;
    width: 240px;
    margin: 0 auto 40px;
    border-radius: 6px;
}
.skeleton-filters { text-align: center; margin-bottom: 32px; }
@media (prefers-reduced-motion: reduce) {
    .skeleton-thumb,
    .skeleton-line,
    .skeleton-chip,
    .skeleton-hero,
    .skeleton-section-title { animation: none; }
}

/* Навигация */
nav {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    background: rgba(11,11,11,0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}
.nav-menu { display: flex; justify-content: center; flex-wrap: wrap; }
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.nav-list li { margin: 0; padding: 0; list-style: none; }
nav a {
    color: #c9a84c;
    text-decoration: none;
    font-weight: 400;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    display: inline-block;
}
nav a:hover { color: #fff; }

/* Кнопка-бургер: на компьютере скрыта */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
}
.nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #c9a84c;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Контент стационарных страниц */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h2 { font-size: 2.5rem; margin-bottom: 30px; text-align: center; }
.page-content h3 { font-size: 1.8rem; margin: 40px 0 16px; color: #fff; }
.page-content h4 { font-size: 1.3rem; margin: 30px 0 12px; color: #fff; }
.page-content p { font-size: 1.1rem; line-height: 1.8; color: #ccc; margin-bottom: 1.2em; }
.page-content ul, .page-content ol { margin: 0 0 1.2em 1.5em; color: #ccc; font-size: 1.1rem; line-height: 1.8; }
.page-content li { margin-bottom: 0.4em; }
.page-content img { max-width: 100%; height: auto; border-radius: 8px; }
.page-content .alignright { float: right; margin: 0 0 20px 30px; max-width: 45%; }
.page-content .alignleft { float: left; margin: 0 30px 20px 0; max-width: 45%; }
.page-content .aligncenter { display: block; margin: 0 auto 20px; }
.page-content .alignnone { display: block; margin: 0 0 20px; }
.page-content .wp-caption { max-width: 100%; }
.page-content .wp-caption-text { font-size: 0.85rem; color: #888; text-align: center; margin-top: 8px; }
.page-content::after { content: ''; display: table; clear: both; }
.loading { text-align: center; color: #888; padding: 20px; }

/* Цитата */
.page-content blockquote,
.single-body blockquote {
    border-left: 3px solid #c9a84c;
    margin: 1.5em 0;
    padding: 0.8em 0 0.8em 1.4em;
    color: #bbb;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
}
.page-content blockquote p,
.single-body blockquote p {
    margin-bottom: 0;
    color: #bbb;
}
.page-content blockquote cite,
.single-body blockquote cite {
    display: block;
    margin-top: 0.6em;
    font-size: 0.9rem;
    font-style: normal;
    color: #c9a84c;
}

/* Ссылки */
a:link { color: #e0c75c; }
a:visited { color: #c9a84c; }
a:hover { color: #fff; }

/* Подчёркивание только для текстовых ссылок внутри контента */
.single-body a,
.page-content > p a,
.page-content > ul a,
.page-content > ol a { text-decoration: underline; }

/* Сброс для всех карточек внутри .page-content */
.page-content .project-card,
.page-content .project-card:link,
.page-content .project-card:visited { text-decoration: none; color: #e0e0e0; }
.page-content .project-card * { text-decoration: none !important; }
.page-content .project-card h3 { color: #fff; }
.page-content .project-card .role { color: #c9a84c; }
.page-content .project-card .meta { color: #888; }

.page-content .event-card,
.page-content .event-card:link,
.page-content .event-card:visited { text-decoration: none; color: #e0e0e0; }
.page-content .event-card * { text-decoration: none !important; }

/* Блок образовательной деятельности на главной */
.teaching-section {
    background: #161616;
    border-top: 1px solid #2a2a2a;
    padding: 60px 20px;
    margin-top: 60px;
}
.teaching-container { max-width: 1400px; margin: 0 auto; }

/* Сетка событий */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Карточка события */
.event-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    transition: 0.25s;
    display: block;
    overflow: hidden;
    min-width: 0;
    text-decoration: none;
    color: #e0e0e0;
}
.event-card:link, .event-card:visited { color: #e0e0e0; }
.event-card:hover { border-color: #c9a84c; transform: translateY(-3px); color: #e0e0e0; }
.event-thumb {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #222;
}
.event-date {
    font-family: 'Playfair Display', serif;
    color: #e0c75c;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1.2;
    margin-bottom: 8px;
}
.event-type {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #c9a84c;
    margin-bottom: 8px;
}
.event-title {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 10px;
}
.event-place { font-size: 14px; color: #999; margin-bottom: 10px; }
.event-description { color: #ccc; font-size: 0.95rem; line-height: 1.6; }

/* Фильтры */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 0 0 40px;
}
.filters-stacked { flex-direction: column; gap: 12px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
    display: inline-block;
    background: transparent;
    color: #c9a84c;
    border: 1.5px solid #c9a84c;
    padding: 7px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    line-height: 1.2;
}
.chip:hover { background: rgba(201,168,76,.15); transform: translateY(-1px); }
.chip.active {
    background: #c9a84c;
    color: #0b0b0b;
    box-shadow: 0 3px 10px rgba(201,168,76,0.3);
}
.chip-reset { border-color: #444; color: #999; }
.chip-reset:hover { color: #e0e0e0; border-color: #777; background: transparent; transform: none; }
.chip-reset[hidden] { display: none; }

/* Кнопка «Фильтры»: на компьютере скрыта, фильтры показаны всегда */
.filters-toggle {
    display: none;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
    padding: 12px 20px;
    background: transparent;
    color: #c9a84c;
    border: 1.5px solid #c9a84c;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background .25s;
}
.filters-toggle:hover { background: rgba(201,168,76,.15); }
.filters-toggle.open { background: #c9a84c; color: #0b0b0b; }

/* Страница преподавания */
.events-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 40px 0 20px;
    color: #e0e0e0;
}

/* Страница события / проекта */
.single { max-width: 900px; margin: 0 auto; }
.single h2 { text-align: left; }
.breadcrumbs { color: #888; font-size: 0.9rem; margin-bottom: 24px; }
.breadcrumbs a { color: #c9a84c; }

/* Мета-теги */
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.meta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.meta-group::before {
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #666;
    margin-right: 4px;
}
.meta-tag {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #3a3a3a;
    color: #c9a84c;
    text-decoration: none;
    transition: border-color .2s, background .2s;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
}
.meta-tag:link, .meta-tag:visited { color: #c9a84c; }
.meta-tag:hover { border-color: #c9a84c; background: rgba(201,168,76,.1); color: #e0c75c; }
span.meta-tag { cursor: default; }
span.meta-tag:hover { border-color: #3a3a3a; background: transparent; color: #c9a84c; }

.single-image { width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; }

/* Текстовый контент записи */
.single-body {
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 30px;
}
.single-body p { margin-bottom: 1em; }
.single-body p:last-child { margin-bottom: 0; }
.single-body ul, .single-body ol { margin: 0 0 1em 1.5em; }
.single-body li { margin-bottom: 0.4em; }
.single-body img { max-width: 100%; height: auto; border-radius: 8px; }
.single-body a { color: #e0c75c; text-decoration: underline; }

.video-wrap {
    position: relative;
    padding-top: 56.25%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .25s; background: #222; }
.gallery img:hover { transform: scale(1.03); }

/* Дополнительные ссылки */
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.link-button,
.link-button:link,
.link-button:visited {
    display: inline-block;
    color: #c9a84c;
    border: 1px solid #c9a84c;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    background: transparent;
    word-break: break-all;
}
.link-button:hover { background: rgba(201,168,76,.15); color: #e0c75c; border-color: #e0c75c; }

/* CTA-кнопка снизу страницы */
.page-cta { margin-top: 40px; padding-top: 30px; border-top: 1px solid #2a2a2a; display: flex; flex-wrap: wrap; gap: 12px; }

/* Скрываем WordPress-видеоблок в post_content (серый placeholder) */
.single-body figure.wp-block-video,
.single-body .wp-video,
.single-body video {
    display: none !important;
}

/* Смотрите также */
.see-also {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #2a2a2a;
}
.see-also-inner {
    max-width: 1400px;
    margin: 0 auto;
}
.see-also-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 24px;
    text-align: left;
}

/* Четыре карточки в строке на компьютере */
.page-content .see-also .projects-grid,
.page-content .see-also .events-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Выпускаем блок за пределы колонки 900px, чтобы карточки были как на главной */
@media (min-width: 1240px) {
    .see-also { margin-left: -160px; margin-right: -160px; }
}
@media (min-width: 1500px) {
    .see-also { margin-left: -250px; margin-right: -250px; }
}

/* Планшет: две карточки в строке */
@media (min-width: 769px) and (max-width: 1239px) {
    .page-content .see-also .projects-grid,
    .page-content .see-also .events-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Сброс стилей .page-content для вложенных карточек */
.page-content .see-also a,
.page-content .see-also a:link,
.page-content .see-also a:visited {
    text-decoration: none !important;
    color: #e0e0e0 !important;
}
.page-content .see-also .project-card,
.page-content .see-also .project-card:link,
.page-content .see-also .project-card:visited,
.page-content .see-also .project-card:hover {
    color: #e0e0e0 !important;
    text-decoration: none !important;
}
.page-content .see-also .project-card h3,
.page-content .see-also .project-card .role,
.page-content .see-also .project-card .meta {
    text-decoration: none !important;
}
.page-content .see-also .event-card,
.page-content .see-also .event-card:link,
.page-content .see-also .event-card:visited,
.page-content .see-also .event-card:hover {
    color: #e0e0e0 !important;
    text-decoration: none !important;
}

/* ===== Телефон ===== */
@media (max-width: 768px) {

    /* Видео не грузится, первый экран фиксированной высоты на чёрном фоне */
    .hero {
        height: 70svh;
        min-height: 420px;
        max-height: none;
        background: #000;
    }
    .hero-video { display: none; }

    /* Навигация: бургер + выпадающее меню */
    nav {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 12px 16px;
    }
    .nav-burger { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(11,11,11,0.98);
        border-bottom: 1px solid #2a2a2a;
        padding: 8px 16px 16px;
    }
    .nav-menu.open { display: block; }
    .nav-list {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        align-items: stretch;
    }
    .nav-list li { border-bottom: 1px solid #1e1e1e; }
    .nav-list li:last-child { border-bottom: none; }
    nav a { display: block; padding: 14px 4px; font-size: 1.1rem; }

    /* Фильтры: скрыты под кнопкой */
    .filters-toggle { display: block; }
    .filters.collapsible { display: none; }
    .filters.collapsible.open { display: flex; }
    .filters-stacked { gap: 16px; }

    /* Смотрите также: одна карточка в строке */
    .see-also { margin-left: 0; margin-right: 0; }
    .page-content .see-also .projects-grid,
    .page-content .see-also .events-grid {
        grid-template-columns: 1fr !important;
    }

    /* Остальное */
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.3rem; margin-bottom: 24px; }
    .hero-button { padding: 12px 30px; font-size: 1rem; }
    .container { padding: 24px 16px; }
    .section-title { font-size: 2rem; }
    .page-content h2 { font-size: 2rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
    .page-content .alignright, .page-content .alignleft { float: none; margin: 0 auto 20px; max-width: 100%; display: block; }
    .skeleton-hero { height: 200px; }
}