/*
 * Ferienhaus an der Wierau – site template
 * Recreates the 2013 design (blue header, light navigation bar, boxed sidebar)
 * with modern, responsive CSS instead of GIF background sprites.
 */

:root {
    --wierau-blue: #11a6d4;
    --wierau-blue-dark: #2f9ac9;
    --wierau-blue-light: #70cdec;
    --wierau-blue-mid: #5fbcdb;
    --wierau-orange: #ea672e;
    --wierau-text: #666;
    --wierau-border: #ccc;
    --wierau-surface: #f7f7f7;
    --wierau-container: 760px;
    --wierau-main: 500px;
    --wierau-sidebar: 220px;
    --wierau-header-height: 130px;
    --wierau-gutter: 16px;
}

/* Base ------------------------------------------------------------------ */

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

body {
    margin: 0;
    background: #fff;
    color: var(--wierau-text);
    font: 0.875rem/1.5 Arial, Helvetica, sans-serif;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    color: var(--wierau-blue);
    line-height: 1.25;
}

h1,
h2 {
    font-size: 1.65rem;
}

h3 {
    font-size: 1rem;
}

h4 {
    font-size: 0.875rem;
}

p,
ul,
ol,
blockquote,
table {
    margin: 0 0 1.5em;
}

ul,
ol {
    padding-left: 2em;
}

ul {
    list-style: square;
}

a {
    color: var(--wierau-orange);
}

a:hover,
a:focus-visible {
    color: var(--wierau-blue);
    text-decoration: none;
}

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

iframe {
    max-width: 100%;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--wierau-gutter);
    z-index: 10;
    padding: 0.5em 1em;
    background: #fff;
    color: var(--wierau-blue);
    font-weight: bold;
}

.skip-link:focus {
    top: var(--wierau-gutter);
}

.container {
    width: 100%;
    max-width: calc(var(--wierau-container) + 2 * var(--wierau-gutter));
    margin-inline: auto;
    padding-inline: var(--wierau-gutter);
}

/* Header ---------------------------------------------------------------- */

.site-header {
    background: var(--wierau-blue);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    min-height: var(--wierau-header-height);
}

.brand {
    position: relative;
    display: block;
    flex: 0 1 465px;
    line-height: 0;
}

.brand__image {
    display: block;
    width: 100%;
}

/* Two click areas over the logo image: "Ferienhaus" left, "Ferienwohnung" right */
.brand__link {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
}

.brand__link--house {
    left: 0;
}

.brand__link--apartment {
    right: 0;
}

.brand__link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.topbar ul {
    display: flex;
    gap: 2em;
    margin: 0;
    padding: 0 0 1.5em;
    list-style: none;
}

.topbar a {
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

.topbar a:hover,
.topbar a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

/* Main navigation ------------------------------------------------------- */

.main-nav {
    position: relative;
    border-bottom: 1px solid #d9d9d9;
    background: linear-gradient(#fdfdfd, #f1f1f1);
}

/* Faded dot pattern below the navigation bar, as in the original design */
.main-nav::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 40px;
    background: repeating-conic-gradient(#e5e5e5 0 25%, transparent 0 50%) 0 0 / 2px 2px;
    mask-image: linear-gradient(#000, transparent);
    pointer-events: none;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li + li {
    border-left: 1px solid #fff;
    box-shadow: -1px 0 0 #e3e3e3;
}

.main-nav a {
    display: block;
    padding: 0.85rem 1.2rem;
    color: var(--wierau-orange);
    font-size: 0.8125rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

.main-nav li:first-child a {
    padding-left: 1.25rem;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .current > a {
    text-decoration: underline;
}

.main-nav__toggle {
    margin: 0.5em 0;
    padding: 0.5em 1em;
    border: 1px solid var(--wierau-border);
    border-radius: 3px;
    background: #fff;
    color: var(--wierau-orange);
    font: inherit;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

.main-nav__toggle::before {
    content: "☰ ";
}

/* Layout ---------------------------------------------------------------- */

.site-body {
    position: relative;
    padding-block: 30px 3em;
}

.site-body--with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, var(--wierau-main)) var(--wierau-sidebar);
    justify-content: space-between;
    gap: 40px;
}

/* As in the original: the text column matches the 500px wide content photos */
.site-main {
    max-width: var(--wierau-main);
}

.site-main:focus {
    outline: none;
}

/* Joomla article output */
.item-page,
.blog-featured {
    overflow-wrap: break-word;
}

.blog-item + .blog-item {
    margin-top: 2em;
}

/* Sidebar box ------------------------------------------------------------ */

.box {
    margin-bottom: 1em;
    border: 1px solid var(--wierau-border);
    background: linear-gradient(#fff, var(--wierau-surface) 30px);
}

.box__title {
    margin: 0;
    padding: 0.55em 0.7em 0.55em 2em;
    border-bottom: 1px solid var(--wierau-blue-dark);
    background:
        url("../images/box-arrow.gif") no-repeat 0.7em 50%,
        linear-gradient(var(--wierau-blue-light), var(--wierau-blue-mid));
    color: #fff;
    font-size: 1.2em;
    text-transform: uppercase;
}

.box__body {
    padding: 10px;
}

.box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.box li {
    margin: 0 0 0.35em;
    padding-left: 10px;
    background: url("../images/bullet.gif") no-repeat 0 0.4em;
    color: var(--wierau-blue);
    font-size: 0.7rem;
    font-weight: bold;
}

/* mod_articles wraps each article in a list item of its own */
.box .mod-articles-items > li {
    margin: 0;
    padding: 0;
    background: none;
}

.box p:last-child,
.box .mod-articles-item:last-child {
    margin-bottom: 0;
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
    margin-bottom: 2em;
}

.site-footer__legal {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--wierau-border);
    background: linear-gradient(var(--wierau-blue-light), var(--wierau-blue-mid));
    color: #fff;
    text-align: center;
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 800px) {
    .site-header__inner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding-top: var(--wierau-gutter);
    }

    .brand {
        flex-basis: auto;
        max-width: 465px;
    }

    .topbar ul {
        justify-content: flex-end;
        padding: 0.75em 0;
    }

    .main-nav__toggle:not([hidden]) {
        display: block;
    }

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

    .main-nav ul {
        flex-direction: column;
        padding-bottom: 0.5em;
    }

    .main-nav li + li {
        border-left: 0;
        box-shadow: none;
        border-top: 1px solid #e3e3e3;
    }

    .main-nav a,
    .main-nav li:first-child a {
        padding: 0.75em 0;
    }

    .site-body--with-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The toggle is only used on small screens */
@media (min-width: 801px) {
    .main-nav__toggle {
        display: none;
    }
}
