.placeholderImage {
    height: 400px;
    margin: 80px;
}

.titleBar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.container {
    padding: 40px 80px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-around;
    gap: 40px;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

.back {
    cursor: pointer;
}

.leftPanel {
    width: 350px;
    border-radius: 20px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    background-color: var(--blockBackground);
    height: fit-content;
    display: flex;
    overflow: hidden;
    flex-shrink: 0;
}

.allSections {
    margin-left: -350px;
    transition: margin-left 1s;
    animation-name: start;
    animation-duration: 1.3s;
}

.allSections.show{
    margin-left: 0px;
    animation: unset;
}

.allSections, .sectionDetails {
    width: 350px;
    flex-shrink: 0;
}

.sectionDetails {
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.sectionDetails .buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.sectionDetails .progress {
    border-bottom: 1px solid var(--text);
    border-top: 1px solid var(--text);
    padding: 20px 20px;
    margin: 10px -20px;
}

.sectionDetails .button {
    font-size: 10px;
    height: 30px;
    line-height: 30px;
    margin: 10px 0;
    padding: 0 30px;
}

.section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.sectionsTitle {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px 20px;
}

.section {
    border-top: 1px solid var(--text);
}

.node {
    display: flex;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.node:hover, .node.highlight {
    color: var(--accent1);
}

.nodeIcon {
    height: 25px;
    width: 25px;
}

.nodeProgress {
    width: 30px;
}

.nodeTitle {
    text-align: left;
    width: calc(100% - 70px);
    font-size: 16px;
}

.allNodesTitle, .sectionTitle{
    font-size: 24px;
    margin: 10px 0;
}

.sectionPanel {
    max-width: 800px;
    width: 70%;
    min-width: 600px;
    border-radius: 20px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    background-color: var(--blockBackground);
    /*height: 800px;*/
    height: fit-content;
    flex-shrink: 0;
    /*margin: 60px;*/
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sectionPanel .topBar {
    height: 80px;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 2px solid var(--text);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
}

.allNodesPlates {
    width: 600px;
    height: calc(var(--diffY) * 1px);
    /*background-color: #00FF38;*/
    position: relative;
}

.nodePlate {
    height: 60px;
    width: 60px;
    background-color: var(--blockBackground);
    position: absolute;
    border-radius: 20px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    /*border: 1px solid var(--text);*/
    left: calc((var(--x) - 30) * 1px);
    top: calc((var(--y) - 30) * 1px);
    z-index: 10;
    cursor: pointer;
}

.nodePlateIcon{
    margin: 10px;
}

.nodePlate.locked {
    cursor: not-allowed;
}

.nodePlate.unlocked {
    background-color: var(--primaryButton);
}

.lockedTitle {
    color: var(--blocked);
}

.nodePlate.highlight, .nodePlate:hover{
    border: 2px solid var(--accent1);
    box-sizing: border-box;
}

.nodePlate.highlight .nodePlateIcon, .nodePlate:hover .nodePlateIcon{
    margin: 8px;
}


.nextLine {
    position: absolute;
    /*background-color: var(--text);*/
    border: 1px dashed var(--text);
    --diffX: calc(var(--startX) - var(--endX));
    --diffY: calc(var(--startY) - var(--endY));
    --absX: max(var(--diffX), -1*var(--diffX));
    --absY: max(var(--diffY), -1*var(--diffY));
    height: calc(sqrt(pow(var(--absX), 2) + pow(var(--absY), 2)) * 1px);
    width: 0px;
    left: calc(var(--startX) * 1px);
    top: calc(var(--startY) * 1px);
    transform-origin: 0% 0%;
    transform: rotate(atan(-1 * (var(--diffX) / var(--diffY))));
    z-index: 1;
}

.leftPanelOverlay {
    position: fixed;
    background-color: rgba(0,0,0,0.25);
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 12;

    display: none;
}

.leftPanelClosing{
    position: fixed;
    left: 50%;
    transform: translateX(50%);
    background: var(--blockBackground);
    z-index: 20;
    height: 80px;
    width: 80px;

    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.80);
    cursor: pointer;
    display: none;
}

/* Styl elementu */
.highlighted {
    box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
    animation: pulsacja 1s infinite; /* Wywołanie animacji */
}

/* Definicja animacji */
@keyframes pulsacja {
    0% {
        box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(255, 0, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
    }
}


@keyframes start {
    0% {margin-left: 0}
    30% {margin-left: 0}
    100% {margin-left: -350px}
}

@media (max-width: 1200px) {
/*@media (max-width: 400px) {*/

    .container {
        padding: 80px 2px !important;
    }
    .leftPanelOverlay {
        display: block;
    }

    .sectionPanel {
        width: 99%;
    }

    .leftPanel{
        position: absolute;
        z-index: 100;
        left: 20px;
        transition: transform 0.5s ease-in-out;
        width: 50%;
        min-width: 400px;
    }

    .allSections {
        width: 100%;
        margin-left: -100%;
        transition: margin-left 1s;
        animation-name: start;
        animation-duration: 1.3s;
    }

    .sectionDetails {
        width: 100%;
    }

    .allSections.show{
        margin-left: 0px;
        animation: unset;
    }

    .leftPanelClosing{
        transition: left 0.45s ease-in-out;
        display: flex;
    }

    .leftPanel.mobileHidden {
        transform: translateX(calc(-100% - 20px));
    }

    .leftPanelClosing.mobileHidden{
        opacity: 70%;
        left: 0;
        /*transform: translateX(50%);*/
    }

    .leftPanelClosing div{
        transition: transform 0.5s ease-in-out;
    }

    .leftPanelClosing.mobileHidden div{
        transform: rotate(180deg);
    }

    .sectionPanel .topBar {
        font-size: 28px;
        height: unset;
        padding: 30px;
    }

    .nodePlate {
        height: 100px;
        width: 100px;
        border-radius: 20px;
        left: calc((var(--x) - 133) * 1.5px);
        top: calc((var(--y) - 30) * 1.5px);
    }

    .nodePlateIcon{
        margin: 20px;
    }

    .nodePlate.highlight .nodePlateIcon, .nodePlate:hover .nodePlateIcon{
        margin: 18px;
    }

    .nextLine {
        --absX: max(var(--diffX), -1.5*var(--diffX));
        --absY: max(var(--diffY), -1.5*var(--diffY));
        left: calc(var(--startX) * 1.5px - 150px);
        top: calc(var(--startY) * 1.5px);
    }

    .allNodesPlates {
        height: calc(var(--diffY) * 2px);
        position: relative;
    }

    .sectionsTitle {
        font-size: 30px;
    }

    .allNodesTitle, .sectionTitle {
        font-size: 42px;
    }

    .sectionDesc {
        font-size: 24px;
    }

    .buttons a {
        font-size: 20px !important;
        padding: 10px 40px !important;
    }

    .node {
        height: unset;
        padding: 25px 0;
        gap: 20px;
    }

    .nodeIcon {
        height: 40px;
        width: 40px;
    }
    .nodeTitle, .section {
        font-size: 24px;
    }

    .nodeProgress {
        width: 40px;
    }

    .back.backButton, a .backButton {
        width: 0;
        height: 0;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-right: 20px solid var(--text);
        cursor: pointer;
    }
}
