/* Horizontal Timeline CSS */
.ht-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
    overflow: hidden;
}

.ht-timeline {
    display: flex;
    border-bottom: 2px solid black;
    justify-content: space-between;
    padding-bottom: 10px;
    position: relative;
    width: 100%;
    max-width: 90%;
}

.ht-year {
    cursor: pointer;
    padding: 10px;
    position: relative;
    font-size: 16px;
    color: #333;
    font-weight: bold;
    flex: 1;
    text-align: center;
    margin-bottom: -11px;
    transition: all 0.3s ease-in-out;
}

.ht-year::after {
    content: '';
    width: 8px;
    height: 8px;
    background: gray;
    border-radius: 50%;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease-in-out;
}

.ht-year.active {
    color: black;
}

.ht-year.active::after {
    position: absolute;
    bottom: -12px;
    width: 25px;
    height: 25px;
    background: white;
    border: 9px solid black;
    border-radius: 50%;
} 

.ht-content {
    display: flex;
    flex-wrap: nowrap;
    gap: 96px;
    overflow: visible;
    width: 100%;
    max-width: 800px;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    padding-bottom: 20px;
}

.ht-item {
    width: 250px;
    text-align: left;
    position: relative;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease-in-out;
}

.ht-item:nth-child(odd) {
    align-self: flex-start;
}

.ht-item:nth-child(even) {
    align-self: flex-end;
    margin-top: 11%;
}

.ht-item.active {
    display: flex;
}

.ht-item.selected .ht-image {
    z-index: 2;
    position: relative;
}

.ht-item.selected .ht-info {
    border: 2px solid black;
    position: relative;
    z-index: 1;
    color: black;
}

.ht-image {
    width: 250px;
    height: 152px;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;
}

.ht-info {
    width: 302px;
    min-height: 118px;
    padding: 9%;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    top: 10px;
    left: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: -12%;
    border: 1px solid #fff;
    box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    color: #333;
}

.ht-info .ht-date {
    font-weight: bold;
    font-size: 18px;
    margin-top: 20px;
}

.ht-info .ht-text {
    font-size: 14px;
    text-align: left;
    word-wrap: break-word;
}

.ht-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-bottom: 20px;
    width: 100%;
    max-width: 800px;
}

.ht-pagination-dot {
    width: 10px;
    height: 10px;
    margin: 5px;
    background: gray;
    border-radius: 50%;
    cursor: pointer;
}

.ht-pagination-dot.active {
    background: black;
}



/*responsive */

@media (max-width: 830px) {
    .ht-container {
        padding: 0px;
    }

    /* Kapsayıcı alan scrollable */
    .ht-timeline {
        display: flex;
        border-bottom: 0px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        position: relative;
        padding-bottom: 30px;

        /* Scrollbar gizlensin */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer / Edge */
    }

    .ht-timeline::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    /* Timeline çizgisi */
    .ht-timeline::before {
        content: '';
        position: absolute;
        bottom: 14px; /* Nokta hizasına */
        left: 0;
        height: 2px;

        /* Değişiklik burada! */
        width: 116vw; /* Görüntülenen ekranın tam genişliğini kapsar */
        min-width: 100%;
        background-color: black;
        z-index: 0;
    }

    /* Yıl item'ları */
    .ht-year {
        position: relative;
        padding: 9%;
        margin-bottom: -9%;
        flex: 0 0 auto;
        min-width: 100px;
        margin-right: 20px;
        text-align: center;
        cursor: pointer;
        z-index: 1;
    }

    /* Noktalar */
    .ht-year::after {
        content: '';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 12px;
        height: 12px;
        background: gray;
        border-radius: 50%;
        z-index: 1;
    }

    /* Aktif yıl */
    .ht-year.active::after {
        width: 24px;
        height: 24px;
        bottom: 6px;
        background: white;
        border: 5px solid black;
        border-radius: 50%;
    }

    /* Kartlar */
    .ht-item {
        text-align: left;
        width: auto;
    }
}


/*tablet*/

/* 581px genişlik ve benzeri cihazlar için */
@media (min-width: 580px) and (max-width: 600px) and (min-height: 800px) {
    .ht-timeline {
        padding-bottom: 30px;
    }

    .ht-timeline::before {
        bottom: 12px; /* Çizgi hizası */
    }

    .ht-year::after {
        bottom: 17%; /* Nokta çizgi hizasında */
    }

    .ht-year.active::after {
        bottom: 12%; /* Daha büyük olanı hizala */
    }
}

/* 820px genişlik ve benzeri cihazlar için */
@media (min-width: 800px) and (max-width: 840px) and (min-height: 1100px) {
    .ht-timeline {
        padding-bottom: 40px;
    }

    .ht-timeline::before {
        bottom: 18px; /* Çizgi hizası */
    }

    .ht-year::after {
        bottom: 22%; /* Nokta çizgi hizasında */
    }

    .ht-year.active::after {
        bottom: 18%; /* Daha büyük olanı hizala */
    }
}



/*imac*/

@media (min-width: 1100px) and (max-width: 1140px) {
    .ht-content {
        display: flex;
        flex-wrap: nowrap; /* İkili satırlı yapı */
        justify-content: flex-start; /* İlk öğeyi sola yaslıyoruz */
        align-items: flex-start;
        gap: 48px;
        width: 100%;
        max-width: 1120px;
        margin-left: 13%;
        padding: 0 24px;
        box-sizing: border-box;
    }

    .ht-item {
        flex: 0 1 calc(50% - 24px); /* İki sütun düzeni */
        max-width: calc(50% - 24px);
        min-width: 300px; /* İsteğe bağlı sınır */
        flex-shrink: 0;
        margin: 0;
    }

    /* İlk öğe sola yapışık */
    .ht-item:first-child {
        margin-left: 0;
    }

    .ht-item.selected {
        transform: scale(1.02);
    }

    /* Eğer item'ların yüksekliği farklıysa hizalamayı sabitlemek için */
    .ht-item:nth-child(odd) {
        align-self: flex-start;
    }

    .ht-item:nth-child(even) {
        align-self: flex-start;
    }
}

