/* General page layout */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: #eef0f3;
    font-family: Arial, sans-serif;
}


/* Header */

.site-header {
    position: relative;
    z-index: 10;

    width: 100%;
    height: 78px;
    padding: 8px 26px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-shrink: 0;

    color: #ffffff;
    background: #132d55;
}


/* Logo */

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.site-logo {
    display: block;
    width: auto;
    height: 54px;
    max-width: 220px;
    object-fit: contain;
}


/* Centred catalogue title */

.catalogue-title {
    position: absolute;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}


/* Header buttons */

.header-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    z-index: 2;
}

.header-button {
    min-height: 42px;
    padding: 10px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #ffffff;
    border-radius: 5px;

    color: #132d55;
    background: #ffffff;

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.header-button:hover,
.header-button:focus {
    color: #132d55;
    background: #e9edf3;
}

.download-button {
    color: #ffffff;
    background: transparent;
}

.download-button:hover,
.download-button:focus {
    color: #132d55;
    background: #ffffff;
}

.fullscreen-button { gap: 7px; cursor: pointer; }
.fullscreen-button.is-active { color: #ffffff; background: transparent; }


/* Flipbook area */

.book-area {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.page-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    width: 48px;
    height: 64px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(19, 45, 85, 0.88);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.page-arrow:hover, .page-arrow:focus-visible { background: #132d55; }
.page-arrow:disabled { opacity: 0; pointer-events: none; }
.page-arrow--previous { left: 20px; }
.page-arrow--next { right: 20px; }
.swipe-hint { display: none; }

#book {
    width: 96%;
    height: 96%;
}


/* Tablets */

@media (max-width: 900px) {
    .site-header {
        height: 68px;
        padding: 7px 14px;
    }

    .site-logo {
        height: 46px;
        max-width: 165px;
    }

    .catalogue-title {
        display: none;
    }

    .header-button {
        min-height: 38px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .book-area {
        padding: 8px;
    }

    #book {
        width: 100%;
        height: 98%;
    }
}


/* Mobile phones */

@media (max-width: 560px) {
    .site-header {
        height: 60px;
        padding: 6px 9px;
        gap: 8px;
    }

    .site-logo {
        width: auto;
        height: 38px;
        max-width: 120px;
    }

    .header-buttons {
        gap: 6px;
    }

    .header-button {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .download-button {
        font-size: 0;
    }

    .download-button::after {
        content: "PDF";
        font-size: 12px;
    }

    .fullscreen-button { width: 36px; min-width: 36px; padding: 0; font-size: 21px; }
    .fullscreen-label { display: none; }

    .book-area {
        width: 100%;
        min-height: 0;
        padding: 4px;

        display: flex;
        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    #book {
        width: calc(100vw - 8px) !important;
        height: calc((100vw - 8px) * 595 / 842) !important;
        max-height: calc(100vh - 68px);
    }

    .page-arrow { width: 38px; height: 54px; border-radius: 0 7px 7px 0; font-size: 40px; opacity: 0.88; }
    .page-arrow--previous { left: 4px; }
    .page-arrow--next { right: 4px; border-radius: 7px 0 0 7px; }
    .swipe-hint {
        position: absolute;
        left: 50%;
        bottom: 16px;
        z-index: 30;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 13px;
        transform: translateX(-50%);
        border-radius: 999px;
        color: #ffffff;
        background: rgba(19, 45, 85, 0.92);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        pointer-events: none;
    }
    .swipe-hint.is-hidden { opacity: 0; visibility: hidden; }
    .swipe-hint__arrow { font-size: 17px; }
}

@media (min-width: 561px) and (max-width: 1200px) {
    .page-arrow--previous { left: 8px; }
    .page-arrow--next { right: 8px; }
}



/* Very small phones */

@media (max-width: 380px) {
    .site-header {
        padding-right: 6px;
        padding-left: 6px;
    }

    .site-logo {
        height: 32px;
        max-width: 95px;
    }

    .header-button {
        min-height: 34px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .download-button::after {
        font-size: 11px;
    }
}


/* Landscape phones */

@media (max-height: 560px) and (orientation: landscape) {
    .site-header {
        height: 52px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .site-logo {
        height: 38px;
    }

    .header-button {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .book-area {
        padding: 4px;
    }

    #book {
        width: 96% !important;
        height: calc(100vh - 60px) !important;
        max-width: calc((100vh - 60px) * 842 / 595);
    }
}

.catalogue-page {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
}

.catalogue-page img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    user-select: none;
}
