@charset "utf-8";

/* Container */
.ksms-history-wrapper {
    position: relative;
    max-width: 1000px; /* Wider for timeline */
    margin: 0 auto;
    padding: 60px 20px 100px; /* Matches other pages */
    min-height: 800px;
}

/* Page Title */
.history-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.history-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #000;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.history-subtitle {
    font-size: 16px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Timeline Container */
.history-timeline {
    position: relative;
    padding: 0;
    margin: 0;
}

/* The Vertical Line */
.history-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #e5e5e5; /* Very subtle line */
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Item (Row) */
.history-item {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* The Node (Star/Circle) */
.history-node {
    position: absolute;
    left: 50%;
    top: 20px; /* Align with top of card */
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #111;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 1); /* Spacing from line */
    z-index: 3;
    transition: all 0.3s ease;
}

.history-item:hover .history-node {
    transform: translateX(-50%) scale(1.2);
    border-color: #000;
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.05); /* Pulse effect */
}

/* Content Card */
.history-content {
    position: relative;
    width: 45%; /* Half width minus gap */
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.history-item:nth-child(odd) .history-content {
    margin-right: auto; /* Left side */
    text-align: right;
}

.history-item:nth-child(even) .history-content {
    margin-left: auto; /* Right side */
    text-align: left;
}

/* Connectors (Line from node to card) - Optional, minimal style usually omits this or makes it faint */
/* Let's skip connectors for cleaner "floating" look */

/* Hover Effects */
.history-item:hover .history-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* Typography */
/* Typography */
.history-date {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Odd Items (Blue Series) */
.history-item:nth-child(odd) .history-date {
    color: #4a6fa5;
    background: rgba(74, 111, 165, 0.1);
}

/* Even Items (Red Series) */
.history-item:nth-child(even) .history-date {
    color: #e07a7e; /* Pastel Red */
    background: rgba(224, 122, 126, 0.1);
}

.history-title-text {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
    line-height: 1.4;
}

.history-place {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    display: block;
    font-weight: 500;
}

.history-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    word-break: keep-all;
}

.history-place i {
    margin-right: 4px;
}


/* Scroll Light Line (Unique to this page if needed, or re-use logic) */
/* We will re-use the generic one or create a specific one */
.scroll-light-line-h {
    position: fixed;
    top: 0;
    right: 40px;
    width: 3px;
    height: 0;
    background: #111;
    box-shadow: none;
    z-index: 900;
    pointer-events: none;
    transition: height 0.05s linear;
    border-radius: 2px;
}


/* Animation Keyframes */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(74, 111, 165, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(74, 111, 165, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 111, 165, 0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(224, 122, 126, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(224, 122, 126, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 122, 126, 0); }
}

/* Update Nodes to use Animation */
.history-item:nth-child(odd) .history-node {
    border-color: #4a6fa5;
    animation: pulse-blue 2s infinite;
}

.history-item:nth-child(even) .history-node {
    border-color: #e07a7e;
    animation: pulse-red 2s infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ksms-history-wrapper {
        /* User said layout has default margin, so remove side padding here */
        padding: 40px 0 100px; 
    }

    .history-timeline::before {
        left: 20px; /* Increased from 8px to 20px to fit node + pulse */
        transform: none;
        background: #eee;
    }

    .history-item {
        margin-bottom: 30px; /* Reduced gap */
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .history-node {
        left: 20px; /* Align with line */
        top: 0;
        width: 14px;
        height: 14px;
        border-width: 3px;
    }

    /* Cards on Mobile */
    .history-content {
        box-sizing: border-box; 
        width: calc(100% - 45px); /* Adjusted for larger left margin */
        margin: 0 0 0 45px !important; /* 20px (line) + 25px (gap) */
        text-align: left !important;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
        transform: none !important;
    }
    
    /* Adjust Date on Mobile */
    .history-date {
        font-size: 12px;
        padding: 2px 8px;
    }
    
    .history-title-text {
        font-size: 17px;
        word-break: keep-all; 
    }
}
