.cotor_carte {
    background-color: rgba(41, 40, 40, 0.366);
    box-shadow: 1px 1px 5px 1px rgba(109, 107, 106, 0.181);
    transform-style: preserve-3d;
    height: auto;
}

.fotografii {
    width: 100%;
    height: auto;
    padding: 1em;
    margin: 1em auto;
}

.fotografii img {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60%;
    flex-wrap: wrap;
    height: auto;
    border-radius: 20px;
    margin: 1em auto;
}

.fotografii p {
    text-align: justify;
}

.book {
    position: relative;
    width: min(900px, 92vw);
    aspect-ratio: 3 / 2;
    height: auto;
    margin: 2em auto;
    perspective: 1200px;
    overflow: hidden;
}

.pagini {
    margin: 1em auto;
    position: absolute;
    inset: 0;
    height: 95%;
    background: beige;
    border-radius: 20px;
    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform .8s cubic-bezier(.25, .8, .25, 1);
    overflow: hidden;
    box-shadow: inset 1px 1px 5px 3px rgba(41, 40, 40, 0.486);

}

.pagini>.pagina:first-of-type {
    position: absolute;
    top: 3em;
    text-align: justify;
    left: 0;
    width: calc(50% - 4px);
    height: 100%;
    overflow: auto;
    padding: 1em;
}

.cotor_carte {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
}

.pagini>.fotografii.pagina {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(50% - 4px);
    height: 100%;
    overflow: auto;
    padding: 1em;
}

.pagini.citite {
    transform: rotateY(-180deg);
}

.pagini::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    transition: opacity .8s ease;
    mix-blend-mode: multiply;
}

.pagini.citite::after {
    opacity: .65;
}

.svg {
    width: 5%;
    margin: 0;
    padding: 0;
    height: auto;
}

.plansa {
    position: relative;
    background: rgba(139, 69, 19, 0.373);
    width: 83%;
    margin: 1em auto;
    box-shadow: 1px 1px 5px 3px rgba(41, 40, 40, 0.486);

}

.vargat {
    background-color: rgba(41, 40, 40, 0.452);
    width: 100%;
    height: 0.1%;
    position: absolute;
    display: block;
    top: 1em;
    box-shadow: 1px 1px 1px 1px rgba(41, 40, 40, 0.116);
    transform: scaleY(1.5);
}

.btn_rasfoire {
    font-size: 2em;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    position: absolute;
    justify-self: center;
    gap: 20em;
    top: 16.5em;
}

#prev,
#next {
    color: rgba(41, 40, 40, 0.366);
    border: none;
    background: none;
    padding: 1px 5px;
}

#prev:hover,
#next:hover {
    background: rgba(41, 40, 40, 0.122);
}

/* ====== PC mare ====== */
@media (min-width: 1400px) {
    .plansa {
        width: 72%;
    }

    .book {
        width: min(800px, 70vw);
    }

    .btn_rasfoire {
        font-size: 1.8em;
        gap: 14em;
        top: 14em;
    }

    .fotografii img {
        width: 55%;
    }

    .svg {
        width: 4%;
    }
}

/* ====== ≤ 1200px ====== */
@media (max-width: 1200px) {
    .plansa {
        width: 82%;
    }

    .book {
        width: min(760px, 86vw);
    }

    .btn_rasfoire {
        font-size: 1.7em;
        gap: 12em;
        top: 13.5em;
    }

    .fotografii img {
        width: 58%;
    }

    .svg {
        width: 5%;
    }
}

/* ====== ≤ 992px  ====== */
@media (max-width: 992px) {
    .plansa {
        width: 90%;
    }

    .book {
        width: min(680px, 90vw);
    }

    .btn_rasfoire {
        font-size: 1.6em;
        gap: 10em;
        top: 12.5em;
    }

    .pagini>.pagina:first-of-type,
    .pagini>.fotografii.pagina {
        padding: 0.9em;
    }

    .fotografii img {
        width: 60%;
    }

    .svg {
        width: 6%;
    }
}

/* ====== ≤ 768px ====== */
@media (max-width: 768px) {
    .plansa {
        width: 94%;
    }

    .book {
        width: min(600px, 94vw);
    }

    .btn_rasfoire {
        font-size: 1.5em;
        gap: 8em;
        top: 11.5em;
    }

    .pagini>.pagina:first-of-type,
    .pagini>.fotografii.pagina {
        padding: 0.8em;
    }

    .fotografii {
        padding: 0.75em;
        margin: 0.75em auto;
    }

    .fotografii img {
        width: 62%;
        border-radius: 18px;
    }

    .svg {
        width: 7%;
    }
}

/* ====== ≤ 600px ====== */
@media (max-width: 600px) {
    .plansa {
        width: 96%;
    }

    .book {
        width: min(520px, 96vw);
    }

    .btn_rasfoire {
        font-size: 1.4em;
        gap: 6em;
        top: 10.5em;
    }

    .pagini {
        border-radius: 16px;
    }

    .fotografii img {
        width: 64%;
        border-radius: 16px;
    }

    .svg {
        width: 8%;
    }
}

/* ====== ≤ 480px ====== */
@media (max-width: 480px) {
    .plansa {
        width: 98%;
    }

    .book {
        width: min(460px, 98vw);
    }

    .btn_rasfoire {
        font-size: 1.3em;
        gap: 4.5em;
        top: 9.8em;
    }

    #prev,
    #next {
        padding: 4px 8px;
    }

    .fotografii img {
        width: 66%;
    }
}

/* ====== ≤ 380px ====== */
@media (max-width: 380px) {
    .book {
        width: min(420px, 98vw);
    }

    .btn_rasfoire {
        font-size: 1.2em;
        gap: 3.5em;
        top: 9.2em;
    }

    .svg {
        width: 9%;
    }
}

.plansa {
    background: rgba(139, 69, 19, 0.373);
    background-image:
        repeating-linear-gradient(to bottom,
            rgba(41, 40, 40, 0.14) 0 3px,
            transparent 10px 32px);
    background-clip: padding-box;
    position: relative;
    z-index: 0;
}

@media (max-width: 768px) {
    .plansa {
        background-image:
            repeating-linear-gradient(to bottom,
                rgba(41, 40, 40, 0.10) 0 1px,
                transparent 5px 40px);
    }
}

@media (max-width: 480px) {
    .plansa {
        background-image: none;
    }
}