/* 54ka.org - one stylesheet for the whole site */

@font-face {
    font-family: 'OpensansR';
    src: url(fonts/opensans-regular-webfont.woff) format('woff'), url(fonts/opensans-regular-webfont.ttf) format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'OpensansBold';
    src: url(fonts/opensans-semibold-webfont.woff) format('woff'), url(fonts/opensans-semibold-webfont.ttf) format('truetype');
    font-display: swap;
}

/* ========== BASE ========== */
* {
    margin: 0;
    padding: 0;
    border: 0 solid #eee;
    list-style: none;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    overflow-x: hidden;
}

body {
    font: 10px 'OpensansR', sans-serif;
    color: #000;
    background: #fff url(back.gif);
    cursor: default;
}

.home {
    background-image: url(../index/design/back.gif);
}

a {
    color: #000;
    text-decoration: none;
    outline: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: none;
}

strong {
    font-family: 'OpensansB', sans-serif;
}

/* hidden from the screen, visible to search engines and screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

/* ========== TOP BAR ========== */
.navbar-top-box {
    position: relative;
    z-index: 1;
    height: 37px;
    overflow: hidden;
    background: #0d0d0d;
}

.navbar-top {
    position: relative;
    height: 34px;
    padding-top: 3px;
}

.navbar-top ul {
    display: flex;
    margin-left: 10px;
}

.navbar-top li {
    flex: none;
    height: 34px;
}

.navbar-top li a {
    display: block;
    height: 26px;
    padding: 8px 12px 0;
    color: #ccc;
    font: 12px/17px 'OpensansBold', sans-serif;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

.navbar-top li a:hover,
.navbar-top li a:active {
    background: #fff;
    color: #000;
}

.navbar-top .buy-print {
    color: orange;
}

.navbar-top .icon_home a {
    width: 37px;
    height: 34px;
    padding: 0;
    background: #0d0d0d url(icon_home.png) no-repeat 0 -2px;
}

.navbar-top .icon_home a:hover {
    background: #0d0d0d url(icon_home.png) no-repeat 0 -40px;
}

.top-search {
    position: absolute;
    top: 7px;
    right: 10px;
    display: flex;
    width: 227px;
    height: 23px;
    border-radius: 2em;
    background: #ccc;
}

.top-search input {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    background: none;
    color: #222;
    font: 12px 'OpensansR', sans-serif;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.top-search input::-webkit-search-cancel-button {
    display: none;
}

.top-search button {
    width: 27px;
    border-radius: 2em;
    background: #f2f2f2;
    color: #000;
    font: 9px 'OpensansBold', sans-serif;
    cursor: pointer;
}

/* phones: the links scroll sideways instead of being cut off */
@media (max-width: 770px) {
    .navbar-top ul {
        margin: 0;
        margin-left: 10px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .navbar-top ul::-webkit-scrollbar {
        display: none;
    }

    .navbar-top li a {
        padding: 8px 10px 0;
    }

    .icon_home,
    .top-search {
        display: none;
    }
}

/* ========== MENU ========== */
.menu {
    position: relative;
    z-index: 5;
    height: 85px;
    background: #fff;
}

.menu-logo,
.menu-2 {
    float: left;
    height: 73px;
    padding: 12px 0 0 7px;
    background: #fff;
}

.menu-logo img {
    display: block;
    width: 266px;
    height: auto;
}

.menu-2 {
    position: relative;
    font-size: 16px;
}

.menu-2 ul {
    position: relative;
    width: 395px;
}

.menu-2 li {
    position: relative;
    float: left;
    width: 129px;
    height: 73px;
    border-left: 1px solid #ebebeb;
}

.menu-2 li a {
    display: block;
    height: 70px;
    padding: 0 5px;
    line-height: 100px;
    color: #999;
}

.home .menu-2 li a {
    color: #555;
}

.menu-2 li a:hover {
    color: #000;
}

.menu-2 ul ul {
    display: none;
    position: absolute;
    top: 73px;
    width: 440px;
    padding: 10px 0;
}

.menu-2 ul ul li {
    width: 130px;
    height: 45px;
    margin-right: 1px;
    border: 0;
}

.menu-2 ul ul li a {
    min-width: 100px;
    height: 35px;
    padding: 7px 15px 2px;
    background: #fff;
    font-size: 12px;
    line-height: 28px;
    transition: all 0.2s ease-in-out;
}

.menu-2 ul ul li a:hover {
    background: #000;
    color: #ebebeb;
}

.menu-2 li.open > ul,
.menu-2 li:focus-within > ul {
    display: block;
}

@media (hover: hover) {
    .menu-2 li:hover > ul {
        display: block;
    }
}

/* home page: the menu sticks to the top after scrolling (site.js) */
@media (min-width: 841px) {
    .home .menu {
        width: 810px;
    }

    .home .menu.is-fixed {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        animation: menu-in 0.2s ease-in-out;
    }

    .home .menu.is-fixed + .box {
        margin-top: 95px;
    }
}

@keyframes menu-in {
    from {
        transform: translateY(-100%);
    }
}

/* ========== HAMBURGER MENU (phones / small tablets) ========== */
.menu-toggle {
    display: none;
}

@media (max-width: 840px) {
    /* black bar + white menu are always at the top of the screen */
    body {
        padding-top: 101px;
    }

    .navbar-top-box {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
    }

    .menu {
        position: fixed;
        top: 37px;
        left: 0;
        right: 0;
        z-index: 29;
        height: 64px;
    }

    .menu-logo {
        height: 52px;
        padding: 12px 0 0 10px;
    }

    .menu-logo img {
        width: 160px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 10px;
        right: 8px;
        width: 44px;
        height: 44px;
        padding: 12px 10px;
        border-radius: 3px;
        background: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        margin-bottom: 5px;
        border-radius: 1px;
        background: #000;
        transition: transform 0.25s, opacity 0.2s;
    }

    .menu-toggle span:last-child {
        margin: 0;
    }

    .nav-open .menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-open .menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* the menu panel under the white bar */
    .menu-2 {
        display: none;
        float: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: auto;
        max-height: calc(100vh - 101px);
        padding: 0;
        overflow-y: auto;
        border-top: 1px solid #ebebeb;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    }

    .nav-open .menu-2 {
        display: block;
    }

    .menu-2 ul {
        width: auto;
    }

    .menu-2 li {
        float: none;
        width: auto;
        height: auto;
        border: 0;
        border-bottom: 1px solid #ebebeb;
    }

    .menu-2 li a,
    .home .menu-2 li a {
        height: auto;
        padding: 14px 16px;
        line-height: 22px;
        color: #555;
    }

    /* sub menus are always open in the panel */
    .menu-2 ul ul,
    .menu-2 li.open > ul,
    .menu-2 li:focus-within > ul,
    .menu-2 li:hover > ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1px;
        position: static;
        width: auto;
        padding: 0 16px 14px;
    }

    .menu-2 ul ul li {
        width: auto;
        height: auto;
        margin: 0;
        border: 0;
    }

    .menu-2 ul ul li a {
        min-width: 0;
        height: auto;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 20px;
        background: #f4f4f4;
    }
}

/* ========== HOME PAGE ========== */
.link-hook {
    position: absolute;
    top: -85px;
}

.frame {
    position: absolute;
    top: 0;
    width: 100%;
    height: 500px;
    background: no-repeat center top / 100% auto;
}

@media (max-width: 1355px) {
    .frame {
        background-size: auto 100%;
    }
}

.navigation {
    position: absolute;
    top: 0;
    width: 100%;
    height: 350px;
    padding-top: 150px;
    overflow: hidden;
    background: url(../index/design/back_b.png);
}

.box {
    float: left;
    width: 100%;
    max-width: 1010px;
    height: 99px;
    margin-top: 10px;
    overflow: hidden;
    background: url(../index/design/black-80.png);
}

.box div {
    float: left;
    padding-top: 11px;
}

.box img {
    width: 77px;
    height: 77px;
    padding: 0 0 11px 11px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.box img:hover {
    opacity: 1;
}

.wrapper-box {
    position: absolute;
    top: 500px;
    z-index: 1;
    width: 100%;
}

.content {
    padding: 0 20px;
}

.title {
    float: left;
    width: 100%;
    margin: 20px;
    font: bold 2em 'OpensansB', sans-serif;
    text-transform: uppercase;
}

/* projects */
.projects {
    float: left;
    width: 100%;
}

.projects-txt,
.search-txt {
    text-align: center;
    font-size: 14px;
}

.projects-txt {
    margin: 10px 0;
    padding: 50px 0 60px;
    background: #fff;
}

.projects-txt h2,
.search-txt h2 {
    margin-bottom: 10px;
    font: bold 30px 'OpensansR', sans-serif;
    opacity: 0.8;
}

.projects li {
    position: relative;
    float: left;
    width: 33.333%;
}

@media (max-width: 720px) {
    .projects li {
        width: 50%;
    }
}

@media (max-width: 570px) {
    .projects li {
        width: 100%;
    }
}

/* the picture is a layer zoomed with transform: the card clips it, no flicker */
.tile,
.blog-item {
    position: relative;
    z-index: 0;
    height: 250px;
    overflow: hidden;
    text-align: center;
}

.tile::before,
.blog-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--img) no-repeat center top / auto 100%;
    transform-origin: 50% 0;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.projects li:hover .tile::before {
    transform: scale(1.2);
}

.tile-info {
    float: left;
    width: 50%;
    height: 60px;
    margin-top: 190px;
    overflow: hidden;
    color: #fff;
    background: url(../index/design/black-80.png);
    opacity: 0.8;
    transition: height 0.2s ease-in-out, margin-top 0.2s ease-in-out, width 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.projects li:hover .tile-info {
    width: 100%;
    height: 250px;
    margin-top: 0;
    opacity: 1;
}

.projects h3 {
    margin: 20px 0 50px;
    font-size: 14px;
    transition: margin 0.5s ease-in-out, font-size 0.5s ease-in-out;
}

.projects li:hover h3 {
    margin-top: 70px;
    font-size: 20px;
}

.tile-info a,
.blog a {
    padding: 10px 20px;
    border: 1px solid #888;
    border-radius: 3px;
    color: #ebebeb;
}

/* the whole picture is a link (works on touch screens without hover) */
.tile-info a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.tile-info a:hover {
    background: url(../index/design/black-80.png);
    color: #fff;
}

/* search */
.search {
    float: left;
    width: 100%;
    margin: 10px 0;
    background: #fff;
}

.search-txt {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0 10px;
}

.search-txt p {
    color: #999;
}

.form-box {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 50px;
    margin: 0 auto;
    padding: 0 10px;
    border: 5px solid #888;
    border-radius: 35px;
}

.form-box:hover {
    border-color: #555;
}

.search-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 1px 5rem 1px 2px;
    background: none;
    color: #333;
    font: 20px 'OpensansR', sans-serif;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-submit {
    position: absolute;
    top: -6px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: none;
    color: #888;
    font: 40px 'OpensansR', sans-serif;
    cursor: pointer;
}

#radiobutt {
    margin: 10px 0 50px;
    text-align: center;
    font-size: 14px;
}

#radiobutt label {
    display: inline-block;
    margin-left: 20px;
    padding: 4px 0;
    cursor: pointer;
}

#radiobutt input {
    margin-right: 4px;
    vertical-align: -1px;
}

/* news */
.news {
    float: left;
    width: 100%;
    padding-bottom: 30px;
    overflow: hidden;
    background: #000 url(../index/design/back_line_black.png);
}

.news .title,
.books .title {
    margin: 0 0 25px 20px;
    padding-top: 20px;
    border-bottom: 3px solid #ebebeb;
}

.news .title {
    color: #fff;
    border-color: #2a2a2a;
}

.news-box,
.books-box {
    float: left;
    width: 50%;
}

.news-img-a {
    display: block;
    float: left;
    width: 165px;
    height: 165px;
    margin-right: 20px;
    padding-right: 20px;
    border-right: 1px solid #555;
}

.news img {
    display: block;
    width: 155px;
    height: auto;
    border: 5px solid #2a2a2a;
}

.news-box:hover img {
    border-color: #555;
}

.news .date {
    height: 20px;
}

.news time {
    float: left;
    padding: 5px 10px;
    background: #fff;
    color: #333;
    text-transform: uppercase;
    opacity: 0.7;
}

.news h3 {
    margin: 20px 10px 0 186px;
    font-size: 15px;
}

.news h3 a,
.books h3 a {
    font: 20px 'OpensansB', sans-serif;
    text-transform: uppercase;
}

.news h3 a {
    color: #fff;
    opacity: 0.8;
}

.news h3 a:hover {
    opacity: 1;
}

/* books */
.books {
    float: left;
    width: 100%;
    margin: 10px 0;
    overflow: hidden;
    background: #fff;
}

.books-box {
    height: 240px;
}

.books-img-a {
    display: block;
    float: left;
    width: 186px;
    padding-right: 25px;
    overflow: hidden;
}

.books img {
    display: block;
    width: 260px;
    height: auto;
    margin-left: -38px;
}

.books .book {
    margin: 50px 0 10px;
}

.books .book span {
    padding: 5px 10px;
    background: #000;
    color: #ebebeb;
}

.books h3 {
    font-size: 15px;
}

.books h3 a:hover {
    opacity: 0.4;
}

@media (max-width: 840px) {
    .news-box,
    .books-box {
        width: 100%;
    }

    .news-box:last-child {
        margin-top: 20px;
    }

    .news h3 a {
        font-size: 16px;
    }
}

/* blogs */
.blog {
    float: left;
    width: 100%;
}

.blog-item {
    float: left;
    width: 50%;
    background: #000;
}

.blog-item::before {
    background-position: center;
    background-size: cover;
    transform: scale(1.1);
    transform-origin: 50% 50%;
}

.blog-item:hover::before {
    transform: scale(1.25);
}

.blog-item > div {
    height: 250px;
    color: #fff;
    background: url(back_b_30_l.png);
}

.blog h3 {
    margin: 70px 0 0;
    font-size: 20px;
}

.blog-sub {
    float: left;
    width: 100%;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.blog a {
    color: #fff;
    background: url(../index/design/black-80.png);
}

.blog a:hover {
    background: #fff;
    color: #000;
    opacity: 0.8;
}

.home-footer {
    float: left;
    width: 100%;
    margin-top: 50px;
    text-align: center;
}

.home-footer img {
    vertical-align: top;
}

/* phones */
@media (max-width: 570px) {
    .search-txt {
        padding: 40px 1rem 10px;
    }

    #radiobutt label {
        margin-left: 10px;
    }

    .news-img-a {
        width: 105px;
        height: 105px;
        margin-right: 15px;
        padding-right: 15px;
    }

    .news img {
        width: 95px;
    }

    .news h3 {
        margin: 15px 0 0 135px;
    }

    .news h3 a {
        font-size: 15px;
    }

    .books-box {
        height: auto;
        min-height: 170px;
        margin-bottom: 20px;
    }

    .books-img-a {
        width: 125px;
        padding-right: 15px;
    }

    .books img {
        width: 170px;
        margin-left: -25px;
    }

    .books .book {
        margin-top: 20px;
    }

    .books h3 {
        overflow: hidden;
    }

    .books h3 a {
        font-size: 16px;
    }

    .blog-item {
        width: 100%;
    }
}

/* ========== TEXT PAGES (about, books, contacts) ========== */
.header-image {
    height: 200px;
    margin-top: 10px;
    background: no-repeat center / cover;
}

.header-image-line {
    height: 200px;
    background: url(back_b_30_l.png);
}

/* 3 columns on desktop, 2 on tablets, 1 on phones */
.page-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 0 1rem;
    padding: 10px 10px 50px;
    font-size: 14px;
}

.page-content-side {
    grid-row: span 2;
}

.page-content-box > div {
    margin-bottom: 1rem;
    padding: 1rem 1rem 1.65rem;
    background: #fff;
    overflow-wrap: break-word;
}

.page-content-box a:hover {
    opacity: 0.5;
}

.page-content h1,
.box-title {
    font: 30px 'OpensansR', sans-serif;
}

.page-content-box img {
    display: block;
    width: 100%;
    height: auto;
}

.contact {
    grid-column: span 2;
    background: #fff;
}

.contact > div {
    max-width: 800px;
    padding: 1rem 1rem 1rem 1rem;
}

.page-content-single {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 66%;
}

.mail {
    display: block;
    width: 140px;
    height: 20px;
    background: url(mail.gif) no-repeat left center;
}

.social-list {
    margin-top: 1.15em;
}

.social-list li {
    margin-bottom: 0.75rem;
}

.social-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    transition: opacity 0.2s;
}

/* black circle with a white icon */
.social-icon {
    flex: none;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: 50%;
    background: #000;
    color: #fff;
}

@media (max-width: 1100px) {
    .page-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-content-single {
        max-width: none;
    }
}

@media (max-width: 800px) {
    .page-content {
        grid-template-columns: minmax(0, 1fr);
        padding-bottom: 70px;
    }

    .page-content-side,
    .contact {
        grid-row: auto;
        grid-column: auto;
    }

    .page-content h1,
    .box-title {
        font-size: 26px;
    }
}

/* ========== GALLERIES ========== */
/* phones and portrait screens: the pictures one under another */
#flashcontent {
    padding: 5px 0 46px;
}

#gallery img {
    display: block;
    width: calc(100% - 10px);
    height: auto;
    max-height: 92vh;
    margin: 0 auto 5px;
    object-fit: contain;
    aspect-ratio: auto 2 / 3;   /* placeholder size until the picture is loaded */
}

.gallery-arrow {
    display: none;
}

/* landscape screens: horizontal strip (gallery.js adds arrows, keys, click, wheel) */
@media (min-width: 801px) and (orientation: landscape) {
    .gallery-page,
    .gallery-page body {
        height: 100%;
        overflow: hidden;
    }

    #flashcontent {
        position: absolute;
        top: 122px;
        bottom: 50px;
        left: 0;
        right: 0;
        padding: 0;
    }

    #gallery {
        position: relative;
        display: flex;
        gap: 3px;
        height: 100%;
        padding: 0 6px 0 5px;
        overflow: auto hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 5px;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    #gallery::-webkit-scrollbar {
        display: none;
    }

    #gallery img {
        flex: none;
        width: auto;
        height: 100%;
        max-height: none;
        margin: 0;
        scroll-snap-align: start;
        cursor: pointer;
    }

    .gallery-tight #gallery {
        gap: 0;
    }

    .gallery-arrow {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 2;
        width: 50px;
        background: none;
        cursor: pointer;
        opacity: 0.5;
        transition: opacity 0.4s;
    }

    .gallery-arrow:hover {
        opacity: 1;
    }

    .gallery-arrow::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 20px;
        width: 18px;
        height: 18px;
        margin-top: -9px;
        border: solid #fff;
        border-width: 0 0 2px 2px;
        transform: rotate(45deg);
        filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
    }

    .gallery-prev {
        left: 8px;
    }

    .gallery-next {
        right: 0;
    }

    .gallery-next::before {
        left: 12px;
        transform: rotate(-135deg);
    }

    .is-idle .gallery-arrow {
        opacity: 0;
        pointer-events: none;
    }
}

@media (min-width: 801px) and (max-width: 840px) and (orientation: landscape) {
    #flashcontent {
        top: 101px;
    }
}

/* ========== LOGO AT THE BOTTOM ========== */
#bottommenu {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    text-align: center;
    pointer-events: none;   /* the empty part of the bar does not block clicks */
}

#bottommenu a {
    pointer-events: auto;
}

#bottommenu img {
    vertical-align: top;
}
