/* Страница эксперта: на всю ширину, фон #fafafa */
html:has(main#expert-main),
body:has(main#expert-main) {
    background: #fafafa;
}

body:has(main#expert-main) {
    margin: 0;
}

.expert-page-breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 104px 20px 12px;
}

@media (max-width: 768px) {
    .expert-page-breadcrumbs {
        padding-top: 96px;
    }
}

.expert-page {
    --expert-accent: #ff6200;
    --expert-text: #1a1a1a;
    --expert-muted: #4a4a4a;
    padding-bottom: 48px;
    min-height: 50vh;
    font-family: "Gilroy", sans-serif;
    background: #fafafa;
}

.expert-profile-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.expert-profile-hero__grid {
    display: grid;
    /* Доля от ширины сетки — иначе при любом экране >380px колонка всегда 380px и фото «не сужается» */
    grid-template-columns: minmax(0, min(380px, 42%)) minmax(0, 1fr);
    gap: 28px 36px;
    align-items: start;
}

.expert-profile-hero__grid > * {
    min-width: 0;
}

@media (max-width: 700px) {
    .expert-profile-hero__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .expert-photo-card {
        max-width: min(380px, 100%);
        justify-self: center;
    }
}

/* Левая карточка: фото */
.expert-photo-card {
    position: relative;
    width: 100%;
    max-width: min(380px, 100%);
    min-width: 0;
}
.expert-photo-card__inner {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 520px;
    background: #e8e8e8;
}

.expert-photo-card__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Готовый макет PNG: высота блока = высота картинки, без полей под «ящик» */
.expert-photo-card__inner--composite {
    aspect-ratio: auto;
    max-height: none;
    background: transparent;
    min-width: 0;
}

.expert-photo-card__inner--composite img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: min(520px, 85vh);
}
.expert-photo-card__star {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    color: #fff;
}

.expert-photo-card__star svg {
    width: 18px;
    height: 18px;
}

.expert-photo-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 20px 22px;
    background: linear-gradient(180deg, transparent 0%, rgba(12, 12, 12, 0.75) 55%, rgba(8, 8, 8, 0.92) 100%);
}

.expert-photo-card__name {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.2;
}

.expert-photo-card__role {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.expert-photo-card__role-line {
    display: block;
}

/* Правая карточка */
.expert-info-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 36px;
    border: 1px solid #e4e4e4;
}

@media (max-width: 600px) {
    .expert-info-card {
        padding: 24px 20px;
    }
}

.expert-info-card__list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.expert-info-card__item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 22px;
}

.expert-info-card__item:last-child {
    margin-bottom: 0;
}

.expert-info-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 0;
}

.expert-info-card__icon img {
    width: 48px;
    height: 48px;
    display: block;
}

.expert-info-card__lead {
    margin: 0 0 0px;
    font-size: 16px;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--expert-text);
}

.expert-info-card__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--expert-muted);
    font-weight: 500;
}

.expert-info-card__quote-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: start;
    margin: 0;
    padding-top: 8px;
}

.expert-info-card__quote-icon {
    justify-self: center;
    display: block;
    margin-top: 2px;
    width: 20px;
    height: 21px;
}

.expert-info-card__quote-row blockquote {
    margin: 0;
}

.expert-info-card__quote-text {
    margin: 0;
    font-size: clamp(16px, 1.3vw, 18px);
    line-height: 1.55;
    font-style: italic !important;
    font-synthesis: style !important;
    font-weight: 500;
    color: #111;
}

/* Секция «Стек технологий» */
.expert-stack {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 20px 24px;
}

.expert-stack__title {
    margin: 0 0 28px;
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 500 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--expert-text);
    text-align: left;
}

.expert-stack__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: left;
}

.expert-stack__col {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 20px;
    border: 1px solid #e4e4e4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    text-align: left;
    box-sizing: border-box;
}

.expert-stack__col-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 500;
    color: #ff6200;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: left;
    width: 100%;
}

.expert-stack__list {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
    width: 100%;
}

.expert-stack__list li {
    padding: 2px 0;
}

@media (max-width: 900px) {
    .expert-stack__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 540px) {
    .expert-stack__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Секция «Продуктивность» */
.expert-productivity {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 24px;
}

.expert-productivity__title {
    margin: 0 0 28px;
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 500 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--expert-text);
}

.expert-productivity__card {
    background: #ffffff;
    border-radius: 24px;
    padding: clamp(24px, 3vw, 36px) clamp(22px, 2.5vw, 36px);
    border: 1px solid #e4e4e4;
}

.expert-productivity__text {
    margin: 0 0 14px;
    font-size: clamp(16px, 1.15vw, 18px);
    line-height: 1.6;
    color: #1a1a1a;
    font-weight: 500;
}

.expert-productivity__text:last-child {
    margin-bottom: 0;
}

.expert-productivity__text strong {
    color: #ff6200;
    font-weight: 700;
}

/* Текст + фото (например, «Ценности в работе» на странице эксперта) */
.expert-productivity__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
}

.expert-productivity__split .expert-productivity__card {
    align-self: start;
}

.expert-productivity__split-media {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.expert-productivity__split-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 800px) {
    .expert-productivity__split {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .expert-productivity__split-media {
        aspect-ratio: 16 / 10;
    }
}

/* Секция «Образовательная и экспертная деятельность» */
.expert-education {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 24px;
}

.expert-education__title {
    margin: 0 0 28px;
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 500 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--expert-text);
    line-height: 1.25;
}

.expert-education__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
}

.expert-education__card {
    background: #ffffff;
    border-radius: 24px;
    padding: clamp(24px, 3vw, 36px) clamp(22px, 2.5vw, 36px);
    border: 1px solid #e4e4e4;
    display: flex;
    align-items: center;
}

.expert-education__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.expert-education__list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 16px;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: 500;
}

.expert-education__list li:last-child {
    margin-bottom: 0;
}

.expert-education__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6200;
}

.expert-education__media {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.expert-education__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right bottom;
}

@media (max-width: 800px) {
    .expert-education__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .expert-education__media {
        aspect-ratio: 16 / 10;
    }
}

/* Секция «Статьи эксперта» */
.expert-articles {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

.expert-articles__title {
    margin: 0 0 28px;
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 500 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--expert-text);
}

.expert-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

@media (max-width: 992px) {
    .expert-articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .expert-articles__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.expert-articles-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.expert-articles-card:hover {
    border-color: #cfcfcf;
    transform: translateY(-2px);
}

.expert-articles-card__image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.expert-articles-card__image-wrap {
    position: relative;
    width: 100%;
    padding-top: 56%;
    overflow: hidden;
    background: #eee;
}

.expert-articles-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.expert-articles-card:hover .expert-articles-card__image {
    transform: scale(1.04);
}

.expert-articles-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 18px 20px;
}

.expert-articles-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.expert-articles-card__date {
    color: #888;
}

.expert-articles-card__category {
    padding: 4px 12px;
    background: #fff0e8;
    color: #ff6200;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.expert-articles-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
}

.expert-articles-card__title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.expert-articles-card__title-link:hover {
    color: #ff6200;
}

.expert-articles-card__excerpt {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--expert-muted);
    flex-grow: 1;
}

.expert-articles-card__footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: auto;
}

.expert-articles-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expert-articles-card__author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.expert-articles-card__author-name {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.expert-articles-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #ff6200;
    text-decoration: none;
    transition: color 0.2s ease;
}

.expert-articles-card__readmore:hover {
    color: #e05600;
}

.expert-articles-card__arrow {
    transition: transform 0.2s ease;
}

.expert-articles-card__readmore:hover .expert-articles-card__arrow {
    transform: translateX(4px);
}

.expert-articles__actions {
    display: flex;
    justify-content: center;
}

.expert-articles__more-btn {
    appearance: none;
    cursor: pointer;
    padding: 12px 36px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #ff6200;
    background: transparent;
    border: 2px solid #ff6200;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.expert-articles__more-btn:hover {
    background: #fff0e8;
}

.expert-articles__more-btn:focus-visible {
    outline: 2px solid #ff6200;
    outline-offset: 3px;
}
