/* Extra Small Devices (Smartphones Vertical - Menos de 576px) */

@media only screen and (max-width: 575.98px) {

    /* articolele se vad fără chenar și padding */
    section article {
        border-radius: 10px;
        padding: 50px 10px 50px 10px;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    /* stiluri pentru titlu */
    hgroup.chapter {
        display: flex;
        flex-direction: column-reverse;
        /* Inversează ordinea elementelor */
        align-items: left;
        margin: 0px 0px 50px 10px;
    }

    h1.main-title {
        font-size: 3rem;
        font-weight: bold;

        letter-spacing: 4px;
        text-transform: uppercase;
    }

    h2.chapter-title {
        font-size: 1.5rem;

        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    /*fin stiluri pentru titlu */



    /* nav bar style */
    .navbar-collapse {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        z-index: 1040;
        height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: all 0.2s ease-in-out;

        &.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(0);
        }
    }

    .navbar-nav {
        padding: 1rem 0;

        .nav-item {
            padding: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            &:last-child {
                border-bottom: none;
            }
        }
    }

    body.light-mode .navbar-collapse {
        background-color: rgba(86, 0, 39, 0.95);
    }

    body.dark-mode .navbar-collapse {
        background-color: rgba(31, 31, 31, 0.95);
    }

    .navbar-brand {
        max-width: 50%;
    }

    #theme-toggle-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
    }

    /*fin nav bar style */



    /* stiluri pentru paginație */
    .pagination {
        justify-content: center;
        gap: 2px;
    }

    .pagination.pagination-lg {
        font-size: 0.875rem;
    }

    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        min-width: 32px;
        text-align: center;
    }

    /* Ascunde toate paginile inițial */
    .pagination .page-item {
        display: none;
    }

    /* Pentru început (pagina 1-4) */
    .pagination .page-item:nth-child(-n+4),
    /* Primele 4 pagini */
    .pagination .page-item:nth-last-child(-n+2),
    /* Ultimele 2 pagini */

    /* Pentru sfârșit (pagina 8-12) */
    .pagination .page-item:first-child,
    /* Prima pagină */
    .pagination .page-item.active,
    /* Pagina activă */
    .pagination .page-item.active~.page-item:nth-child(-n+4),
    /* Până la 4 pagini după activă */
    .pagination .page-item:nth-last-child(-n+2)

    /* Ultimele 2 pagini */
        {
        display: block;
    }




    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        padding: 10px 30px;
        font-size: 1rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */
}

/* Small Devices (Smartphones Vertical - Mas de 576px y Menos de 768px) */
@media only screen and (min-width: 576px) and (max-width: 767.98px) {

    /* articolele se vad fără chenar și padding */
    section article {
        border-radius: 0;
        padding: 10px;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    /* stiluri pentru titlu */
    hgroup.chapter {
        display: flex;
        flex-direction: column-reverse;
        /* Inversează ordinea elementelor */
        align-items: left;
        margin: 0px 0px 50px 40px;
    }

    h1.main-title {
        font-size: 3rem;
        font-weight: bold;

        letter-spacing: 4px;
        text-transform: uppercase;
    }

    h2.chapter-title {
        font-size: 1.5rem;

        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }


    /* nav bar style */
    .navbar-collapse {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        z-index: 1040;
        height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: all 0.2s ease-in-out;

        &.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(0);
        }
    }

    .navbar-nav {
        padding: 1rem 0;

        .nav-item {
            padding: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            &:last-child {
                border-bottom: none;
            }
        }
    }

    body.light-mode .navbar-collapse {
        background-color: rgba(86, 0, 39, 0.95);
    }

    body.dark-mode .navbar-collapse {
        background-color: rgba(31, 31, 31, 0.95);
    }

    .navbar-brand {
        max-width: 50%;
    }

    #theme-toggle-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
    }

    /*fin nav bar style */



    /* stiluri pentru paginație */
    .pagination {
        justify-content: center;
        gap: 2px;
    }

    .pagination.pagination-lg {
        font-size: 0.875rem;
    }

    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        min-width: 32px;
        text-align: center;
    }

    /* Ascunde toate paginile inițial */
    .pagination .page-item {
        display: none;
    }

    /* Pentru început (pagina 1-4) */
    .pagination .page-item:nth-child(-n+4),
    /* Primele 4 pagini */
    .pagination .page-item:nth-last-child(-n+2),
    /* Ultimele 2 pagini */

    /* Pentru sfârșit (pagina 8-12) */
    .pagination .page-item:first-child,
    /* Prima pagină */
    .pagination .page-item.active,
    /* Pagina activă */
    .pagination .page-item.active~.page-item:nth-child(-n+4),
    /* Până la 4 pagini după activă */
    .pagination .page-item:nth-last-child(-n+2)

    /* Ultimele 2 pagini */
        {
        display: block;
    }





    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 1.2rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        padding: 10px 50px;
        font-size: 2rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */
}

/* Medium Devices (Tablets - Mas de 768px y Menos de 992px) */
@media only screen and (min-width: 768px) and (max-width: 991.98px) {

    /* articolele se vad fără chenar și padding */
    section article {
        border-radius: 0;
        padding: 10px;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    /* stiluri pentru titlu */
    hgroup.chapter {
        display: flex;
        flex-direction: column-reverse;
        /* Inversează ordinea elementelor */
        align-items: left;
        margin: 0px 0px 50px 10px;
    }

    h1.main-title {
        font-size: 3rem;
        font-weight: bold;

        letter-spacing: 4px;
        text-transform: uppercase;
    }

    h2.chapter-title {
        font-size: 1.5rem;

        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    /*fin stiluri pentru titlu */

    /* nav bar style */
    .navbar-collapse {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        z-index: 1040;
        height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: all 0.2s ease-in-out;

        &.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(0);
        }
    }

    .navbar-nav {
        padding: 1rem 0;

        .nav-item {
            padding: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            &:last-child {
                border-bottom: none;
            }
        }
    }

    body.light-mode .navbar-collapse {
        background-color: rgba(86, 0, 39, 0.95);
    }

    body.dark-mode .navbar-collapse {
        background-color: rgba(31, 31, 31, 0.95);
    }

    .navbar-brand {
        max-width: 50%;
    }

    #theme-toggle-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
    }

    /*fin nav bar style */


    /* stiluri pentru paginație */
    .pagination {
        justify-content: center;
        gap: 2px;
    }

    .pagination.pagination-lg {
        font-size: 0.875rem;
    }

    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        min-width: 32px;
        text-align: center;
    }

    /* Ascunde toate paginile inițial */
    .pagination .page-item {
        display: none;
    }

    /* Pentru început (pagina 1-4) */
    .pagination .page-item:nth-child(-n+4),
    /* Primele 4 pagini */
    .pagination .page-item:nth-last-child(-n+2),
    /* Ultimele 2 pagini */

    /* Pentru sfârșit (pagina 8-12) */
    .pagination .page-item:first-child,
    /* Prima pagină */
    .pagination .page-item.active,
    /* Pagina activă */
    .pagination .page-item.active~.page-item:nth-child(-n+4),
    /* Până la 4 pagini după activă */
    .pagination .page-item:nth-last-child(-n+2)

    /* Ultimele 2 pagini */
        {
        display: block;
    }


    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 2rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        padding: 10px 50px;
        font-size: 2rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */
}

/* Large Devices (Computadoras - Mas de 992px y Menos de 1200px) */
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
    /* CSS pentru dispozitive mari */

    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 2rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        padding: 10px 50px;
        font-size: 2rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */
}

/* Extra Large Devices (Computadoras - Mas de 1200px) */
@media only screen and (min-width: 1200px) {
    /* CSS pentru dispozitive extra mari */

    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 2rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        padding: 10px 50px;
        font-size: 2rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */
}

/* Extra Extra Large Devices (Televisiones - Mas de 1400px) */
@media only screen and (min-width: 1400px) {
    /* CSS pentru dispozitive foarte mari */


    /* stiluri animație foto și butoane */
    .hover-effect {
        display: inline-block;
        perspective: 1000px;
    }

    .hover-effect img {
        animation: floating 3s ease-in-out infinite;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform-origin: center;
        will-change: transform, box-shadow;
    }

    .hover-effect img:hover {
        transform: scale(1.05) rotateY(10deg) rotateX(5deg);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .hover-effect img:active {
        transform: scale(1.02) rotateY(0deg) rotateX(0deg);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .hover-effect figcaption {
        font-size: 0.85rem;
        transition: color 0.3s ease;
    }

    .hover-effect:hover figcaption {
        color: #007bff;
    }

    .buttons-overlap {
        top: -5%;
        z-index: 10;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 1.5rem;
        border-radius: 8px;
    }

    .btn {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-danger {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
        /* padding: 20px 25px; */
        padding: 10px 50px;
        font-size: 2.5rem;
    }

    .animated-modal {
        opacity: 0;
        transform: scale(0.5);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .animated-modal.show {
        opacity: 1;
        transform: scale(1);
    }

    @keyframes floating {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .position-relative {
        position: relative;
    }

    .position-absolute {
        z-index: 10;
    }

    /* fin stiluri animație foto și butoane */

}