/* CGM multilingual SimplePages
   Adds only language controls and language-panel layout.
   Existing hero dimensions/styles are intentionally untouched. */

.cgm-lang-switch-wrap {
    padding-top: 30px;
    padding-bottom: 8px;
}

.cgm-lang-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cgm-lang-switch__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    padding: 7px 12px;
    border: 1px solid rgba(16, 47, 72, .28);
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    color: #102f48;
    font-family: "Hind", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.cgm-lang-switch__button:hover,
.cgm-lang-switch__button:focus-visible {
    border-color: #102f48;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 47, 72, .10);
}

.cgm-lang-switch__button[aria-pressed="true"] {
    border-color: #102f48;
    background: #102f48;
    color: #fff;
}

.cgm-lang-switch__flag {
    display: block;
    width: 22px;
    height: 15px;
    flex: 0 0 22px;
    object-fit: cover;
    border: 1px solid rgba(16, 47, 72, .18);
    border-radius: 2px;
}

[data-cgm-lang-panel][hidden] {
    display: none !important;
}

/* About: keep the existing editorial system, only give the selector its shell. */
body.cgm-about-page .cgm-lang-switch-wrap {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

/* Visit / getting here */
body.cgm-contact-page {
    background: #061827 !important;
}

body.cgm-contact-page #wrap {
    background: #061827 !important;
}

/*
 * Big Picture normally gives #content a 21 px horizontal inset.
 * /visit has its own centred #primary, so the outer content can safely be
 * full width. This lets the CGM footer run flush to both viewport edges.
 */
body.cgm-contact-page #content {
    padding: 0 !important;
    margin: 0 !important;
    background: #f3f0e8;
}

/* The custom CGM footer is already rendered by the visit template. */
body.cgm-contact-page #wrap > footer {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.cgm-contact-page .cgm-site-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    background: #061827 !important;
}

body.cgm-contact-page #primary {
    width: min(1080px, calc(100% - 48px));
    max-width: none;
    margin: 0 auto;
    padding: 44px 0 68px;
}

body.cgm-contact-page #simple-pages-breadcrumbs {
    margin-top: 0;
}

body.cgm-contact-page #primary > h1 {
    margin-bottom: 8px;
    color: #0b2c45;
    font-family: "Caudex", serif;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.05;
}

body.cgm-contact-page .cgm-lang-switch-wrap {
    padding-top: 12px;
    padding-bottom: 28px;
}

body.cgm-contact-page .cgm-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
    gap: 30px;
    align-items: start;
}

body.cgm-contact-page .cgm-contact-card,
body.cgm-contact-page .cgm-contact-map {
    border: 1px solid rgba(16,47,72,.16);
    background: rgba(255,255,255,.66);
    padding: clamp(24px, 4vw, 36px);
}

body.cgm-contact-page .cgm-contact-card h2,
body.cgm-contact-page .cgm-contact-map h2 {
    margin: 0 0 14px;
    color: #0b2c45;
    font-family: "Caudex", serif;
    font-size: clamp(27px, 3vw, 35px);
    line-height: 1.12;
}

body.cgm-contact-page .cgm-contact-card h3 {
    margin: 0 0 12px;
    color: #0b2c45;
    font-family: "Caudex", serif;
    font-size: 23px;
}

body.cgm-contact-page .cgm-contact-card p,
body.cgm-contact-page .cgm-contact-map p {
    font-family: "Hind", sans-serif;
    font-size: 17px;
    line-height: 1.62;
}

body.cgm-contact-page .cgm-contact-card hr {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid rgba(16,47,72,.14);
}

body.cgm-contact-page .cgm-route-link {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 9px 13px;
    border: 1px solid #0b2c45;
    color: #0b2c45;
    font-weight: 600;
    text-decoration: none;
}

body.cgm-contact-page .cgm-route-link:hover,
body.cgm-contact-page .cgm-route-link:focus-visible {
    background: #0b2c45;
    color: #fff;
    outline: none;
}

@media (max-width: 760px) {
    body.cgm-about-page .cgm-lang-switch-wrap,
    body.cgm-contact-page #primary {
        width: min(100% - 28px, 1080px);
    }

    body.cgm-contact-page .cgm-contact-layout {
        grid-template-columns: 1fr;
    }

    .cgm-lang-switch {
        gap: 6px;
    }

    .cgm-lang-switch__button {
        padding: 7px 10px;
        font-size: 14px;
    }
}

.cgm-lang-switch__button {
    text-decoration: none;
}

.cgm-lang-panel {
    display: none;
}

.cgm-lang-panel.is-active {
    display: block;
}


/* Secondary external link used for Celle parking guidance. */
body.cgm-contact-page .cgm-parking-link {
    margin-top: 10px;
}

/* ========================================================================
   ABOUT: language selector lives inside the existing hero.
   Hero geometry, slider and image treatment are intentionally unchanged.
   ======================================================================== */
body.cgm-about-page .cgm-about-hero .cgm-lang-switch-wrap {
    width: auto;
    margin: 20px 0 0;
    padding: 0;
}

body.cgm-about-page .cgm-about-hero .cgm-lang-switch {
    gap: 8px;
}

body.cgm-about-page .cgm-about-hero .cgm-lang-switch__button {
    min-height: 36px;
    padding: 6px 11px;
    border-color: rgba(255,255,255,.52);
    background: rgba(5, 28, 46, .42);
    color: #fff;
    box-shadow: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

body.cgm-about-page .cgm-about-hero .cgm-lang-switch__button:hover,
body.cgm-about-page .cgm-about-hero .cgm-lang-switch__button:focus-visible {
    border-color: #d1b476;
    background: rgba(5, 28, 46, .78);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(209,180,118,.16);
}

body.cgm-about-page .cgm-about-hero .cgm-lang-switch__button[aria-pressed="true"] {
    border-color: #d1b476;
    background: #d1b476;
    color: #0b2c45;
}

body.cgm-about-page .cgm-about-hero .cgm-lang-switch__flag {
    border-color: rgba(255,255,255,.46);
}

@media (max-width: 760px) {
    body.cgm-about-page .cgm-about-hero .cgm-lang-switch-wrap {
        width: auto;
        margin-top: 16px;
    }

    body.cgm-about-page .cgm-about-hero .cgm-lang-switch__button {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 13px;
    }

    body.cgm-about-page .cgm-about-hero .cgm-lang-switch__flag {
        width: 20px;
        height: 14px;
        flex-basis: 20px;
    }
}
