:root{
  --logo-darkblue:#0A2A73;
  --logo-midblue:#1F5FBF;
  --logo-lightblue:#4FA3FF;

  --background:#A3D4FF;
  --white:#FFFFFF;
  --text-main:#002D62;
  --accent:#1F5FBF;
  --shadow:rgba(0,0,0,0.12);

  --header-h:80px;        /* Höhe des fixen Headers */
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}

body{
  background:var(--background);
  color:var(--text-main);
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  display:flex;
  flex-direction:column;
  overflow-y:scroll;
  scrollbar-width:none;
}
body::-webkit-scrollbar{display:none}

/* ===== Header ===== */
header{
  position:fixed; top:0; left:0; right:0;
  height:var(--header-h);
  background:var(--background);
  display:flex; align-items:center; justify-content:center;
  z-index:1000;
}
header .logo-small{
  height:56px; width:auto;
  opacity:0;
  transition:opacity .2s linear;
}

/* ===== Layout-Hülle ===== */
.layout{
  flex:1 0 auto;
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
  position:relative;
  display:grid;
  grid-template-columns:1fr 720px 1fr;
  gap:2rem 3rem;
  align-items:start;
  justify-items:center;
}

/* ===== linke/rechte Kacheln ===== */
.menu-left,.menu-right{
  position:fixed; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:1.5rem; z-index:900;
}
.menu-left{left:2rem}
.menu-right{right:2rem}

/* ===== zentrale Spalte ===== */
.col-center{
  width:720px; max-width:100%;
  margin:0 auto;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  grid-column:2;
  justify-self:center;
}

/* Logo groß */
.logo-large{
  width:240px; height:auto; margin-bottom:1.5rem;
  transition:opacity .2s linear;
}

/* Überschrift & Text */
.col-center h1{font-size:2.2rem; margin-bottom:1rem}
.text-container{width:100%; max-width:700px; padding-bottom:120px}
.text-container p{font-size:1.1rem; line-height:1.55; text-align:center}
.text-container .kontakt-text{text-align:left}

/* Kachel-Styles */
.kachel{
  background:var(--white); color:var(--text-main); text-decoration:none;
  font-weight:700; padding:1.1rem 1.6rem; border-radius:12px;
  box-shadow:0 6px 18px var(--shadow);
  transition:transform .18s ease, background-color .18s ease, color .18s ease;
  min-width:200px; text-align:center; display:inline-block;
}
.kachel:hover{background:var(--accent); color:var(--white); transform:translateY(-2px)}

/* ===== Footer ===== */
footer{
  position:fixed; bottom:0; left:0; width:100%;
  background:var(--background);
  padding:1.25rem 1.5rem 1.5rem;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  color:var(--text-main); font-size:.95rem; z-index:800;
}
.footer-left{justify-self:start}
.footer-center{justify-self:center}
.footer-right{justify-self:end}
.footer-link{color:var(--text-main); text-decoration:none; font-weight:600}
.footer-link:hover{color:var(--accent)}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--white);
  color: var(--text-main);
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--shadow);
  position: relative;
}
.close-modal {
  position: absolute;
  top: .5rem;
  right: .8rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
}

/* Projekt-Kacheln */
.projekt-kachel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--white);
  color: var(--text-main);
  text-decoration: none;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
  margin: 2rem 0;
}
.projekt-kachel:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}
.projekt-logo { width: 100px; height: auto; flex-shrink: 0; }
.projekt-text h3 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.projekt-text p { margin: 0; font-size: 1.05rem; line-height: 1.5; }

/* Links im Fließtext */
.inline-link {color: var(--text-main); text-decoration: underline; font-weight: 600}
.inline-link:hover {color: var(--accent)}

/* ===== Hamburger Menü ===== */
.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  margin-right: 1rem;
  z-index: 1001;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  position: absolute;
  top: var(--header-h);
  right: 0; left: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 999;
}
.mobile-nav a {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
}
.mobile-nav a:hover {
  background: var(--accent);
  color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width:768px){
  .menu-left,.menu-right{display:none}
  .hamburger{display:block}

  .layout {
    grid-template-columns: 1fr;
    justify-items: center; /* zentriert den Inhalt horizontal */
    padding: calc(var(--header-h) + 1rem) 1rem 6rem;
  }
  .col-center {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .col-center h1{font-size:1.9rem}
  .text-container p{font-size:1rem}

  footer {
    grid-template-columns: 1fr;
    text-align: center;
    row-gap: .6rem;
  }
  .footer-left,.footer-center,.footer-right{justify-self:center}
  .footer-center {order:1}
  .footer-right {order:2}
  .footer-left {order:3}

  /* Ziele- und Projekt-Kacheln mobil umstellen */
  .ziel-box,
  .projekt-kachel {
    flex-direction: column;
    width: 100%;
    height: auto;
    text-align: left; /* oder center */
  }

  .ziel-bild,
  .ziel-platzhalter,
  .projekt-logo {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
  }

  .ziel-info,
  .projekt-text {
    width: 100%;
    padding: 1rem;
  }
}
