/*-------------
CSS RESET & BASE TYPOGRAPHY
-------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    box-sizing: border-box;
    scroll-behavior: smooth;
    background: #F4F4F9;
}
body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    color: #16181a;
    background: #fff;
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}
a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover, a:focus { color: #18587A; text-decoration: underline; }

/* ---------
Mono color palette for sophisticated monochrome theme
Use strong contrasts for drama!
 ----------*/
:root {
    --monochrome-black: #16181a;
    --monochrome-dark: #222326;
    --monochrome-gray1: #4A4A4A;
    --monochrome-gray2: #888;
    --monochrome-gray3: #D6D7DB;
    --monochrome-gray4: #F4F4F9;
    --primary: #18587A;   /* Slight color pop for CTA, still monochrome-friendly */
    --secondary: #2E8B57;
    --accent: #F4F4F9;
    --white: #fff;
    --black: #16181a;
    --radius: 10px;
    --transition: 0.2s cubic-bezier(.62,.12,.26,1.06);
    --shadow-card: 0 2px 24px 0 rgba(34,34,34,0.08), 0 1.5px 9px 0 rgba(22,24,26,0.07);
    --shadow-strong: 0 4px 12px rgba(22,24,26,0.12);
}

/* -------------
TYPOGRAPHY
--------------*/
h1, h2, h3, h4 {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--black);
    font-weight: 700;
}
h1 {
    font-size: 2.5rem;  /* 40px base */
    margin-bottom: 20px;
    letter-spacing: 0.01em;
}
h2 {
    font-size: 2rem; /* 32px */
    margin-bottom: 18px;
}
h3 {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 12px;
}
h4 {
    font-size: 1.125rem; /* 18px */
    margin-bottom: 10px;
}
p, ul, ol {
    font-size: 1rem;  /* 16px */
    margin-bottom: 12px;
    color: var(--monochrome-gray1);
}
strong {
    color: var(--black);
    font-weight: bold;
}
.subheadline {
    font-size: 1.25rem;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--monochrome-gray1);
    margin-bottom: 20px;
    letter-spacing: 0.01em;
}

ul, ol {
    list-style: disc;
    padding-left: 22px;
}
ul li, ol li {
    margin-bottom: 8px;
    color: var(--monochrome-gray2);
}

/* -----------
LAYOUT
-----------*/
.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}
.content-wrapper {
    margin-bottom: 40px;
    padding: 0;
}
.section {
    margin-bottom: 60px;
    padding: 40px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.text-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

/* For spacing between cards/sections */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}
.card {
    margin-bottom: 20px;
    position: relative;
    flex: 1 1 320px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    min-width: 260px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover, .card:focus-within {
    box-shadow: var(--shadow-strong);
    transform: translateY(-2px) scale(1.02);
}

.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.text-image-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

/* Feature grid (index.php) */
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    margin: 24px 0 0 0;
}
.feature-grid > div {
    flex: 1 1 220px;
    background: var(--monochrome-gray4);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 28px 22px;
    min-width: 200px;
    margin-bottom: 20px;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--monochrome-gray3);
}
.feature-grid > div img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    filter: grayscale(100%) contrast(1.3);
}
.feature-grid > div:hover {
    box-shadow: var(--shadow-strong);
    transform: translateY(-3px) scale(1.025);
}

/* Service cards (leistungen.html) */
.service-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px 0 0 0;
}
.service-cards > div {
    flex: 1 1 300px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 26px 20px;
    min-width: 220px;
    margin-bottom: 20px;
    border: 1px solid var(--monochrome-gray3);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}
.service-cards > div:hover {
    box-shadow: var(--shadow-strong);
    transform: translateY(-3px) scale(1.025);
}

/* Testimonials */
.testimonial-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--monochrome-gray4);
    margin-bottom: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--monochrome-gray3);
    color: var(--black);
    font-style: italic;
    font-size: 1.15rem;
    flex-wrap: wrap;
}
.testimonial-card strong {
    color: var(--monochrome-gray2);
    font-size: 1rem;
    font-style: normal;
    display: block;
    margin-left: auto;
}

/* Thank you block (thanks.php) */
.thankyou-block {
    background: var(--monochrome-gray4);
    border-radius: var(--radius);
    margin: 24px 0;
    padding: 40px 18px 32px 18px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* Trust signals styling (kontakt.html) */
.trust-signals {
    margin-top: 22px;
    font-size: 1.1rem;
    color: var(--monochrome-black);
    background: var(--monochrome-gray4);
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

/* -----------
BUTTONS
------------*/
.cta-primary {
    display: inline-block;
    background: var(--black);
    color: var(--white) !important;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: bold;
    border-radius: var(--radius);
    padding: 14px 32px;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 12px rgba(34,34,34,0.07);
    border: none;
    outline: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.cta-primary:hover, .cta-primary:focus {
    background: var(--primary);
    color: var(--white) !important;
    box-shadow: 0 6px 24px rgba(34,34,34,0.10);
    transform: translateY(-2px) scale(1.01);
}

button, .mobile-menu-toggle, .mobile-menu-close {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 600;
    border: none;
    outline: none;
    cursor: pointer;
    background: none;
    color: var(--black);
    padding: 0;
    transition: color var(--transition), background var(--transition);
}

button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Button group in cookie banner */
.cookie-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
}
.btn-cookie-accept, .btn-cookie-reject, .btn-cookie-settings {
    border-radius: var(--radius);
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    padding: 11px 26px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.btn-cookie-accept {
    background: var(--black);
    color: var(--white);
}
.btn-cookie-accept:hover, .btn-cookie-accept:focus {
    background: var(--primary);
}
.btn-cookie-reject {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--monochrome-gray2);
}
.btn-cookie-reject:hover, .btn-cookie-reject:focus {
    background: var(--monochrome-gray3);
    color: var(--black);
}
.btn-cookie-settings {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-cookie-settings:hover, .btn-cookie-settings:focus {
    background: var(--primary);
    color: var(--white);
}

/* --------------
HEADER/NAVIGATION
----------------*/
header {
    background: var(--white);
    border-bottom: 1px solid var(--monochrome-gray3);
    box-shadow: 0 1px 6px rgba(24,24,24,0.06);
}
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 13px 20px;
}
header nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
header nav a {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 1rem;
    color: var(--black);
    padding: 8px 0;
    border-radius: 0;
    font-weight: 500;
    opacity: 0.95;
    position: relative;
    transition: color var(--transition), opacity var(--transition);
}
header nav a.cta-primary {
    margin-left: 18px;
    margin-top: 0;
}
header nav a:after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: var(--primary);
    transition: width 0.24s cubic-bezier(.77,0,.18,1.08);
    margin-top: 2px;
}
header nav a:hover:after, header nav a:focus:after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    margin: 0 0 0 16px;
    border-radius: 7px;
    padding: 4px 12px;
    color: var(--black);
    transition: background var(--transition);
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
    background: var(--monochrome-gray3);
}

/* -------------
MOBILE MENU
--------------*/
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(22,24,26, 0.92);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    transform: translateX(100%);
    transition: transform 0.44s cubic-bezier(.77,0,.18,1.08);
    pointer-events: none;
    opacity: 0;
}
.mobile-menu.open {
    transform: translateX(0);
    pointer-events: all;
    opacity: 1;
    transition: transform 0.32s cubic-bezier(.77,0,.18,1.08), opacity 0.28s ease-in;
}
.mobile-menu-close {
    font-size: 2rem;
    color: var(--white);
    padding: 18px 24px 12px 0;
    background: none;
    border-radius: 7px;
    align-self: flex-end;
    margin: 0 10px 0 0;
    transition: background var(--transition), color var(--transition);
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
    background: rgba(68,68,70,0.12);
    color: var(--accent);
}
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 32px 30px 20px 32px;
}
.mobile-nav a {
    color: var(--white);
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 10px 0;
    border-radius: 6px;
    transition: background var(--transition), color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
    background: var(--white);
    color: var(--black);
}

/* Hide nav on mobile - show burger */
@media (max-width: 900px) {
    header nav { display: none; }
    .mobile-menu-toggle { display: block; }
    header .container {
        gap: 0;
    }
}

@media (min-width: 901px) {
    .mobile-menu { display: none !important; }
}

/* -----
MAIN
------*/
main {
    width: 100%;
    background: var(--accent);
    padding-bottom: 55px;
    min-height: 60vh;
}
main section {
    width: 100%;
    margin-bottom: 60px;
}

/* ---------
FOOTER
----------*/
footer {
    width: 100%;
    background: var(--monochrome-black);
    color: var(--white);
    border-top: 1px solid var(--monochrome-gray3);
    font-size: 1rem;
}
footer .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 38px 20px 24px 20px;
}
footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 11px 0;
}
footer nav a {
    color: var(--white);
    opacity: .89;
    font-size: 1rem;
    margin-right: 2px;
    transition: color var(--transition), opacity var(--transition);
}
footer nav a:hover, footer nav a:focus {
    color: var(--primary);
    opacity: 1;
}
.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}
.footer-contact span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--monochrome-gray4);
    opacity: 0.88;
    font-size: 0.98rem;
}
footer img { filter: grayscale(100%) brightness(0.7); }

/* ---------------
RESPONSIVE DESIGN
--------------------*/
@media (max-width: 1200px) {
    .container { max-width: 96vw; }
}
@media (max-width: 990px) {
    .feature-grid > div,
    .service-cards > div {
        flex: 1 1 275px;
    }
}
@media (max-width: 830px) {
    .feature-grid, .service-cards, .footer-contact {
        flex-direction: column;
        align-items: flex-start;
    }
    .feature-grid > div,
    .service-cards > div {
        width: 100%;
        min-width: unset;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.4rem; }
    .section { padding: 26px 4vw; margin-bottom: 34px; }
    .thankyou-block { padding: 24px 8px; }
    .testimonial-card { font-size: 1rem; padding: 14px 7px; }
    .content-wrapper { margin-bottom: 22px; }
    .footer-contact { gap: 10px; font-size: 0.98rem; }
    .footer-contact span { white-space: normal; }
    main { padding-bottom: 50px; }
    .text-image-section { flex-direction: column; gap: 18px; align-items: flex-start; }
}
@media (max-width: 540px) {
    .container { padding: 0 7px; }
    .footer-contact { gap: 5px; font-size: 0.95rem; }
    .feature-grid > div, .service-cards > div { padding: 14px 5px; }
}

/* --------------
COOKIE CONSENT BANNER STYLES
---------------*/
.cookie-consent-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--monochrome-black);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 18px 18px 18px;
    box-shadow: 0 -6px 32px rgba(22,24,26,0.18);
    border-radius: 15px 15px 0 0;
    font-size: 1.08rem;
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.33s var(--transition), opacity 0.21s linear;
}
.cookie-consent-banner.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(80px);
    transition: transform 0.44s var(--transition), opacity 0.28s linear;
}
.cookie-btn-group { justify-content: center; }

/* ------------
COOKIE PREFERENCES MODAL
------------*/
.cookie-modal-overlay {
    position: fixed;
    z-index: 10000;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(22,24,26,0.73);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.29s ease;
}
.cookie-modal-overlay.hide {
    opacity: 0;
    pointer-events: none;
}
.cookie-modal {
    background: var(--white);
    color: var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 36px 24px 28px 24px;
    min-width: 310px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}
.cookie-modal h3 {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    margin-bottom: 6px;
}
.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
    background: var(--monochrome-gray4);
    padding: 12px 14px;
    border-radius: 7px;
}
.cookie-category label {
    font-weight: 500;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--monochrome-black);
}
.cookie-toggle {
    width: 42px;
    height: 24px;
    background: var(--monochrome-gray3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    transition: background var(--transition);
    position: relative;
}
.cookie-toggle input {
    display: none;
}
.cookie-toggle span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--monochrome-gray2);
    display: block;
    transition: transform var(--transition), background var(--transition);
    position: absolute;
    left: 3px;
    top: 3px;
}
.cookie-toggle input:checked + span {
    transform: translateX(18px);
    background: var(--primary);
}
.cookie-category.essential label { opacity: 0.7; }
.cookie-category.essential .cookie-toggle {
    opacity: 0.5;
    pointer-events: none;
}
.cookie-modal .cookie-btn-group {
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}
.cookie-modal .btn-cookie-accept, .cookie-modal .btn-cookie-settings {
    padding: 10px 24px;
    font-size: 1rem;
}
.cookie-modal-close {
    position: absolute;
    right: 16px;
    top: 14px;
    background: none;
    border: none;
    color: var(--monochrome-gray1);
    font-size: 1.6rem;
    cursor: pointer;
    border-radius: 7px;
    padding: 2px 12px;
    transition: background var(--transition);
}
.cookie-modal-close:focus, .cookie-modal-close:hover {
    background: var(--monochrome-gray4);
}

/* Prevent overlap with banner on small screens */
@media (max-width: 768px) {
    .cookie-consent-banner { font-size: 1rem; padding: 25px 6px 15px 6px; }
}

/* ------------
MISC
-----------*/
::-webkit-scrollbar {
    width: 10px;
    background: var(--monochrome-gray4);
}
::-webkit-scrollbar-thumb {
    background: var(--monochrome-gray3);
    border-radius: 7px;
}

/* Accessible focus indicator */
:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Add subtle underline to links inside text */
.text-section a {
    text-decoration: underline dotted var(--primary) 1.5px;
    color: var(--primary);
}
.text-section a:hover, .text-section a:focus { color: var(--black); }

/* Utility: visually hidden (for accessibility) */
.visually-hidden {
    border: 0 !important;
    clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px; overflow: hidden;
    padding: 0; position: absolute; white-space: nowrap;
}

/* --- END CSS --- */
