body, html {
    height: 100%;
    margin: 0;

    overflow-x: hidden; /* This ensures that horizontal scrolling doesn't occur */
    overflow-y: auto;   /* This ensures that vertical scrolling only occurs when necessary */
}

.home {
    background-image: url(/img/back.jpg);
}

.bg.resurse,
.bg.book-details,
.bg.cms,
.bg.checkout,
.bg.success,
.bg.cancel,
.bg.order-status,
.bg.download {
    background-image: url(/img/waves.png);
}


.bg {
    height: 100%;
    background-position: right;
    background-repeat: no-repeat;
    background-size: cover;
    /* position: relative; */
    background-attachment: fixed;
    top: 0;
    overflow-x: hidden;
}

.main-content {
    flex-grow: 1;
    padding-bottom: 50px;
    height: fit-content;
    min-height: calc(100% - 301px);
}

.book-details .main-content {
    margin-top: 7vmin;
}

.bg:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
}

.title {
    color: #044e76;
    font-size: calc(max(16px,min(4vh, 7vw)));
}

header.mainpage {
    padding-top: 50px;
}

header.mainpage nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: saturate(180%) blur(20px);
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

header.mainpage nav .container {
    display: flex;
    flex-direction: row;
    position: relative;
}

nav  a.logo img {
    height: 50px;
}

/* This CSS hides the mobile logo on larger screens */
.logo-mobile {
    display: none;
}

/* This CSS hides the desktop logo and shows the mobile logo on smaller screens */
@media screen and (max-width: 768px) {
    .logo-desktop {
        display: none;
    }
    .logo-mobile {
        display: inline;
    }
    .with-cart.book-details .main-content {
        margin-top: 20vmin;
    }

    .with-cart .container.article {
        margin-top: 10vmin;
    }

    .bg.with-cart .container.body-section {
        margin-top: 90px;
    }
}

.bg .container.body-section {
    margin-top: 40px;
}


.bg.resurse .container.body-section,
.bg.home .container.body-section,
.bg.despreafazie .container.body-section,
.bg.order-status .container.body-section,
.bg.download .container.body-section,
.bg.success .container.body-section {
    min-height: calc(100% - 160px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header.mainpage nav .container ul {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0 0 0 10px; /* Add padding to move it away from the logo */
    overflow: hidden;
}

header.mainpage nav .container ul li {
    list-style: none;
}

header.mainpage nav .container ul li a {
    color: #5f5f5f;
    text-decoration: none;
}


.header {
    width: 100%;
    position: relative;
    top: 5vmin;
    padding-bottom: 4vh;
    display: flex;
}



/* Style the list items to float left */
nav ul li {
    float: left;
}

/* Add additional styling for the links */
nav ul li a {
    display: block;
    color: #044e76; /* You can change the color here */
    text-align: center;
    padding: 14px 10px;
    font-weight: bold; /* Make text bold */
}

/* Change link color on hover */
nav ul li a:hover {
    text-decoration: none; /* Remove underline */
    color: #1dbbff; /* You can change the hover color here */
}


h2.cta-heading {
    font-size: 3vmin;
    color: #0062cc; /* A bright color to draw attention */
    margin-top: 2em; /* Some space above the heading */
}

p.cta-description {
    font-size: 2vmin;
    color: #333333; /* Dark text for readability */
}

.toggle-buttons {
    width: 100%;
}

.toggle-buttons .btn {
    width: 50%; /* makes the buttons fill the container */
    font-size: 2vmin; /* makes the text size responsive */
}


.bookshelf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2vmin;
    gap: 11vh 7vh;
    padding-inline-start: 0;
}


.book {
    list-style: none;
    width: 209px;
    max-height: 295px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 2vmin;
    position: relative;
}

.book:hover {
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
}

.book:hover a, .book:hover .booktitle {
    color: #3f3f3f;
    text-decoration: none;
}

.book img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Modified styles for portrait images */
.book.portrait {
    /* These could be the same as the default, unless you want different dimensions for portrait images */
    width: 227px;
    height: 295px;
}

/* Modified styles for landscape images */
.book.landscape {
    /* You might want to adjust these values to better accommodate landscape images */
    width: 295px;      /* This is wider to accommodate landscape images */
    height: 227px;     /* This is shorter */
    margin-top: 66px;
}

.book.portrait img {
    width: auto;
    height: 100%;
    object-fit: cover;
}

.book.landscape img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.booktitle {
    text-align: center;
    margin-top: 9px;
    color: #5f5f5f;
    font-weight: 600;
}

.floating-cover {
    position: fixed;
    z-index: 9999;
    transition: all 0.5s ease-in-out;
    pointer-events: none; // This ensures that the cloned cover doesn't interfere with user interactions
}

.coverpreview {
    max-width: 360px;
    max-height: 509px;
    height: auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 2vmin;
    position: -webkit-sticky; /* for Safari */
    position: sticky;
    top: 100px;
}


.coverpreview:hover {
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
}


.book-info {
    display: flex;
    width: 100%;
    flex-flow: row;
    flex-wrap: wrap;
}

.book-info .label {
    color: #071c41;
    font-weight: 600;
}

.book-info .right-side {
    padding-left: 3rem;
}

.book-info .price {
    font-size: 22px;
    color: #8fac08;
}

.book-info .left-side {
    text-align: center;
}

.book-info .booktitle {
    text-align: left;
    font-size: 30px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 2rem;
}

.book-description, .author-bio {
    text-align: justify;
}

.footer {
    height: 50px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #999;
}

.footer ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
}

.footer ul li {
    list-style: none;
    padding: 0 10px;
}

.footer ul li a {
    color: #000;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.cloaked {
    visibility: hidden !important;
}


/* ------------------------------------ */


#payment-form #payment-message {
    color: rgb(105, 115, 134);
    font-size: 16px;
    line-height: 20px;
    padding-top: 12px;
    text-align: center;
}

#payment-form #payment-element {
    margin-bottom: 24px;
}

/* Buttons and links */
#payment-form button {
    background: #5469d4;
    font-family: Arial, sans-serif;
    color: #ffffff;
    border-radius: 4px;
    border: 0;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    transition: all 0.2s ease;
    box-shadow: 0 4px 5.5px 0 rgba(0, 0, 0, 0.07);
    width: 100%;
}
#payment-form button:hover {
    filter: contrast(115%);
}
#payment-form button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* spinner/processing state, errors */
#payment-form .spinner,
#payment-form .spinner:before,
#payment-form .spinner:after {
    border-radius: 50%;
}
#payment-form .spinner {
    color: #ffffff;
    font-size: 22px;
    text-indent: -99999px;
    margin: 0 auto;
    position: relative;
    width: 20px;
    height: 20px;
    box-shadow: inset 0 0 0 2px;
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
}
#payment-form .spinner:before,
#payment-form .spinner:after {
    position: absolute;
    content: "";
}
#payment-form .spinner:before {
    width: 10.4px;
    height: 20.4px;
    background: #5469d4;
    border-radius: 20.4px 0 0 20.4px;
    top: -0.2px;
    left: -0.2px;
    -webkit-transform-origin: 10.4px 10.2px;
    transform-origin: 10.4px 10.2px;
    -webkit-animation: loading 2s infinite ease 1.5s;
    animation: loading 2s infinite ease 1.5s;
}
#payment-form .spinner:after {
    width: 10.4px;
    height: 10.2px;
    background: #5469d4;
    border-radius: 0 10.2px 10.2px 0;
    top: -0.1px;
    left: 10.2px;
    -webkit-transform-origin: 0 10.2px;
    transform-origin: 0 10.2px;
    -webkit-animation: loading 2s infinite ease;
    animation: loading 2s infinite ease;
}

@-webkit-keyframes loading {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@keyframes loading {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 600px) {
    form {
        width: 80vw;
        min-width: initial;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.fadeInUp {
    animation-name: fadeInUp;
}

.bookshelf .book:hover .buy-button,
.bookshelf .book:hover .download-button
{
    display: block;
}

.resurse .bookshelf .book .buy-button ,
.resurse .bookshelf .book .download-button
{
    display: none;
}

.bookshelf .buy-button,
.bookshelf .download-button {
    position: absolute;
    bottom: 20px;
    left: calc(50% - 35px);
    display: none;
}

.book .download {
    position: relative;
    left: 23px;
    width: 80%;
    display: none;
    color: #eee;
}

.book.ready a.download {
    display: block;
    text-decoration: none;
    color: #eee;
}

.book.ready .progress {
    display: none;
}

.book.ready.downloading .progress{
    display: block;
}

.book.ready.downloading .download {
    display: none;
}

.book .status, .book.ready.available .status {
    display: none;
}

.book.ready.unavailable::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #07a402;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
}

.book.ready.unavailable .status {
    display: block;
}

.book.ready.unavailable a.download {
    display: none;
}

.book.ready.unavailable .status {
    color: #07a402;
    font-weight: 900;
}

.progress-bar {
    transition: width 5s linear;
}


.fulfillment .book:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/*  =================================================
    ================ CART WIDGET ====================
    ================================================= */

/*.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}*/

.cart-widget {
    display: flex;
    align-items: center;
    gap: 1rem; /* Adds space between child elements */
    position: absolute;
    right: 10px;
    height: 50px;
}

.cart-items {
    position: relative;
}

.cart-items a {
    text-decoration: none;
}

.cart-items a img {
    max-width: 50px;
    height: 40px;
    margin: 5px;
    box-shadow: 2px 2px 10px #d3d3d3;
}
.cart-items a img:hover {
    box-shadow: 2px 2px 10px #a7a7a7;
}

.book-thumbnail {
    position: relative;
    display: inline-block; /* to keep images side by side */
}

.remove-book {
    display: none;
    position: absolute;
    top: 1px;
    right: 0px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    font-weight: bold;
}

.book-thumbnail:hover .remove-book {
    display: block;
}

#checkoutModal th {
    color: #777;
}

.floating-cover {
    position: absolute;
    transition: transform 1s, opacity 1s;
}

.disclaimer {
    /*color: #d10505;*/
    margin-top: 10px;
    font-weight: 600;
}

/* Optional: Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .cart-widget {
        flex-direction: row;
        align-items: center;
        top: 62px;
    }

    .main-content {
        padding-bottom: 3vh;
        margin-top: 92px;
    }

    .with-cart header.mainpage nav .container{
        height: 136px;
    }
}

.article {
    padding-top: 3vh;
    user-select: none;
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* Internet Explorer/Edge */
}

.article .menu {
    position: sticky;
    top: 60px;
    height: calc(100vh - 132px); /* Optional: Makes the menu height adapt to the viewport, subtracting the header height */
    overflow-y: auto; /* Adds scroll to the menu if items exceed the viewport height */
    padding-left: 32px;
}


.article h1 {
    font-size: 32px;
    color: #004a8e;
    margin-bottom: 20px;
}


.article .content {
    margin-bottom: 100px;
}

.menu h4 {
    margin-bottom: 20px;
}

.menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.menu ul ul {
    margin-left: 10px;
}

.menu li {
    list-style-type: none;
    margin: 0;
    padding: 0 0 0 10px; /* Add padding to move it away from the logo */
    overflow: hidden;
}

.menu li {
    margin-bottom: 10px;
}

.menu .has-children {
    background: #e5e5e5;
    color: #333;
    padding: 5px 10px;
}

.menu .has-children a {
    color: #1b1e21;
}

.menu  a {
    color: #004a8f;
}


.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-form-container h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 98%;
    background-position-y: 50%;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #0074D9;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 15px;
    }
}

