/* HHYC Timeline Styles */

.hhyc-timeline-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: visible;
    padding-bottom: 40px;
    box-sizing: border-box;
}

.hhyc-timeline-heading {
    width: 100%;
    text-align: center;
    padding: 0 40px 40px;
}

.hhyc-timeline-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}

.hhyc-timeline-subtitle {
    margin: 0;
    font-size: clamp(16px, 2.6vw, 20px);
    color: #555;
    line-height: 1.6;
}

.hhyc-timeline-container {
    width: 100%;
    min-height: inherit;
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    scroll-behavior: smooth;
}

.hhyc-timeline-track {
    position: relative;
    min-height: inherit;
    min-width: 100%;
    padding: 110px 100px 140px;
    display: inline-block;
    box-sizing: border-box;
}

.hhyc-timeline-line {
    position: absolute;
    top: 50%;
    left: 100px;
    right: 100px;
    height: 3px;
    background-color: #333;
    transform: translateY(-50%);
    z-index: 1;
}

.hhyc-timeline-items {
    position: relative;
    min-height: inherit;
    display: flex;
    align-items: center;
    z-index: 2;
    padding: 0;
}

/* Timeline Item Styles */
.hhyc-timeline-item {
    position: relative;
    min-width: 400px;
    min-height: inherit;
    padding: 0 30px;
    display: flex;
    align-items: center;
}

.hhyc-timeline-item-wrapper {
    position: relative;
    margin-top:25px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Top positioned items */
.hhyc-timeline-item-top .hhyc-timeline-item-content {
    position: absolute;
    bottom: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    max-width: 90%;
}

/* Bottom positioned items */
.hhyc-timeline-item-bottom .hhyc-timeline-item-content {
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    max-width: 90%;
    margin-top:15px;
}

/* Timeline Item Content */
.hhyc-timeline-item-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hhyc-timeline-item-content:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.hhyc-timeline-item-bottom .hhyc-timeline-item-content:hover {
    transform: translateX(-50%) translateY(5px);
}

.hhyc-timeline-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
}

.hhyc-timeline-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hhyc-timeline-item-content:hover .hhyc-timeline-item-image img {
    transform: scale(1.05);
}

.hhyc-timeline-item-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.hhyc-timeline-item-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Timeline Dot */
.hhyc-timeline-dot {
    position: absolute;
    top: calc(50% + 4px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: #D4AF37;
    border: 4px solid #fff;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hhyc-timeline-item:hover .hhyc-timeline-dot {
    transform: translate(-50%, -50%) scale(1.2);
}

.hhyc-timeline-dot.has-image {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.hhyc-timeline-dot.has-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

/* Lightbox */
body.hhyc-timeline-lightbox-open {
    overflow: hidden;
}

.hhyc-timeline-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 15, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9999;
    padding: 20px;
}

.hhyc-timeline-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hhyc-timeline-lightbox-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhyc-timeline-lightbox-dialog img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hhyc-timeline-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hhyc-timeline-lightbox-close:hover,
.hhyc-timeline-lightbox-close:focus {
    outline: none;
    transform: scale(1.05);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

/* Timeline Date */
.hhyc-timeline-date {
    font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #1f1f1f;
    white-space: nowrap;
    padding: 6px 16px;
}

.hhyc-timeline-item-top .hhyc-timeline-date {
    top: calc(50% + 30px);
    transform: translate(-50%, 0);
}

.hhyc-timeline-item-bottom .hhyc-timeline-date {
    top: calc(50% - 30px);
    transform: translate(-50%, -100%);
}

/* Navigation Arrows */
.hhyc-timeline-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
    border: 2px solid #ffffff;
}

.hhyc-timeline-nav-arrow:hover {
    background: #D4AF37;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(-50%) scale(1.1);
}

.hhyc-timeline-nav-prev {
    left: 20px;
}

.hhyc-timeline-nav-next {
    right: 20px;
}

.hhyc-timeline-nav-arrow span {
    font-size: 30px;
    color: #ffffff;
    line-height: 1;
}

/* Scrollbar Styling */
.hhyc-timeline-container::-webkit-scrollbar {
    height: 8px;
}

.hhyc-timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hhyc-timeline-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.hhyc-timeline-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hhyc-timeline-item {
        min-width: 300px;
        padding: 0 20px;
    }
    
    .hhyc-timeline-item-content {
        width: 280px;
    }
    
    .hhyc-timeline-item-image {
        height: 150px;
    }
    
    .hhyc-timeline-item-title {
        font-size: 18px;
    }
    
    .hhyc-timeline-item-description {
        font-size: 13px;
    }
    
    .hhyc-timeline-track {
        padding: 50px 50px;
    }
    
    .hhyc-timeline-line {
        left: 50px;
        right: 50px;
    }

    .hhyc-timeline-item-top .hhyc-timeline-date {
        top: calc(50% + 48px);
    }

    .hhyc-timeline-item-bottom .hhyc-timeline-date {
        top: calc(50% - 48px);
    }
}

@media (max-width: 480px) {
    .hhyc-timeline-item {
        min-width: 250px;
        padding: 0 15px;
    }
    
    .hhyc-timeline-item-content {
        width: 220px;
        padding: 15px;
    }
    
    .hhyc-timeline-nav-arrow {
        width: 56px;
        height: 56px;
    }
    
    .hhyc-timeline-nav-arrow span {
        font-size: 26px;
    }
}

/* Animation Classes */
.hhyc-timeline-item {
    opacity: 0;
    animation: fadeInTimeline 0.6s forwards;
}

.hhyc-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.hhyc-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.hhyc-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.hhyc-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.hhyc-timeline-item:nth-child(5) { animation-delay: 0.5s; }
.hhyc-timeline-item:nth-child(6) { animation-delay: 0.6s; }
.hhyc-timeline-item:nth-child(7) { animation-delay: 0.7s; }
.hhyc-timeline-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInTimeline {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
