/* ============================================================
 * ACADEM — GLOBAL CSS
 * Версия 3.3
 *
 * Структура:
 *
 *   1. DESIGN TOKENS          — переменные, палитра, типографика
 *   2. BASE                   — body, ссылки, общие сбросы
 *   3. COMPONENTS
 *      3.1 GOOGLE CSE         — поиск
 *      3.2 AUTHOR PAGE        — страница автора
 *
 * Принципы:
 *   - всё визуальное регулируется через переменные
 *   - компоненты изолированы своими scope-классами
 *   - мобильные стили — внутри компонента
 *
 * Изменения 3.3:
 *   - #author-description больше не , а 
 *   - добавлен <h2 class="author-section-title"> — скрытый для SEO
 *   - «Работы автора» — H2, по центру, коричневый, почти как H1
 * ============================================================ */


/* ============================================================
 * 1. DESIGN TOKENS
 * ============================================================ */

:root {

    /* --------------------------------------------------------
     * 1.1 ПАЛИТРА — ГЛОБАЛЬНАЯ
     * -------------------------------------------------------- */

    --c-link: #d31d1f;
    --c-link-hover: #ffbd4f;

    --c-heading: #5a3a2e;
    --c-text: #000000;

}


/* ------------------------------------------------------------
 * 1.2 ТОКЕНЫ — AUTHOR PAGE
 * ------------------------------------------------------------ */

.uc-apagecss {

    /* -------- Палитра -------- */

    --ap-color-heading: var(--c-heading);
    --ap-color-text: var(--c-text);
    --ap-color-link: var(--c-link);
    --ap-color-link-hover: var(--c-link-hover);

    --ap-color-dot: #b8b8b8;
    --ap-color-dot-active: var(--c-heading);
    --ap-color-thumb-outline: var(--c-heading);

    /* -------- Шрифт -------- */

    --ap-font-family: var(--t-text-font, 'Roboto', Arial, sans-serif);

    /* -------- Типографика: H1 — имя автора -------- */

    --ap-h1-size: 32px;
    --ap-h1-line: 1.2;
    --ap-h1-weight: 700;
    --ap-h1-margin-bottom: 35px;

    /* -------- Типографика: H2 — описания -------- */

    --ap-h2-size: 16px;
    --ap-h2-line: 1.5;
    --ap-h2-weight: 300;

    /* -------- Типографика: заголовки разделов (H2 видимые) -------- */

    --ap-section-title-size: 31px;
    --ap-section-title-line: 1.2;
    --ap-section-title-weight: 700;
    --ap-section-title-margin-bottom: 25px;

    --ap-works-title-margin-top: 60px;

    /* -------- Типографика: mobile -------- */

    --ap-m-h1-size: 26px;
    --ap-m-h1-line: 1.2;
    --ap-m-h1-margin-bottom: 25px;

    --ap-m-h2-size: 16px;
    --ap-m-h2-line: 1.5;

    --ap-m-section-title-size: 25px;
    --ap-m-section-title-line: 1.2;
    --ap-m-section-title-margin-bottom: 20px;

    --ap-m-works-title-margin-top: 40px;

    /* -------- Layout -------- */

    --ap-page-width: 100%;
    --ap-page-padding: 0;
    --ap-m-page-padding: 0;

    --ap-gallery-width: 300px;

    --ap-gallery-gap-left: 50px;
    --ap-gallery-gap-bottom: 20px;
    --ap-m-gallery-gap-bottom: 30px;

    --ap-academy-margin-top: 20px;
    --ap-m-academy-margin-top: 15px;

    /* -------- Галерея -------- */

    --ap-thumb-size: 58px;
    --ap-thumb-gap: 8px;
    --ap-thumb-margin-top: 10px;
    --ap-thumb-outline-width: 2px;
    --ap-thumb-outline-offset: 2px;

    --ap-arrow-size: 35px;
    --ap-arrow-font-size: 25px;
    --ap-arrow-line-height: 35px;

    --ap-nav-margin-top: 12px;

    --ap-dot-size: 7px;
    --ap-dot-gap: 7px;

}


/* ============================================================
 * 2. BASE
 * ============================================================ */


/* ------------------------------------------------------------
 * 2.1 ССЫЛКИ — ГЛОБАЛЬНЫЕ ТЕКСТОВЫЕ
 * ------------------------------------------------------------ */

#allrecords
.t-text a[href],
#allrecords
.t-descr a[href],
#allrecords
.t-heading a[href],
#allrecords
.t-title a[href],
#allrecords
.t-impact-text a[href],
#allrecords
.t-text-impact a[href],
#allrecords
.t-uptitle a[href],
#allrecords
.t-store__card__title a[href],
#allrecords
.t-store__card__descr a[href],
#allrecords
.t-store__card__text a[href],
#allrecords
.t-store__card__info a[href],
#allrecords
.t744__descr.t-descr a[href],
#allrecords
.t780__descr.t-descr a[href] {
    color: var(--c-link) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}


/* -------- Visited -------- */

#allrecords
.t-text a[href]:visited,
#allrecords
.t-descr a[href]:visited,
#allrecords
.t-heading a[href]:visited,
#allrecords
.t-title a[href]:visited,
#allrecords
.t-impact-text a[href]:visited,
#allrecords
.t-text-impact a[href]:visited,
#allrecords
.t-uptitle a[href]:visited,
#allrecords
.t-store__card__title a[href]:visited,
#allrecords
.t-store__card__descr a[href]:visited,
#allrecords
.t-store__card__text a[href]:visited,
#allrecords
.t-store__card__info a[href]:visited,
#allrecords
.t744__descr.t-descr a[href]:visited,
#allrecords
.t780__descr.t-descr a[href]:visited {
    color: var(--c-link) !important;
    text-decoration: none !important;
}


/* -------- Hover -------- */

#allrecords
.t-text a[href]:hover,
#allrecords
.t-descr a[href]:hover,
#allrecords
.t-heading a[href]:hover,
#allrecords
.t-title a[href]:hover,
#allrecords
.t-impact-text a[href]:hover,
#allrecords
.t-text-impact a[href]:hover,
#allrecords
.t-uptitle a[href]:hover,
#allrecords
.t-store__card__title a[href]:hover,
#allrecords
.t-store__card__descr a[href]:hover,
#allrecords
.t-store__card__text a[href]:hover,
#allrecords
.t-store__card__info a[href]:hover,
#allrecords
.t744__descr.t-descr a[href]:hover,
#allrecords
.t780__descr.t-descr a[href]:hover {
    color: var(--c-link-hover) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--c-link-hover) !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;
    border-bottom: none !important;
    box-shadow: none !important;
}


/* ============================================================
 * 3. COMPONENTS
 * ============================================================ */


/* ============================================================
 * 3.1 GOOGLE CSE
 * ============================================================ */

.uc-gse-full .t-col.t-col_10.t-prefix_2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
    left: 0 !important;
    right: 0 !important;
    position: static !important;
    box-sizing: border-box !important;
}

.uc-gse-full .t-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.uc-gse-full .gsc-search-box {
    max-width: 1160px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

.uc-gse-full .gsc-search-box table {
    width: 100% !important;
    max-width: 100% !important;
}

.uc-gse-full .gsc-input {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
}

.uc-gse-full .gsc-input-box,
.uc-gse-full input.gsc-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.uc-gse-full .gsc-search-button {
    width: auto !important;
    white-space: nowrap !important;
}

.uc-gse-full .gsc-control-cse,
.uc-gse-full .gsc-control-wrapper-cse,
.uc-gse-full .gsc-results-wrapper-nooverlay,
.uc-gse-full .gsc-results-wrapper-visible,
.uc-gse-full .gsc-above-wrapper-area,
.uc-gse-full .gsc-above-wrapper-area-container,
.uc-gse-full .gsc-resultsbox-visible,
.uc-gse-full .gsc-resultsRoot,
.uc-gse-full .gsc-tabData,
.uc-gse-full .gsc-webResult,
.uc-gse-full .gsc-results,
.uc-gse-full .gsc-wrapper,
.uc-gse-full .gsc-expansionArea,
.uc-gse-full .gs-webResult,
.uc-gse-full .gs-result,
.uc-gse-full .gsc-result {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.uc-gse-full .gsc-result-info,
.uc-gse-full .gsc-result-info-container,
.uc-gse-full .gs-per-result-labels,
.uc-gse-full .gs-per-result-labels * {
    display: none !important;
}

.uc-gse-full .gs-richsnippet-box {
    display: none !important;
}

.uc-gse-full .gsc-tabsAreaInvisible,
.uc-gse-full .gsc-tabHeader {
    display: none !important;
}

.uc-gse-full .gsc-thumbnail-inside {
    text-align: left !important;
}


/* ============================================================
 * 3.2 AUTHOR PAGE
 *
 * Scope: .uc-apagecss
 * ============================================================ */


/* ------------------------------------------------------------
 * 3.2.1 Корневой контейнер
 * ------------------------------------------------------------ */

.uc-apagecss #author-page {
    width: var(--ap-page-width);
    max-width: 100%;
    box-sizing: border-box;

    margin-left: auto;
    margin-right: auto;

    padding-left: var(--ap-page-padding);
    padding-right: var(--ap-page-padding);

    font-family: var(--ap-font-family);
    color: var(--ap-color-text);
}

.uc-apagecss #author-page::after {
    content: '';
    display: table;
    clear: both;
}


/* ------------------------------------------------------------
 * 3.2.2 Типографика — H1
 * ------------------------------------------------------------ */

.uc-apagecss #author-name {
    margin: 0 0 var(--ap-h1-margin-bottom) 0;
    padding: 0;

    text-align: left;

    font-size: var(--ap-h1-size);
    line-height: var(--ap-h1-line);
    font-weight: var(--ap-h1-weight);

    color: var(--ap-color-heading);
}


/* ------------------------------------------------------------
 * 3.2.3 H2 — скрытый заголовок раздела «Описание автора»
 *
 * visually-hidden: Google видит структуру, пользователь — нет.
 * ------------------------------------------------------------ */

.uc-apagecss .visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;

    border: 0 !important;
}


/* ------------------------------------------------------------
 * 3.2.4 Описание автора — содержимое
 * ------------------------------------------------------------ */

.uc-apagecss #author-description {
    margin: 0;
    padding: 0;

    text-align: left;

    font-size: var(--ap-h2-size);
    line-height: var(--ap-h2-line);
    font-weight: var(--ap-h2-weight);

    color: var(--ap-color-text);
}


/* ------------------------------------------------------------
 * 3.2.5 Academy
 * ------------------------------------------------------------ */

.uc-apagecss #academy {
    clear: both;
    margin-top: var(--ap-academy-margin-top);
    padding: 0;
}

.uc-apagecss #academy-description {
    margin: 0;
    padding: 0;

    font-size: var(--ap-h2-size);
    line-height: var(--ap-h2-line);
    font-weight: var(--ap-h2-weight);

    color: var(--ap-color-text);
}


/* ------------------------------------------------------------
 * 3.2.6 H2 — «Работы автора»
 *
 * По центру, коричневый, почти как H1.
 * ------------------------------------------------------------ */

.uc-apagecss .author-works-title {
    margin: var(--ap-works-title-margin-top) 0 var(--ap-section-title-margin-bottom) 0;
    padding: 0;

    text-align: center;

    font-size: var(--ap-section-title-size);
    line-height: var(--ap-section-title-line);
    font-weight: var(--ap-section-title-weight);

    color: var(--ap-color-heading);
}


/* ------------------------------------------------------------
 * 3.2.7 Ссылки в описаниях
 * ------------------------------------------------------------ */

.uc-apagecss #author-description a[href],
.uc-apagecss #academy-description a[href] {
    color: var(--ap-color-link) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}

.uc-apagecss #author-description a[href]:visited,
.uc-apagecss #academy-description a[href]:visited {
    color: var(--ap-color-link) !important;
    text-decoration: none !important;
}

.uc-apagecss #author-description a[href]:hover,
.uc-apagecss #academy-description a[href]:hover {
    color: var(--ap-color-link-hover) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--ap-color-link-hover) !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;
    border-bottom: none !important;
    box-shadow: none !important;
}


/* ------------------------------------------------------------
 * 3.2.8 Галерея — контейнер (float: right)
 * ------------------------------------------------------------ */

.uc-apagecss .author-gallery {
    float: right;

    width: var(--ap-gallery-width);
    max-width: 100%;

    margin: 0 0 var(--ap-gallery-gap-bottom) var(--ap-gallery-gap-left);
}

.uc-apagecss .author-gallery-main {
    width: 100%;
    margin: 0;
    padding: 0;
}

.uc-apagecss #author-gallery-main-image {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;

    object-fit: contain;
}


/* ------------------------------------------------------------
 * 3.2.9 Галерея — миниатюры
 * ------------------------------------------------------------ */

.uc-apagecss .author-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;

    gap: var(--ap-thumb-gap);

    margin-top: var(--ap-thumb-margin-top);
}

.uc-apagecss .author-gallery-thumbnail {
    display: block;

    width: var(--ap-thumb-size);
    height: var(--ap-thumb-size);

    padding: 0;
    margin: 0;

    border: none;
    background: none;

    cursor: pointer;

    overflow: hidden;
}

.uc-apagecss .author-gallery-thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.uc-apagecss
.author-gallery-thumbnail.author-gallery-thumbnail-active {
    outline: var(--ap-thumb-outline-width) solid var(--ap-color-thumb-outline);
    outline-offset: var(--ap-thumb-outline-offset);
}


/* ------------------------------------------------------------
 * 3.2.10 Галерея — мобильная навигация
 * ------------------------------------------------------------ */

.uc-apagecss
.author-gallery-mobile-navigation {

    display: none;

    width: 100%;

    align-items: center;
    justify-content: space-between;

    margin-top: var(--ap-nav-margin-top);
}

.uc-apagecss .author-gallery-arrow {

    width: var(--ap-arrow-size);
    height: var(--ap-arrow-size);

    padding: 0;

    border: none;
    background: transparent;

    font-family: inherit;
    font-size: var(--ap-arrow-font-size);
    line-height: var(--ap-arrow-line-height);

    color: var(--ap-color-heading);

    cursor: pointer;
}

.uc-apagecss .author-gallery-arrow:hover {
    color: var(--ap-color-link-hover);
}


/* ------------------------------------------------------------
 * 3.2.11 Галерея — точки пагинации
 * ------------------------------------------------------------ */

.uc-apagecss .author-gallery-dots {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: var(--ap-dot-gap);

    flex: 1;
}

.uc-apagecss .author-gallery-dot {

    width: var(--ap-dot-size);
    height: var(--ap-dot-size);

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: var(--ap-color-dot);

    cursor: pointer;
}

.uc-apagecss
.author-gallery-dot.author-gallery-dot-active {
    background: var(--ap-color-dot-active);
}


/* ------------------------------------------------------------
 * 3.2.12 Галерея — одно изображение
 * ------------------------------------------------------------ */

.uc-apagecss
.author-gallery-single
.author-gallery-mobile-navigation {
    display: none !important;
}

.uc-apagecss
.author-gallery-single
.author-gallery-thumbnails {
    display: none !important;
}


/* ------------------------------------------------------------
 * 3.2.13 AUTHOR PAGE — MOBILE
 * ------------------------------------------------------------ */

@media screen and (max-width: 980px) {

    .uc-apagecss #author-page {
        padding-left: var(--ap-m-page-padding);
        padding-right: var(--ap-m-page-padding);
    }


    .uc-apagecss .author-gallery {
        float: none;

        width: 100%;
        max-width: var(--ap-gallery-width);

        margin: 0 auto var(--ap-m-gallery-gap-bottom) auto;
    }


    .uc-apagecss #author-name {
        font-size: var(--ap-m-h1-size);
        line-height: var(--ap-m-h1-line);
        margin-bottom: var(--ap-m-h1-margin-bottom);
    }

    .uc-apagecss #author-description {
        font-size: var(--ap-m-h2-size);
        line-height: var(--ap-m-h2-line);
    }

    .uc-apagecss #academy {
        margin-top: var(--ap-m-academy-margin-top);
    }

    .uc-apagecss #academy-description {
        font-size: var(--ap-m-h2-size);
        line-height: var(--ap-m-h2-line);
    }


    .uc-apagecss .author-works-title {
        font-size: var(--ap-m-section-title-size);
        line-height: var(--ap-m-section-title-line);
        margin-top: var(--ap-m-works-title-margin-top);
        margin-bottom: var(--ap-m-section-title-margin-bottom);
    }


    .uc-apagecss .author-gallery-thumbnails {
        display: none;
    }

    .uc-apagecss
    .author-gallery-mobile-navigation {
        display: flex;
    }

}