/**
 * AG Timeline - Frontend Styles
 * Responsywna pionowa oś czasu
 */

/* Główny wrapper */
.ag-timeline-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Container timeline */
.ag-timeline {
    position: relative;
    padding: 20px 0;
}

/* Środkowa linia */
.ag-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #11c0e8, #0ea5cc);
    transform: translateX(-50%);
    z-index: 1;
}

/* Pojedynczy element timeline */
.ag-timeline-item {
    position: relative;
    width: 60%;
    padding: 20px 40px;
    box-sizing: border-box;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

/* Animacja fade in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementy po lewej stronie */
.ag-timeline-item-left {
    left: 0;
    padding-right: 60px;
    text-align: right;
}

/* Elementy po prawej stronie */
.ag-timeline-item-right {
    left: 50%;
    padding-left: 60px;
    text-align: left;
}

/* Marker (kropka) */
.ag-timeline-marker {
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    z-index: 10;
}

.ag-timeline-item-left .ag-timeline-marker {
    right: -10px;
}

.ag-timeline-item-right .ag-timeline-marker {
    left: -10px;
}

.ag-timeline-dot {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #11c0e8;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(17, 192, 232, 0.2);
    transition: all 0.3s ease;
}

.ag-timeline-item:hover .ag-timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(17, 192, 232, 0.3);
}

/* Karta z treścią */
.ag-timeline-card {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #11c0e8;
    transition: all 0.3s ease;
    position: relative;
}

.ag-timeline-item-right .ag-timeline-card {
    border-left: none;
    border-right: 4px solid #11c0e8;
}

.ag-timeline-card:hover {
    box-shadow: 0 5px 25px rgba(17, 192, 232, 0.3);
    transform: translateY(-3px);
}

/* Trójkącik wskazujący na linię */
.ag-timeline-card::before {
    content: '';
    position: absolute;
    top: 25px;
    width: 0;
    height: 0;
    border-style: solid;
}

.ag-timeline-item-left .ag-timeline-card::before {
    right: -15px;
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent #ffffff;
}

.ag-timeline-item-right .ag-timeline-card::before {
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-color: transparent #ffffff transparent transparent;
}

/* Tytuł */
.ag-timeline-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Opis */
.ag-timeline-description {
    color: #666;
    font-size: 1em;
    line-height: 1.7;
}

.ag-timeline-description p {
    margin: 0 0 10px 0;
}

.ag-timeline-description p:last-child {
    margin-bottom: 0;
}

/* Komunikat gdy brak pozycji */
.ag-timeline-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* RESPONSYWNOŚĆ */

/* Tablet (do 992px) */
@media (max-width: 992px) {
    .ag-timeline::before {
        left: 30px;
    }
    
    .ag-timeline-item,
    .ag-timeline-item-left,
    .ag-timeline-item-right {
        width: 100%;
        left: 0;
        padding-left: 80px;
        padding-right: 20px;
        text-align: left;
    }
    
    .ag-timeline-marker,
    .ag-timeline-item-left .ag-timeline-marker,
    .ag-timeline-item-right .ag-timeline-marker {
        left: 20px;
        right: auto;
    }
    
    .ag-timeline-card,
    .ag-timeline-item-right .ag-timeline-card {
        border-left: 4px solid #11c0e8;
        border-right: none;
    }
    
    .ag-timeline-card::before,
    .ag-timeline-item-left .ag-timeline-card::before,
    .ag-timeline-item-right .ag-timeline-card::before {
        left: -15px;
        right: auto;
        border-width: 10px 15px 10px 0;
        border-color: transparent #ffffff transparent transparent;
    }
}

/* Mobile (do 576px) */
@media (max-width: 576px) {
    .ag-timeline-wrapper {
        padding: 20px 10px;
    }
    
    .ag-timeline::before {
        left: 20px;
    }
    
    .ag-timeline-item,
    .ag-timeline-item-left,
    .ag-timeline-item-right {
        padding-left: 60px;
        padding-right: 10px;
        margin-bottom: 30px;
    }
    
    .ag-timeline-marker,
    .ag-timeline-item-left .ag-timeline-marker,
    .ag-timeline-item-right .ag-timeline-marker {
        left: 10px;
    }
    
    .ag-timeline-card {
        padding: 20px;
    }
    
    .ag-timeline-title {
        font-size: 1.1em;
    }
    
    .ag-timeline-description {
        font-size: 0.95em;
    }
}

/* Extra small (do 380px) */
@media (max-width: 380px) {
    .ag-timeline-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
    
    .ag-timeline-item,
    .ag-timeline-item-left,
    .ag-timeline-item-right {
        padding-left: 50px;
    }
}
