/*
Theme Name: gewerbeimmobilien24
Theme URI: https://gewerbeimmobilien24.net/
Author: objekt-m
Description: Schlankes WordPress-Theme fuer gewerbeimmobilien24.net.
Version: 1.0.0
Text Domain: gewerbeimmobilien24
*/

:root {
  --ink: #061b2d;
  --text: #1b2d3b;
  --muted: #667787;
  --line: #d7e0e8;
  --paper: #f6f8fb;
  --white: #ffffff;
  --brand: #1477bf;
  --brand-dark: #092f4f;
  --steel: #466f82;
  --accent: #ffc15a;
  --accent-soft: #fff3d9;
  --shadow: 0 18px 50px rgba(7, 24, 39, 0.12);
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(7, 31, 51, 0.06), rgba(255, 255, 255, 0) 460px),
    var(--white);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

iframe,
object,
embed,
table,
pre,
figure,
.wp-block-image,
.wp-block-table,
.wp-block-group,
.wp-block-columns {
  max-width: 100%;
}

pre,
table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

input,
textarea,
select,
button {
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 252, 0.78));
  border: 1px solid rgba(190, 211, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(6, 27, 45, 0.18);
  backdrop-filter: blur(18px) saturate(1.25);
  isolation: isolate;
}

body:not(.home) main {
  padding-top: 92px;
}

.admin-bar .site-header {
  top: 44px;
}

.header-inner,
.footer-inner,
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  width: auto;
  min-height: 66px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand img {
  width: clamp(240px, 29vw, 390px);
  display: block;
  opacity: 0.88;
  transition: opacity 0.18s ease;
}

.brand:hover img {
  opacity: 1;
}

.menu-toggle,
.menu-close,
.mobile-menu,
.mobile-menu-backdrop {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 10px;
  border-radius: 6px;
}

.site-nav a:hover {
  background: rgba(20, 119, 191, 0.1);
  text-decoration: none;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li {
  margin: 0;
}

.mobile-nav a,
.mobile-nav > a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(215, 224, 232, 0.86);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.mobile-nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
}

.menu-item-kontakt > a {
  background: var(--ink);
  color: var(--white) !important;
}

.hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 193, 90, 0.22), transparent 27%),
    radial-gradient(circle at 77% 86%, rgba(20, 119, 191, 0.52), transparent 34%),
    linear-gradient(115deg, #061827 0%, #092f4f 54%, #416d80 100%);
  color: var(--white);
  margin-top: -80px;
  padding: calc(clamp(58px, 8vw, 108px) + 86px) 0 42px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -9vw;
  bottom: -120px;
  width: min(520px, 55vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(18deg);
  border-radius: 8px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #b9d8ef;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  color: inherit;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  max-width: 920px;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.hero-lead {
  max-width: 780px;
  margin: 24px 0 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: #e2edf6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #edf6fd;
  font-weight: 750;
  font-size: 0.92rem;
  max-width: 100%;
  white-space: normal;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--white);
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 12px 28px rgba(18, 103, 177, 0.22);
}

.button:hover,
.wp-block-button__link:hover {
  text-decoration: none;
  background: #0f5a9b;
}

.button.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
  min-width: 0;
  overflow: hidden;
}

.hero-panel strong {
  display: block;
  font-size: 2.45rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-panel p {
  margin: 0 0 18px;
  color: #eef5fa;
  overflow-wrap: anywhere;
}

.hero-panel p:last-child {
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 14px 34px rgba(7, 24, 39, 0.06);
}

.stat {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.94rem;
}

.section {
  padding: clamp(54px, 7vw, 86px) 0;
}

.section.alt {
  background: var(--paper);
}

.intro {
  max-width: 820px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  min-height: 100%;
  box-shadow: 0 12px 32px rgba(7, 24, 39, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #b8cad8;
}

.alt .card {
  background: var(--white);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.content {
  width: min(var(--max), calc(100% - 40px));
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(46px, 7vw, 78px) 0;
  overflow-wrap: anywhere;
}

.content > p:first-of-type {
  font-size: 1.14rem;
  color: #344655;
}

.content h1 {
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  margin-bottom: 20px;
}

.content h2 {
  color: var(--ink);
  margin-top: 42px;
}

.content p,
.content li {
  font-size: 1.05rem;
}

.content > p,
.content > ul,
.content > ol {
  max-width: none;
}

.content ul {
  padding-left: 1.2rem;
}

.page-hero {
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 193, 90, 0.18), transparent 25%),
    linear-gradient(115deg, #061827, #0b395d 68%, #416d80);
  border-bottom: 1px solid var(--line);
  padding: 52px 0;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4vw, 3.8rem);
}

.page-hero p {
  max-width: 760px;
  font-size: 1.14rem;
  color: #dcecf6;
}

.offer-widget {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 0;
  isolation: isolate;
  contain: paint;
  width: 100%;
  max-width: 100%;
  margin: 0 0 34px;
}

.container > .offer-widget {
  margin-top: 24px;
}

.content > .offer-widget:first-child {
  width: 100%;
  max-width: 100%;
  margin: -10px 0 42px;
}

#iwModule,
#iwWidget,
.iwWidget {
  position: relative !important;
  z-index: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#iwModule * {
  max-width: 100%;
}

#iwModule table,
#iwWidget table,
.iwWidget table {
  width: 100% !important;
}

.offer-widget iframe,
.offer-widget object,
.offer-widget embed {
  position: relative !important;
  z-index: 0 !important;
}

.contact-form {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cbd8e3;
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fbfdff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(18, 103, 177, 0.16);
  border-color: var(--brand);
}

.form-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.form-message.success {
  background: #e6f6ee;
  color: #12633a;
}

.form-message.error {
  background: #fde9e7;
  color: #8a2118;
}

#iwdigetinfo {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-band {
  background: var(--ink);
  color: var(--white);
  padding: 44px 0;
}

.contact-band .container {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact-band h2 {
  margin-bottom: 8px;
}

.contact-band p {
  margin: 0;
  color: #d7e7f3;
}

.site-footer {
  background: #f1f4f7;
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .site-header {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
  }

  body:not(.home) main {
    padding-top: 62px;
  }

  .admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 62px;
    padding: 8px 0;
    width: min(var(--max), calc(100% - 32px));
  }

  .brand img {
    width: clamp(210px, 58vw, 320px);
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(15, 63, 96, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    font: inherit;
    font-weight: 850;
    box-shadow: 0 10px 28px rgba(6, 27, 45, 0.1);
  }

  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .menu-toggle-bars {
    position: relative;
  }

  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-toggle-bars::before {
    top: -6px;
  }

  .menu-toggle-bars::after {
    top: 6px;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4, 18, 30, 0.48);
    backdrop-filter: blur(2px);
  }

  .mobile-menu-backdrop[hidden] {
    display: none;
  }

  .mobile-menu {
    display: none;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 10001;
    width: min(88vw, 360px);
    max-width: 100%;
    padding: 18px 20px 28px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 252, 0.96));
    border-left: 1px solid rgba(190, 211, 225, 0.9);
    box-shadow: -24px 0 54px rgba(6, 27, 45, 0.26);
    transform: translateX(0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu-open .mobile-menu {
    display: block;
    animation: mobileMenuIn 0.22s ease;
  }

  @keyframes mobileMenuIn {
    from {
      transform: translateX(102%);
    }
    to {
      transform: translateX(0);
    }
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    margin-bottom: 10px;
    color: var(--ink);
    font-weight: 900;
    font-size: 1.08rem;
  }

  .menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 63, 96, 0.16);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
  }

  .hero {
    margin-top: 0;
    padding-top: 36px;
    padding-bottom: 34px;
  }

  .hero::after {
    right: -22vw;
    bottom: -80px;
    width: 70vw;
  }

  h1 {
    font-size: clamp(1.85rem, 9.2vw, 3.2rem);
    max-width: 100%;
  }

  .hero-lead {
    font-size: 1.06rem;
    margin-top: 18px;
    max-width: 34rem;
  }

  .hero-badges {
    gap: 8px;
    max-width: 100%;
  }

  .hero-badges span {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 0.82rem;
    flex: 1 1 auto;
    min-width: min(100%, 132px);
  }

  .hero-panel {
    padding: 20px;
  }

  .hero-panel strong {
    font-size: 2rem;
  }

  .hero-grid,
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

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

  .form-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    width: 100%;
  }

  .button,
  .wp-block-button__link {
    width: 100%;
    max-width: 100%;
  }

  .contact-band .container {
    align-items: stretch;
  }

  .offer-widget {
    padding: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content > .offer-widget:first-child {
    width: 100%;
    max-width: 100%;
    margin: 0 0 32px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .container {
    width: min(var(--max), calc(100% - 32px));
  }

  .brand img {
    width: clamp(190px, 58vw, 285px);
  }

  .menu-toggle {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.92rem;
  }

  .page-hero {
    padding: 38px 0;
  }

  .page-hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.7rem);
  }

  .hero-grid,
  .hero-grid > *,
  .split,
  .split > *,
  .grid,
  .card,
  .actions,
  .hero-badges,
  .hero-panel {
    min-width: 0;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 9.4vw, 2.72rem);
    line-height: 1.14;
  }

  .hero-lead {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .content {
    padding: 38px 0;
  }

  .section {
    padding: 46px 0;
  }

  .content h2 {
    font-size: 1.55rem;
  }

  .card,
  .contact-form {
    padding: 18px;
  }

  .hero {
    padding-bottom: 42px;
  }

  .hero-panel,
  .offer-widget {
    margin-inline: 0;
  }

  .hero-panel {
    padding: 18px;
  }

  .hero-panel strong {
    font-size: clamp(1.72rem, 8vw, 2.08rem);
    overflow-wrap: anywhere;
  }

  .content {
    width: min(var(--max), calc(100% - 32px));
    max-width: calc(100% - 32px);
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }

  .contact-band {
    padding: 38px 0;
  }

  .footer-links {
    gap: 10px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 390px) {
  .header-inner,
  .footer-inner,
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .brand img {
    width: clamp(174px, 56vw, 250px);
  }

  .menu-toggle span:last-child {
    display: none;
  }

  .menu-toggle {
    width: 42px;
    padding: 0;
  }

  .hero-panel strong {
    font-size: 1.72rem;
  }

  .hero h1 {
    font-size: clamp(1.72rem, 9vw, 2.22rem);
  }

  .hero-lead {
    font-size: 0.98rem;
  }

  .hero-badges span {
    min-width: 0;
    flex-basis: 100%;
  }

  .button,
  .wp-block-button__link {
    padding-inline: 12px;
    font-size: 0.95rem;
  }
}
