/*
   BSS Elektrotechnik - Rework
   Single-page design with Geschäftsbereiche subpage
*/

@import url('../fonts/fonts.css');

:root {
    /* Colors - Milwaukee Aggressive */
    --primary: #D60B33;
    --primary-hover: #B00A2A;
    --primary-light: #FF3D5A;
    --secondary: #1A1A1A;
    --text-main: #1F1F1F;
    --text-light: #5C5C5C;
    --text-inverse: #D1D5DB;
    --bg-white: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-dark: #1A1A1A;
    --bg-charcoal: #0D0D0D;
    --border-light: #E5E5E5;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --container: 1400px;

    --transition: 0.15s ease-out;
    --transition-fast: 0.1s ease-out;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

[id] {
    scroll-margin-top: 160px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    overflow-wrap: break-word;
    hyphens: auto;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
}

h4 {
    font-size: 1.125rem;
    font-weight: 700;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* === UTILITIES === */
.container {
    width: 90%;
    max-width: var(--container);
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-light {
    background: var(--bg-light);
}

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

.text-primary {
    color: var(--primary);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 4px 4px 0 var(--secondary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--secondary);
}

.btn-primary:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 var(--secondary);
}

.btn-outline {
    background: transparent;
    border: 3px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* === HEADER === */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    border-bottom: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#site-header.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.top-bar {
    display: none;
    background: var(--secondary);
    padding: 0.5rem 0;
    font-size: 0.75rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: none;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
}

.top-bar a {
    color: white;
}

.top-bar a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile: Logo + Hamburger */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
}


.brand-logo img {
    transition: opacity 0.3s ease;
}

.brand-logo {
    position: relative;
}

.brand-logo .logo-full {
    height: 80px;
}

.brand-logo .logo-compact {
    display: none;
}

.header-right {
    display: none;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition-fast);
}

nav a:hover {
    color: white;
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--secondary);
    padding: 5rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    z-index: 1001;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.mobile-nav a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1024px) {
    .header-main {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 0 1rem;
    }

    .brand-logo {
        display: flex;
        align-items: center;
    }

    .brand-logo .logo-full {
        height: 110px;
    }

    .header-right {
        display: flex;
        align-items: center;
    }

    .menu-toggle,
    .mobile-nav,
    .menu-backdrop {
        display: none !important;
    }
}

/* === HERO === */
#hero {
    position: relative;
    min-height: 100vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
    background: rgba(26, 26, 26, 0.55);
    color: white;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/site/start-hintergrundbild.webp?v=25042026') center/cover no-repeat;
    filter: grayscale(1);
    z-index: -1;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    color: white;
    font-size: clamp(2.25rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    max-width: none;
    line-height: 1;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    hyphens: auto;
}

.mobile-break {
    display: none;
}

@media (max-width: 767px) {
    .mobile-break {
        display: inline;
    }
}

.hero-keywords {
    display: block;
    color: var(--primary);
    font-size: clamp(1rem, 3vw, 1.5rem);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

#hero .lead {
    font-size: 1rem;
    color: var(--text-inverse);
    max-width: 650px;
    margin-bottom: 2.5rem;
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

@media (max-width: 767px) {
    #hero {
        text-align: center;
    }

    #hero .lead {
        margin-left: auto;
        margin-right: auto;
    }
}

/* === INTRO === */
#intro {
    padding: 5rem 0;
    background: var(--bg-white);
    text-align: center;
}

#intro h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: 0.05em;
}

#intro h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 1.5rem auto 0;
}

/* === GESCHÄFTSBEREICHE === */
#geschaeftsbereiche {
    padding: 5rem 0;
    background: var(--primary);
}

#geschaeftsbereiche h2 {
    color: white;
}

#geschaeftsbereiche .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

#geschaeftsbereiche .grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.bereich-card {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.bereich-card:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.bereich-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.5rem;
    transition: var(--transition-fast);
}

.bereich-icon::before {
    font-family: 'electrician';
    content: "\e900";
    font-size: 2rem;
    color: #fff;
    transition: var(--transition-fast);
}

.bereich-card:hover .bereich-icon {
    background: var(--secondary);
}

.bereich-card h3 {
    margin-bottom: 1rem;
}

.bereich-card p {
    margin-bottom: 1rem;
    flex: 1;
}

.bereich-link {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.bereich-card:hover .bereich-link {
    padding-left: 0.5rem;
}

@media (min-width: 768px) {
    #geschaeftsbereiche .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === HANDWERK UND HIGHTECH === */
#handwerk {
    position: relative;
    padding: 5rem 0;
    background: rgba(26, 26, 26, 0.75);
    text-align: center;
}

#handwerk::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/site/hightech-beispielbild.webp?v=25042026') center/cover no-repeat;
    filter: grayscale(1);
    z-index: -1;
}

#handwerk .container {
    position: relative;
    z-index: 2;
}

#handwerk h2 {
    color: white;
    margin-bottom: 1.5rem;
}

#handwerk p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    text-transform: none;
}

/* === WIR === */
#wir {
    padding: 5rem 0;
    background: var(--bg-white);
}

#wir .container {
    max-width: 800px;
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
}

#wir h2 {
    margin-bottom: 1.5rem;
}

#wir p {
    font-size: 1.125rem;
    line-height: 1.8;
    text-transform: none;
    margin-bottom: 0;
}

/* === KONTAKT === */
#kontakt {
    padding: 5rem 0;
    background: var(--secondary);
}

#kontakt>.container>h2 {
    color: white;
    margin-bottom: 0.5rem;
}

#kontakt>.container>.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 4rem;
    }
}

/* Contact Info Sidebar */
.contact-info {
    background: white;
    padding: 2.5rem;
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--primary);
    height: fit-content;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    color: var(--secondary);
}

.contact-info-item {
    margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.contact-info-item p {
    margin-bottom: 0;
    color: var(--text-main);
    line-height: 1.7;
}

.contact-info-item a {
    color: var(--text-main);
}

.contact-info-item a:hover {
    color: var(--primary);
}

/* Contact Map */
.contact-map-wrap {
    margin-top: 2.5rem;
}

.contact-map-wrap iframe,
.map-contact {
    width: 100%;
    height: 360px;
    border: 0;
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--primary);
}

/* Contact Form */
form {
    background: white;
    padding: 2.5rem;
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    max-height: 400px;
    resize: vertical;
    overflow-y: auto;
}

/* Bereich Select Cards */
.bereich-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.bereich-option {
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.bereich-option:hover {
    border-color: var(--primary);
}

.bereich-option.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.bereich-option.active strong {
    color: white;
}

.bereich-sub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.bereich-sub.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
}

.sub-option {
    padding: 0.75rem 0.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    text-align: center;
    transition: var(--transition-fast);
}

.sub-option:hover {
    border-color: var(--primary);
}

.sub-option.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

@media (max-width: 400px) {
    .bereich-select {
        grid-template-columns: 1fr;
    }

    .bereich-sub {
        grid-template-columns: 1fr;
    }
}

.form-status {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.form-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 4px 4px 0 var(--secondary);
}

form button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--secondary);
}

form button[type="submit"]:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 var(--secondary);
}

/* === FLOATING CONTACT BUTTON === */
.floating-contact-btn {
    position: fixed;
    bottom: 2rem;
    right: 5%;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 4px 4px 0 var(--secondary);
    z-index: 900;
    transition: opacity 0.3s ease, transform 0.3s ease, background var(--transition-fast);
}

.floating-contact-btn:hover {
    background: var(--primary-hover);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--secondary);
    color: white;
}

.floating-contact-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.floating-contact-btn svg {
    flex-shrink: 0;
}

/* === FOOTER === */
#site-footer {
    background: var(--bg-charcoal);
    color: white;
    padding: 4rem 0 2rem;
    border-top: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 2rem 2.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.footer-grid .brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 150px;
    flex-shrink: 0;
}

.footer-grid .brand p {
    margin-top: 60px;
    margin-bottom: 0;
    color: var(--text-inverse);
    text-transform: none;
}

.footer-grid h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-grid .links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-grid a {
    color: var(--text-inverse);
    transition: var(--transition-fast);
}

.footer-grid a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.copyright {
    text-align: center;
    color: var(--text-inverse);
    font-size: 0.875rem;
}

@media (max-width: 1023px) {
    .footer-grid .brand {
        display: none;
    }

    .footer-logo {
        height: 100px;
    }

    .footer-grid .brand p {
        margin-top: 0;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* === LEGAL PAGES (Impressum, Datenschutz) === */
.legal-page {
    padding: 12rem 0 5rem;
    background: var(--bg-white);
}

.legal-page .container {
    max-width: 900px;
}

.legal-page h1 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary);
}

.legal-page h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.legal-page p {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.legal-page ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.legal-page ul li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.legal-page a {
    color: var(--primary);
}

.legal-page a:hover {
    text-decoration: underline;
}

/* === GESCHÄFTSBEREICHE PAGE === */
.geschaeft-hero {
    padding: 10rem 0 5rem;
    background: var(--secondary);
    text-align: center;
}

.geschaeft-hero h1 {
    color: white;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 767px) {
    .geschaeft-hero {
        padding: 7rem 0 3rem;
    }

    .geschaeft-hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

.geschaeft-hero .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* Planung Section */
.planung-content {
    max-width: 800px;
    text-align: center;
}

.planung-content h2 {
    margin-bottom: 1.5rem;
}

.planung-content p {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Bereich Detail Sections */
.bereich-detail {
    padding: 0;
    overflow: hidden;
}

.bereich-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 400px;
}

.bereich-detail-image {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.bereich-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.bereich-detail:hover .bereich-detail-image img {
    filter: grayscale(0);
}

.bereich-detail-text {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bereich-detail-text h2 {
    margin-bottom: 1.5rem;
}

.bereich-detail-text p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.bereich-detail-text .btn {
    align-self: flex-start;
}

/* Alternating background */
.bereich-detail:nth-child(even) .bereich-detail-text {
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .bereich-detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bereich-detail-image {
        min-height: auto;
    }

    .bereich-detail-text {
        padding: 4rem 3rem;
    }

    /* Reversed layout: text left, image right */
    .bereich-detail--reversed .bereich-detail-grid {
        direction: rtl;
    }

    .bereich-detail--reversed .bereich-detail-grid>* {
        direction: ltr;
    }
}

@media (min-width: 1024px) {
    .bereich-detail-text {
        padding: 5rem 4rem;
    }
}

.powered-by:hover {
    opacity: 1;
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* adjust top align of logo */
.powered-by__logo {
    margin-top: -1px;
}

.powered-by__text {
    font-family: var(--font-body);
    font-size: 0.55rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.03em;
    transition: color 0.3s;
}

.powered-by:hover .powered-by__text {
    color: rgba(255, 255, 255, 0.6);
}

.powered-by__logo {
    height: 9px;
    width: auto;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.powered-by:hover .powered-by__logo {
    opacity: 0.6;
}

/* ── Small phones ── */
@media (max-width: 380px) {
    .powered-by {
        right: 1rem;
        bottom: 1rem;
    }
}

/* === HIDE DEBUG TAGS === */
.debug-tag {
    display: none;
}

/* === MOBILE LAYOUT FIXES === */
@media (max-width: 767px) {

    /* Container nutzt mehr Breite damit Formulare + Cards nicht gequetscht werden. */
    .container {
        width: 92%;
    }

    /* Contact: Form & Info Side-By-Side padding reduzieren — 2.5rem war zu viel. */
    form,
    .contact-info {
        padding: 1.5rem;
    }

    /* Submit-Button-Text nicht umbrechen, falls platz knapp */
    form button[type="submit"] {
        white-space: normal;
    }

    /* Bereich-Sub-Buttons: auf Mobile 2 statt 3 Spalten für mehr Tap-Target */
    .bereich-sub {
        grid-template-columns: 1fr 1fr;
    }

    /* H1/H2 dürfen bei sehr langen Wörtern brechen */
    h1,
    h2 {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}