/*
 * What the jQuery plugins of the old website brought (flexslider, jQuery.flexImages, Font Awesome JS,
 * the back-to-top script); everything else is the CSS of the theme.
 */

/* ------------------------------------------------------------ hero slideshow (controllers/hero_slider) */
.bg-slider .slides {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bg-slider .slides > .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 600ms ease;
}

.bg-slider .slides > .slide.is-active {
    opacity: 1;
}

/* ------------------------------------------------------------ art pictures (controllers/art_gallery) */
.flex-images {
    overflow: hidden;
}

.flex-images .item {
    float: left;
    margin: 4px;
    border: 1px solid #eee;
    box-sizing: content-box;
    overflow: hidden;
    position: relative;
}

.flex-images .item img {
    display: block;
    width: auto;
    height: 100%;
}

/* ------------------------------------------------------------ icons (symfony/ux-icons, Font Awesome 5) */
.svg-inline--fa {
    display: inline-block;
    height: 1em;
    width: 1em;
    overflow: visible;
    vertical-align: -0.125em;
}

/* ------------------------------------------------------------ phone: at the start (desktop), call button in the header (phones) */
.hero-phone {
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 8px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.12em;
}

.hero-phone .svg-inline--fa {
    color: #b98d36;
    font-size: 17px;
    transition: transform 0.3s ease-in-out;
}

.hero-phone:hover,
.hero-phone:focus {
    color: #fff;
    text-decoration: none;
    border-color: #b98d36;
}

.hero-phone:hover .svg-inline--fa {
    transform: rotate(-12deg) scale(1.1);
}

.header-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 20px;
    background: #b98d36;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.header-call:hover,
.header-call:focus,
.header-call:active {
    background: #a57e30;
    color: #fff;
    text-decoration: none;
}

/* the menu of the legal pages links to /#wine etc.: the fixed header must not cover the title */
#hero, #menus, #wine, #news, #about, #art, #contact {
    scroll-margin-top: 61px;
}

/* ------------------------------------------------------------ map with two clicks (controllers/map_consent) */
/* side by side (desktop): the map is as high as the contact details beside it */
@media (min-width: 768px) {
    .contact-section .map-col {
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

    .contact-section .map-container {
        flex: 1;
        min-height: 320px;
        padding-bottom: 0;
    }

    /* the column ends with the last line of the opening hours, not with the margins of its blocks */
    .contact-section .info-col .general,
    .contact-section .info-col .contact-methods:last-child,
    .contact-section .info-col .contact-methods:last-child :last-child {
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

.map-consent {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(rgba(25, 20, 15, 0.55), rgba(25, 20, 15, 0.55)), url("../images/news-bg-QuyhCkp.jpg") center / cover;
    color: #fff;
    text-align: center;
}

.map-consent__address {
    margin: 0;
    font-size: 16px;
    letter-spacing: 0.04em;
}

.map-consent__address .svg-inline--fa {
    color: #b98d36;
    margin-right: 6px;
}

.map-consent__note {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.map-consent__note a,
.map-consent__route {
    color: #d6ad5c;
}

.map-consent__route {
    font-size: 13px;
}

/* stacked (phones, small tablets): the placeholder as high as its content, the loaded map 4:3 */
@media (max-width: 767.98px) {
    .contact-section .map-container {
        padding-bottom: 75%;
    }

    .contact-section .map-container:has(.map-consent) {
        height: auto;
        padding-bottom: 0;
    }

    .map-consent {
        position: static;
        min-height: 240px;
        gap: 10px;
        padding: 28px 18px;
    }

    /* street and town on two lines, the marker above them */
    .map-consent__address {
        font-size: 15px;
        letter-spacing: 0.02em;
        line-height: 1.5;
    }

    .map-consent__address .svg-inline--fa {
        display: block;
        margin: 0 auto 6px;
        font-size: 20px;
    }

    .map-consent__address span {
        display: block;
    }

    .map-consent__address .map-consent__separator {
        display: none;
    }
}

/* ------------------------------------------------------------ legal pages (/impressum, /datenschutz) */
.legal-page {
    padding: 140px 0 90px;
    background: #f5f5f5;
}

.legal-page .legal-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
}

.legal-page h1 {
    margin: 0 0 30px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
}

.legal-page h2 {
    margin: 32px 0 12px;
    font-size: 18px;
    font-weight: bold;
}

.legal-page .legal-date {
    color: #999;
    font-size: 13px;
}

@media (max-width: 767.98px) {
    .legal-page {
        padding-top: 100px;
    }

    .legal-page .legal-content {
        padding: 24px 18px;
    }
}

/* ------------------------------------------------------------ back to top (controllers/back_to_top) */
#topcontrol {
    position: fixed;
    right: 5px;
    bottom: 5px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 500ms, visibility 500ms, background 400ms;
}

#topcontrol.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .bg-slider .slides > .slide,
    #topcontrol {
        transition: none;
    }
}
