/**
 * CSS стили для страницы "История клуба"
 * 
 * @package Arsenal
 */

/* ========================================
   Контейнер основной
   ======================================== */

.club-history-container {
    background: var(--color-white);      
    padding: var(--container-padding-y) var(--container-padding-x);
    max-width: var(--container-max-width);
    margin: 0 auto;
}

/* ========================================
   Основной стиль h1
   ======================================== */

.entry-header h1 {
    font-size: 2rem;
    text-align: left;
}

/* ========================================
   Секция "История клуба"
   ======================================== */

.history-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.history-intro__heading {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 2.4375rem;
    color: var(--gray-900);
    margin: 0;
}

.history-intro__text {
    font-size: 1rem;
    font-weight: 400;
    line-height: 25.6px;
    color: var(--gray-600);
    max-width: 1370px;
    margin: 0;
}

/* ========================================
   Секция "Временная шкала"
   ======================================== */

.timeline-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.timeline-section__heading {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 2.1rem;
    color: var(--red-900);
    margin: 0;
}



/* ========================================
   Секция "Рекорды и достижения"
   ======================================== */

.achievements-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.achievements-section__heading {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 2.1rem;
    color: var(--red-900);
    margin: 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    grid-auto-rows: auto;
}

/* ========================================
   Карточки достижений (разные варианты)
   ======================================== */

.achievement-card {
    border-radius: 0.625rem;
    padding: 1.5rem;
    box-shadow: 0 0.625rem 0.9375rem -3px rgba(26, 26, 26, 0.1), 0 0.25rem 0.375rem -4px rgba(26, 26, 26, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.achievement-card:hover {
    box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.achievement-card--primary {
    background: linear-gradient(to bottom, var(--red-900), var(--red-700));
    color: white;
    grid-column: 1;
    grid-row: 1;
}

.achievement-card--white {
    background: var(--color-white);
    border: 0.125rem solid var(--red-900);
    color: var(--gray-900);
    grid-column: 2;
    grid-row: 1;
}

.achievement-card--secondary {
    background: var(--color-white);
    border-left: 0.25rem solid var(--red-700);
    color: var(--gray-900);
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
}

.achievement-card__header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.achievement-card__icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.achievement-card__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.achievement-card__icon svg use {
    stroke: currentColor;
    fill: none;
}

/* Для primary стиля иконка Титулы*/
.achievement-card--primary .achievement-card__icon svg {
    color: #ffdf20;
}

/* Для white стиля иконка серая */
.achievement-card--white .achievement-card__icon svg {
    color: var(--gray-900);
}

.achievement-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.75rem;
    margin: 0;
}

.achievement-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-card__item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5rem;
}

.achievement-card__item-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-card__item-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.achievement-card__item-icon svg use {
    stroke: currentColor;
    fill: none;
}

.achievement-card__item-text {
    flex: 1;
    margin: 0;
}

.achievement-card--primary .achievement-card__item-icon {
    color: #ffdf20;
}

.achievement-card--primary .achievement-card__item-icon svg {
    color: #ffdf20;
}

/* ========================================
   Статистические карточки
   ======================================== */

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    border-radius: 0.625rem;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 0.1875rem 0 rgba(26, 26, 26, 0.1), 0 1px 0.125rem -1px rgba(26, 26, 26, 0.1);
    background: var(--color-white);
    grid-column: span 1;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 0.5rem 0.75rem var(--shadow-hover);
    transform: translateY(-0.125rem);
}

.stat-card__label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 19.6px;
    color: var(--gray-600);
    margin: 0;
}

.stat-card__value {
    font-size: 1rem;
    font-weight: 400;
    line-height: 25.6px;
    color: var(--gray-900);
    margin: 0;
}

.stat-card__bold {
    font-weight: 700;
    color: var(--gray-700);
}

.stat-card--full-width {
    grid-column: 1 / -1;
}

/* ========================================
   Секция "Домашние стадионы"
   ======================================== */

.stadiums-section {
    background-color: var(--gray-100);
    border-radius: 0.625rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stadiums-section__heading {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 2.1rem;
    color: var(--red-900);
    margin: 0;
}

.stadiums-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stadium-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.stadium-item__icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stadium-item__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    color: #850d0d;
}

.stadium-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.stadium-item__name {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.575rem;
    color: var(--gray-900);
    margin: 0;
}

.stadium-item__location {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 22.4px;
    color: var(--gray-600);
    margin: 0;
}

/* ========================================
   Утилиты и вспомогательные классы
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Анимации при загрузке */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.club-history-container {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   Временная шкала (новая версия с бейджами)
   Структура для interactive timeline
   ======================================== */

.timeline-container {
    max-width: 1200px;
    padding: 0 1.25rem;
    position: relative;
    width: 100%;
}

/* Года в сером бейджах сверху */
.timeline-years-badges {
    position: relative;
    width: 100%;
    height: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.timeline-year-badge {
    position: absolute;
    top: 0;
    background-color: var(--gray-200);
    border-radius: 33px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-900);
    text-align: center;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3.75rem;
    transform: translateX(-50%);
    line-height: 1.5rem;
}

/* Линия временной шкалы */
.timeline-line {
    position: relative;
    width: 100%;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Фоновая линия */
.timeline-background-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.25rem;
    background-color: var(--gray-300, #d1d5dc);
    transform: translateY(-50%);
}

/* Заполняющая линия (динамическое заполнение при наведении) */
.timeline-fill-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 0.25rem;
    background-color: var(--red-700, #ff1a1a);
    transform: translateY(-50%);
    transition: width 0.3s ease;
    pointer-events: none;
}

/* Контейнер для точек - с поддержкой CSS переменных для динамического пересчета */
.timeline-dots {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 100%;
    transform: translateY(-50%);
    /* CSS переменная для количества точек - используется для расчета равномерного расстояния */
    --timeline-items: 1;
}

/* Точки на линии - равномерное распределение */
.timeline-dot {
    position: absolute;
    top: 50%;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 0.25rem solid white;
    background-color: var(--gray-300, #d1d5dc); /* Серый цвет по умолчанию для неактивных */
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.625rem 0.9375rem -3px rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.timeline-dot:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0.9375rem 1.25rem -3px rgba(0, 0, 0, 0.15), 0 0.375rem 0.5rem -4px rgba(0, 0, 0, 0.12);
}

.timeline-events {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.timeline-event {
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    overflow: visible;
    /* left будет установлен инлайн стилем */
}

.timeline-event__tooltip {
    font-size: 1rem;
    color: var(--gray-600, #4a5565);
    background: var(--color-white);
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border-top: 0.1875rem solid;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
    white-space: normal;
    width: auto;
    min-width: 9.375rem;
    line-height: 1.4;
    z-index: 100;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.timeline-event--top .timeline-event__tooltip {
    bottom: calc(100% + 0.25rem);
}

.timeline-event--bottom .timeline-event__tooltip {
    top: calc(100% + 0.25rem);
}

.timeline-event__tooltip.visible {
    display: block;
    opacity: 1;
    visibility: visible;
}

.timeline-event:hover .timeline-event__tooltip {
    display: block;
}

/* ========================================
   АДАПТИВНЫЙ ДИЗАЙН (Все media queries)
   ======================================== */

/* ========================================
   Адаптивный дизайн (Desktop to Tablet: max-width 1024px)
   ======================================== */

@media (max-width: 1024px) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}
	
	.entry-header h1 {
        font-size: 1.75rem;
        text-align: left;
    }
    
    .club-history-container {
        padding: 2rem 1.5rem;
    }
    
    .history-intro {
        margin-bottom: 2.5rem;
    }
    
    .history-intro__heading {
        font-size: 1.625rem;
        line-height: 2.25rem;
    }
    
    .timeline-section,
    .achievements-section {
        margin-bottom: 2.5rem;
    }
    
    .achievements-grid {
        gap: 1.25rem;
    }
    
    .achievement-card {
        padding: 1.25rem;
    }
    
    .achievement-card__title {
        font-size: 1.125rem;
        line-height: 1.625rem;
    }
    
    .stadiums-section {
        padding: 1.25rem;
    }
    
    .stadiums-grid {
        gap: 1.25rem;
    }
    
    .timeline-container {
        padding: 0 1rem;
    }
    
    .timeline-year-badge {
        font-size: 0.875rem;
        padding: 0.3125rem 0.625rem;
        min-width: 55px;
    }
    
    .timeline-dot {
        width: 1.25rem;
        height: 1.25rem;
        border: 0.1875rem solid white;
    }
}

/* ========================================
   Адаптивный дизайн (Tablet: max-width 768px)
   ======================================== */

@media (max-width: 768px) {
    h1, h2, h3, h4, h5, h6 {
        text-align: left;
    }

    .entry-header h1 {
        font-size: 1.5rem;
        padding: 0 1.25rem;
    }

    .club-history-container {
        padding: 1.5rem 1.25rem;
    }
    
    .history-intro {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .history-intro__heading {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .history-intro__text {
        font-size: 0.9375rem;
        line-height: 1.5rem;
    }
    
    .timeline-section,
    .achievements-section {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .timeline-section__heading,
    .achievements-section__heading,
    .stadiums-section__heading {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .achievement-card--primary {
        grid-column: span 1;
        grid-row: auto;
    }

    .achievement-card--white {
        grid-column: span 1;
        grid-row: auto;
    }
    
    .achievement-card {
        padding: 1.125rem;
        gap: 0.875rem;
    }
    
    .achievement-card__header {
        gap: 0.625rem;
    }
    
    .achievement-card__icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .achievement-card__title {
        font-size: 1.125rem;
        line-height: 1.5rem;
    }
    
    .achievement-card__item {
        gap: 0.375rem;
        font-size: 0.9375rem;
        line-height: 22px;
    }
    
    .achievement-card__item-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    .stat-card {
        grid-column: span 1;
        padding: 1rem;
    }
    
    .stat-card__label {
        font-size: 0.8125rem;
    }
    
    .stat-card__value {
        font-size: 0.9375rem;
        line-height: 1.5rem;
    }
    
    .stadiums-section {
        padding: 1.125rem;
        gap: 0.875rem;
    }

    .stadiums-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stadium-item {
        gap: 0.875rem;
    }
    
    .stadium-item__icon {
        width: 44px;
        height: 44px;
    }
    
    .stadium-item__name {
        font-size: 17px;
        line-height: 1.5rem;
    }
    
    .stadium-item__location {
        font-size: 0.8125rem;
        line-height: 1.25rem;
    }

    /* Timeline styles for tablet */
    .timeline-container {
        padding: 0 0.75rem;
    }
    
    .timeline-years-badges {
        height: 0.875rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .timeline-year-badge {
        font-size: 0.875rem;
        padding: 0.3125rem 0.625rem;
        height: 1.75rem;
        min-width: 3.125rem;
    }
    
    .timeline-line {
        height: 3.75rem;
    }
    
    .timeline-background-line,
    .timeline-fill-line {
        height: 0.1875rem;
    }
    
    .timeline-dot {
        width: 1.125rem;
        height: 1.125rem;
        border: 0.1875rem solid white;
    }

    .timeline-event__tooltip {
        font-size: 0.8125rem;
        padding: 0.5rem 0.625rem;
        min-width: 130px;
    }
    
    /* Крайние подсказки не выходят за границы */
    .timeline-event:first-child .timeline-event__tooltip {
        left: 0;
        transform: translateX(0);
    }
    
    .timeline-event:last-child .timeline-event__tooltip {
        left: auto;
        right: 0;
        transform: translateX(0);
    }
}

/* ========================================
   Адаптивный дизайн (Mobile: max-width 30rem)
   ======================================== */

@media (max-width: 30rem) {
    h1, h2, h3, h4, h5, h6 {
        text-align: left;
    }

    h1 {
        font-size: 1.25rem;
    }
    
    .entry-header h1 {
        font-size: 1.25rem;
        padding: 0 1rem;
    }

    .club-history-container {
        padding: 1.25rem 1rem;        
    }
    
    .history-intro {
        gap: 0.625rem;
        margin-bottom: 1.75rem;
    }

    .history-intro__heading,
    .timeline-section__heading,
    .achievements-section__heading,
    .stadiums-section__heading {
        font-size: 1.125rem;
        line-height: 1.625rem;
    }

    .history-intro__text {
        font-size: 0.875rem;
        line-height: 22px;
    }
    
    .timeline-section,
    .achievements-section {
        gap: 1.25rem;
        margin-bottom: 1.75rem;
    }
    
    .achievements-grid {
        gap: 0.75rem;
    }

    .achievement-card {
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .achievement-card__header {
        gap: 0.5rem;
    }
    
    .achievement-card__icon {
        width: 1.5rem;
        height: 1.5rem;
    }

    .achievement-card__title {
        font-size: 1rem;
        line-height: 22px;
    }
    
    .achievement-card__list {
        gap: 0.375rem;
    }

    .achievement-card__item {
        font-size: 0.875rem;
        line-height: 1.25rem;
        gap: 0.375rem;
    }
    
    .achievement-card__item-icon {
        width: 1.125rem;
        height: 1.125rem;
    }

    .stat-card {
        padding: 0.875rem;
        gap: 0.375rem;
        border-radius: 0.5rem;
    }

    .stat-card__label {
        font-size: 0.75rem;
        line-height: 1.125rem;
    }

    .stat-card__value {
        font-size: 0.875rem;
        line-height: 21px;
    }

    .stadiums-section {
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .stadiums-grid {
        gap: 0.75rem;
    }

    .stadium-item {
        gap: 0.75rem;
    }

    .stadium-item__icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .stadium-item__name {
        font-size: 1rem;
        line-height: 22px;
    }

    .stadium-item__location {
        font-size: 0.75rem;
        line-height: 19px;
    }

    /* Timeline styles for mobile */
    .timeline-container {
        padding: 0 0.5rem;
    }
    
    .timeline-years-badges {
        height: 0.75rem;
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .timeline-year-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        height: 1.5rem;
        min-width: 45px;
        line-height: 1.25rem;
    }
    
    .timeline-line {
        height: 3.125rem;
    }
    
    .timeline-background-line,
    .timeline-fill-line {
        height: 0.125rem;
    }
    
    .timeline-dot {
        width: 1rem;
        height: 1rem;
        border: 0.125rem solid white;
    }
    
    .timeline-dot:hover {
        transform: translate(-50%, -50%) scale(1.1);
    }

    .timeline-event__tooltip {
        font-size: 0.6875rem;
        padding: 0.375rem 0.5rem;
        min-width: 110px;
        max-width: 140px;
        border-radius: 0.375rem;
    }
    
    /* Крайние подсказки не выходят за границы */
    .timeline-event:first-child .timeline-event__tooltip {
        left: 0;
        transform: translateX(0);
    }
    
    .timeline-event:last-child .timeline-event__tooltip {
        left: auto;
        right: 0;
        transform: translateX(0);
    }
}





