/* ===== RESET & VARIABLES / Reset & Variablen ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0563ae;
  --primary-dark: #044a82;
  --gray-bg: #f5f7f9;
  --text: #333;
  --text-light: #666;
  --white: #fff;
  --border: #ddd;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== UTILITIES / Hilfsklassen ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 70px 0; }
.section-alt { background: var(--gray-bg); }
.text-center { text-align: center; }
.mt-m { margin-top: 1.5rem; }
.mb-m { margin-bottom: 1.5rem; }
.mb-xl { margin-bottom: 3rem; }
/* ===== HEADER / Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
}
.logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); }

/* Logo-Groesse steuern / Control logo size */
.logo img {
    height: 50px;
    width: auto;
}

/* ===== NAVIGATION / Navigation ===== */
.nav { display: flex; gap: 4px; list-style: none; }
.nav a {
  display: block; padding: 8px 14px;
  font-size: 0.92rem; font-weight: 500;
  border-radius: 4px; transition: background 0.2s;
}
.nav a:hover, .nav .active a {
  color: var(--primary); background: var(--gray-bg);
}
.nav-mobile-toggle { display: none; }

/* ===== HERO / Hero Section ===== */
.hero {
  position: relative; background-size: cover;
  background-position: center; color: var(--white);
  padding: 90px 0 70px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(4, 74, 130, 0.75);
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.4rem; font-weight: 700;
  margin-bottom: 12px;
}
.hero p {
  font-size: 1.15rem; opacity: 0.92;
  max-width: 600px;
}
.hero .btn {
  display: inline-block; margin-top: 28px;
  background: var(--white); color: var(--primary);
  padding: 12px 30px; border-radius: var(--radius);
  font-weight: 600; transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.hero .btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.95);
}
/* ===== TILES / Kacheln ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ===== TILES / Kacheln ===== */
.tile {
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  border-radius: var(--radius); min-height: 220px;
  display: flex; align-items: flex-end;
  justify-content: center; text-align: center;
  padding: 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
/* Gradient NUR fuer Service/Product-Tiles, NICHT fuer Galerie / Gradient ONLY for Service/Product tiles, NOT gallery */
.tile.has-overlay::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,99,174,0.1) 0%,
    rgba(5,99,174,0.1) 50%,
    rgba(5,99,174,0.85) 100%
  );
}
.tile .tile-content {
  position: relative; z-index: 1;
  font-size: 1.2rem; font-weight: 600;
}

/* ===== JOB CARDS / Job-Karten ===== */
.job-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.job-card:hover { transform: translateY(-3px); }
.job-card .thumb {
  height: 160px; background: #e0e6ed;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 0.8rem;
}
.job-card .label {
  padding: 14px 16px; font-weight: 600;
  font-size: 0.95rem; color: var(--primary);
}

/* ===== BUTTONS / Buttons ===== */
.btn {
  display: inline-block; padding: 12px 28px;
  background: var(--primary); color: var(--white);
  border-radius: var(--radius); font-weight: 600;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent; border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
/* ===== COMPANY SECTION / Unternehmensbereich ===== */
.company {
  background: var(--primary); color: var(--white);
  padding: 70px 0;
}
.company-inner { max-width: 720px; }
.company h2 { font-size: 1.6rem; margin-bottom: 18px; }
.company p { margin-bottom: 14px; opacity: 0.92; }
.company a {
  color: var(--white); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.5);
}

/* ===== BENEFITS / Vorteile-Liste ===== */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-item {
  display: flex; align-items: flex-start; gap: 12px;
}
.benefit-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gray-bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--primary);
}
.benefit-text h4 { font-size: 1rem; margin-bottom: 4px; }
.benefit-text p { font-size: 0.9rem; color: var(--text-light); }

/* ===== LISTS / Checklisten ===== */
.checklist { list-style: none; }
.checklist li {
  position: relative; padding-left: 30px;
  margin-bottom: 10px;
}
.checklist li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--primary); font-weight: 700;
}

/* ===== TITLE HEADINGS / Titelvorbereitung ===== */
.section-title {
  font-size: 1.7rem; text-align: center;
  margin-bottom: 44px; color: var(--text);
}
/* ===== CONTACT FORM / Kontaktformular ===== */
.contact-form {
  background: var(--gray-bg); padding: 30px;
  border-radius: var(--radius); max-width: 700px;
  margin: 0 auto;
}
.contact-form label {
  display: block; margin-bottom: 6px;
  font-weight: 600; font-size: 0.9rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 12px; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem;
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ===== CONTACT INFO / Kontaktdetails ===== */
.contact-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.contact-item {
  background: var(--white); padding: 20px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-item h4 { color: var(--primary); margin-bottom: 8px; }
.contact-item p { color: var(--text-light); }

/* ===== FOOTER / Footer ===== */
.footer {
  background: #1a202c; color: #a0aec0;
  padding: 28px 0; font-size: 0.9rem;
}
.footer-inner {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer a { color: #a0aec0; margin-left: 18px; }
.footer a:hover { color: var(--white); }

/* ===== RESPONSIVE / Responsive ===== */
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.8rem; }
  .benefits, .contact-info { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 10px; padding: 10px 0; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ===== EDITORIAL SPLIT / Zweispaltiger Textblock ===== */
.editorial {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}
.editorial h3 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.3;
}
.editorial p {
  color: var(--text-light);
}

@media (max-width: 768px) {
  .editorial {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== GALERIE / Gallery Grid ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery .tile {
  min-height: 180px;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOSAIK GALERIE / Mosaic Gallery ===== */
.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 180px;
  gap: 12px;
}
/* Erstes Bild: ueber zwei Zeilen / First image: span 2 rows */
.gallery-mosaic .tile:first-child {
  grid-row: span 2;
}
@media (max-width: 768px) {
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-mosaic .tile:first-child {
    grid-row: span 1;
  }
}

/* ===== LEISTUNGSDTAIL / Service Detail ===== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}
.service-detail .tile {
  min-height: 250px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-detail .tile:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(5,99,174,0.25);
}
/* Umtauschen bei jedem zweiten Element / Flip every second element */
.service-detail:nth-child(even) {
  direction: rtl;
}
.service-detail:nth-child(even) > div {
  direction: ltr;
}

@media (max-width: 768px) {
  .service-detail {
    grid-template-columns: 1fr;
  }
  .service-detail:nth-child(even) {
    direction: ltr;
  }
}

/* ===== ICON LIST / Icon-Liste ===== */
.icon-list { list-style: none; }
.icon-list li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px;
}
.icon-list li::before {
  content: "\2713";
  width: 24px; height: 24px;
  background: var(--primary); color: var(--white);
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}

/* ===== CONTACT CARD / Ansprechpartner-Karten ===== */
.contact-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s; text-align: center;
}
.contact-card:hover { transform: translateY(-3px); }
.contact-card-img {
  height: 120px;
  background-size: cover;
  background-position: top center;
  background-color: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card h4 {
  font-size: 1rem; margin: 12px 0 4px; color: var(--text);
}
.contact-card p {
  margin: 0; font-size: 0.85rem; color: var(--text-light);
}
@media (max-width: 768px) {
  .contact-card-img { height: 150px; }
}

/* ===== IMPRESSUM / Impressum-Seite ===== */
.impressum-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.impressum-wrapper h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.impressum-wrapper h2:first-of-type {
    margin-top: 0;
}

.impressum-wrapper h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 12px;
}

.impressum-wrapper p {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.impressum-wrapper p:last-child {
    margin-bottom: 0;
}

.impressum-wrapper small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.impressum-wrapper a {
    color: var(--primary);
    text-decoration: underline;
}

.impressum-wrapper a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

@media (max-width: 560px) {
    .impressum-wrapper h2 {
        font-size: 1.25rem;
        margin-top: 28px;
    }
}

/* ===== DATENSCHUTZ WRAPPER / Datenschutz Seite ===== */
.datenschutz-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.datenschutz-wrapper h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.datenschutz-wrapper h2:first-of-type {
    margin-top: 0;
}

.datenschutz-wrapper h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 12px;
}

.datenschutz-wrapper h4 {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
}

.datenschutz-wrapper p {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 14px;
    text-align: justify;
}

.datenschutz-wrapper p:last-child {
    margin-bottom: 0;
}

.datenschutz-wrapper a {
    color: var(--primary);
    text-decoration: underline;
    word-break: break-word;
}

.datenschutz-wrapper a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.datenschutz-wrapper strong {
    font-weight: 600;
}

@media (max-width: 560px) {
    .datenschutz-wrapper h2 {
        font-size: 1.25rem;
        margin-top: 36px;
    }

    .datenschutz-wrapper h3 {
        font-size: 1.1rem;
    }
}

/* ===== ISO CERTIFICATION / ISO Zertifizierung ===== */
.iso-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--gray-bg), #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 40px auto;
    max-width: 900px;
}

.iso-badge-image {
    flex-shrink: 0;
    width: 120px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.iso-badge-content h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 0 0 8px 0;
}

.iso-badge-content p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.iso-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.iso-badge-link:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Vollständige Sektion für Unternehmensseite */
.iso-section {
    margin: 60px 0;
}

.iso-section-image {
    text-align: center;
    margin-bottom: 32px;
}

/* Zentrierung AUS dem Media-Query holen / Move centering out of media query */
.iso-section-image img {
    display: block;
    margin: 0 auto;
    max-width: 350px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.iso-section-content h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.iso-section-content p {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ===== KARRIERE / Karriere-Seite ===== */
.career-intro {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

.empty-jobs {
    text-align: center;
    padding: 60px 20px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto 40px;
}

.empty-jobs a {
    color: var(--primary);
    text-decoration: underline;
}

/* Job-Liste / Job listing cards */
.job-listing {
    display: block;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.job-listing:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(5, 99, 174, 0.12);
    border-color: var(--primary);
}

.job-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.job-listing-header h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin: 0;
}

.job-type-badge {
    flex-shrink: 0;
    padding: 4px 12px;
    background: var(--gray-bg);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.job-location {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.job-short-desc {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.job-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Initiativbewerbung / Speculative application section */
.initiativ-section {
    margin-top: 60px;
    padding: 40px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    text-align: center;
}

.initiativ-section h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.initiativ-section p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

/* Job-Detailseite / Job detail page */
.job-detail {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.job-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.job-meta-item {
    font-size: 1rem;
    color: var(--text-light);
}

.job-short p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 30px;
}

.job-long {
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 40px;
}

.job-apply {
    margin-top: 50px;
    padding: 30px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    text-align: center;
}

.job-apply h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.job-apply p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Responsive / Responsive Anpassungen */
@media (max-width: 768px) {
    .job-meta {
        flex-direction: column;
        gap: 8px;
    }

    .initiativ-section {
        padding: 24px;
    }
}

/* ===== POPUP MODAL / Hinweis-Fenster ===== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: popupFadeIn 0.25s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.popup-box {
    background: var(--white);
    border-radius: 8px;
    max-width: 480px;
    width: 100%;
    padding: 36px 32px 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popupSlideIn 0.3s ease;
}

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

.popup-box h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.popup-message {
    color: var(--text);
    line-height: 1.7;
    font-size: 1rem;
}

/* Absaetze im Popup / Paragraphs inside popup */
.popup-message p { margin: 0 0 12px; }
.popup-message p:last-child { margin-bottom: 0; }
.popup-message b, .popup-message strong { font-weight: 700; }
.popup-message i, .popup-message em { font-style: italic; }
.popup-message u { text-decoration: underline; }

.popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.popup-close:hover {
    color: var(--text);
}

@media (max-width: 560px) {
    .popup-box {
        padding: 28px 20px 20px;
    }
    .popup-box h2 {
        font-size: 1.2rem;
    }
}