/* Styl ogólny */
body {
    margin: 0;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f8fc;
    color: #2d2a32;
    overflow-x: hidden;
}

.atm-history {
    width: 100%;
    overflow: hidden;
}

/* Sekcja nagłówka z wideo */
.atm-history-header {
    position: relative;
    height: 70vh; /* zmniejszona wysokość */
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

/* Wideo w tle */
.atm-header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.65);
}

/* Gradientowy overlay */
.atm-history-header-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(124, 77, 255, 0.8) 40%, rgba(124, 77, 255, 0.2) 70%, rgba(255,255,255,0) 100%);
    z-index: 1;
}

/* Treść po lewej stronie */
.atm-history-header-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-left: 8%;
}

.atm-history-header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.atm-history-header-content p {
    font-size: 1.2rem;
    color: #f3f0ff;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}



/* Bloki historii */
.atm-history-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 10%;
    gap: 60px;
    opacity: 0;
    transform: translateY(80px);
    transition: all 0.8s ease-out;
}

.atm-history-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.atm-history-block.reverse {
    flex-direction: row-reverse;
}

.atm-history-text {
    flex: 1;
    font-size: 1.1rem;
}

.atm-history-text h2 {
    color: #7c4dff;
    margin-bottom: 15px;
    font-size: 2rem;
}

.atm-history-img {
    flex: 1;
    position: relative;
}

.atm-history-img img {
    width: 100%;
    border-radius: 40px;
    clip-path: polygon(5% 0, 100% 0%, 95% 100%, 0% 100%);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.atm-history-img img:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
}

/* Oś czasu */
.atm-timeline-section {
    text-align: center;
    background: #f2eefc;
    padding: 120px 20px;
}

.atm-timeline-section h2 {
    color: #6a1b9a;
    margin-bottom: 80px;
    font-size: 2.5rem;
}

.atm-timeline {
    position: relative;
    width: 80%;
    margin: auto;
    border-left: 3px solid #b388ff;
}

.atm-timeline-item {
    position: relative;
    margin: 40px 0;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.atm-timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.atm-timeline-content {
    background: #fff;
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    left: 30px;
}

.atm-timeline-content h3 {
    margin-top: 0;
    color: #7e57c2;
}

.atm-timeline::before {
    content: "";
    position: absolute;
    left: -9px;
    width: 18px;
    height: 18px;
    background: #7e57c2;
    border-radius: 50%;
    top: 0;
}

@media (max-width: 1199px) {
    .atm-history-header-content h1 {
        font-size: 3rem;
    }

    .atm-history-block {
        padding: 80px 8%;
        gap: 40px;
    }

    .atm-history-text h2 {
        font-size: 1.8rem;
    }
}

/* --- TABLETY (poniżej 992px) --- */
@media (max-width: 991px) {
    .atm-history-header {
        height: 60vh;
    }

    .atm-history-header-content {
        margin-left: 6%;
        max-width: 500px;
    }

    .atm-history-header-content h1 {
        font-size: 2.6rem;
    }

    .atm-history-header-content p {
        font-size: 1.05rem;
    }

    /* Bloki historii w kolumnach */
    .atm-history-block {
        flex-direction: column;
        padding: 70px 6%;
        gap: 30px;
        text-align: center;
    }

    .atm-history-block.reverse {
        flex-direction: column;
    }

    .atm-history-text, .atm-history-img {
        flex: unset;
        width: 100%;
    }

    .atm-history-img img {
        clip-path: none;
        border-radius: 25px;
    }
    
}
@media (max-width: 991px) {
    /* Ustawienie kolumnowo jak wcześniej */
    .atm-history-block {
        flex-direction: column;
    }

    /* Dla .reverse – najpierw tekst, potem obraz */
    .atm-history-block.reverse {
        flex-direction: column-reverse;
    }
}


/* --- TELEFONY (poniżej 768px) --- */
@media (max-width: 767px) {
    body {
        font-size: 0.95rem;
    }

    .atm-history-header {
        height: 50vh;
    }

    .atm-history-header-content {
        margin-left: 5%;
        max-width: 90%;
        text-align: center;
    }

    .atm-history-header-content h1 {
        font-size: 2rem;
    }

    .atm-history-header-content p {
        font-size: 1rem;
    }

    .atm-history-block {
        padding: 50px 5%;
    }

    .atm-history-text h2 {
        font-size: 1.5rem;
    }

    .atm-timeline-section {
        padding: 80px 10px;
    }

    .atm-timeline-section h2 {
        font-size: 2rem;
        margin-bottom: 50px;
    }

    .atm-timeline {
        width: 90%;
        border-left: 2px solid #b388ff;
    }

    .atm-timeline-content {
        left: 20px;
        padding: 15px 20px;
    }
}

/* --- BARDZO MAŁE TELEFONY (poniżej 480px) --- */
@media (max-width: 480px) {
    .atm-history-header-content h1 {
        font-size: 1.8rem;
    }

    .atm-history-header-content p {
        font-size: 0.95rem;
    }

    .atm-history-img img {
        border-radius: 20px;
    }

    .atm-timeline-content h3 {
        font-size: 1.1rem;
    }
}
