@charset "utf-8";

html {
  box-sizing: border-box;
}

*, ::before, ::after {
  box-sizing: inherit;
}

body {
  margin: 0 auto;
  padding: 0;
  font-family: Calibri;
  overflow-x: hidden;
  background-color: #ffffff;
  color: #000000;
}

body > * {
  color: #000000;
  padding: 1em;
  margin: 1em 0;
}

/* NAVBAR STYLING STARTS */
.navbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #5c0e2e;
  color: #ffffff !important; /* EXPLIZIT Weiße Schrift */
  font-family: Century;
  font-size: 16pt;
}

/* ALLE Texte in der Navbar auf Weiß setzen */
.navbar * {
  color: #ffffff !important;
}

.navbar a {
  color: #ffffff !important;
  text-decoration: none;
}

.navbar a:hover {
  color: #f2f2f2 !important;
  text-decoration: underline;
}

.nav-links a {
  color: #ffffff !important;
}

/* LOGO */
.logo img {
  width: 280px;
  height: 100px;
  max-width: 100%;
}

/* NAVBAR MENU */
.menu {
  display: flex;
  gap: 1em;
  font-size: 18px;
  color: #ffffff !important;
}

.menu a {
  color: #ffffff !important;
}

.menu li:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  transition: 0.3s ease;
}

.menu li {
  list-style-type: none;
  padding: 5px 14px;
  color: #ffffff !important;
}

/* DROPDOWN MENU */
.services {
  position: relative;
}

.dropdown {
  background-color: #5c0e2e;
  padding: 1em 0;
  position: absolute;
  display: none;
  border-radius: 14px;
  top: 35px;
  z-index: 1001;
  color: #ffffff !important;
}

.dropdown li + li {
  margin-top: 10px;
}

.dropdown li {
  padding: 0.5em 0.5em;
  width: 8em;
  text-align: center;
  color: #ffffff !important;
}

.dropdown a {
  color: #ffffff !important;
}

.dropdown li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.services:hover .dropdown {
  display: block;
}

/* RESPONSIVE NAVBAR MENU */
input[type=checkbox] {
  display: none;
}

.hamburger {
  display: none;
  font-size: 24px;
  user-select: none;
  color: #ffffff !important;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    background-color: #5c0e2e;
    right: 0;
    left: 0;
    text-align: center;
    padding: 16px 0;
    color: #ffffff !important;
  }
  
  .menu a {
    color: #ffffff !important;
  }
  
  .menu li {
    color: #ffffff !important;
  }
}

/* REST DES CODES BLEIBT UNVERÄNDERT... */
/* LIGHTBOX STYLES */
.lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  max-height: 80%;
  object-fit: contain;
  animation: zoom 0.3s;
}

.lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 1.2rem;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

@keyframes zoom {
  from {transform: scale(0.1)}
  to {transform: scale(1)}
}

/* TABLE STYLES */
table {
  border: 1px solid #ddd;
  margin: 20px auto;
  border-radius: 0;
  width: 100%;
  max-width: 1200px;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

th, td {
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: top;
  padding: 15px 10px;
  border-radius: 0;
  background: #ffffff;
}

th {
  background: #ffffff;
  font-weight: bold;
  color: #5c0e2e;
  border-bottom: 2px solid #5c0e2e;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Remove box from table container */
div[style*="overflow-x:auto"] {
  background: transparent;
  border: none;
  box-shadow: none;
}

.subject-title {
  margin: 15px 0;
  font-weight: bold;
  color: #5c0e2e;
}

/* IMAGE STYLES */
img {
  display: block;
  margin: 10px auto;
  max-width: 100%;
  height: auto;
}

/* Clickable images for lightbox */
.image-with-caption img,
.image-with-caption_broader img,
.media-item img,
.abschnitt img,
.artikel img,
.text-gallery img,
.news img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.image-with-caption img:hover,
.image-with-caption_broader img:hover,
.media-item img:hover,
.abschnitt img:hover,
.artikel img:hover,
.text-gallery img:hover,
.news img:hover {
  opacity: 0.9;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    background-color: #5c0e2e;
    right: 0;
    left: 0;
    text-align: center;
    padding: 16px 0;
  }

  .menu li:hover {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
  }

  .menu li + li {
    margin-top: 12px;
  }

  input[type=checkbox]:checked ~ .menu {
    display: block;
  }

  .hamburger {
    display: block;
  }

  .dropdown {
    left: 50%;
    top: 30px;
    transform: translateX(35%);
  }

  .dropdown li:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* GALLERY MOBILE LAYOUT */
  .gallery-container {
    flex-direction: column;
    margin: 20px 0;
  }

  .gallery-text,
  .gallery-images,
  .gallery-text-images_broader,
  .gallery-images_broader {
    flex: none;
    width: 100%;
    padding: 20px;
    min-width: 100%;
  }

  .gallery-container:not(.alternate) .gallery-text + .gallery-images,
  .gallery-container.alternate .gallery-text-images_broader + .gallery-images_broader {
    order: 2;
  }

  .gallery-container:not(.alternate) .gallery-text,
  .gallery-container.alternate .gallery-text-images_broader {
    order: 1;
  }

  .image-with-caption,
  .image-with-caption_broader {
    flex: 1 1 100%;
    min-width: 100%;
    margin-bottom: 20px;
  }

  .image-with-caption:last-child,
  .image-with-caption_broader:last-child {
    margin-bottom: 0;
  }

  .image-with-caption img,
  .image-with-caption_broader img {
    width: 100%;
    height: 250px;
    object-fit: contain;
  }

  .caption h3,
  .caption_broader h3 {
    font-size: 1.1rem;
  }

  .caption p,
  .caption_broader p {
    font-size: 0.9rem;
  }

  /* ARTICLE IMAGES MOBILE */
  .abschnitt img,
  .artikel img,
  .news img {
    float: none;
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto 20px auto;
    display: block;
    padding: 0;
  }
  
  /* RESPONSIVE TABLE */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  th, td {
    padding: 8px;
    font-size: 0.9rem;
  }
  
  .lightbox-content {
    width: 95%;
  }
  
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
  
  /* TEXT GALLERY MOBILE */
  .text-gallery {
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
  }
  
  .text-gallery-item {
    min-width: 100%;
    max-width: 100%;
  }
  
  .text-gallery-item img {
    height: 250px;
    object-fit: contain;
  }
  
  .text-gallery-caption {
    font-size: 1rem;
    padding: 0 10px;
  }
}

/* DESKTOP GALLERY STYLES */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  margin: 40px 0;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.gallery-text {
  flex: 2;
  min-width: 300px;
  padding: 30px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.gallery-images {
  flex: 1;
  min-width: 300px;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.image-with-caption {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.image-with-caption img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}

.caption {
  margin-top: 15px;
}

.caption h3 {
  font-size: 1.3rem;
  color: #5c0e2e;
  margin-bottom: 8px;
}

.caption p {
  color: #666;
  font-size: 1rem;
  line-height: 1.4;
}

.gallery-text-images_broader {
  flex: 1;
  min-width: 300px;
  padding: 30px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.gallery-images_broader {
  flex: 2;
  min-width: 300px;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.image-with-caption_broader {
  flex: 2;
  min-width: 250px;
  text-align: center;
}

.image-with-caption_broader img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}

.caption_broader {
  margin-top: 15px;
}

.caption_broader h3 {
  font-size: 1.3rem;
  color: #5c0e2e;
  margin-bottom: 8px;
}

.caption_broader p {
  color: #666;
  font-size: 1rem;
  line-height: 1.4;
}

.alternate {
  flex-direction: row-reverse;
}

.media-section {
  flex: 1;
  min-width: 250px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  background: #ffffff;
}

.media-item {
  width: 100%;
  text-align: center;
}

.media-item img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}

.media-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  background: #000;
  border: 1px solid #eee;
}

/* INLINE TEXT GALLERY */
.text-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
  justify-content: center;
}

.text-gallery-item {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.text-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  cursor: pointer;
}

.text-gallery-caption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #5c0e2e;
}

/* TYPOGRAPHY */
h2 {
  font-size: 1.8rem;
  color: #5c0e2e;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #5c0e2e;
}

h3 {
  font-size: 1.5rem;
  color: #5c0e2e;
  margin: 25px 0 15px;
}

h4 {
  font-size: 1.2rem;
  color: #5c0e2e;
  margin: 25px 0 15px;
}

h5 {
  font-size: 1.3rem;
  color: #8b0000;
  margin: 25px 0 15px;
}

p {
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: #333;
  line-height: 1.5;
}

ul {
  margin: 15px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
  color: #333;
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 30px 0;
}

/* CONTENT SECTIONS */
.abschnitt {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  font-size: 13pt;
  padding: 20px;
  border-radius: 8px;
}

.abschnitt img {
  border-radius: 8px;
  float: right;
  width: 300px;
  height: 300px;
  padding: 10px;
  margin-top: 0px;
  margin-left: 30px;
  margin-right: 30px;
  object-fit: contain;
  border: 1px solid #eee;
}

.artikel {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 25px;
  font-size: 13pt;
  border-radius: 8px;
}

.artikel img {
  float: right;
  width: 300px;
  height: 300px;
  padding: 10px;
  margin-top: 0px;
  margin-left: 20px;
  margin-right: 20px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 8px;
}

.news {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.news img {
  float: right;
  width: 300px;
  height: 300px;
  padding: 10px;
  margin-top: 0px;
  margin-left: 30px;
  margin-right: 30px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 8px;
}

/* FOOTER */
.footer {
  background-color: #5c0e2e;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  color: #ffffff;
}

.footer a {
  font-size: 21px;
  color: #ffffff;
  transition: color 0.3s;
}

.footer a:hover {
  color: #f2f2f2;
}

/* RESPONSIVE GRID LAYOUT */
@media (min-width: 30em) {
  body {
    color: #000000;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 0 2em;
  }

  header, nav,  
  .abschnitt, .artikel, .news, 
  .gallery-container {
    grid-column: 3 / 13;
  }
  
  .footer {
    grid-column: 3 / 13; 
    padding-left: calc(2/14 * 100%);
    padding-right: calc(2/14 * 100%);
  }
}

/* ADDITIONAL RESPONSIVE */
@media (max-width: 1200px) {
  .gallery-container {
    margin: 30px 10px;
  }
  
  table {
    margin: 20px 10px;
  }
}

@media (max-width: 992px) {
  .gallery-text,
  .gallery-images,
  .gallery-text-images_broader,
  .gallery-images_broader {
    padding: 20px;
  }
  
  .image-with-caption img,
  .image-with-caption_broader img {
    height: 300px;
  }
}

/* PRINT STYLES */
@media print {
  .navbar,
  .footer,
  .lightbox {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    background: #ffffff;
  }
  
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .gallery-container {
    border: 1px solid #ddd;
    box-shadow: none;
    margin: 10px 0;
  }
  
  table {
    border: 1px solid #000;
  }
  
  th, td {
    border: 1px solid #000;
  }
}

/* CODE BLOCK STYLES */
.code-block {
  background-color: #f8f9fa;
  border-left: 4px solid #5c0e2e;
  padding: 20px;
  margin: 25px 0;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-x: auto;
  border-radius: 0 5px 5px 0;
  color: #333;
  line-height: 1.4;
  border: 1px solid #e0e0e0;
}

.code-block:hover {
  background-color: #f0f2f5;
}

/* FORMULA STYLES */
.formula {
  background-color: #f8f9fa;
  padding: 20px;
  margin: 25px 0;
  border-radius: 5px;
  font-family: "Cambria", "Times New Roman", serif;
  text-align: center;
  border-left: 4px solid #5c0e2e;
  color: #222;
  font-size: 1.1rem;
  border: 1px solid #e0e0e0;
}

.formula-inline {
  font-family: "Cambria", "Times New Roman", serif;
  font-style: italic;
  background-color: #f8f9fa;
  padding: 2px 8px;
  border-radius: 4px;
  color: #222;
  font-weight: 500;
  border: 1px solid #e0e0e0;
}

/* NOTE BOX */
.note {
  background-color: #fff9e6;
  border-left: 4px solid #ffd54f;
  padding: 20px;
  margin: 25px 0;
  border-radius: 0 5px 5px 0;
  border: 1px solid #ffeaa7;
}

.note strong {
  color: #5c0e2e;
}

/* CALCULATION CHAIN */
.calculation-chain {
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 5px;
  margin: 30px 0;
  border-left: 4px solid #5c0e2e;
  border: 1px solid #e0e0e0;
}

.calculation-chain ol {
  margin: 15px 0;
  padding-left: 25px;
}

.calculation-chain li {
  margin-bottom: 15px;
  padding-left: 8px;
  color: #333;
  font-weight: 500;
}

/* DESKTOP GRID LAYOUT FOR ARTICLES */
@media (min-width: 48em) {
  body {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 0 2em;
  }

  .artikel {
    grid-column: 3 / 13;
  }
}

/* LINK STYLES */
a {
  color: #5c0e2e;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #8b0000;
  text-decoration: underline;
}

a:visited {
  color: #8b0000;
}

/* FOCUS STYLES FOR ACCESSIBILITY */
:focus {
  outline: 2px solid #5c0e2e;
  outline-offset: 2px;
}

/* SELECTION COLOR */
::selection {
  background-color: rgba(92, 14, 46, 0.1);
  color: #000;
}

::-moz-selection {
  background-color: rgba(92, 14, 46, 0.1);
  color: #000;
}