/* ==========================================================================
   tbottlers.com
   Rebuild of the 2011 design (fileadmin/templates/zcss/standard.css of the old
   website). From 1000px the page box keeps the old fixed 950px layout, below
   that the content is stacked and the navigation opens with a button.
   ========================================================================== */

@font-face {
    font-family: 'Kalam';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../Fonts/Kalam/kalam-latin-300-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Kalam';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../Fonts/Kalam/kalam-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Kalam';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../Fonts/Kalam/kalam-latin-700-normal.woff2') format('woff2');
}

:root {
    --color-background: #ede6dc;
    --color-text: #4b4b4d;
    --color-nav: #646567;
    --color-green: #2c8527;
    --color-headline: #198d3e;
    --color-footer: #353537;
    --color-sidebar: #f5f2ed;
    --font-text: Verdana, Arial, Helvetica, sans-serif;
    --font-hand: 'Kalam', 'Bradley Hand', cursive;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-text);
    font-size: 14px;
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

a {
    color: var(--color-text);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

p,
h1,
h2,
h3,
h4 {
    margin: 0;
    padding: 0;
}

p + p,
p + ul,
ul + p {
    margin-top: 0;
}

ul {
    margin: 0;
    padding: 0 0 0 15px;
    list-style-image: url('../Images/list-dash.png');
    line-height: 1.55;
}

strong {
    font-weight: bold;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 8px 12px;
    background: #fff;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ==========================================================================
   Page frame
   ========================================================================== */

.site {
    position: relative;
}

.site__box {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}

.site__content {
    flex: 1 0 auto;
}

.site__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.site__logo img {
    display: block;
    width: 200px;
}

.site__sidebar {
    background: var(--color-sidebar);
}

.site__fruit,
.site__fruit-left {
    display: none;
}

.site__vignette {
    display: none;
}

.site__content {
    padding: 16px 16px 32px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #d6d0c6;
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    font: 400 18px/1 var(--font-hand);
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform .2s;
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle__bars::before {
    top: -6px;
}

.nav-toggle__bars::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

.main-nav {
    display: none;
    padding: 8px 16px 16px;
}

.main-nav.is-open {
    display: block;
}

.main-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.4;
}

.main-nav a {
    display: block;
    color: var(--color-nav);
    text-decoration: none;
}

.main-nav__list--1 > .main-nav__item > a {
    padding: 4px 0;
    color: var(--color-text);
    font: 300 24px/1.15 var(--font-hand);
}

.main-nav__list--1 > .main-nav__item.is-active > a {
    color: var(--color-green);
    font-weight: 400;
}

/* Hover shows the active colour, like the rollover graphics of the old menu */
.main-nav__list--1 > .main-nav__item > a {
    transition: color .15s;
}

.main-nav__list--1 > .main-nav__item > a:hover,
.main-nav__list--1 > .main-nav__item > a:focus-visible {
    color: var(--color-green);
}

.main-nav__list--2,
.main-nav__list--3 {
    margin: 0 0 0 15px;
    /* Padding instead of margin: the space belongs to the menu item, so the
       pointer does not leave the item on its way into the submenu */
    padding-bottom: 10px;
}

.main-nav__list--3 {
    padding-bottom: 0;
}

.main-nav__list--2 a,
.main-nav__list--3 a {
    padding: 4px 0 4px 15px;
}

.main-nav__list--2 .main-nav__item.is-active > a {
    color: var(--color-green);
}

.main-nav__list--2 a:hover,
.main-nav__list--3 a:hover,
.main-nav__list--2 .is-current > a,
.main-nav__list--3 .is-current > a {
    color: var(--color-green);
    background: url('../Images/arrow.png') 2px 50% no-repeat;
}

/* Only the submenu of the active branch is open; other submenus open by clicking the item, which loads its page */
.main-nav__item:not(.is-active) > .main-nav__list {
    display: none;
}

/* Mobile menu: the arrow on the right opens and closes the subpages without loading the page */
@media (max-width: 999px) {
    .main-nav__item.has-children {
        position: relative;
    }

    .main-nav__item.has-children > a {
        padding-right: 48px;
    }

    .main-nav__toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 44px;
        height: 38px;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: var(--color-nav);
        cursor: pointer;
    }

    .main-nav__list--2 .main-nav__toggle,
    .main-nav__list--3 .main-nav__toggle {
        height: 32px;
    }

    .main-nav__toggle::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 9px;
        height: 9px;
        margin: -7px 0 0 -5px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform .2s, margin .2s;
    }

    .main-nav__toggle[aria-expanded="true"]::before {
        margin-top: -3px;
        transform: rotate(-135deg);
    }

    .main-nav__toggle:hover,
    .main-nav__toggle[aria-expanded="true"] {
        color: var(--color-green);
    }

    .main-nav__item > .main-nav__toggle[aria-expanded="true"] + .main-nav__list {
        display: block;
    }

    .main-nav__item > .main-nav__toggle[aria-expanded="false"] + .main-nav__list {
        display: none;
    }

    /* The teasers of the start page belong to the desktop menu */
    .main-nav__teaser {
        display: none;
    }
}

@media (min-width: 1000px) {
    .main-nav__toggle {
        display: none;
    }
}

.main-nav__teaser {
    margin: -2px 0 20px;
    color: var(--color-text);
    line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site__footer {
    padding: 16px;
    border-top: 1px solid #eee8de;
    background: linear-gradient(#fff, #f6f2ec);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.6;
}

.footer-nav {
    column-gap: 16px;
}

.footer-nav a {
    color: var(--color-footer);
    font-size: 0.95em;
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-nav a[aria-current] {
    font-weight: bold;
    text-decoration: none;
}

.site__claim {
    margin-top: 8px;
    color: var(--color-headline);
    font: 400 26px/1.2 var(--font-hand);
}

/* ==========================================================================
   Content layouts
   ========================================================================== */

.columns__aside {
    margin-top: 20px;
}

.onecol {
    max-width: 660px;
}

/* ==========================================================================
   Content elements
   ========================================================================== */

.textblock {
    margin-bottom: 20px;
}

.textblock__headline,
.product-info__headline {
    margin-bottom: 8px;
    color: var(--color-headline);
    font: 400 24px/1.2 var(--font-hand);
}

.textblock__headline img,
.product-info__headline img {
    display: block;
}

.textblock--spacing-bottom .textblock__headline + * {
    margin-top: 20px;
}

.content-image {
    margin-bottom: 20px;
}

.content-image img {
    display: block;
}

.product-info__fruit {
    display: block;
    margin-bottom: 10px;
}

.product-info {
    text-align: left;
}

.product-info ul {
    padding-left: 0;
    list-style: none;
    line-height: 1.7;
}

.product-info__ingredients {
    padding-top: 2px;
    font-size: 0.9em;
    line-height: 1.7;
}

.product-info__icons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Image enlargement
   ========================================================================== */

.content-image__zoom {
    display: inline-block;
    cursor: zoom-in;
}

.lightbox {
    max-width: 92vw;
    max-height: 92vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    cursor: zoom-out;
}

.lightbox[open] {
    animation: lightbox-zoom .25s ease-out;
}

.lightbox::backdrop {
    background: rgba(237, 230, 220, .8);
}

.lightbox__image {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
    background: #fff;
}

.lightbox__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--color-text);
    font-size: 22px;
    line-height: 32px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
    cursor: pointer;
}

@keyframes lightbox-zoom {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox[open] {
        animation: none;
    }
}

/* Slider
   ========================================================================== */

.slider {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
}

.slider__track {
    position: relative;
    display: grid;
    overflow: hidden;
}

/* All slides share one grid cell: the track keeps the height of the tallest slide,
   so nothing jumps while main.js slides one out and the next one in */
.slider__slide {
    grid-area: 1 / 1;
    margin: 0;
    visibility: hidden;
}

.slider__slide.is-active {
    visibility: visible;
}

.slider__slide img {
    display: block;
}

.slider__caption {
    padding-top: 12px;
}

.slider__headline {
    margin-bottom: 8px;
    color: var(--color-headline);
    font: 400 24px/1.2 var(--font-hand);
}

.slider__text {
    display: block;
    text-decoration: none;
}

.slider__text p + p {
    margin-top: 1.7em;
}

.slider__link img {
    display: block;
}

.slider__more {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-green);
}

.slider__prev,
.slider__next {
    width: 39px;
    height: 39px;
    margin-top: 10px;
    border: 0;
    background: transparent center no-repeat;
    cursor: pointer;
    opacity: .6;
}

.slider__prev:hover,
.slider__next:hover {
    opacity: 1;
}

.slider__prev {
    background-image: url('../Images/slider-prev.png');
}

.slider__next {
    background-image: url('../Images/slider-next.png');
}

.slider__nav {
    display: flex;
    justify-content: center;
    gap: 0;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (min-width: 640px) {
    .columns {
        display: flex;
        justify-content: space-between;
        gap: 24px;
    }

    .columns__main {
        flex: 0 1 300px;
    }

    .columns__aside {
        flex: 1 1 auto;
        margin-top: 0;
        text-align: right;
    }

    .columns__aside .content-image img {
        display: inline-block;
    }

    .site__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .site__claim {
        margin-top: 0;
    }
}

/* ==========================================================================
   Desktop: fixed layout of the old website
   ========================================================================== */

@media (min-width: 1000px) {
    body {
        font-size: 12px;
        /* The fruit image reaches beyond the window on narrow screens and must not cause horizontal scrolling */
        overflow-x: clip;
    }

    .site {
        width: 950px;
        margin-left: 30px;
    }

    .site__box {
        display: grid;
        grid-template-columns: 240px 710px;
        grid-template-rows: auto 1fr auto;
        min-height: 750px;
        background: url('../Images/page-background.jpg') 0 0 no-repeat;
    }

    /* Shadows left and right of the page box */
    .site__box::before,
    .site__box::after {
        content: '';
        position: absolute;
        top: 0;
        width: 20px;
        height: 750px;
        background: 0 0 no-repeat;
    }

    .site__box::before {
        left: -20px;
        background-image: url('../Images/shadow-left.png');
    }

    .site__box::after {
        right: -20px;
        background-image: url('../Images/shadow-right.png');
    }

    .site__header {
        grid-column: 2;
        grid-row: 1;
        display: block;
        padding: 20px 0 0 210px;
    }

    .site__logo img {
        width: 292px;
    }

    .nav-toggle {
        display: none;
    }

    .site__sidebar {
        position: relative;
        grid-column: 1;
        grid-row: 1 / -1;
        background: transparent;
    }

    /* The area stays 225px high without image, the start page has none */
    .site__fruit-left {
        display: block;
        height: 225px;
        overflow: visible;
    }

    #page-5 .site__fruit-left {
        display: none;
    }

    .site__fruit-left img {
        display: block;
    }

    .main-nav,
    .main-nav.is-open {
        display: block;
        padding: 0 25px 0 10px;
    }

    #page-5 .main-nav {
        padding-top: 135px;
    }

    .main-nav a {
        padding-left: 15px;
    }

    .main-nav__list--1 > .main-nav__item > a {
        padding: 0 0 0 15px;
        font-size: 25px;
        line-height: 1.1;
    }

    .main-nav__list--2 a,
    .main-nav__list--3 a {
        padding: 0 0 0 15px;
    }

    .main-nav__teaser {
        margin: -2px 0 25px 16px;
    }

    .site__vignette {
        display: block;
        position: absolute;
        top: 700px;
        left: 65px;
        width: 100px;
    }

    .site__content {
        grid-column: 2;
        grid-row: 2;
        padding: 20px 10px 0;
    }

    .site__footer {
        grid-column: 2;
        grid-row: 3;
        align-items: baseline;
        padding: 0 23px 2px 33px;
        border: 0;
        background: none;
    }

    .footer-nav {
        column-gap: 0;
    }

    .footer-nav li + li::before {
        content: '|';
        padding: 0 4px;
        color: var(--color-footer);
    }

    .footer-nav a {
        font-size: 0.85em;
    }

    .site__claim {
        font-size: 27px;
    }

    /* The big fruit image sits behind the right edge of the page box */
    .site__fruit {
        display: block;
        position: absolute;
        z-index: 1;
        top: 200px;
        left: 820px;
    }

    .site__fruit img {
        display: block;
        max-width: none;
    }

    /* Content layouts
       ====================================================================== */

    .columns {
        gap: 0;
    }

    .columns__main {
        flex: 0 0 240px;
        padding-left: 20px;
    }

    #page-33 .columns__main,
    #page-35 .columns__main {
        flex-basis: 300px;
    }

    .columns__aside {
        flex: 0 1 auto;
    }

    /* Images in the narrow left column may overlap it, as on the old website */
    .columns__main .content-image img {
        max-width: none;
    }

    .columns__aside .content-image {
        margin: 0 15px 0 0;
    }

    .onecol {
        width: 675px;
        max-width: none;
        padding-left: 15px;
    }

    .start {
        padding: 0 30px 0 20px;
    }

    /* Content elements
       ====================================================================== */

    .textblock--spacing-top {
        margin-top: 117px;
    }

    .textblock__headline,
    .product-info__headline,
    .slider__headline {
        margin-bottom: 5px;
        font-size: 28px;
    }

    .content-image--left {
        margin: 10px 0 0 -10px;
    }

    /* Data protection: long text scrolls inside the page box, as before */
    #page-125 .textblock {
        overflow-y: auto;
        max-height: 34rem;
        padding-right: 1rem;
    }

    #page-125 .textblock p {
        margin: 1em 0;
    }

    #page-125 .textblock h2:not(.textblock__headline) {
        margin-top: 20px;
        font-size: 1.2em;
        line-height: 1.4;
    }

    .product-info {
        width: 380px;
        margin-right: 15px;
    }

    .product-info p {
        width: 360px;
    }

    /* Element specific spacing of the old stylesheet */
    #c168 {
        margin-top: 4em;
    }

    #c139 {
        margin-top: -2.5em;
    }

    #c150 {
        margin-top: 7em;
    }

    /* Slider: caption over the image as on the old website */
    .slider__slide {
        position: relative;
    }

    .slider__caption {
        position: absolute;
        top: 402px;
        left: 340px;
        width: 290px;
        padding: 0;
    }

    .onecol .slider {
        margin: 0 0 0 15px;
    }

    .onecol .slider--chronicle {
        margin-top: 8px;
    }

    /* As in the old slider the text sits in a box aligned to the bottom (table with
       valign=bottom), so long texts grow upwards instead of running out of the slide */
    .slider--chronicle .slider__caption {
        top: auto;
        bottom: 30px;
        left: 2px;
        width: 265px;
    }

    .slider__nav {
        margin-top: 20px;
    }

    .slider__prev,
    .slider__next {
        width: 24px;
        height: 24px;
        margin: 0;
        background-size: 24px;
    }
}
