/*
 * Template 0770 "Flea market", one of the responsive templates from 0707 on: written by
 * tools/responsive-templates (node render.js --media) from base.css and themes/h-fundstueck.css, edit those.
 * The fonts (fontsource, SIL Open Font License) are in ../../fonts, the pictures (CC0) in ../img.
 */

/* pathway-extreme-vietnamese-wght-normal */
@font-face {
  font-family: 'Pathway Extreme Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../../fonts/pathway-extreme-vietnamese-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* pathway-extreme-latin-ext-wght-normal */
@font-face {
  font-family: 'Pathway Extreme Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../../fonts/pathway-extreme-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* pathway-extreme-latin-wght-normal */
@font-face {
  font-family: 'Pathway Extreme Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../../fonts/pathway-extreme-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* figtree-latin-ext-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(../../fonts/figtree-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* figtree-latin-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(../../fonts/figtree-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/*
 * The shared part of the modern templates: the page structure of template.phtml, the menu of
 * GenerateMenuHelper::generateOldMenu (flat <li>: headings, separators, submenu entries as siblings), the content of the
 * editor (.hpage_content) and the phone layout. A theme sets the custom properties and styles its masthead.
 */

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

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

body.hp {
    margin: 0;
    background: var(--hp-bg);
    color: var(--hp-text);
    font-family: var(--hp-body-font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.hp-site { min-height: 100vh; display: flex; flex-direction: column; }

/* Masthead: the theme gives it its picture or colour */
.hp-masthead { position: relative; }
.hp-masthead__inner {
    position: relative;
    max-width: var(--hp-max, 1200px);
    margin: 0 auto;
    padding: 0 32px;
}
.hp-brand { font-family: var(--hp-heading-font); line-height: 1.1; }
.hp-brand a { color: inherit; text-decoration: none; }
.hp-brand img { max-width: 100%; height: auto; display: block; }

/* Sidebar and content */
.hp-layout {
    position: relative;
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--hp-max, 1200px);
    margin: 0 auto;
    padding: 40px 32px 64px;
    display: grid;
    grid-template-columns: var(--hp-sidebar, 260px) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    /* short pages: the extra height below the content, not between the rows */
    align-content: start;
}

.hp-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.hp-sidebar {
    background: var(--hp-sidebar-bg, transparent);
    border-radius: var(--hp-radius, 0);
    padding: var(--hp-sidebar-padding, 0);
}
.hp-sidebar__title {
    display: block;
    font-family: var(--hp-heading-font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hp-muted);
    padding: 0 14px 12px;
}

.hp-menu { list-style: none; margin: 0; padding: 0; }
.hp-menu li { margin: 0; padding: 0; }
.hp-menu li > a {
    display: block;
    padding: 9px 14px;
    border-radius: var(--hp-menu-radius, 8px);
    color: var(--hp-menu-text, var(--hp-text));
    text-decoration: none;
    line-height: 1.35;
    transition: background-color .15s, color .15s;
}
.hp-menu li > a:hover { background: var(--hp-menu-hover-bg); color: var(--hp-menu-hover-text, var(--hp-menu-text, var(--hp-text))); }
.hp-menu li.active > a {
    background: var(--hp-menu-active-bg, var(--hp-accent));
    color: var(--hp-menu-active-text, var(--hp-accent-contrast));
    font-weight: 600;
}
/* An entry with a submenu: its link is "#" */
.hp-menu li > a[href="#"]::after { content: ""; float: inline-end; margin-top: .45em; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .55; }
.hp-menu li.submenu_item > a { padding-inline-start: 30px; font-size: .94em; }
.hp-menu li.menu_heading {
    margin: 22px 0 6px;
    padding: 0 14px;
    font-family: var(--hp-heading-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hp-muted);
}
.hp-menu li.menu_separator hr { border: 0; border-top: 1px solid var(--hp-line); margin: 14px 14px; }

.hp-main {
    min-width: 0;
    background: var(--hp-surface, transparent);
    border-radius: var(--hp-radius, 0);
    padding: var(--hp-main-padding, 0);
}
.hp-main__title {
    font-family: var(--hp-heading-font);
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: var(--hp-heading-weight, 700);
    line-height: 1.15;
    color: var(--hp-heading, var(--hp-text));
    margin: 0 0 24px;
}
.hp-main__body > p:empty { display: none; }

/* The content of the editor */
.hpage_content { overflow-wrap: break-word; }
.hpage_content p { margin: 0 0 1.1em; }
.hpage_content h1, .hpage_content h2, .hpage_content h3, .hpage_content h4 {
    font-family: var(--hp-heading-font);
    font-weight: var(--hp-heading-weight, 700);
    color: var(--hp-heading, var(--hp-text));
    line-height: 1.25;
    margin: 1.6em 0 .55em;
}
.hpage_content > :first-child, .hpage_content > p:first-child > :first-child { margin-top: 0; }
.hpage_content h1 { font-size: 1.75em; }
.hpage_content h2 { font-size: 1.4em; }
.hpage_content h3 { font-size: 1.15em; }
.hpage_content a { color: var(--hp-link, var(--hp-accent)); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hpage_content a:hover { text-decoration-thickness: 2px; }
.hpage_content img { border-radius: var(--hp-image-radius, 6px); }
/* Nothing wider than the content; pictures and videos keep their proportions (not spacers and lines: a picture of
   1 x 1 pixel would become square). The same as the mobile layout of the old templates (mobile_layout.css). */
.hpage_content :is(img, video, iframe, embed, object) { max-width: 100%; }
.hpage_content :is(img, video):not([height="0"], [height="1"], [height="2"], [height="3"], [height="4"], [height="5"], [width="1"], [width="2"], [width="3"], [width="4"], [width="5"]) { height: auto; }
.hpage_content pre { white-space: pre-wrap; }
.hpage_content :is(input, textarea, select) { max-width: 100%; box-sizing: border-box; }
.hpage_content ul, .hpage_content ol { padding-inline-start: 1.3em; margin: 0 0 1.1em; }
.hpage_content li { margin: .25em 0; }
.hpage_content li::marker { color: var(--hp-accent); }
.hpage_content blockquote {
    margin: 1.5em 0;
    padding-block: .2em;
    padding-inline: 1.2em 0;
    border-inline-start: 3px solid var(--hp-accent);
    font-style: italic;
    color: var(--hp-muted);
}
.hpage_content hr { border: 0; border-top: 1px solid var(--hp-line); margin: 2em 0; }
/* The tables of the content editor; not the layout tables of the addons (guestbook, calendar, forms: with border,
   cellpadding, cellspacing, a class or an id) */
.hpage_content table:not([border], [cellpadding], [cellspacing], [class], [id]) { border-collapse: collapse; margin: 0 0 1.4em; font-size: .95em; }
.hpage_content table:not([border], [cellpadding], [cellspacing], [class], [id], [width], [style*="width"]) { width: 100%; }
.hpage_content table:not([border], [cellpadding], [cellspacing], [class], [id]) > * > tr > :is(th, td) { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--hp-line); vertical-align: top; }
.hpage_content table:not([border], [cellpadding], [cellspacing], [class], [id]) > * > tr > th { font-weight: 600; color: var(--hp-table-head-text, var(--hp-heading, var(--hp-text))); background: var(--hp-table-head, transparent); }
.hpage_content table:not([border], [cellpadding], [cellspacing], [class], [id]) > tbody > tr:nth-child(even) > td { background: var(--hp-table-stripe, transparent); }

.hp-footer { height: var(--hp-footer-height, 0); background: var(--hp-footer-bg, transparent); }

/* Phones and small tablets: one column, the menu behind its title */
@media (max-width: 1023px) {
    body.hp { font-size: 16px; }
    .hp-masthead__inner { padding: 0 20px; }
    .hp-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 16px 48px; }
    .hp-sidebar { padding: 0; background: var(--hp-sidebar-mobile-bg, var(--hp-surface, #fff)); border-radius: var(--hp-radius-mobile, 12px); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
    .hp-sidebar__title {
        position: relative;
        padding-block: 14px;
        padding-inline: 18px 52px;
        cursor: pointer;
        color: var(--hp-text);
        user-select: none;
    }
    .hp-sidebar__title::after {
        content: "";
        position: absolute;
        inset-inline-end: 18px;
        top: 50%;
        width: 18px;
        height: 12px;
        margin-top: -6px;
        background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
                    linear-gradient(currentColor, currentColor) 0 5px / 100% 2px no-repeat,
                    linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat;
    }
    .hp-menu { display: none; padding: 0 8px 12px; }
    .hp-nav-toggle:checked ~ .hp-sidebar .hp-menu { display: block; }
    .hp-main { padding: var(--hp-main-padding-mobile, 0); }

    /* The content as in the mobile layout of the old templates (mobile_layout.css): an iframe without a height gets
       the proportions of a video, tables of a fixed width scroll sideways, pictures floated beside the text take at
       most half the width */
    .hpage_content iframe:not([height], [style*="height"]) { aspect-ratio: 16 / 9; height: auto; }
    .hpage_content table:is([width], [style*="width"]):not([width="100%"], [style*="width: 100%"], [style*="width:100%"]) { display: block; overflow-x: auto; }
    .hpage_content table { max-width: 100%; }
    .hpage_content :is(img, video, table, div):is([style*="float: left"], [style*="float:left"], [style*="float: right"], [style*="float:right"]):not([style*="absolute"]),
    .hpage_content :is(img, table)[align="left"],
    .hpage_content :is(img, table)[align="right"] {
        max-width: 45% !important;
    }
}

/* Phones: forms with the label above the field and fields as wide as the form (mobile_layout.css) */
@media (max-width: 600px) {
    .hpage_content form :is(table, tbody, tr, td, th) { display: block; width: auto !important; max-width: 100%; box-sizing: border-box; }
    .hpage_content form tr:has(> :nth-child(3)) { display: flex; flex-wrap: wrap; gap: 4px; }
    .hpage_content form :is(textarea, select, input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="hidden"], [type="file"])) { width: 100% !important; }
}

/* Flea market: the name on a big price tag, the menu as a row of hanging tags in mustard, teal and brick, finds in the photo */
:root {
    --hp-sidebar-padding: 0;
    --hp-bg: #f6f2ea;
    --hp-surface: #ffffff;
    --hp-text: #26231e;
    --hp-muted: #6c665b;
    --hp-heading: #1e1c18;
    --hp-accent: #c4552f;
    --hp-accent-contrast: #ffffff;
    --hp-link: #a8441f;
    --hp-line: #e7e0d2;
    --hp-heading-font: 'Pathway Extreme Variable', 'Segoe UI', system-ui, sans-serif;
    --hp-body-font: 'Figtree Variable', 'Segoe UI', system-ui, sans-serif;
    --hp-heading-weight: 800;
    --hp-radius: 12px;
    --hp-menu-radius: 0;
    --hp-menu-hover-bg: transparent;
    --hp-table-head: #f5efe2;
    --hp-main-padding: 48px 56px;
    --hp-main-padding-mobile: 28px 20px;
    --hp-sidebar-mobile-bg: #ffffff;
}

body.hp { font-size: 16.5px; }
.hp-masthead { height: clamp(360px, 56vh, 560px); background: #6b5b48 url(../img/header.jpg) center / cover no-repeat; }
.hp-masthead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 28, 24, .5), rgba(30, 28, 24, 0) 60%); }
.hp-masthead__inner { z-index: 1; height: 100%; display: flex; align-items: center; }
.hp-brand {
    position: relative; padding: 34px 48px 34px 86px; background: #e9b949; color: #1e1c18; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -.02em; max-width: 620px; transform: rotate(-4deg);
    clip-path: polygon(52px 0, 100% 0, 100% 100%, 52px 100%, 0 50%); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .3));
}
.hp-brand::before { content: ""; position: absolute; left: 30px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #6b5b48; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25); }
.hp-layout { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
.hp-main { box-shadow: 0 14px 34px rgba(30, 28, 24, .08); }
.hp-main__title { letter-spacing: -.02em; }

@media (min-width: 1024px) {
    .hp-sidebar__title { display: none; }
    .hp-menu { display: flex; flex-wrap: wrap; gap: 14px 10px; padding: 8px 0 16px; }
    .hp-menu li > a { position: relative; display: block; padding: 10px 18px 10px 34px; background: #2d7f7a; color: #ffffff; font-weight: 700; clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%); transform: rotate(-2deg); }
    .hp-menu li > a::before { content: ""; position: absolute; left: 14px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #f6f2ea; }
    .hp-menu li:nth-child(3n+2) > a { background: #e9b949; color: #1e1c18; transform: rotate(1.5deg); }
    .hp-menu li:nth-child(3n) > a { background: #c4552f; transform: rotate(-.5deg); }
    .hp-menu li > a:hover { transform: rotate(0) translateY(-2px); }
    .hp-menu li.active > a { background: #1e1c18; color: #ffffff; transform: none; }
    .hp-menu li.menu_heading { align-self: center; padding: 0 4px 0 12px; color: #6c665b; }
    .hp-menu li.menu_separator hr { width: 2px; height: 30px; margin: 4px 10px; border: 0; background: #d6cdbb; }
    .hp-menu li > a[href="#"]::after { float: none; display: inline-block; margin-inline-start: 8px; vertical-align: 2px; }
}
@media (max-width: 1023px) {
    .hp-masthead { height: 300px; }
    .hp-brand { padding: 22px 26px 22px 64px; clip-path: polygon(40px 0, 100% 0, 100% 100%, 40px 100%, 0 50%); }
    .hp-brand::before { left: 20px; width: 14px; height: 14px; margin-top: -7px; }
}
