/**
 * Bedrijfs Tijdlijn Frontend Styles
 * Version: 1.0.0
 */

/* Container */
.btl-timeline-container {
    position: relative;
}

/* Timeline wrapper */
.btl-timeline {
    position: relative;
    padding: 40px 0;
    font-size: 0; /* Verwijder whitespace tussen inline-block items */
}

/* Vertical line in the middle */
.btl-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #3b82f6;
    transform: translateX(-50%);
    z-index: 0;
}

/* Start bolletje bovenaan de lijn */
.btl-timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border: 4px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 0 4px #3b82f6;
}

/* Eind bolletje onderaan de lijn */
.btl-timeline-end {
    position: relative;
    height: 0;
    clear: both;
    width: 100%;
    margin: 0;
    padding: 0;
}

.btl-timeline-end::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border: 4px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 0 4px #3b82f6;
}

/* Timeline item */
.btl-timeline-item {
    position: relative;
    width: calc(50% - 40px);
    margin-bottom: 20px;
    display: inline-block;
    vertical-align: top;
    font-size: 16px; /* Reset font-size na parent's font-size: 0 */
}

.btl-timeline-item:nth-child(odd) {
    margin-right: 40px;
}

.btl-timeline-item:nth-child(even) {
    margin-left: 40px;
    margin-top: 120px;
}

/* Bullet point on the line */
.btl-timeline-item::before {
    display: none;
}

/* Left positioned items */
.btl-timeline-item.btl-left {
    justify-content: flex-start;
}

.btl-timeline-item.btl-left .btl-card {
    margin: 0;
    max-width: 100%;
}

/* Right positioned items */
.btl-timeline-item.btl-right {
    justify-content: flex-end;
}

.btl-timeline-item.btl-right .btl-card {
    margin: 0;
    max-width: 100%;
}

/* Card styling */
.btl-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Square style for card */
.btl-card.btl-square {
    border-radius: 0;
}

/* Card with border */
.btl-card.btl-with-border {
    border: 1px solid #e2e8f0;
}

.btl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Card image */
.btl-card-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.btl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card content */
.btl-card-content {
    padding: 24px;
}

/* Card content - extra padding when no image (for year badge) */
.btl-card:not(:has(.btl-card-image)) .btl-card-content {
    padding-top: 60px;
}

/* Year - positioned top right over image */
.btl-year {
    position: absolute;
    top: 16px;
    right: 0;
    background-color: #3b82f6;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
    z-index: 5;
}

/* Driehoek voor linker kaart (wijst naar rechts) */
/*
.btl-timeline-item:nth-child(odd) .btl-year::after {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 16px solid #3b82f6;
    border-right: none;
}
*/
/* Year badge links uitlijnen voor rechter kolom */
.btl-timeline-item:nth-child(even) .btl-year {
    right: auto;
    left: 0;
    border-radius: 0 8px 8px 0;
}

/* Driehoek voor rechter kaart (wijst naar links) */
/*
.btl-timeline-item:nth-child(even) .btl-year::after {
    content: "";
    position: absolute;
    right: -16px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: none;
    border-right: 16px solid #3b82f6;
}
    */

/* Square style for year badge */
.btl-card.btl-square .btl-year {
    border-radius: 0;
}

/* Title */
.btl-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e293b;
    line-height: 1.3;
}

/* Description */
.btl-description {
    font-size: 16px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

/* Responsive design */
@media screen and (max-width: 768px) {    .btl-timeline-item {
        display: block;
        width: 100%;
        margin: 0 0 30px 0 !important;
    }
    
    .btl-timeline-item:nth-child(even) {
        margin-top: 0 !important;
    }
    
    .btl-card-image {
        height: 180px;
    }
    
    .btl-title {
        font-size: 20px;
    }
    
    .btl-year {
        font-size: 16px;
        padding: 6px 12px;
        top: 12px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .btl-description {
        font-size: 14px;
    }
    
    .btl-card-content {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .btl-timeline-container {
        padding: 10px;
    }
    
    .btl-timeline {
        padding: 20px 0;
    }
    
    .btl-timeline-item {
        margin-bottom: 20px !important;
    }
    
    .btl-card-image {
        height: 150px;
    }
    
    .btl-title {
        font-size: 18px;
    }
    
    .btl-year {
        font-size: 14px;
        padding: 5px 10px;
        top: 10px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .btl-description {
        font-size: 14px;
    }
    
    .btl-card-content {
        padding: 16px;
    }
}

/* Animation for items when they come into view */
@media (prefers-reduced-motion: no-preference) {
    .btl-timeline-item {
        opacity: 0;
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .btl-timeline-item:nth-child(1) { animation-delay: 0.1s; }
    .btl-timeline-item:nth-child(2) { animation-delay: 0.2s; }
    .btl-timeline-item:nth-child(3) { animation-delay: 0.3s; }
    .btl-timeline-item:nth-child(4) { animation-delay: 0.4s; }
    .btl-timeline-item:nth-child(5) { animation-delay: 0.5s; }
    .btl-timeline-item:nth-child(n+6) { animation-delay: 0.6s; }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Print styles */
@media print {
    .btl-timeline-item {
        page-break-inside: avoid;
        animation: none !important;
        opacity: 1 !important;
        display: block !important;
        width: 100% !important;
        margin: 0 0 20px 0 !important;
    }
    
    .btl-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .btl-card:hover {
        transform: none;
    }
}