/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background: rgba(43, 133, 211, 0.03);
  color: #333;
  padding-bottom: 2rem;
}



/* === Header & Navigation === */
header {
  background: rgba(43, 133, 211, 0.03);
  padding: 1rem 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  height: 50px;
  display: block;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links li a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  position: relative;
}
.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -5px;
  background-color: #2b85d3;
  transition: width 0.3s ease;
}
.nav-links li a:hover::after {
  width: 100%;
}
.menu-btn {
  display: none;
}

/* === Home Seite === */

.unified-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 6rem;
  gap: 2rem;
}

.content-row.reverse {
  flex-direction: row-reverse;
}

.content-row img {
  flex: 1 1 300px;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
}

.text-block {
  flex: 1 1 400px;
}

.text-block ul {
  padding-left: 1.2rem;
  list-style-type: disc;
  margin: 1rem 0;
}

.text-block h2 {
  margin-top: 0;
}
/* === Intro-Abschnitt zentriert & mobilfähig === */
.intro-text {
  text-align: center;
  color: #2b85d3;
  max-width: 960px;
  margin: 6rem auto 5rem;
  padding: 0 1.5rem;
}

.intro-text h1 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.intro-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
}

/* === TYPOGRAPHIE SYSTEM === */
body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: #333;
  line-height: 1.6;
  font-size: 1rem;
}

/* Standardabsätze */
.text-standard,
p {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1rem;
}

/* Kleine Texte z. B. für Footer oder rechtliche Hinweise */
.text-small {
  font-size: 0.9rem;
  color: #555;
}

/* Überschriften */
.text-heading,
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #2b85d3;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4, h5, h6 { font-size: 1.1rem; }

/* Links */
a {
  text-decoration: none;
  color: #2b85d3;
  transition: color 0.3s ease;
}

a:hover {
  color: #1a6fb8;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
  .intro-text {
    padding: 2rem 1rem;
    margin: 4rem auto 3rem;
  }

  .intro-text h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .intro-text p {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* === Alternative Hero Section für Unterseiten === */
.hero-section.alt-header {
  background-image: url("test.png");
}
.hero-section,
.hero-section .hero-text-block,
.hero-section h1,
.hero-section p {
  color: white;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  .nav-container {
  position: relative;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: white;
    padding: 1rem;
    position: absolute;
    top: 70px;
    right: 1rem;
    width: 200px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  .nav-links.show {
    display: flex;
  }
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .project-box {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  .project-box:hover {
    transform: scale(1.02);
  }
  .project-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  .project-title {
    padding: 1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    background-color: #f0f0f0;
  }
  .toggle-icon {
    font-size: 1.5rem;
    color: #007acc;
  }

  .project-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .project-overlay.open {
    display: flex;
  }

  .project-detail-box {
    background: white;
    max-width: 95%;
    width: 1000px;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
  }

.project-detail-box img {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

  .project-text {
    width: 50%;
    overflow-y: auto;
  }

  .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
  }

  @media (max-width: 768px) {
    .project-detail-box {
      flex-direction: column;
    }
    .project-detail-box img,
    .project-text {
      width: 100%;
    }
  }

/* === Sections === */
.section-one,
.section-two,
.feedback-slider,
.site-footer {
  background: transparent;
}
.section-one {
  display: flex;
  flex-wrap: wrap;
  padding: 10rem 2rem;
  gap: 2rem;
  align-items: center;
}
.text-block {
  flex: 2;
}
.text-block h1 {
  font-size: 2.2rem;
  color: rgba(43, 133, 211, 0.6);
  margin-bottom: 1rem;
}
.text-block p {
  font-size: 1.1rem;
  color: #444;
}
.section-two {
  padding: 4rem 2rem;
  margin-top: 4rem;
}
.section-two:first-of-type {
  margin-top: 0;
}
.section-two h1 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.8rem;
  color: rgba(43, 133, 211, 0.6);
}
.item-row,
.sector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
  justify-content: center;
}
.item,
.sector-box {
  background: white;
  padding: 1.5rem;
  flex: 1 1 320px;
  max-width: 420px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.item img,
.sector-box img {
  max-height: 140px;
  margin-bottom: 1rem;
  object-fit: contain;
}
.item h2,
.sector-box h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.sector-box p {
  text-align: left;
  margin-bottom: 1rem;
}



/* === Feedback Slider === */
.feedback-slider {
  padding: 4rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.feedback-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  margin: auto;
  position: relative;
}
.feedback-card {
  max-width: 600px;
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: opacity 0.3s ease;
}
.feedback-logo {
  width: 50px;
  margin-bottom: 1rem;
}
.feedback-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: block;
}
.feedback-text {
  font-size: 1rem;
  color: #444;
}
.nav-btn {
  font-size: 2rem;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
}
.nav-btn:hover {
  color: #2b85d3;
}

/* === Back to Top Button === */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #2b85d3;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  font-size: 1.5rem;
}
#scrollTopBtn:hover {
  background-color: #1a6fb8;
}


/* === Optimized Footer === */
.site-footer {
  background: #f9fcfe;
  padding: 3rem 1rem;
  font-size: 0.95rem;
  color: #333;
  border-top: 1px solid #e0e0e0;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}

.footer-column {
  flex: 1 1 250px;
  min-width: 200px;
}

.footer-column h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2b85d3;
}

.footer-column p,
.footer-column a {
  line-height: 1.6;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: #2b85d3;
}

.footer-column input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-column button {
  width: 100%;
  padding: 0.7rem;
  background-color: #2b85d3;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 0.95rem;
}

.footer-column button:hover {
  background-color: #1a6fb8;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.footer-bottom a {
  color: #2b85d3;
  text-decoration: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-column {
    margin-bottom: 1rem;
  }

  .footer-column h4 {
    margin-bottom: 0.5rem;
  }

  .footer-column p,
  .footer-column a {
    margin: 0.2rem 0;
    line-height: 1.4;
  }
}


/* Gemeinsame Hero Section-Grundstruktur */
.hero-section {
  position: relative;
  width: 100vw;
  max-width: 100%;
  margin: 0 auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 500px;
  display: flex;
  color: white;
  padding: 4rem 2rem;
  overflow: hidden;
}

/* Abstand unterhalb des Bildes */
.hero-section + main {
  margin-top: 4rem;
} 

/* Startseite: zentriert im Bild */
.hero-home {
  justify-content: center;
  align-items: center;
  background-image: url("images/test2.png");
  text-align: center;
}

/* Unterseiten: Schrift unten links */
.hero-subpage {
  justify-content: flex-start;
  align-items: flex-end;
  background-image: url("images/Header3.png"); 
  text-align: left;
}

.hero-text-block {
  max-width: 800px;
  color: white;
}

.hero-text-block h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-text-block p {
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Responsive für kleinere Bildschirme */
@media (max-width: 768px) {
  .hero-section {
    height: 175px; 
    padding: 2rem 1rem;
    align-items: flex-end; 
    justify-content: flex-start;
  }

  .hero-text-block h1 {
    font-size: 1.6rem;
  }

  .hero-text-block p {
    font-size: 1rem;
  }
}
/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .section-one {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .feedback-container {
    flex-direction: column;
  }
  .item,
  .sector-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .footer-column {
    margin-bottom: 0.5rem;
  }
  .footer-column h4 {
    margin-bottom: 0.3rem;
  }
  .footer-column p,
  .footer-column a {
    margin: 0.2rem 0;
    line-height: 1.3;
  }
}





.project-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background: white;
  padding: 2rem;
  margin: 2rem auto;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  align-items: flex-start;
  max-width: 1200px;
}

.project-image {
  flex: 1 1 300px;
  max-width: 400px;
}
.project-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  object-fit: cover;
}

.project-content {
  flex: 2 1 600px;
}

@media (max-width: 768px) {
  .project-box {
    flex-direction: column;
  }
  .project-image,
  .project-content {
    max-width: 100%;
  }
}

/* === Akkordeon-Projektboxen === */
.project-box {
  margin-bottom: 2rem;
  border: 1px solid #ddd;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  background: white;
}

/* Header mit Bild + Titel + Symbol */
.project-header {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}
.project-header:hover {
  background: rgba(43, 133, 211, 0.05);
}

.project-header img {
  width: 100%;
  height: auto;
  display: block;
}

/* Titel und + Symbol nebeneinander */
.project-title {
  padding: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
}

.toggle-icon {
  font-size: 1.5rem;
  color: #2b85d3;
  transition: transform 0.3s ease;
}

/* Eingeklappter Bereich */
.project-details {
  display: none;
  padding: 1.5rem;
  border-top: 1px solid #eee;
  animation: fadeIn 0.3s ease-in-out;
  background: #fff;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Projekte im 3-Spalten-Raster === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-box {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.project-box:hover {
  transform: translateY(-4px);
}

.project-header img {
  width: 100%;
  height: auto;
  object-fit: cover;
}


/* Einheitliche Höhe für Bilder */
.project-header img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* Details mittig mit Bild links und Text rechts */
.project-box.open .project-header {
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  background: white;
}

.project-box.open .project-title {
  flex: 1;
  background: none;
  padding: 0;
  font-size: 1.5rem;
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
}

.project-box.open .project-header img {
  width: 50%;
  height: auto;
  border-radius: 0.5rem;
}

.project-box.open .project-details {
  display: block !important;
  flex: 1;
  padding: 0;
  animation: fadeIn 0.3s ease-in-out;
}

/* Optional: Box wird beim Öffnen hervorgehoben */
.project-box.open {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: scale(1.01);
}

/* Mobile Anpassung */
@media (max-width: 768px) {
  .project-box.open .project-header {
    flex-direction: column;
  }
  .project-box.open .project-header img {
    width: 100%;
    height: auto;
  }
  .project-box.open .project-details {
    padding-top: 1rem;
  }
}


body.popup-active {
  overflow: hidden;
}

.project-box.open .project-header {
  display: none;
}

.project-box.open {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.project-box.open .project-header {
  display: block;
  flex: 1;
}

.project-box.open .project-header img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  max-height: 70vh;
  object-fit: contain;
}

.project-box.open .project-title {
  display: none; 
}

.project-box.open .project-details {
  flex: 2;
  overflow-y: auto;
  max-height: 70vh;
}

@media (max-width: 768px) {
  .project-box.open {
    flex-direction: column;
  }

  .project-box.open .project-header,
  .project-box.open .project-details {
    max-height: unset;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }
}











@media (max-width: 768px) {
  .content-row img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .news-image {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}


@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .project-overlay {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0.5rem !important;
    overflow-y: auto !important;
  }

  .project-detail-box {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 1rem !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative !important;
  }

  .project-detail-box img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    margin-bottom: 1rem;
    border-radius: 10px;
  }

  .project-text {
    width: 100% !important;
    overflow: visible !important;
  }

  .project-detail-box table {
    width: 100% !important;
    overflow-x: auto !important;
    display: block !important;
  }

  .project-detail-box table th,
  .project-detail-box table td {
    white-space: normal !important;
  }

  body.popup-active {
    overflow: auto !important;
  }
}


.project-box.open .project-details {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === KORREKTE Lösung für services.html === */
body.services-page .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

body.services-page .project-box {
  width: 100%;
  position: relative;
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

body.services-page .project-box.open {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.services-page .project-header {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

body.services-page .project-header img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

body.services-page .project-title {
  padding: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
}

body.services-page .project-details {
  display: none;
  padding: 1.5rem;
  border-top: 1px solid #eee;
  background: #fff;
}

body.services-page .project-box.open .project-details {
  display: block;
}

body.services-page .project-box.open .toggle-icon {
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

@media (min-width: 769px) {
  body.services-page .project-box.open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    z-index: 999;
    background-color: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
  }

  body.services-page .project-box.open .project-details {
    display: block;
    padding: 1.5rem;
  }
}

/* === Mobile Styling für Services & Projects === */
@media (max-width: 768px) {
  .projects-grid {
    padding: 0 1rem;
  }

  .project-box {
    margin: 0 auto;
    border-radius: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .project-header img {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
  }

  .project-title {
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
  }

  .project-details {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

/* === MOBILE FIX: Noch kompakterer Abstand zwischen Bild und Text === */
@media (max-width: 768px) {
  .projects-grid {
    padding: 0 0.5rem;
  }

  .project-box {
    margin: 0.5rem auto;
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
    border-radius: 0.6rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  }

  .project-header {
    margin: 0;
    padding: 0;
  }

  .project-header img {
    height: 140px;
    width: 100%;
    object-fit: contain;
    padding: 0;
    margin: 0;
    display: block;
  }

  .project-title {
    display: none;
  }

  .project-details {
    padding-top: 0.3rem;
    margin-top: 0;
    font-size: 0.92rem;
    line-height: 1.5;
  }
}
@media (max-width: 768px) {
  .project-details h3 {
    margin: 0.3rem 0 0.2rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .project-details p {
    margin: 0.3rem 0;
  }
}

@media (max-width: 768px) {
  .project-box .project-title {
    display: flex !important;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    background-color: #f9f9f9;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-title .toggle-icon {
    align-self: flex-end;
  }
}