/* Frontend Styles for Vertical Timeline Plugin */

/* ===========================================
   DIVI THEME COMPATIBILITY OVERRIDES
   =========================================== */

/* Force text color and font styles to override Divi */
.vt-timeline-wrapper,
.vt-timeline-wrapper * {
    box-sizing: border-box !important;
}

.vt-timeline-wrapper .vt-timeline-card,
.vt-timeline-wrapper .vt-timeline-description,
.vt-timeline-wrapper .vt-timeline-description p {
    color: #1a1a1a !important;
    font-family: inherit;
    font-size: 15px !important;
    line-height: 1.7 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

.vt-timeline-wrapper .vt-timeline-title {
    color: #1a1a1a !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

/* ===========================================
   BASE STYLES
   =========================================== */

.vt-timeline-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.vt-timeline-main-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.vt-timeline-main-description {
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.vt-timeline {
    position: relative;
    padding: 40px 0;
}

/* Vertical Line */
.vt-timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #e0e0e0;
    top: 0;
}

/* Timeline Item */
.vt-timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    align-items: flex-start;
    min-height: 100px;
    padding-top: 45px;
}

/* Timeline Dot */
.vt-timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #3498db;
    border: 4px solid #fff;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    top: 55px;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    z-index: 2;
}

/* Timeline Date Container - Above everything */
.vt-timeline-date-container {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    text-align: center;
    z-index: 3;
    white-space: normal;
    word-wrap: break-word;
}

.vt-timeline-date {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: normal;
    line-height: 1.3;
    max-width: 200px;
}

/* Left and Right Content Containers */
.vt-timeline-left-content {
    width: 45%;
    padding-right: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 20px;
    box-sizing: border-box !important;
}

.vt-timeline-right-content {
    width: 45%;
    padding-left: 30px;
    margin-left: 10%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    box-sizing: border-box !important;
}

/* Ensure image wrapper and card align at the same vertical level */
.vt-timeline-left-content .vt-timeline-image-wrapper,
.vt-timeline-right-content .vt-timeline-card,
.vt-timeline-left-content .vt-timeline-card,
.vt-timeline-right-content .vt-timeline-image-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Timeline Card (for text content) */
.vt-timeline-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: 100%;
    max-width: 400px;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease-in-out;
    box-sizing: border-box !important;
    position: relative;
}

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

.vt-timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

/* Timeline Image Wrapper */
.vt-timeline-image-wrapper {
    width: 100%;
    max-width: 350px;
    box-sizing: border-box !important;
}

/* Timeline Image */
.vt-timeline-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease-in-out;
    line-height: 0; /* Remove gap below image */
}

.vt-timeline-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.vt-timeline-image:hover img {
    transform: scale(1.05);
}

/* Image Credit Line */
.vt-timeline-image-credit {
    margin-top: 8px;
    font-size: 12px;
    font-style: italic;
    color: #999 !important;
    text-align: center;
    line-height: 1.4;
}

/* Timeline Title */
.vt-timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

/* Timeline Description */
.vt-timeline-description {
    font-size: 15px;
    line-height: 1.7;
    color: #1a1a1a;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vt-timeline-description p {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
}

.vt-timeline-description p:last-child {
    margin-bottom: 0 !important;
}

/* Arrow indicators for cards */
.vt-timeline-left-content .vt-timeline-card::after {
    content: '';
    position: absolute;
    top: 25px;
    right: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #fff;
}

.vt-timeline-right-content .vt-timeline-card::after {
    content: '';
    position: absolute;
    top: 25px;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #fff transparent transparent;
}

/* Timeline List (for multiple timelines) */
.vt-timelines-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.vt-timelines-list h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.vt-timelines-list ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vt-timelines-list li {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 10px 20px;
}

.vt-timelines-list a {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    transition: color 0.3s ease;
}

.vt-timelines-list a:hover {
    color: #2980b9;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .vt-timeline-line {
        left: 20px;
    }
    
    .vt-timeline-item {
        flex-direction: column;
        margin-bottom: 40px;
        padding-top: 40px;
    }
    
    .vt-timeline-dot {
        left: 20px;
        transform: translateX(-50%);
        top: 45px;
    }
    
    .vt-timeline-date-container {
        text-align: left;
        padding-left: 50px;
        padding-right: 20px;
    }
    
    .vt-timeline-date {
        display: inline-block;
        max-width: 150px;
        text-align: center;
    }
    
    .vt-timeline-left-content,
    .vt-timeline-right-content {
        width: 100% !important;
        padding-left: 50px !important;
        padding-right: 20px !important;
        margin-left: 0 !important;
        margin-bottom: 15px;
        padding-top: 10px !important;
    }
    
    .vt-timeline-image-wrapper,
    .vt-timeline-card {
        max-width: 100% !important;
    }
    
    /* Remove arrows on mobile */
    .vt-timeline-left-content .vt-timeline-card::after,
    .vt-timeline-right-content .vt-timeline-card::after {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .vt-timeline-wrapper {
        padding: 10px;
    }
    
    .vt-timeline-left-content,
    .vt-timeline-right-content {
        padding-left: 40px;
        padding-right: 10px;
    }
    
    .vt-timeline-card {
        padding: 15px;
    }
    
    .vt-timeline-title {
        font-size: 18px;
    }
    
    .vt-timeline-description {
        font-size: 14px;
    }
    
    .vt-timeline-date {
        font-size: 12px;
        padding: 4px 15px;
    }
    
    .vt-timeline-image-credit {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .vt-timeline-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .vt-timeline-image {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .vt-timeline-line {
        background: #ccc;
    }
    
    .vt-timeline-date {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    /* Remove arrows in print */
    .vt-timeline-left-content .vt-timeline-card::after,
    .vt-timeline-right-content .vt-timeline-card::after {
        display: none;
    }
}