/* ============================================
   author-page.css — страница автора
   Двери Оптима | /drafts/author-page.css
   ============================================ */

/* --- Общий контейнер: светлая карточка на тёмном сайте --- */
.author-page {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    font-family: Open_Sans_mw, sans-serif;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin: 20px auto 40px;
    max-width: 1200px;
    width: 100%;
    color: #514341;
    box-sizing: border-box;
}

.author-page *,
.author-page *::before,
.author-page *::after {
    box-sizing: border-box;
}

/* --- Сброс курсива из глобальных стилей сайта --- */
.author-page h2,
.author-page h3,
.author-page .author-card__section-title,
.author-page .author-card__name,
.author-page .author-card__position,
.author-page .author-content__section-title,
.author-page .article-card__title {
    font-style: normal !important;
}

/* --- Карточка автора (левая колонка) --- */
.author-card {
    position: sticky;
    top: 24px;
    align-self: start;
}

.author-card__photo-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    margin: 0 auto 20px;
    background: #f5f5f5;
}

.author-card__photo-wrap::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2525a, #f2992e);
    z-index: 0;
}

.author-card__photo-wrap::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
    z-index: 1;
}

.author-card__photo {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
    display: block;
}

.author-page .author-card__hero {
    text-align: center;
    margin-bottom: 8px;
}

.author-page .author-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e2525a !important;
    padding: 5px 12px;
    border: 1px solid rgba(226, 82, 90, 0.35);
    border-radius: 4px;
    margin-bottom: 14px;
    background: #fff;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.author-page .author-card__badge:hover,
.author-page .author-card__badge:focus {
    background: #e2525a !important;
    color: #fff !important;
    border-color: #e2525a !important;
    text-decoration: none !important;
}

.author-page .author-card__name {
    font-size: 26px;
    font-weight: 700;
    color: #2e2725 !important;
    line-height: 1.2;
    margin: 0 0 6px;
    padding: 0;
    text-align: center;
}

.author-card__position {
    font-size: 15px;
    color: #6b6a6a;
    margin-bottom: 24px;
    text-align: center;
}

/* --- Секции в карточке --- */
.author-card__section {
    padding: 16px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.author-card__section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.author-card__section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2e2725;
    margin: 0 0 10px;
    padding: 0;
}

.author-card__company {
    color: #e2525a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.author-card__company:hover {
    text-decoration: underline;
    color: #e2525a;
}

/* --- Соцсети и мессенджеры --- */
.author-socials {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-socials__item {
    padding: 0;
    margin: 0;
}

.author-socials__item::before {
    display: none;
}

.author-socials__item a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #514341 !important;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.author-socials__item a:hover {
    color: #e2525a !important;
    text-decoration: none;
}

.author-socials__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.author-socials__item a:hover .author-socials__icon {
    background: rgba(226, 82, 90, 0.12);
}

.author-socials__icon svg {
    stroke: #e2525a;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Теги экспертизы --- */
.author-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.author-tags li {
    padding: 0;
    margin: 0;
}

.author-tags li::before {
    display: none;
}

.author-tags a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    color: #514341 !important;
    background: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.author-tags a:hover {
    background: rgba(226, 82, 90, 0.08);
    border-color: rgba(226, 82, 90, 0.3);
    color: #e2525a !important;
    text-decoration: none;
}

/* --- Правая колонка (контент) --- */
.author-content__section {
    margin-bottom: 48px;
}

.author-content__section:last-child {
    margin-bottom: 0;
}

.author-page .author-content__section-title {
    text-align: left;
    font-size: 25px;
    font-family: Open_Sans_mw, sans-serif;
    color: #514341 !important;
    margin: 0 0 20px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    font-weight: 700;
}

.author-page .author-content__section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e2525a, #f2992e);
}

.author-content p {
    font-family: Open_Sans_mw, sans-serif;
    font-size: 15px;
    color: #6b6a6a !important;
    line-height: 1.75;
    margin: 0 0 16px;
}

.author-content p strong {
    color: #2e2725 !important;
}

.author-content a {
    color: #e2525a !important;
    text-decoration: none;
}

.author-content a:hover {
    text-decoration: underline;
    color: #e2525a !important;
}

/* --- Сетка статей: 2 колонки, крупные карточки --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    text-decoration: none !important;
}

.article-card__cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    overflow: hidden;
}

.article-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.article-card:hover .article-card__cover img {
    transform: scale(1.05);
}

.article-card__cover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #e2525a, #f2992e);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}

.article-card:hover .article-card__cover::after {
    opacity: 1;
}

.article-card__tag {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(46, 39, 37, 0.85);
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 2;
}

.article-card__body {
    padding: 22px 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.article-card__title {
    font-size: 19px;
    font-weight: 700;
    color: #2e2725 !important;
    line-height: 1.35;
    margin: 0 0 10px;
    padding: 0;
    transition: color 0.2s ease;
}

.article-card:hover .article-card__title {
    color: #e2525a !important;
}

.article-card__lead {
    font-size: 14px;
    color: #6b6a6a;
    line-height: 1.6;
    margin: 0;
}

/* --- Кнопка "Все статьи автора" --- */
.author-page .articles-more {
    text-align: center;
    margin-top: 36px;
}

.author-page .articles-more__link,
.author-page .articles-more__link:link,
.author-page .articles-more__link:visited {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #fff !important;
    color: #e2525a !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #e2525a !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: Open_Sans_mw, sans-serif;
}

.author-page .articles-more__link:hover,
.author-page .articles-more__link:active,
.author-page .articles-more__link:focus {
    background: #e2525a !important;
    color: #fff !important;
    border-color: #e2525a !important;
    text-decoration: none !important;
}

.author-page .articles-more__link .articles-more__text {
    color: inherit !important;
    font: inherit !important;
}

.author-page .articles-more__link:hover .articles-more__text,
.author-page .articles-more__link:focus .articles-more__text {
    color: #fff !important;
}

.author-page .articles-more__link svg {
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.author-page .articles-more__link:hover svg,
.author-page .articles-more__link:hover svg *,
.author-page .articles-more__link:focus svg,
.author-page .articles-more__link:focus svg * {
    stroke: #fff !important;
    transform: translateX(4px);
}

/* --- Адаптив --- */
@media (max-width: 960px) {
    .author-page {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px;
    }

    .author-card {
        position: static;
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 24px;
        align-items: start;
    }

    .author-card__photo-wrap {
        width: 180px;
        height: 180px;
        margin-bottom: 0;
    }

    .author-card__sidebar-content {
        min-width: 0;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .author-page {
        padding: 24px 20px;
        border-radius: 8px;
    }

    .author-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .author-card__photo-wrap {
        width: 160px;
        height: 160px;
    }

    .author-card__sidebar-content {
        width: 100%;
    }

    .author-card__section {
        width: 100%;
        text-align: left;
    }

    .author-socials {
        align-items: flex-start;
    }

    .author-page .author-content__section-title {
        font-size: 22px;
    }

    .article-card__title {
        font-size: 17px;
    }

    .articles-more__link {
        width: 100%;
        justify-content: center;
    }
}
