/* HandelsBrücke Regensburg – Geometric & Structured CSS Theme (Flexbox only) */
/* ========= CSS RESET & NORMALIZE ========= */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ul, li, nav, section, header, main, footer, button, img, figure {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  vertical-align: baseline;
}
html { font-size: 16px; }
body {
  font-family: 'Arial', Arial, sans-serif;
  color: #123860;
  background: #F3F7FA;
  min-height: 100vh;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
:focus { outline: 2px solid #1CA87F; outline-offset: 2px; }

/* ========= TYPOGRAPHY ========= */
:root {
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Arial', Arial, sans-serif;
  --primary: #123860;
  --secondary: #1CA87F;
  --accent: #F3F7FA;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(18,56,96,0.08);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 12px;
  line-height: 1.14;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
@media (min-width: 600px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }
}
p, ul, li {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 10px;
  line-height: 1.55;
  color: #193E57;
}
strong, b { font-weight: 700; }

/* ========= LAYOUT CONTAINERS ========= */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
@media (max-width: 900px) {
  .section { padding: 30px 8px; margin-bottom: 40px; }
}

/* ========= HEADER & NAV ========= */
header {
  background: #123860;
  color: #F3F7FA;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(18,56,96,0.10);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 28px;
}
header img {
  height: 38px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: #F3F7FA;
  letter-spacing: .03em;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background .18s, color .1s;
}
.main-nav a:hover, .main-nav a:focus {
  background: rgba(28,168,127,0.20);
  color: #1CA87F;
}
.main-nav .cta {
  background: #1CA87F;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 28px;
  box-shadow: 0 2px 6px rgba(28,168,127,0.09);
  margin-left: 16px;
  transition: background .16s, box-shadow .24s;
}
.main-nav .cta:hover, .main-nav .cta:focus {
  background: #123860;
  color: #1CA87F;
  box-shadow: 0 4px 18px rgba(28,168,127,0.17);
}
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  border-radius: 8px;
  transition: background .16s;
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: #1CA87F;
}
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18,56,96,.97);
  color: #fff;
  z-index: 205;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.77,.2,.05,1.0);
  display: flex;
  flex-direction: column;
  padding: 0;
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2.1rem;
  color: #1CA87F;
  background: none;
  align-self: flex-end;
  margin: 20px 32px 12px 0;
  border-radius: 4px;
  border: none;
  width: 38px; height: 38px;
  transition: background .14s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #F3F7FA;
  color: #123860;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 32px;
  align-items: flex-start;
  padding-left: 42px;
}
.mobile-nav a {
  color: #F3F7FA;
  font-family: var(--font-display);
  font-size: 1.275rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 22px;
  letter-spacing: .03em;
  transition: background .12s, color .08s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #1CA87F;
  color: #FFF;
}
@media (min-width: 1001px) {
  .mobile-menu, .mobile-menu.open, .mobile-menu-close { display: none !important; }
}

/* ========= HERO SECTIONS ========= */
.hero, .hero-international {
  display: flex;
  align-items: center;
  background: linear-gradient(102deg, #F3F7FA 54%, #dffff8 100%);
  min-height: 345px;
  margin-bottom: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 18px rgba(28,168,127,0.11);
}
.hero .container, .hero-international .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 270px;
}
.hero .content-wrapper, .hero-international .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
}
.hero h1, .hero-international h1 {
  font-size: 2.5rem;
  color: #123860;
  font-family: var(--font-display);
  line-height: 1.13;
  letter-spacing: 0.01em;
  font-weight: 800;
}
.hero p, .hero-international p {
  font-size: 1.22rem;
  color: #193E57;
  margin-bottom: 8px;
}
.hero .cta, .hero-international .cta {
  margin-top: 12px;
}
@media (max-width: 700px) {
  .hero h1, .hero-international h1 { font-size: 1.45rem; }
  .hero, .hero-international { min-height: 190px; }
  .hero .container, .hero-international .container { min-height: 140px; }
}

/* ========= FLEX GRIDS ========= */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 20px 0 24px 0;
  align-items: stretch;
  justify-content: flex-start;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 20px 20px 20px;
  min-width: 220px;
  flex: 1 1 240px;
  max-width: 320px;
  border: 2px solid #F3F7FA;
  transition: border-color .16s, box-shadow .16s, transform .18s;
}
.feature-item img {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  margin-top: -6px;
}
.feature-item h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
  font-family: var(--font-display);
}
.feature-item p {
  font-size: 1rem;
  color: #193E57;
}
.feature-item:hover, .feature-item:focus {
  border-color: #1CA87F;
  box-shadow: 0 8px 24px rgba(28,168,127,0.13);
  transform: translateY(-4px) scale(1.03);
}

@media (max-width: 850px) {
  .feature-grid {
    gap: 20px;
  }
  .feature-item {
    min-width: 160px;
    max-width: 100%;
    padding: 20px 10px;
  }
}
@media (max-width: 600px) {
  .feature-grid { flex-direction: column; gap: 18px; }
}

/* ========= TESTIMONIAL CARDS ========= */
.testimonials, .references {
  background: #F3F7FA;
  border-radius: var(--radius);
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border-left: 6px solid #1CA87F;
  border-radius: 12px;
  margin: 0 0 24px 0;
  padding: 24px 26px 18px 26px;
  min-width: 0;
  max-width: 680px;
  box-shadow: 0 3px 12px rgba(18,56,96,0.06);
  position: relative;
  color: #123860;
  font-size: 1.07rem;
  line-height: 1.52;
}
.testimonial-card:last-child { margin-bottom: 0; }
.testimonial-card p {
  color: #193E57;
  font-weight: 500;
  margin-bottom: 2px;
}
.testimonial-card .customer {
  margin-left: 0;
  font-size: .98em;
  color: #555c6e;
  font-family: var(--font-body);
}
@media (max-width: 600px) {
  .testimonial-card {
    padding: 18px 10px 14px 13px;
    font-size: 1rem;
  }
}

/* ========= BUTTONS & INTERACTIVE ========= */
.cta {
  display: inline-block;
  background: #1CA87F;
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 34px;
  border: none;
  border-radius: 14px 1px 14px 1px;
  box-shadow: 0 3px 12px rgba(28,168,127,0.10);
  margin-top: 8px;
  transition: background .18s, color .11s, box-shadow .22s, transform .18s;
}
.cta:hover, .cta:focus {
  background: #123860;
  color: #1CA87F;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(18,56,96,0.15);
}

/* ========= CONTACT INFO SECTIONS ========= */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 10px;
}
.contact-info > div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: #123860;
}
.contact-info img {
  width: 28px; height: 28px;
  filter: grayscale(0.18);
  opacity: 0.92;
}
.contact-info a {
  color: #1CA87F;
  font-weight: 600;
  transition: color .13s;
}
.contact-info a:hover, .contact-info a:focus { color: #123860; }

@media (max-width: 700px) {
  .contact-info { gap: 16px; flex-direction: column; }
}

/* ========= CONTENT SECTION FLEX PATTERNS ========= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 200px;
  flex: 1 1 300px;
  padding: 22px 18px;
}
.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;
}

/* ========= UL LISTS IN SECTIONS ========= */
.services-overview ul,
 .services-detail ul,
 .international-services ul,
 .branchen-loesungen ul,
 .about-international ul,
 .legal ul {
  margin: 10px 0 16px 16px;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.services-overview ul li,
 .services-detail ul li,
 .international-services ul li,
 .branchen-loesungen ul li,
 .about-international ul li,
 .legal ul li {
  font-size: 1rem;
  color: #123860;
  position: relative;
  padding-left: 22px;
}
.services-overview ul li:before,
 .services-detail ul li:before,
 .international-services ul li:before,
 .branchen-loesungen ul li:before,
 .about-international ul li:before,
 .legal ul li:before {
  content: '';
  display: inline-block;
  position: absolute;
  left: 0; top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #1CA87F;
}

/* ========= FOOTER ========= */
footer {
  background: #123860;
  color: #F3F7FA;
  margin-top: 64px;
  padding: 44px 0 32px 0;
  font-size: 1rem;
}
footer .container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}
.footer-nav, .footer-legal {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-nav a,.footer-legal a {
  color: #F3F7FA;
  margin-bottom: 0;
  padding: 3px 0;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 6px;
  transition: background .15s, color .1s;
}
.footer-nav a:hover, .footer-nav a:focus,
.footer-legal a:hover, .footer-legal a:focus {
  background: #1CA87F;
  color: #FFF;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
}
.footer-contact img { width: 40px; height: 40px; margin-bottom: 4px; }
.footer-contact a img { filter: grayscale(0.18); transition: filter .13s, opacity .13s; opacity: .93; }
.footer-contact a:hover img, .footer-contact a:focus img {
  filter: none;
  opacity: 1;
}
@media (max-width: 1000px) {
  footer .container {
    flex-direction: column;
    gap: 28px;
    align-items: flex-start;
  }
}

/* =========== CARD & CASES =========== */
.cases .feature-grid {
  gap: 24px;
}
.cases .feature-item {
  min-width: 170px;
  max-width: 330px;
  padding: 22px 14px 19px 14px;
}

/* =========== THANK YOU =========== */
.thankyou .content-wrapper {
  align-items: center;
  justify-content: center;
}
.thankyou h1 {
  color: #1CA87F;
  margin-top: 40px;
  margin-bottom: 14px;
}

/* =========== LEGAL PAGES =========== */
.legal, .legal-gdpr, .cookie-policy, .legal-terms {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 24px;
}
.legal h1, .legal-gdpr h1, .cookie-policy h1, .legal-terms h1 {
  margin-bottom: 20px;
  color: #123860;
}
.legal h2, .legal-gdpr h2, .cookie-policy h2, .legal-terms h2 {
  margin-top: 18px;
  margin-bottom: 8px;
  color: #1CA87F;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.legal ul, .legal-gdpr ul, .cookie-policy ul, .legal-terms ul {
  margin-left: 24px;
}

/* =========== RESPONSIVE FLEX LAYOUTS =========== */
@media (max-width: 900px) {
  .container { padding: 0 8px; }
}
@media (max-width: 768px) {
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .footer-contact, .footer-nav, .footer-legal {
    align-items: flex-start;
  }
  .text-image-section { flex-direction: column; gap: 16px; }
}

@media (max-width: 520px) {
  .section, .content-wrapper, .legal, .legal-gdpr, .cookie-policy, .legal-terms {
    padding: 16px 4px;
  }
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: #fff;
  color: #123860;
  padding: 18px 12px;
  box-shadow: 0 -2px 22px rgba(18,56,96,0.11);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2500;
  gap: 18px;
  flex-wrap: wrap;
  border-radius: 18px 18px 0 0;
  transition: transform .33s cubic-bezier(.82,.01,.17,1.01);
}
.cookie-consent-banner.hide {
  transform: translateY(100%);
}
.cookie-consent-banner p {
  font-size: 0.97rem;
  flex: 2 1 200px;
  color: #123860;
}
.cookie-consent-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-consent-banner button {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  margin: 0;
  cursor: pointer;
  transition: background .17s, color .12s, box-shadow .18s;
  min-width: 115px;
}
.cookie-accept {
  background: #1CA87F;
  color: #FFF;
}
.cookie-accept:hover, .cookie-accept:focus {
  background: #123860;
  color: #1CA87F;
}
.cookie-reject {
  background: #F3F7FA;
  color: #123860;
  border: 2px solid #1CA87F;
}
.cookie-reject:hover, .cookie-reject:focus {
  background: #1CA87F;
  color: #fff;
}
.cookie-settings {
  background: transparent;
  color: #1CA87F;
  border: 2px solid #1CA87F;
}
.cookie-settings:hover, .cookie-settings:focus {
  background: #1CA87F;
  color: #FFF;
}
@media (max-width: 550px) {
  .cookie-consent-banner { flex-direction: column; gap: 11px; align-items: flex-start; }
  .cookie-consent-actions { flex-direction: column; gap: 9px; align-items: stretch; }
}

/* ========== COOKIE SETTINGS MODAL ========== */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(18,56,96,.54);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .19s;
}
.cookie-modal {
  background: #fff;
  color: #123860;
  border-radius: 20px;
  box-shadow: 0 6px 32px rgba(28,168,127,0.13);
  max-width: 400px;
  width: 98%;
  padding: 36px 28px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 4001;
  animation: modalappear .25s cubic-bezier(0.6, 0.04, 0.2, 1.0);
}
@keyframes modalappear {
  from {transform: scale(.85) translateY(60px); opacity:0;}
  to { transform: scale(1) translateY(0); opacity:1;}
}
.cookie-modal h2 {
  font-size: 1.32rem;
  color: #1CA87F;
  margin-bottom: 8px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.cookie-category label {
  font-size: 1.07rem;
  font-family: var(--font-body); font-weight: 600;
}
.cookie-category .toggle {
  width: 36px; height: 21px;
  background: #e0ece6;
  border-radius: 20px;
  position: relative;
  transition: background .17s;
  cursor: pointer;
}
.cookie-category .toggle[data-active="true"] {
  background: #1CA87F;
}
.cookie-category .toggle .knob {
  display: block;
  width: 19px; height: 19px;
  background: #fff;
  border-radius: 90px;
  box-shadow: 0 1px 5px rgba(28,168,127,0.13);
  position: absolute;
  left: 1px; top: 1px;
  transition: left .20s;
}
.cookie-category .toggle[data-active="true"] .knob {
  left: 16px;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 18px;
}
.cookie-modal .cookie-modal-actions button {
  font-size: 1rem;
  border-radius: 9px;
  padding: 9px 18px;
}

/* ========== SPACING ========== */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Fix for box cards so they never overlap or stack oddly on small screens */
@media (max-width: 700px) {
  .card-container, .content-grid, .feature-grid { flex-direction: column; gap: 18px; }
}

/* Prevent overlap everywhere by setting min- and max-widths + margin */
.section, .feature-item, .testimonial-card, .card {
  margin-bottom: 24px;
  min-width: 0;
}

/* ========== GEOMETRIC STRUCTURED ANGULAR FONTS & SHAPE DETAILS ========== */
h1, h2, h3, .cta, .main-nav a, .mobile-nav a {
  font-family: var(--font-display);
  /* Montserrat is geometric, fallback on Arial */
}
.card, .feature-item, .testimonial-card, .cookie-modal, .cookie-consent-banner, .section {
  border-radius: 14px 24px 12px 24px;
  /* Angular, geometric feel */
}

/* Add geometric accents for geometric_structured look */
.feature-item::before, .card::before {
  content: '';
  display: none;
}
/* You can add custom SVG/decoration via ::after if you use shape images later */

/* ========== ANIMATIONS ========== */
.cta, .feature-item, .testimonial-card, .cookie-consent-banner button, .card {
  transition: box-shadow .18s, transform .13s, background .16s, color .16s, border .16s;
}
.feature-item:hover, .card:hover, .testimonial-card:hover {
  box-shadow: 0 8px 40px rgba(28,168,127,0.09), 0 0 1px #1CA87F;
  transform: translateY(-4px) scale(1.015);
  border-color: #1CA87F;
}

/* ====== VISUAL HIERARCHY: MARGIN, PADDING, GAP (8/16/24/32) ====== */
.section, .content-wrapper {
  gap: 24px;
}
.section h1, .section h2 { margin-bottom: 18px; }
.section p, .section ul { margin-bottom: 14px; }

/* Misc Utility */
.mt-20 { margin-top: 20px; } .mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; } .mb-40 { margin-bottom: 40px; }

/* ====== ENSURE PROPER Z-INDEX STACKING ====== */
header { z-index: 100; }
.mobile-menu, .mobile-menu.open { z-index: 205; }
.cookie-consent-banner, .cookie-modal, .cookie-modal-overlay { z-index: 9999; }

/* ====== PRINT CLEANUP ====== */
@media print {
  .cookie-consent-banner, .mobile-menu, .mobile-menu-toggle, header, footer { display: none !important; }
  body { background: #fff !important; }
}
