/**
 * Timeline Shortcode Styles - Side-by-side version
 * Moderne og responsiv tidslinje med items på begge sider samtidigt
 * OPDATERET: Viser venstre og højre items ved siden af hinanden
 */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

.timeline-container {
    font-family: 'Korolev', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.timeline {
    position: relative;
    padding: 0;
}

/* Central line - nu i midten af hele containeren */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #8C7131 0%, #6b5425 100%);
    border-radius: 2px;
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Row - Holder et par af items */
.timeline-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-row.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline sider */
.timeline-side {
    flex: 1;
    max-width: calc(50% - 40px);
    padding: 0 20px;
}

.timeline-left {
    display: flex;
    justify-content: flex-end;
}

.timeline-right {
    display: flex;
    justify-content: flex-start;
}

/* Central kolonne med markører */
.timeline-center {
    width: 80px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    gap: 60px;
    position: relative;
    z-index: 2;
}

/* Timeline content kort */
.timeline-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Korolev', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
}

.timeline-content:hover,
.timeline-content.hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.timeline-content.expanded {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

/* Timeline Header */
.timeline-header {
    padding: 25px 30px 20px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, #8C7131 0%, #6b5425 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: fit-content;
}

.timeline-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Korolev', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-right: 40px;
}

/* Preview sektion */
.timeline-preview {
    padding: 0 30px 25px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease-out;
    overflow: hidden;
}

.timeline-content.expanded .timeline-preview {
    opacity: 0;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0;
    transition: all 0.3s ease-out;
}

.timeline-preview-text {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    max-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.timeline-preview-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(248, 250, 255, 0.9));
    pointer-events: none;
}

.timeline-content.expanded .timeline-preview-text::after {
    display: none;
}

/* Expand/Collapse Icon */
.timeline-expand-icon {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8C7131 0%, #6b5425 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-expand-icon:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(140, 113, 49, 0.3);
}

.timeline-expand-icon .expand-plus,
.timeline-expand-icon .expand-minus {
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.3s ease;
    position: absolute;
}

.timeline-expand-icon .expand-minus {
    opacity: 0;
    transform: rotate(90deg);
}

.timeline-expand-icon.expanded .expand-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.timeline-expand-icon.expanded .expand-minus {
    opacity: 1;
    transform: rotate(0deg);
}

/* Kollapsibel del */
.timeline-expandable {
    display: block;
    background: #ffffff;
}

.timeline-image {
    width: 100%;
    min-height: 180px;
    max-height: 400px;
    overflow: hidden;
    position: relative;
    background-color: #f8faff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.timeline-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.timeline-text {
    padding: 25px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.timeline-description {
    font-size: 14px;
    line-height: 1.7;
    color: #2b2b2b;
    margin: 0;
    font-weight: 400;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Timeline marker */
.timeline-marker {
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #8C7131;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.timeline-marker-inner {
    width: 8px;
    height: 8px;
    background: #8C7131;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

/* Forbindelseslinjer fra markør til kort */
.timeline-left .timeline-content::after {
    content: '';
    position: absolute;
    top: 45px;
    right: -20px;
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8C7131);
}

.timeline-right .timeline-content::before {
    content: '';
    position: absolute;
    top: 45px;
    left: -20px;
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, #8C7131, transparent);
}

/* Responsive design */
@media (max-width: 1024px) {
    .timeline-container {
        max-width: 100%;
    }
    
    .timeline-side {
        max-width: calc(50% - 30px);
        padding: 0 15px;
    }
    
    .timeline-center {
        width: 60px;
        min-width: 60px;
    }
    
    .timeline-content {
        max-width: 100%;
    }
    
    .timeline-title {
        font-size: 20px;
    }
}

/* Tablet og mobil - skift til enkelt kolonne */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-side {
        max-width: none;
        width: 100%;
        padding: 0;
        padding-left: 60px;
        justify-content: flex-start !important;
    }
    
    .timeline-side .timeline-content {
        max-width: none;
        margin-bottom: 20px;
    }
    
    .timeline-center {
        position: absolute;
        left: 20px;
        width: 20px;
        min-width: 20px;
        padding-top: 30px;
        gap: 0;
        height: 100%;
    }
    
    .timeline-marker {
        position: absolute;
        left: 0;
    }
    
    .timeline-marker:first-child {
        top: 30px;
    }
    
    .timeline-marker-second {
        top: auto !important;
        bottom: 50%;
    }
    
    .timeline-left .timeline-content::after,
    .timeline-right .timeline-content::before {
        display: none;
    }
    
    .timeline-title {
        font-size: 18px;
        padding-right: 35px;
    }
    
    .timeline-header {
        padding: 20px 25px 15px 25px;
    }
    
    .timeline-preview {
        padding: 0 25px 20px 25px;
    }
    
    .timeline-text {
        padding: 20px 25px;
    }
    
    .timeline-expand-icon {
        width: 28px;
        height: 28px;
        right: 20px;
    }
    
    .timeline-image {
        min-height: 150px;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 40px 15px;
    }
    
    .timeline-row {
        margin-bottom: 30px;
    }
    
    .timeline-side {
        padding-left: 50px;
    }
    
    .timeline::before {
        left: 25px;
    }
    
    .timeline-center {
        left: 15px;
    }
    
    .timeline-header {
        padding: 18px 20px 12px 20px;
    }
    
    .timeline-preview {
        padding: 0 20px 18px 20px;
    }
    
    .timeline-text {
        padding: 18px 20px;
    }
    
    .timeline-title {
        font-size: 16px;
        padding-right: 30px;
    }
    
    .timeline-description {
        font-size: 13px;
    }
    
    .timeline-expand-icon {
        width: 26px;
        height: 26px;
        right: 15px;
    }
    
    .timeline-image {
        min-height: 120px;
        max-height: 250px;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.timeline-content:focus {
    outline: 2px solid rgba(140, 113, 49, 0.5);
    outline-offset: 2px;
}

/* Subtle animation when expanding */
.timeline-content.expanded {
    animation: expandPulse 0.6s ease-out;
}

@keyframes expandPulse {
    0% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 25px 70px rgba(140, 113, 49, 0.2); }
    100% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15); }
}