/* === Font Faces === */
@font-face {
    font-family: "ca";
    src: url("/assets/fonts/ca/ca-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ca";
    src: url("/assets/fonts/ca/ca-regular-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "ca";
    src: url("/assets/fonts/ca/ca-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ca";
    src: url("/assets/fonts/ca/ca-bold-italic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* === Reset === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 700; 
    margin-bottom: 0.5rem;
}

h5 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* === Generic Floating Content Images === */
.flow-image {
    width: min(100%, 20rem);
    margin-bottom: 0.75rem;
    border-radius: 0.35rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.flow-image-left {
    float: left;
    margin-right: 1rem;
}

.flow-image-right {
    float: right;
    margin-left: 1rem;
}

.flow-image-clear {
    clear: both;
}

/* === Image Attribution === */
.image-with-attribution {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 0.75rem;
}

.image-with-attribution > img {
    margin-bottom: 0;
}

.image-with-attribution-left {
    float: left;
    margin-right: 1rem;
}

.image-with-attribution-right {
    float: right;
    margin-left: 1rem;
}

.image-attribution {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    font-style: italic;
}

.image-attribution a {
    color: inherit;
    text-decoration: none;
}

.image-attribution a:hover,
.image-attribution a:focus-visible {
    color: var(--color-accent);
    text-decoration: none;
}

ol, ul, menu {
    list-style: none;
}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    max-width: 100%;
    height: auto;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

button, input, optgroup, select, textarea {
    font: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

fieldset {
    border: none;
}

summary {
    cursor: pointer;
}

abbr[title] {
    text-decoration: underline dotted;
}

b, strong {
    font-weight: 700;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

hr {
    border: none;
    border-top: 1px solid;
    color: inherit;
    height: 0;
}

/* === Base === */
:root {
    --corporate-red: #520505;

    --color-accent: var(--corporate-red);
    --color-text: #2b2b2b;
    --color-bg: var(--color-beige);
    --color-beige: #fdf6e3;
    --font-family: "ca", "Times New Roman", serif;

    --fs-site-name: 3rem;  /* site name in sidebar */
    --fs-nav: 1.3rem;        /* navigation links */
    --fs-body: 1.25rem;     /* body / running text */
    --fs-heading: 2rem;     /* section headings */
    --fs-hero: 3rem;         /* hero title */

    --sidebar-width: 12rem;
    --sidebar-logo-top-bottom-gap: 1rem;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.2;
    min-height: 100dvh;
    display: flex;
    flex-direction: row;
    overflow-y: scroll;
}

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

a:hover {
    text-decoration: underline;
}

.food-menu {
    max-width: 700px;
    margin: 0 auto;
}

.food-menu h1,
.food-menu h2,
.food-menu h3,
.food-menu h4,
.food-menu h5,
.food-menu h6 {
    padding-top: 1rem;
    text-align: center;
}

.food-menu h2 {
    text-transform: uppercase;
}

.food-description {
    width: calc(100% - 5rem);
    margin-bottom: 0px;
}

.food-item-header {
    display: flex;
    flex-wrap: wrap;
}

.food-item {
    margin-bottom: 1rem;
}

.food-variant {
    display: flex;
    flex-wrap: wrap;
}

.variant-text {
    padding-left: 2rem;
}

.food-item-name {
    font-weight: bold;
}

.food-item-price {
    font-weight: bold;
    margin-left: auto;
}

.allergens {
    font-size: 0.9rem;
    /*make superscript*/
    vertical-align: super;
    margin-left: 0.5rem;
}

.allergen-list {
    columns: 3;
    column-gap: 2rem;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.allergen-item {
    break-inside: avoid;
}

.allergen-letter {
    display: inline-block;
    min-width: 2rem;
    font-weight: 700;
}

.allergen-text {
    display: inline;
}

.online-booking-cta {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.online-booking-button {
    display: inline-block;
    border-radius: 18px;
    background-color: #870a05;
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.online-booking-button:hover,
.online-booking-button:focus-visible {
    text-decoration: none;
    opacity: 0.92;
}

/* === Catering Form === */

.catering-flash {
    text-align: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border: 1px solid;
}

.catering-flash p {
    margin: 0;
}

.catering-flash-success {
    background-color: #e8f5e9;
    border-color: #66bb6a;
    color: #2e7d32;
}

.catering-flash-error {
    background-color: #fbe9e7;
    border-color: #ef5350;
    color: #c62828;
}

.catering-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.catering-form-row {
    display: flex;
    gap: 1rem;
}

.catering-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
}

.catering-field-grow {
    flex: 2 1 0;
}

.catering-field-date {
    flex: 0 0 11rem;
}

.catering-field-plz {
    flex: 0 1 7rem;
}

.catering-form label {
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
}

.catering-form input,
.catering-form select,
.catering-form textarea {
    font-family: inherit;
    padding: 0.35rem 0.5rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.catering-time-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.catering-time-picker select {
    width: 3em;
}

.catering-form .catering-field > select#catering-persons {
    width: 3em;
}

.catering-field-persons {
    align-self: flex-start;
}

.catering-checkbox-label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 1rem;
}

.catering-checkbox-label input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
}

.catering-form button[type="submit"] {
    margin-top: 1rem;
    align-self: flex-start;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: #870a05;
    color: #fff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.catering-form button[type="submit"]:hover,
.catering-form button[type="submit"]:focus-visible {
    opacity: 0.92;
}

.catering-form input:user-invalid,
.catering-form select:user-invalid {
    border-color: #c0392b;
    outline-color: #c0392b;
}

@media (max-width: 60rem) {
    .catering-form-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .catering-form-row-inline {
        flex-direction: row;
        gap: 1rem;
    }

    .catering-field-plz {
        flex-basis: auto;
    }
}

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-accent);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: var(--sidebar-logo-top-bottom-gap) 1.25rem;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 5px 0px 10px 0px rgba(0,0,0,0.75);
}

/* === Logo (inside sidebar) === */
.site-logo {
    text-decoration: none;
    cursor: pointer;
    display: block;
    margin-left: 0.5rem;
    margin-bottom: var(--sidebar-logo-top-bottom-gap);
}

.site-logo:hover,
.site-logo:visited {
    text-decoration: none;
    color: inherit;
}

.site-name {
    font-size: var(--fs-site-name);
    color: #fff;
}

/* === Navigation (inside sidebar) === */
.main-nav {
    flex: 1;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-item > a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 0.25rem;
    color: #fff;
    font-size: var(--fs-nav);
    transition: background 0.15s;
    line-height: 1.6;
    text-decoration: none;
}

.nav-item > a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.nav-item {
    position: relative;
}

.nav-sublist {
    list-style: none;
    padding-left: 0.75rem;
    margin-top: 0.1rem;
    margin-bottom: 0.25rem;
}

.nav-subitem a {
    display: block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: calc(var(--fs-nav) - 0.1rem);
    transition: background 0.15s, color 0.15s;
}

.nav-subitem a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

/* Hamburger (hidden on desktop, used on mobile) */
.nav-hamburger {
    display: none;
}

#nav-toggle {
    display: none;
}

/* === Page Body (right of sidebar) === */
.page-body {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* === Main Content === */
.site-content {
    flex: 1;
    max-width: 64rem;
    padding: 2.5rem 2rem;
    width: 100%;
}

/* === Hero (Start Page) === */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero h1 {
    font-size: var(--fs-hero);
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: var(--fs-body);
    margin-bottom: 0.25rem;
}

p.hero-link {
    margin: 0rem;
}

.hero-link a {
    font-size: var(--fs-body);
    font-weight: 600;
}

/* === Opening Hours Section === */
.opening-hours-section {
    max-width: 28rem;
    margin: 2rem auto;
    text-align: center;
}

.opening-hours-section h2 {
    font-size: var(--fs-heading);
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.opening-hours {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
    text-align: left;
}

.opening-hours dt {
    font-weight: 600;
}

/* === Home News Section === */
.home-news-section {
    max-width: 36rem;
    margin: 2.25rem auto;
    text-align: center;
}

.home-news-section h2 {
    font-size: var(--fs-heading);
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.news-card {
    position: relative;
    text-align: left;
    background: #fff9ee;
    border: 2px solid #e8d4ad;
    border-left: 0.45rem solid #870a05;
    border-radius: 0.35rem;
    padding: 1rem 1.1rem 0.8rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.news-kicker {
    display: inline-block;
    background: #870a05;
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.55rem;
}

.news-headline {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
}

.news-details {
    list-style: disc;
    margin: 0;
    padding-left: 1.35rem;
}

.news-details li {
    margin-bottom: 0.35rem;
}

.news-details li:last-child {
    margin-bottom: 0;
}

.text-center {
    text-align: center;
}

/* === Jobs / Stellen === */
.jobs-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.jobs-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    background: #870a05;
    color: #fff;
    font-size: 0.9em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.jobs-hero h1 {
    color: #870a05;
    margin-bottom: 0.75rem;
}

.jobs-lead {
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.4;
}

.jobs-card {
    max-width: 40rem;
    margin: 1.5rem auto 0;
    background: #fff9ee;
    border: 2px solid #e8d4ad;
    border-left: 0.45rem solid #870a05;
    border-radius: 0.35rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    padding: 1.15rem 1.2rem 1rem;
}

.jobs-card h2 {
    color: #870a05;
    font-size: 1.55rem;
}

.jobs-list {
    list-style: disc;
    margin: 0.75rem 0 0.65rem;
    padding-left: 1.45rem;
}

.jobs-list li {
    margin-bottom: 0.45rem;
}

.jobs-note {
    display: inline-block;
    margin-top: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.3rem;
    background: #f3e4c7;
}

p.jobs-cta {
    margin-bottom: 0;
    font-weight: 700;
}

.jobs-cta a {
    text-decoration-thickness: 2px;
}

/* === 404 Not Found === */
.not-found {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.not-found h1 {
    font-size: var(--fs-hero);
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.not-found p {
    font-size: var(--fs-body);
    margin-bottom: 0.5rem;
}

.not-found-img {
    display: block;
    margin: 2rem auto 0;
    max-width: 24rem;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* === Footer (inside page-body, not below sidebar) === */
.site-footer {
    background: var(--color-beige);
    border-top: 5px solid var(--color-accent);
    margin-top: auto;
    padding: 1.25rem;
}

.footer-inner {
    max-width: 64rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 4rem;
}

.footer-contact h3,
.footer-hours h3 {
    color: var(--color-accent);
    font-size: var(--fs-heading);
    margin-bottom: 0.5rem;
}

.footer-contact address {
    font-style: normal;
}

.footer-hours .opening-hours {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 1rem;
}

.footer-hours .opening-hours dt {
    font-weight: 600;
}

.footer-hours .online-booking-cta {
    text-align: left;
    margin: 0 0 1rem;
}

.footer-note {
    max-width: 64rem;
    margin-top: 1.25rem;
}

.footer-note p {
    margin: 0;
}

/* === Large Screen "Menu Card" Content === */
@media (min-width: 80rem) {
    .page-body {
        position: relative;
        isolation: isolate;
    }

    /* Blurred building background behind the menu card */
    .page-body::before {
        content: "";
        position: fixed;
        top: 0;
        left: var(--sidebar-width);
        right: 0;
        bottom: 0;
        background: url("/assets/images/gasthof-franzl-gebaeude.jpg") center / cover no-repeat;
        filter: blur(5px);
        opacity: 0.3;
        z-index: -1;
        pointer-events: none;
    }

    .site-content {
        --menu-ornament: #b89668;
        position: relative;
        margin: 2.5rem auto;
        background: var(--color-beige);
        border: 1.5px solid var(--menu-ornament);
        /* border-radius: 0.5rem; */
        padding: 4rem 4.5rem;
        box-shadow:
            0 2px 50px rgba(0, 0, 0, 0.3),
            inset 0 0 30px rgba(0,0,0,0.1);
    }

    /* Decorative inner corner brackets */
    .site-content::before {
        content: "";
        position: absolute;
        inset: 12px;
        pointer-events: none;
        background:
            url("/assets/images/ornaments/co-tl.svg") 0 0 / 75px 75px no-repeat,
            url("/assets/images/ornaments/co-tr.svg") 100% 0 / 75px 75px no-repeat,
            url("/assets/images/ornaments/co-bl.svg") 0 100% / 75px 75px no-repeat,
            url("/assets/images/ornaments/co-br.svg") 100% 100% / 75px 75px no-repeat;
    }
}

/* === Responsive (Mobile) === */
@media (max-width: 48rem) {
    .sidebar {
        position: fixed;
        top: 0;
        left: calc(-1 * var(--sidebar-width));
        transition: left 0.25s ease;
        z-index: 200;
        padding-top: 4rem;
    }

    .site-logo {
        display: none;
    }

    /* Show sidebar when hamburger is checked */
    body:has(#nav-toggle:checked) .sidebar {
        left: 0;
    }

    /* Overlay behind sidebar */
    body:has(#nav-toggle:checked)::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 150;
    }

    .nav-hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 300;
        padding: 0.5rem;
        background: var(--color-accent);
        border-radius: 0.25rem;
    }

    .hamburger-bar {
        display: block;
        width: 26px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.2s;
    }

    .page-body {
        margin-left: 0;
    }

    .site-content {
        padding: 3.5rem 1.25rem 2rem;
    }

    .hero h1 {
        font-size: var(--fs-heading);
    }

    .news-headline {
        font-size: 1.25rem;
    }

    .jobs-card {
        padding: 1rem 0.95rem 0.9rem;
    }

    .jobs-card h2 {
        font-size: 1.35rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .allergen-list {
        columns: 2;
    }

    .flow-image,
    .flow-image-left,
    .flow-image-right {
        float: none;
        margin-left: 0;
        margin-right: 0;
        width: min(100%, 24rem);
    }
}

@media (max-width: 37.5rem) {
    .allergen-list {
        columns: 1;
    }
}
