/* ==========================================================
   Layout "modern" (config.design.layout = "modern")
   Alle Regeln greifen nur mit der Klasse .layout-modern an <html>.
   Farben kommen weiterhin aus dem Theme (CSS-Variablen), daher
   funktionieren alle Themes in beiden Layouts.
   ========================================================== */

/* ---------------------------------- */
/* Schrift: Inter, selbst gehostet (keine externen Server, Datenschutz).
   Wird nur heruntergeladen, wenn das moderne Layout aktiv ist.
   Lizenz: fonts/Inter-LICENSE.txt (SIL Open Font License 1.1) */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    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;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"),
         url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    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;
}

.layout-modern {
    --font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --modern-radius: 16px;
    --modern-topbar-height: 64px;
    --modern-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
    --modern-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.08), 0 16px 36px rgba(16, 24, 40, 0.14);
}

.layout-modern body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
}

/* ---------------------------------- */
/* Leiste: [Logo + Titel] [Navigation] [Sprache] */
.layout-modern #topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--modern-topbar-height);
    padding: 0 1.5rem;
    box-sizing: border-box;
    background: var(--header-bg-color);
    color: var(--header-text-color);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--header-text-color) 12%, transparent),
                0 4px 16px rgba(16, 24, 40, 0.06);
}

.layout-modern #topbar header {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    background: none;
    text-align: left;
    position: static;
}

.layout-modern #topbar #header-text,
.layout-modern #topbar header.has-language-switcher #header-text {
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-modern #topbar #site-logo {
    max-height: 44px;
    max-width: 200px;
    margin: 0;
}

/* Logo + Titel als ein Link, Titel wird bei Platzmangel mit … gekürzt */
.layout-modern #topbar .home-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    overflow: hidden;
}

/* Header-Container des Sprachumschalters ist in der Leiste leer */
.layout-modern #topbar #language-switcher-header {
    display: none;
}

/* Navigation: nimmt den restlichen Platz, Links rechtsbündig.
   (Viele Regeln in style.css nutzen !important, daher hier ebenfalls) */
.layout-modern #topbar #main-nav {
    flex: 1 1 0;
    min-width: 0;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: none !important;
    border: none;
    z-index: auto !important;
}

.layout-modern #topbar .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.layout-modern #topbar #nav-links {
    width: auto;
    gap: 0.25rem;
    justify-content: flex-end;
}

.layout-modern #topbar #nav-links a {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    color: var(--header-text-color);
    font-size: 0.95rem;
    font-weight: 500;
    background: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.layout-modern #topbar #nav-links a:hover {
    background: color-mix(in srgb, var(--header-text-color) 12%, transparent);
}

.layout-modern #topbar #nav-links a[aria-current="page"] {
    background: color-mix(in srgb, var(--header-text-color) 18%, transparent);
    font-weight: 600;
}

/* Sprachumschalter rechts in der Leiste */
.layout-modern #topbar-tools {
    flex: none;
    display: flex;
    align-items: center;
}

.layout-modern #topbar-tools:empty {
    display: none;
}

.layout-modern #topbar-tools #language-switcher {
    min-width: 0;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--header-text-color) 35%, transparent);
    background: transparent;
    color: var(--header-text-color);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.layout-modern #topbar-tools #language-switcher option {
    color: #222222;
    background: #ffffff;
}

/* ---------------------------------- */
/* Menü-Button (wenn die Links nicht in die Leiste passen) */
html.layout-modern body #topbar nav#main-nav button#nav-toggle {
    width: auto;
    min-height: 0;
    padding: 0.45rem 0.7rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--header-text-color);
    font-size: 1.25rem;
    line-height: 1;
    gap: 0.4rem;
}

html.layout-modern body #topbar nav#main-nav button#nav-toggle:hover {
    background: color-mix(in srgb, var(--header-text-color) 12%, transparent);
}

.layout-modern #nav-toggle::after,
.layout-modern #nav-toggle .menu-text {
    display: none;
}

/* Im Menü-Modus braucht es das alte Dropdown der nav-container nicht */
.layout-modern #topbar #main-nav.mobile-view .nav-container {
    display: none !important;
}

/* Ausgeklapptes Menü: volle Breite direkt unter der Leiste */
html.layout-modern #mobile-text {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    box-sizing: border-box;
    padding: 0.5rem 1.25rem 1rem !important;
    background: var(--header-bg-color) !important;
    box-shadow: 0 16px 32px rgba(16, 24, 40, 0.16);
    z-index: 999 !important;
}

html.layout-modern #mobile-text .mobile-nav-link {
    width: 100%;
    color: var(--header-text-color) !important;
    font-size: 1.05rem !important;
    font-weight: 500;
    padding: 0.85rem 0 !important;
    border-top: none !important;
    border-bottom: 1px solid color-mix(in srgb, var(--header-text-color) 12%, transparent) !important;
}

html.layout-modern #mobile-text .mobile-nav-link:last-child {
    border-bottom: none !important;
}

html.layout-modern #mobile-text .mobile-nav-link:hover,
html.layout-modern #mobile-text .mobile-nav-link[aria-current="page"] {
    background: none !important;
    opacity: 0.75;
}

@media (max-width: 768px) {
    .layout-modern #topbar {
        gap: 0.5rem;
        padding: 0 0.75rem 0 1rem;
        --modern-topbar-height: 56px;
    }

    .layout-modern #topbar #header-text,
    .layout-modern #topbar header.has-language-switcher #header-text {
        font-size: 1.05rem;
    }

    .layout-modern #topbar #site-logo {
        max-height: 36px;
        max-width: 140px;
    }

    .layout-modern #topbar-tools #language-switcher {
        padding: 0.3rem 0.55rem;
        font-size: 0.85rem;
    }
}

/* ---------------------------------- */
/* Startseite: Einleitung */
.layout-modern #welcome #welcome-top {
    padding: 4rem 1.5rem 1.5rem;
}

.layout-modern #welcome #welcome-top > h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

/* Fließtext ohne Kasten, angenehme Zeilenlänge */
.layout-modern #welcome #welcome-top > p {
    width: min(720px, 100%);
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    font-size: 1.1rem;
    line-height: 1.75;
}

/* Überschrift über den Kacheln */
.layout-modern #welcome > div[align] h2 {
    margin: 2.5rem 1rem 0.5rem;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------------------------------- */
/* Unterkunfts-Kacheln */
.layout-modern #welcome #object-overview-placeholder {
    max-width: 1240px;
    padding: 0 1.5rem;
    background: none;
    border: none;
    margin: 1rem auto 3rem !important;
}

.layout-modern .unterkunft-preview-grid {
    gap: 1.75rem;
    padding: 0;
}

.layout-modern #welcome .unterkunft-box {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: var(--modern-radius);
    background: var(--background-white);
    box-shadow: var(--modern-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.layout-modern #welcome .unterkunft-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--modern-shadow-hover);
}

.layout-modern .unterkunft-box__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.layout-modern #welcome .unterkunft-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.layout-modern #welcome .unterkunft-box:hover img {
    transform: scale(1.05);
}

.layout-modern .unterkunft-box__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.1rem 1.25rem 1.25rem;
}

.layout-modern #welcome .unterkunft-box h3 {
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--card-text-color, var(--text-color));
}

.layout-modern .unterkunft-box__teaser {
    margin: 0.35rem 0 0;
    text-align: left;
    font-size: 0.95rem;
}

.layout-modern .unterkunft-box__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--card-cta-color, var(--accent-text));
}

.layout-modern .unterkunft-box__cta::after {
    content: "→";
    transition: transform 0.2s ease;
}

.layout-modern .unterkunft-box:hover .unterkunft-box__cta::after {
    transform: translateX(4px);
}

/* ---------------------------------- */
/* Kontaktbereich: Icons statt Emojis, luftiger */
.layout-modern .welcome-bottom-card {
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: var(--modern-shadow);
}

.layout-modern .welcome-bottom-card h3 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.layout-modern .welcome-contact-info {
    background: none;
    padding: 0;
}

.layout-modern .welcome-contact-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.layout-modern .welcome-contact-link {
    padding: 0.7rem 1.2rem 0.7rem 0.7rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    font-weight: 500;
}

.layout-modern .welcome-contact-link-icon {
    font-size: 0;          /* Emoji ausblenden … */
}

.layout-modern .welcome-contact-link-icon::before {
    content: "";            /* … und durch ein einfarbiges Icon ersetzen */
    width: 1.1rem;
    height: 1.1rem;
    background: currentColor;
    -webkit-mask: var(--modern-icon) center / contain no-repeat;
    mask: var(--modern-icon) center / contain no-repeat;
}

.layout-modern .welcome-contact-link[href^="tel:"] {
    --modern-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.layout-modern .welcome-contact-link[href^="mailto:"] {
    --modern-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}

/* ---------------------------------- */
/* Footer: schlanker, Text und Logo in einer Zeile */
.layout-modern footer {
    padding: 0.9rem 1rem;
}

.layout-modern footer a {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.layout-modern footer .footer-text {
    font-size: 0.85rem;
    opacity: 0.85;
}

.layout-modern footer .footer-text br {
    display: none;
}

.layout-modern footer .footer-logo {
    height: 26px;
}

/* ---------------------------------- */
/* Unterseiten (Impressum o. ä.) */
.layout-modern #custom-content {
    max-width: 760px;
    padding: 3rem 1.5rem;
    line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
    .layout-modern #welcome .unterkunft-box,
    .layout-modern #welcome .unterkunft-box img,
    .layout-modern .unterkunft-box__cta::after {
        transition: none;
    }
}

/* ---------------------------------- */
/* Optionale Bausteine im modernen Layout */
.layout-modern #welcome .benefits {
    margin-top: 3rem;
}

.layout-modern #welcome .benefit {
    text-align: left;
    background: var(--background-white);
    border: none;
    border-radius: var(--modern-radius);
    box-shadow: var(--modern-shadow);
}

.layout-modern #welcome .benefit__title {
    font-weight: 650;
}

.layout-modern .unterkunft-box__facts {
    justify-content: flex-start;
    margin: 0.6rem 0 0;
}

/* WhatsApp: Sprechblasen-Icon statt Emoji */
.layout-modern .welcome-contact-link--whatsapp .welcome-contact-link-icon {
    font-size: 0;
}

.layout-modern .welcome-contact-link--whatsapp {
    --modern-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E");
}

/* Footer-Links neben dem DiBooq-Hinweis */
.layout-modern footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 2rem;
}

.layout-modern footer .footer-links {
    margin: 0;
}

.layout-modern footer .footer-links a {
    font-size: 0.85rem;
}
