

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
    line-height: 1.6;
    margin: 0;
}

h1 {
    text-align: center;
    color: #555;
    margin-bottom: 40px;
    padding-top: 20px;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* 수직선 */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: calc(100% - 30px);
    background-color: #ccc;
    z-index: -1;
}

.timeline-item {
    position: relative;
    padding: 20px 0;
    display: flex; 
    justify-content: center;
    align-items: center;
}

/* 점 */
.timeline-item::before {
    content: '';
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background-color: #3498db;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
    z-index: 1;
}

/* 텍스트 */
.timeline-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    box-sizing: border-box;
    text-align: center;
}

.keyword {
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.age {
    display: block;
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}

.details {
    display: none;
    font-size: 0.9em;
    color: #666;
}

/* 이미지 */
.image-container {
    display: none;
    margin-left: 20px; 
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 800px 이상 화면 */
@media screen and (min-width: 800px) {
    .timeline-item {
        justify-content: flex-start;
    }


    .timeline-item:nth-child(even) {
        justify-content: flex-end;
    }


    .timeline-item::before {
        display: block;
    }

    .timeline-content {
        width: 45%;
        text-align: left; 
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left; 
    }

    .details {
        display: block;
    }

    /* 이미지 숨김 */
    .image-container {
        display: none;
    }
}


/* 1200px 이상 화면 */
@media screen and (min-width: 1200px) {
    .timeline-container {
        max-width: 100%;   
        width: 100%;
        margin: 0 auto;
    }

    .timeline-item {
        display: flex;
        flex-direction: column; 
        justify-content: center;
        align-items: center;   
        text-align: center;
        gap: 40px;
        width: 100%;
    }

    .timeline-content {
        width: 100%;
        max-width: 1200px; 
        text-align: center;
    }

    .image-container {
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        width: 100%;
        max-width: 1920px;
    }

    .image-container img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        object-fit: cover;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}


}
