/* AC ImmoManagement, Stylesheet
   Farben aus dem bisherigen Jimdo-Auftritt, Comfortaa als Logo-Schrift. */

@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-latin-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-latin-ext-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --petrol: #1e4d64;
  --petrol-dark: #143646;
  --blue: #2f7aa1;
  --slate: #54628d;
  --text: #24292f;
  --muted: #59626d;
  --bg: #ffffff;
  --tint: #f2f5f8;
  --border: #dbe2e8;
  --success: #1f6f43;
  --error: #b42318;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Comfortaa", var(--font-body);

  --radius: 10px;
  --shadow: 0 1px 2px rgb(20 54 70 / 0.06), 0 4px 16px rgb(20 54 70 / 0.06);
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--petrol); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--petrol);
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--petrol); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.7em 1.3em;
  border: 2px solid var(--petrol);
  border-radius: 999px;
  background: var(--petrol);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { background: var(--petrol-dark); border-color: var(--petrol-dark); color: #fff; }
.button--small { padding: 0.45em 1em; font-size: 0.95rem; }
.button--light { background: #fff; border-color: #fff; color: var(--petrol); }
.button--light:hover { background: var(--tint); border-color: var(--tint); color: var(--petrol-dark); }
.button--ghost { background: transparent; border-color: rgb(255 255 255 / 0.8); color: #fff; }
.button--ghost:hover { background: rgb(255 255 255 / 0.12); border-color: #fff; }

/* Kopfbereich */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.97);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo img { width: 52px; height: auto; }
.logo__text {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.3rem; color: var(--slate); white-space: nowrap;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.main-nav a:not(.button) {
  display: block; padding: 0.5rem 0.75rem;
  color: var(--text); text-decoration: none; font-weight: 500;
  border-radius: 6px;
}
.main-nav a:not(.button):hover { background: var(--tint); color: var(--petrol); }
.main-nav a[aria-current] { color: var(--petrol); box-shadow: inset 0 -2px 0 var(--petrol); border-radius: 0; }
.main-nav__portal { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  display: block; width: 20px; height: 2px; margin: 0 auto;
  background: var(--petrol); position: relative; transition: transform 0.2s;
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a:not(.button) { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .main-nav a[aria-current] { box-shadow: inset 3px 0 0 var(--petrol); padding-left: 0.75rem; }
  .main-nav__portal { margin: 1rem 0 0; }
  .main-nav__portal .button { display: block; text-align: center; }
}
@media (max-width: 380px) {
  .logo__text { font-size: 1.1rem; }
  .logo img { width: 42px; }
}

/* Startseite */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgb(20 54 70 / 0.94) 0%, rgb(30 77 100 / 0.86) 50%, rgb(30 77 100 / 0.55) 100%),
    url("../images/hero.jpg") center 40% / cover no-repeat;
}
.hero__inner { padding-block: clamp(3.5rem, 9vw, 7rem); max-width: var(--container); }
.hero__title { color: #fff; max-width: 22ch; hyphens: manual; font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
.hero__intro { max-width: 46ch; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); opacity: 0.95; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

.section { padding-block: clamp(3rem, 6vw, 4.5rem); }
.section--tinted { background: var(--tint); }
.section__title { margin-bottom: 1.5rem; }
.section__more { margin: 1.5rem 0 0; font-weight: 600; }

.trust { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.trust img { width: 181px; flex-shrink: 0; }
.trust__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--petrol); margin-bottom: 0.4rem; }
.trust__text p:last-child { margin: 0; }
@media (max-width: 640px) { .trust { flex-direction: column; align-items: flex-start; } }

/* Karten */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card__title { font-size: 1.15rem; margin-bottom: 0.8rem; }
.card__subtitle { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
.card p:last-child { margin-bottom: 0; }

/* Unterseiten */
.page-head { background: var(--tint); border-bottom: 1px solid var(--border); padding-block: clamp(2rem, 5vw, 3rem); margin-bottom: clamp(2rem, 5vw, 3rem); }
.page-head h1 { margin: 0; max-width: 30ch; hyphens: manual; }
.page-head__meta { margin: 0.75rem 0 0; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; font-size: 0.92rem; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.5rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

.page-main { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
/* Text-Seiten und Beiträge: schmale, mittige Spalte */
.page-template .page-head .container, .page-template .page-main,
.post-template .page-head .container, .post-template .page-main { max-width: calc(800px + 2 * var(--gutter)); }
.page-template .prose, .post-template .prose { max-width: none; }
.page-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.page-foot .card ul { padding: 0; }

/* Untermenü "Unternehmen" */
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle {
  width: 28px; height: 36px; margin-left: -0.5rem; padding: 0;
  border: 0; background: transparent; cursor: pointer; color: var(--text);
}
.sub-toggle::before {
  content: ""; display: block; width: 7px; height: 7px; margin: 0 auto;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
}
.main-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 250px; padding: 0.4rem !important;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  flex-direction: column !important; align-items: stretch !important; gap: 0 !important;
}
.main-nav .has-sub:hover .sub-menu, .main-nav .has-sub:focus-within .sub-menu, .main-nav .has-sub.is-open .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 0.55rem 0.75rem; border-radius: 6px; white-space: nowrap; }
.main-nav .sub-menu a[aria-current] { box-shadow: none; background: var(--tint); border-radius: 6px; }
@media (max-width: 960px) {
  .has-sub { display: block; }
  .sub-toggle { display: none; }
  .main-nav .sub-menu { display: flex; position: static; min-width: 0; padding: 0 0 0 1rem !important; border: 0; box-shadow: none; background: transparent; }
  .main-nav .sub-menu a { border-radius: 0; font-weight: 400; }
}

.contact-card__phone { font-size: 1.2rem; font-weight: 700; color: var(--petrol); text-decoration: none; }

/* Fließtext */
.prose { max-width: 72ch; min-width: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.3rem; }
.prose li::marker { color: var(--petrol); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose .figure { margin: 1.5rem 0; }
.prose .figure img { border-radius: 6px; }
.prose figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.97rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--petrol); }
.prose blockquote { margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.25rem; border-left: 3px solid var(--petrol); color: var(--muted); }
.cta-inline { margin-top: 2.5rem; }

/* Blog */
.posts { display: grid; gap: 1.5rem; align-content: start; }
.posts--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; display: flex; flex-direction: column; transition: box-shadow 0.15s, transform 0.15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media img, .post-card__placeholder { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--petrol) 0%, var(--slate) 100%); }
.post-card__placeholder .brand-mark { width: 30%; background: rgb(255 255 255 / 0.85); }
.post-card__body { padding: 1.2rem 1.4rem 1.4rem; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; font-size: 0.88rem; color: var(--muted); margin: 0 0 0.35rem; }
.post-card__tag { color: var(--petrol); font-weight: 600; }
.post-card__title { font-size: 1.1rem; margin-bottom: 0.6rem; }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__excerpt {
  margin: 0; color: var(--muted); font-size: 0.96rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.pagination span { color: var(--muted); }

.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--petrol); font-weight: 600; line-height: 1.4; }
.post-nav a:hover { background: var(--tint); }
.post-nav span { display: block; font-size: 0.85rem; font-weight: 400; color: var(--muted); margin-bottom: 0.25rem; }

.hours { margin: 0 0 0.75rem; }
.hours__row { display: flex; justify-content: space-between; gap: 1rem; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; }
.hours__note { font-size: 0.93rem; color: var(--muted); }

/* Fußbereich */
.site-footer { background: var(--petrol-dark); color: rgb(255 255 255 / 0.85); font-size: 0.97rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 3rem 2rem; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; margin-bottom: 0.6rem; }
.site-footer__heading { font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(255 255 255 / 0.65); margin-bottom: 0.75rem; }
.site-footer__links { list-style: none; padding: 0; }
.site-footer__links li { margin-bottom: 0.3rem; }
.site-footer .hours__note { color: rgb(255 255 255 / 0.7); }
.site-footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.15); padding-block: 1.25rem; font-size: 0.88rem; color: rgb(255 255 255 / 0.65); }
.site-footer__bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}


/* Ghost: Kontaktseite und Inhaltskarten */
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button--outline { background: transparent; color: var(--petrol); }
.button--outline:hover { background: var(--tint); color: var(--petrol-dark); border-color: var(--petrol); }
.gh-content .kg-card { margin: 1.5rem 0; }
.gh-content .kg-image { border-radius: 6px; }
.gh-content figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.gh-content .kg-width-wide, .gh-content .kg-width-full { width: 100%; }
.gh-content .kg-width-wide img, .gh-content .kg-width-full img { width: 100%; }

/* Markenzeichen: die zwei Häuser aus dem Logo, einfärbbar */
.brand-mark {
  display: inline-block; flex-shrink: 0;
  width: 2.6rem; aspect-ratio: 240 / 185;
  background: var(--slate);
  -webkit-mask: url("../images/logo-icon.png") center / contain no-repeat;
  mask: url("../images/logo-icon.png") center / contain no-repeat;
}
.hero { overflow: hidden; }
.hero__mark {
  position: absolute; right: max(2vw, calc((100vw - var(--container)) / 2)); bottom: -2%;
  width: clamp(180px, 30vw, 420px); background: rgb(255 255 255 / 0.12);
}
.site-footer__brand { white-space: nowrap; }
.site-footer__brand .brand-mark { width: 2.2rem; background: rgb(255 255 255 / 0.8); }

/* Startseite: zentrierter Einstieg */
.intro__head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; margin-bottom: 2rem; }
.intro__head h2 { margin: 0; }
.intro__grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem;
  max-width: 960px; margin-inline: auto; align-items: start;
}
@media (max-width: 800px) { .intro__grid { grid-template-columns: 1fr; } }
.intro .card { padding: clamp(1.4rem, 3vw, 2rem); }
.intro__text h2, .intro__text h3 { font-size: 1.15rem; margin: 1.2em 0 0.4em; }
.intro__text p { margin-bottom: 0.4em; }
.intro__text > :first-child { margin-top: 0; }
.intro__text > :last-child { margin-bottom: 0; }
.intro__text ul { padding-left: 1.2rem; }
.intro__text li::marker { color: var(--petrol); }
.intro__contact { background: var(--tint); border-color: transparent; }
.trust { justify-content: center; }
.posts--home { margin-top: 0.5rem; }
.section__more { text-align: center; }

/* Kästen rechts */
.company-box__title, .contact-card__title {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--petrol);
  margin: 0 0 0.8rem;
}
.company-box__title .brand-mark { width: 2rem; }
.company-box ul { list-style: none; padding: 0; margin: 0; }
.company-box a { display: block; padding: 0.5rem 0.6rem; border-radius: 6px; color: var(--text); text-decoration: none; }
.company-box a:hover { background: var(--tint); color: var(--petrol); }
.company-box a[aria-current] { background: var(--tint); color: var(--petrol); font-weight: 600; }
.contact-card__emergency { display: inline-block; margin-top: 0.3rem; font-size: 0.95rem; }
.contact-card__note { font-size: 0.9rem; color: var(--muted); }

.page-image { margin: 0 0 2rem; }
.page-image img { width: 100%; border-radius: var(--radius); }

/* Blogliste: Textliste, Bild nur wenn vorhanden */
.posts--list { gap: 1rem; }
.posts--list .post-card { flex-direction: row; }
.posts--list .post-card:hover { transform: none; }
.posts--list .post-card__media { flex: 0 0 clamp(140px, 24%, 240px); }
.posts--list .post-card__media img { height: 100%; aspect-ratio: auto; min-height: 100%; }
.posts--list .post-card--noimg .post-card__media { display: none; }
.posts--list .post-card__body { padding: 1.1rem 1.4rem; }
.posts--list .post-card__title { font-size: 1.15rem; }
.posts--list .post-card__excerpt { -webkit-line-clamp: 2; line-clamp: 2; }
@media (max-width: 600px) {
  .posts--list .post-card__media { display: none; }
}

/* Themen-Leiste */
.tag-filter { margin-bottom: 1.75rem; }
.tag-filter ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-filter a {
  display: inline-block; padding: 0.35em 0.9em; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 0.95rem;
}
.tag-filter a:hover { border-color: var(--petrol); color: var(--petrol); }
.tag-filter a[aria-current] { background: var(--petrol); border-color: var(--petrol); color: #fff; }

/* Hinweis bei älteren Beiträgen */
.post-notice {
  margin: 0 0 2rem; padding: 0.9rem 1.1rem;
  background: var(--tint); border-left: 3px solid var(--slate); border-radius: 0 6px 6px 0;
  font-size: 0.96rem; color: var(--text);
}
.post-notice[hidden] { display: none; }

.site-footer__emergency { margin-top: 0.75rem; }
.trust img { height: auto; }
.trust__text .gh-content p:last-child { margin: 0; }

/* Seite "Unternehmen": erstes Bild als Profilfoto links neben Name und Stichpunkten */
.page-ueber-uns .gh-content > figure.kg-image-card:first-of-type {
  float: left; width: clamp(150px, 30%, 220px); margin: 0.35rem 1.75rem 1rem 0;
}
.page-ueber-uns .gh-content > figure.kg-image-card:first-of-type img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.page-ueber-uns .gh-content > figure.kg-image-card:first-of-type ~ ul { overflow: hidden; }
.page-ueber-uns .gh-content > :is(h2, h3) { clear: both; }
.page-ueber-uns .gh-content > figure.kg-image-card:first-of-type + p { margin-top: 0.35rem; font-size: 1.1rem; }
@media (max-width: 520px) {
  .page-ueber-uns .gh-content > figure.kg-image-card:first-of-type { float: none; width: 60%; max-width: 220px; margin: 0 0 1rem; }
}
