:root {
  /* Farben - zentral definiert */
  --color-main-bg: #1a1a1a;
  --color-text: #00bb00;
  --color-text-secondary: #666666;
  --color-footer-bg: #666666;
  --color-header-bg: #1a1a1a;
  --color-text-light: #e0e0e0;
  --color-link: #00bb00;
  --color-link-hover: #00cc00;
  --color-frame: #00bb00;
  --color-lang-active-bg: #888888;
  --color-lang-text: #666666;
  --color-logo-bg: #666666;
  
  /* Abstände */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Footer */
footer {
  min-height: 2.5rem;
  background-color: var(--color-footer-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  flex-shrink: 0;
}

footer a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

footer a.modal-open {
  background-color: var(--color-main-bg);
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-company-name {
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
}

.main-nav a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.2);
}

.main-nav .icon {
  margin-right: 0.3rem;
  font-size: 1.3em;
}

/* main Bereich */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--color-main-bg);
}

/* Text Section */
.text-section {
  height: 15%;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem;
  flex-shrink: 0;
}

.text-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  height: 100%;
}

.text-row .header-logo {
  height: 80%;
  width: auto;
  object-fit: contain;
}

.text-row .text-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 90%;
}

.text-content h1 {
  font-size: clamp(1rem, 5vw, 4rem);
  color: var(--color-text);
  margin: 0;
  line-height: 1;
}

.text-content p {
  font-size: clamp(0.6rem, 2vw, 1.8rem);
  color: var(--color-text-secondary);
  margin: 0.2rem 0 0 0;
  max-width: 90%;
}

/* Images Section */
.images-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 5% 10%;
  min-height: 0;
}

.image-row {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5%;
  min-height: 0;
}

/* Layout-Umschaltung */
.layout-2x2 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.layout-1x4 {
  display: none;
}

.card {
  width: 40%;
  height: 80%;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card:hover img {
  transform: scale(1.05);
}

.card-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-main-bg);
  border: 2px solid var(--color-frame);
  color: var(--color-text-light);
  padding: 0.5rem;
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.card:hover .card-text {
  transform: translateY(0);
}

/* Touch-Geräte: Text immer sichtbar */
@media (hover: none) and (pointer: coarse) {
  .card-text {
    transform: translateY(0);
    background: var(--color-main-bg);
  }
}

/* Message Icon */
.message-icon {
  position: fixed;
  top: 1rem;
  right: 5rem;
  width: 3.5rem;
  height: 3.5rem;
  cursor: pointer;
  z-index: 1000;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-icon img {
  width: 2.6rem;
  height: 2.6rem;
}

.message-icon:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Globe Icon */
.lang-globe {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  cursor: pointer;
  z-index: 1000;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-globe img {
  width: 2.6rem;
  height: 2.6rem;
}

.lang-globe:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Language Dropdown */
.lang-dropdown {
  display: none;
  position: fixed;
  top: 5.5rem;
  right: 1rem;
  background: var(--color-footer-bg);
  border-radius: 0.5rem;
  padding: 0.5rem;
  z-index: 1001;
}

.lang-dropdown.active {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lang-dropdown a {
  color: white;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 0.25rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.lang-dropdown a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--color-main-bg);
  border-radius: 0.5rem;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
  margin: 0;
  color: white;
  font-size: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h1 {
  color: white;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: white;
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-header-bg);
}

button[type="submit"] {
  background-color: var(--color-frame);
  color: var(--color-text-secondary);
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

button[type="submit"]:hover {
  background: var(--color-link-hover);
}

/* Status Message */
.status-message {
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 0.25rem;
  text-align: center;
}

.status-message.success {
  background: rgba(0, 187, 0, 0.2);
  color: var(--color-frame);
  border: 1px solid var(--color-frame);
}

.status-message.error {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

/* Impressum Modal Styles */
.impressum-modal h2 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: white;
  font-size: 1.4rem;
}

.impressum-modal h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  color: white;
}

.impressum-modal p {
  color: white;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.impressum-modal address {
  font-style: normal;
  margin: 0.6rem 0;
  color: white;
  font-size: 1.1rem;
}

.impressum-modal .company-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.impressum-modal .contact-info,
.impressum-modal .vat-info {
  margin: 1rem 0;
  padding: 0.6rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

.impressum-modal .contact-info p,
.impressum-modal .vat-info p {
  color: white;
  font-size: 1.1rem;
}

.impressum-modal .contact-info strong,
.impressum-modal .vat-info strong {
  color: var(--color-frame);
}

/* Mobile Nav Bar */
.mobile-nav-bar {
  display: none;
}

.mobile-nav-item img {
  width: 2.2rem;
  height: 2.2rem;
}

.lang-flag {
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text);
  background: transparent;
  border-radius: 4px;
  border: 2px solid var(--color-frame);
  cursor: pointer;
}

/* ========== MEDIA QUERIES - 5 PROFILE ========== */

/* ---------- PROFIL 2: Tablet Landscape (≥768px + landscape) ---------- */
@media (min-width: 768px) and (orientation: landscape) {
  .images-section {
    padding: 4% 8%;
  }
  .image-row {
    flex: 1;
    min-height: 0;
  }
  .card {
    width: 50%;
    height: 80%;
  }
}

/* ---------- PROFIL 3: Tablet Portrait (481px - 767px + portrait) ---------- */
@media (min-width: 481px) and (max-width: 767px) and (orientation: portrait) {
  .images-section {
    padding: 5% 10%;
  }
  .image-row {
    flex-direction: column;
    justify-content: center;
    gap: 5%;
    flex: 1;
    min-height: 0;
  }
  .card {
    width: 95%;
    height: 80%;
  }
}

/* ---------- PROFIL 4: Mobile Landscape (≤480px + landscape) ---------- */
@media (max-width: 480px) and (orientation: landscape) {
  .images-section {
    padding: 4% 8%;
    overflow-y: auto;
  }
  .image-row {
    flex-direction: row;
    justify-content: space-between;
    gap: 5%;
    flex: 1;
    min-height: 0;
  }
  .card {
    width: 45%;
    height: 85%;
  }
  .card img {
    width: 100%;
    height: 100%;
  }
  footer {
    justify-content: center;
  }
  .footer-links[data-mobile-hidden] {
    display: none;
  }
}

/* ---------- PROFIL 5: Mobile Portrait (≤480px + portrait) - 1x4 Grid ---------- */
@media (max-width: 480px) and (orientation: portrait) {
  .images-section {
    padding: 5% 10%;
    overflow-y: auto;
  }
  .layout-2x2 {
    display: none;
  }
  .layout-1x4 {
    display: flex;
    flex-direction: column;
    gap: 5%;
    height: 100%;
  }
  .layout-1x4 .image-row {
    flex-direction: column;
    justify-content: center;
    gap: 5%;
    flex: 1;
    min-height: 0;
  }
  .layout-1x4 .card {
    width: 100%;
    height: 80%;
  }
  .layout-1x4 .card img {
    width: 100%;
    height: 100%;
  }
  footer {
    justify-content: center;
  }
  .footer-links[data-mobile-hidden] {
    display: none;
  }
}

/* ---------- Desktop: Mobile Nav ausblenden (≥768px) ---------- */
@media (min-width: 768px) {
  .mobile-nav-bar[data-mobile-only] {
    display: none !important;
  }
  .footer-links[data-mobile-hidden] {
    display: flex;
  }
}