/* --- Основной скролл --- */
.students-scroll-wrapper { position: relative; }
.students-scroll-container {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 1rem 1.5rem;
    scroll-behavior: smooth;
    cursor: grab;
    user-select: none;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.students-scroll-container::-webkit-scrollbar { display: none; }
.students-scroll-container.grabbing { cursor: grabbing; }

.student-item {
    flex: 0 0 380px;
    min-width: 380px;
    align-self: stretch;
    display: flex;
}

.student-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.scroll-hint {
    display: flex;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--main-color-orange, #ff8c00);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 15;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--main-color-orange, #ff8c00);
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.1s ease, background-color 0.2s ease, color 0.2s ease;
}
.scroll-hint.visible {
    opacity: 1;
    pointer-events: auto;
    animation: swipeHint 1.5s infinite ease-in-out;
}
.scroll-hint.visible:active, .scroll-hint.visible:hover {
    animation: none;
    transform: translateY(-50%) scale(0.9);
    background: var(--main-color-orange, #ff8c00);
    color: #fff;
}

@media (max-width: 768px) {
    .student-item { flex: 0 0 85vw; min-width: 280px; }
}

@keyframes swipeHint {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(8px); }
}

/* --- Структура карточки --- */
.card-main-title {
    font-size: 1.25rem;
    line-height: 1.2;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === БЛОК ФОТО (Переименован во избежание конфликтов) === */
.honor-card-image {
    height: 270px;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-color: rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: var(--bg-image, none);
    transition: background-image 0.3s ease;
}

/* Плейсхолдер пока картинка не загрузилась */
.honor-card-image:not(.loaded) {
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to { background-position-x: -200%; }
}

.honor-card-image.is-vertical {
    background-image: none !important;
}

.honor-card-image.is-vertical::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(1.1);
    z-index: 1;
}

.honor-card-image.is-vertical::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    height: 92%;
    background-image: var(--bg-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

.card-result-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffe0b2;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
    max-width: calc(100% - 24px);
    line-height: 1.3;
}

.detail-wrapper {
    overflow: hidden;
    transition: max-height 0.4s ease;
    flex-grow: 1;
}
.detail-wrapper.expanded {
    max-height: 2000px;
}

.read-more-btn {
    /* ====== СБРОС браузерных стилей кнопки (НОВОЕ) ====== */
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    /* =================================================== */

    /* Ваши исходные стили */
    display: inline;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-left: 0.3rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.read-more-btn:hover {
    color: #e67e00;
}

/* ====== НОВОЕ: стили для клавиатурного фокуса (доступность) ====== */
.read-more-btn:focus-visible {
    outline: 2px dashed #e67e00;
    outline-offset: 2px;
    border-radius: 3px;
}
.card-footer-info {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    color: #fff;
    opacity: 0.9;
}

.detail-html {
    text-align: left;
    font-size: 1rem;
    line-height: 1.5;
    color: white;
}
.detail-html h3 {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 700;
}
.detail-html p { margin-bottom: 0.5rem; }
.detail-html ul { padding-left: 1.2rem; margin-bottom: 0.5rem; }
.detail-html li { margin-bottom: 0.3rem; }
.detail-html strong { color: #ffe0b2; }
.detail-html em {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
    margin-top: 0.8rem;
    border-top: 1px dashed rgba(255,255,255,0.3);
    padding-top: 0.5rem;
}

/* Индикатор загрузки внизу скролла */
.scroll-loader {
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.scroll-loader.visible {
    opacity: 1;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--main-color-orange, #ff8c00);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
