/**
 * mms.css — Millmann Media Solutions
 * Custom design system for millmann.at
 * Clean, minimal, Hetzner-inspired professional IT design.
 * Sharp edges, flat cards, no gradients outside hero.
 * ============================================================
 */


/* ============================================================
   1. @font-face — Montserrat (local, 5 weights)
   ============================================================ */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   2. CSS Custom Properties (:root)
   ============================================================ */

:root {
  /* Brand colors */
  --mms-red:            #B22222;
  --mms-red-dark:       #8B0000;
  --mms-dark:           #383838;
  --mms-grey:           #f5f5f5;
  --mms-white:          #ffffff;
  --mms-text:           #555555;
  --mms-text-light:     #888888;
  --mms-border:         #e0e0e0;

  /* Bootstrap primary overrides */
  --bs-primary:         #B22222;
  --bs-primary-rgb:     178, 34, 34;
  --bs-link-color:      #B22222;
  --bs-link-hover-color:#8B0000;

  /* Font stack */
  --mms-font:           'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font sizes */
  --mms-fs-xs:          0.72rem;
  --mms-fs-sm:          0.8rem;
  --mms-fs-base:        0.875rem;
  --mms-fs-md:          1rem;
  --mms-fs-lg:          1.05rem;
  --mms-fs-xl:          1.25rem;
  --mms-fs-2xl:         1.5rem;
  --mms-fs-3xl:         2rem;
  --mms-fs-hero:        clamp(2rem, 5vw, 3.2rem);

  /* Font weights */
  --mms-fw-regular:     400;
  --mms-fw-medium:      500;
  --mms-fw-semibold:    600;
  --mms-fw-bold:        700;
  --mms-fw-extrabold:   800;

  /* Spacing */
  --mms-space-xs:       8px;
  --mms-space-sm:       16px;
  --mms-space-md:       24px;
  --mms-space-lg:       40px;
  --mms-space-xl:       60px;
  --mms-space-2xl:      80px;

  /* Border radius — max 4px per spec */
  --mms-radius-sm:      2px;
  --mms-radius:         4px;
  --mms-radius-icon:    8px;

  /* Shadows */
  --mms-shadow-card:    0 4px 16px rgba(0, 0, 0, 0.10);
  --mms-shadow-nav:     0 2px 8px rgba(0, 0, 0, 0.08);
  --mms-shadow-mega:    0 8px 24px rgba(0, 0, 0, 0.10);
  --mms-shadow-dropdown:0 4px 16px rgba(0, 0, 0, 0.10);

  /* Transitions */
  --mms-transition:     0.15s ease;
}


/* ============================================================
   3. Base reset
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--mms-font);
  color: var(--mms-text);
  background-color: var(--mms-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mms-font);
  color: var(--mms-dark);
  font-weight: var(--mms-fw-bold);
  line-height: 1.2;
  margin-top: 0;
}

a {
  color: var(--mms-red);
  text-decoration: none;
  transition: color var(--mms-transition);
}

a:hover {
  color: var(--mms-red-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}


/* ============================================================
   4. Pre-header (.mms-pre-header)
   ============================================================ */

.mms-pre-header {
  background: var(--mms-dark);
  height: 38px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.mms-pre-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
}

.mms-pre-header-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0 12px;
  transition: color var(--mms-transition);
  white-space: nowrap;
}

.mms-pre-header-link:hover {
  color: var(--mms-white);
  text-decoration: none;
}

.mms-pre-header-link--first {
  padding-left: 0;
}

.mms-pre-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  padding: 3px 10px;
  color: var(--mms-white);
  font-size: 0.72rem;
  font-family: var(--mms-font);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--mms-transition);
  white-space: nowrap;
}

.mms-pre-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mms-white);
  text-decoration: none;
}


/* ============================================================
   5. Main Navbar (.mms-navbar)
   ============================================================ */

.mms-navbar {
  background: var(--mms-white);
  border-bottom: 1px solid var(--mms-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 62px;
  display: flex;
  align-items: center;
  transition: box-shadow var(--mms-transition);
}

.mms-navbar--scrolled {
  box-shadow: var(--mms-shadow-nav);
}

.mms-navbar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
}

.mms-navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 32px;
  text-decoration: none;
}

.mms-navbar-brand img {
  height: 48px;
  width: auto;
  max-width: none;
  display: inline-block;
}

.mms-navbar-brand .navbar-logo-dark { display: none; }
[data-bs-theme="dark"] .mms-navbar-brand .navbar-logo-dark  { display: inline-block; }
[data-bs-theme="dark"] .mms-navbar-brand .navbar-logo-light { display: none; }

.mms-navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 62px;
}

.mms-nav-item {
  position: relative;
  height: 62px;
  display: flex;
  align-items: center;
}

.mms-nav-link {
  color: var(--mms-dark);
  font-size: var(--mms-fs-base);
  font-weight: var(--mms-fw-medium);
  padding: 0 14px;
  height: 62px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--mms-transition), border-color var(--mms-transition);
  white-space: nowrap;
  font-family: var(--mms-font);
}

.mms-nav-link:hover,
.mms-nav-link--active {
  color: var(--mms-red);
  border-bottom-color: var(--mms-red);
  text-decoration: none;
}

.mms-nav-link--has-mega {
  cursor: pointer;
  gap: 5px;
  user-select: none;
}

.mms-nav-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  display: inline-block;
  line-height: 1;
}

.mms-nav-item.open .mms-nav-arrow {
  transform: rotate(180deg);
}

/* Navbar actions slot (buttons, avatar) */
.mms-navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  flex-shrink: 0;
}


/* ============================================================
   6. Megamenu (.mms-mega)
   ============================================================ */

.mms-mega {
  display: none;
  position: fixed;
  top: 100px; /* pre-header 38px + navbar 62px — wird per JS gesetzt */
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: var(--mms-white);
  border-top: 2px solid var(--mms-red);
  border-bottom: 1px solid var(--mms-border);
  box-shadow: var(--mms-shadow-mega);
  padding: 0;
  z-index: 999;
}

.mms-nav-item.open .mms-mega {
  display: block;
}

/* IT services: 5 columns */
.mms-mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

/* Agentur services: 4 columns */
.mms-mega-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.mms-mega-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--mms-radius);
  text-decoration: none;
  transition: background var(--mms-transition);
  color: inherit;
}

.mms-mega-item:hover {
  background: var(--mms-grey);
  text-decoration: none;
  color: inherit;
}

.mms-mega-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--mms-radius-icon);
  background: rgba(178, 34, 34, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--mms-red);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.mms-mega-title {
  font-size: var(--mms-fs-base);
  font-weight: var(--mms-fw-semibold);
  color: var(--mms-dark);
  margin-bottom: 3px;
  line-height: 1.3;
}

.mms-mega-desc {
  font-size: 0.75rem;
  color: var(--mms-text-light);
  line-height: 1.4;
}

/* Mega section header (optional label row) */
.mms-mega-section-label {
  font-size: var(--mms-fs-xs);
  font-weight: var(--mms-fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mms-text-light);
  padding: 0 0 12px 0;
  border-bottom: 1px solid var(--mms-border);
  margin-bottom: 8px;
}


/* ============================================================
   7. Mobile Nav
   ============================================================ */

.mms-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: var(--mms-dark);
}

.mms-hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--mms-dark);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mms-hamburger.open .mms-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mms-hamburger.open .mms-hamburger-line:nth-child(2) {
  opacity: 0;
}

.mms-hamburger.open .mms-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop: nav collapse = full flex row */
.mms-nav-collapse {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: space-between;
}

/* Mobile: collapse to dropdown */
@media (max-width: 991px) {
  .mms-hamburger {
    display: flex;
  }

  .mms-navbar {
    position: relative;
  }

  .mms-nav-collapse {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--mms-white);
    border-top: 1px solid var(--mms-border);
    padding: 8px 0 16px;
    position: absolute;
    top: 62px;
    left: 0;
    width: 100%;
    z-index: 998;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .mms-nav-collapse.open {
    display: flex;
  }

  /* Mobile nav links */
  .mms-nav-collapse .mms-nav-link {
    height: auto;
    padding: 12px 20px;
    border-bottom: none;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mms-nav-collapse .mms-nav-link:hover,
  .mms-nav-collapse .mms-nav-link--active {
    border-left-color: var(--mms-red);
    border-bottom-color: transparent;
    background: var(--mms-grey);
  }

  /* Mobile mega items stack vertically */
  .mms-nav-collapse .mms-mega {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 8px 0;
    width: 100%;
    border-top: none;
  }

  .mms-nav-collapse .mms-mega-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .mms-nav-collapse .mms-mega-item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 0;
  }

  .mms-nav-collapse .mms-mega-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .mms-nav-controls {
    padding: 12px 20px 4px;
    border-top: 1px solid var(--mms-border);
  }
}


/* ============================================================
   8. Buttons (.mms-btn)
   ============================================================ */

.mms-btn {
  font-family: var(--mms-font);
  font-weight: var(--mms-fw-semibold);
  font-size: var(--mms-fs-base);
  border-radius: var(--mms-radius);
  padding: 10px 22px;
  transition: background var(--mms-transition), color var(--mms-transition), border-color var(--mms-transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.mms-btn i {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
}

.mms-btn:focus-visible {
  outline: 2px solid var(--mms-red);
  outline-offset: 2px;
}

/* Primary */
.mms-btn-primary {
  background: var(--mms-red);
  color: var(--mms-white);
  border-color: var(--mms-red);
}

.mms-btn-primary:hover {
  background: var(--mms-red-dark);
  border-color: var(--mms-red-dark);
  color: var(--mms-white);
  text-decoration: none;
}

/* Outline */
.mms-btn-outline {
  background: transparent;
  border-color: var(--mms-red);
  color: var(--mms-red);
}

.mms-btn-outline:hover {
  background: var(--mms-red);
  color: var(--mms-white);
  text-decoration: none;
}

/* Dark */
.mms-btn-dark {
  background: var(--mms-dark);
  color: var(--mms-white);
  border-color: var(--mms-dark);
}

.mms-btn-dark:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
  color: var(--mms-white);
  text-decoration: none;
}

/* Sizes */
.mms-btn-sm {
  padding: 7px 16px;
  font-size: var(--mms-fs-sm);
}

.mms-btn-lg {
  padding: 13px 28px;
  font-size: var(--mms-fs-md);
}


/* ============================================================
   9. Cards (.mms-card)
   ============================================================ */

.mms-card {
  background: var(--mms-white);
  border: 1px solid var(--mms-border);
  border-radius: var(--mms-radius);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mms-card:hover {
  box-shadow: var(--mms-shadow-card);
  transform: translateY(-2px);
}

.mms-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--mms-radius-icon);
  background: var(--mms-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  margin: 0 auto 20px;
  flex-shrink: 0;
}

.mms-card-icon i {
  display: block;
  line-height: 1;
  vertical-align: middle;
}

.mms-card-title {
  font-size: var(--mms-fs-md);
  font-weight: var(--mms-fw-bold);
  color: var(--mms-dark);
  margin-bottom: 8px;
  text-align: center;
}

.mms-card-desc {
  font-size: var(--mms-fs-base);
  color: #666666;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

/* Centered list block inside card */
.mms-card .list-unstyled {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.mms-card .list-unstyled li {
  text-align: left;
}


/* ============================================================
   10. Sections
   ============================================================ */

.mms-section {
  padding: 80px 0;
}

.mms-section--sm {
  padding: 48px 0;
}

.mms-section--grey {
  background: var(--mms-grey);
}

.mms-section--dark {
  background: var(--mms-dark);
  color: var(--mms-white);
}

.mms-section--dark h1,
.mms-section--dark h2,
.mms-section--dark h3,
.mms-section--dark h4,
.mms-section--dark h5,
.mms-section--dark h6 {
  color: var(--mms-white);
}

.mms-section-label {
  display: block;
  font-size: var(--mms-fs-xs);
  font-weight: var(--mms-fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mms-red);
  margin-bottom: 12px;
}

.mms-section-title {
  font-size: var(--mms-fs-3xl);
  font-weight: var(--mms-fw-extrabold);
  color: var(--mms-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.mms-section--dark .mms-section-title {
  color: var(--mms-white);
}

.mms-section-subtitle {
  font-size: var(--mms-fs-lg);
  color: #666666;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
}

.mms-section--dark .mms-section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}


/* ============================================================
   11. Hero (.mms-hero)
   ============================================================ */

.mms-hero {
  background: var(--mms-dark);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Diagonal red accent — clip-path triangle top-right */
.mms-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 220px 140px 0;
  border-color: transparent var(--mms-red) transparent transparent;
  opacity: 0.18;
  pointer-events: none;
}

/* Secondary subtle red block bottom-right */
.mms-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: var(--mms-red);
  opacity: 0.05;
  border-radius: 0;
  pointer-events: none;
}

.mms-hero-label {
  display: block;
  color: var(--mms-red);
  font-size: 0.75rem;
  font-weight: var(--mms-fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-align: center;
}

.mms-hero-title {
  font-size: var(--mms-fs-hero);
  font-weight: var(--mms-fw-extrabold);
  color: var(--mms-white);
  line-height: 1.1;
  margin-bottom: 20px;
  text-align: center;
}

.mms-hero-text {
  font-size: var(--mms-fs-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Decorative vertical bar */
.mms-hero-accent {
  display: inline-block;
  width: 4px;
  height: 48px;
  background: var(--mms-red);
  vertical-align: middle;
  margin-right: 16px;
  flex-shrink: 0;
}

.mms-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}


/* ============================================================
   12. Footer (.mms-footer)
   ============================================================ */

.mms-footer {
  background: var(--mms-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 32px;
}

.mms-footer-title {
  color: var(--mms-white);
  font-size: 0.85rem;
  font-weight: var(--mms-fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.mms-footer-link {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: var(--mms-fs-base);
  display: block;
  padding: 4px 0;
  transition: color var(--mms-transition);
  font-family: var(--mms-font);
}

.mms-footer-link:hover {
  color: var(--mms-white);
  text-decoration: none;
}

.mms-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 48px;
  font-size: var(--mms-fs-sm);
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mms-footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
}

.mms-footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Footer social icons */
.mms-footer-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.mms-footer-social-link {
  width: 34px;
  height: 34px;
  border-radius: var(--mms-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background var(--mms-transition), color var(--mms-transition), border-color var(--mms-transition);
}

.mms-footer-social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--mms-white);
  text-decoration: none;
}


/* ============================================================
   13. Auth styles
   ============================================================ */

.auth-section {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 3rem 0;
  background: var(--mms-grey);
}

.auth-card {
  background: var(--mms-white);
  border: 1px solid var(--mms-border);
  border-radius: var(--mms-radius);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.07),
    4px 6px 0 0 rgba(0, 0, 0, 0.04),
    4px 6px 0 1px rgba(0, 0, 0, 0.06);
}

.auth-code-inputs .code-digit {
  font-family: var(--mms-font);
  text-align: center;
  font-weight: var(--mms-fw-bold);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.auth-code-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Auth form elements */
.auth-card .form-control:focus,
.auth-card .form-select:focus {
  border-color: var(--mms-red);
  box-shadow: 0 0 0 0.2rem rgba(178, 34, 34, 0.2);
}

.auth-card .btn-primary {
  background: var(--mms-red);
  border-color: var(--mms-red);
  font-family: var(--mms-font);
  font-weight: var(--mms-fw-semibold);
  border-radius: var(--mms-radius);
}

.auth-card .btn-primary:hover {
  background: var(--mms-red-dark);
  border-color: var(--mms-red-dark);
}


/* ============================================================
   14. Nav user avatar & dropdown
   ============================================================ */

.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mms-red);
  color: var(--mms-white);
  font-size: 0.75rem;
  font-weight: var(--mms-fw-bold);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  user-select: none;
  font-family: var(--mms-font);
}

.nav-avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.nav-user-avatar {
  background: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-user-avatar:focus-visible .nav-avatar {
  outline: 2px solid var(--mms-red);
  outline-offset: 2px;
}

/* Dropdown panel */
.nav-user-dropdown {
  min-width: 230px;
  border: 1px solid var(--mms-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  overflow: hidden;
  background: var(--mms-white);
  border-radius: 0 0 var(--mms-radius) var(--mms-radius);
}

.nav-user-dropdown-header {
  background: rgba(178,34,34,0.04);
  border-bottom: 1px solid var(--mms-border);
  padding: 12px 16px;
}
.nav-user-dropdown-header p { color: var(--mms-dark); }

.nav-user-dropdown-body {
}

.nav-user-dropdown-footer {
  border-top: 1px solid var(--mms-border);
}

.nav-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 40px;
  font-size: 0.84rem;
  font-weight: var(--mms-fw-medium);
  color: var(--mms-dark);
  text-decoration: none;
  transition: background var(--mms-transition);
  cursor: pointer;
  font-family: var(--mms-font);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.nav-user-dropdown-item:hover {
  background: var(--mms-grey);
  color: var(--mms-dark);
  text-decoration: none;
}

.nav-user-dropdown-item--danger { color: #c0392b; }
.nav-user-dropdown-item--danger:hover {
  background: rgba(192,57,43,0.07);
  color: #c0392b;
}

/* Icon: no background, centered, consistent size */
.nav-user-dropdown-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
  color: var(--mms-text-light);
}
.nav-user-dropdown-item--danger .nav-user-dropdown-icon { color: #c0392b; }

/* Dark mode */
[data-bs-theme="dark"] .nav-user-dropdown {
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .nav-user-dropdown-header {
  background: rgba(178,34,34,0.12);
  border-bottom-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .nav-user-dropdown-header p,
[data-bs-theme="dark"] .nav-user-dropdown-header .fw-semibold { color: #fff; }
[data-bs-theme="dark"] .nav-user-dropdown-header .text-muted { color: rgba(255,255,255,0.5) !important; }
[data-bs-theme="dark"] .nav-user-dropdown-footer { border-top-color: rgba(255,255,255,0.08); }
[data-bs-theme="dark"] .nav-user-dropdown-item { color: rgba(255,255,255,0.85); }
[data-bs-theme="dark"] .nav-user-dropdown-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
[data-bs-theme="dark"] .nav-user-dropdown-icon { color: rgba(255,255,255,0.4); }


/* ============================================================
   15. Bootstrap overrides
   ============================================================ */

/* Primary color vars */
:root {
  --bs-primary:         #B22222;
  --bs-primary-rgb:     178, 34, 34;
  --bs-link-color:      #B22222;
  --bs-link-hover-color:#8B0000;
}

/* btn-primary */
.btn-primary {
  background-color: var(--mms-red) !important;
  border-color: var(--mms-red) !important;
  font-family: var(--mms-font);
  font-weight: var(--mms-fw-semibold);
  border-radius: var(--mms-radius) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--mms-red-dark) !important;
  border-color: var(--mms-red-dark) !important;
  box-shadow: none !important;
}

/* btn-outline-secondary — override to red brand */
.btn-outline-secondary {
  border-color: var(--mms-red) !important;
  color: var(--mms-red) !important;
  font-family: var(--mms-font);
  font-weight: var(--mms-fw-semibold);
  border-radius: var(--mms-radius) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--mms-red) !important;
  border-color: var(--mms-red) !important;
  color: var(--mms-white) !important;
  box-shadow: none !important;
}

/* form-control focus */
.form-control:focus,
.form-select:focus {
  border-color: var(--mms-red);
  box-shadow: 0 0 0 0.2rem rgba(178, 34, 34, 0.2);
}

/* alert-danger */
.alert-danger {
  border-color: #f5d0d0;
  background-color: #fce8e8;
  color: #8B0000;
}

/* text-primary / bg-primary */
.text-primary {
  color: var(--mms-red) !important;
}

.bg-primary {
  background-color: var(--mms-red) !important;
}

/* Bootstrap border-radius resets (keep sharp look) */
.rounded,
.rounded-3,
.rounded-4 {
  border-radius: var(--mms-radius) !important;
}


/* ============================================================
   16. Utilities
   ============================================================ */

/* Decorative divider */
.mms-divider {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--mms-red);
  margin-bottom: 20px;
  border: none;
  opacity: 1;
}

/* Text utilities */
.text-mms-red  { color: var(--mms-red)  !important; }
.text-mms-dark { color: var(--mms-dark) !important; }

/* Background utilities */
.bg-mms-dark { background: var(--mms-dark) !important; }
.bg-mms-grey { background: var(--mms-grey) !important; }

/* Container helper — full-width inner with max-width */
.mms-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Flex row helpers */
.mms-flex         { display: flex; }
.mms-flex-center  { display: flex; align-items: center; }
.mms-flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Responsive typography */
@media (max-width: 768px) {
  .mms-section {
    padding: 56px 0;
  }

  .mms-section--sm {
    padding: 32px 0;
  }

  .mms-hero {
    padding: 72px 0 56px;
  }

  .mms-section-title {
    font-size: 1.65rem;
  }

  .mms-mega-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mms-mega-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .mms-footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Footer: 2 columns on tablet */
  .mms-footer .col-lg-2 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 576px) {
  .mms-section-title {
    font-size: 1.4rem;
  }

  .mms-hero-title {
    font-size: 1.8rem;
  }

  .mms-hero-text {
    font-size: 0.95rem;
  }

  .mms-hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .mms-hero-actions .mms-btn {
    width: 100%;
    justify-content: center;
  }

  .mms-card {
    padding: 20px;
  }

  .mms-container {
    padding: 0 12px;
  }

  /* Hide hero decorative pseudo-elements on small screens to prevent overflow */
  .mms-hero::before,
  .mms-hero::after {
    display: none;
  }

  /* Reduce hero padding further on small phones */
  .mms-hero {
    padding: 56px 0 40px;
  }

  /* Section padding tighter on xs */
  .mms-section {
    padding: 44px 0;
  }

  /* Card icon slightly smaller on xs */
  .mms-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  /* Pre-header: tighter on xs */
  .mms-pre-header {
    height: auto;
    min-height: 38px;
    padding: 4px 0;
    flex-wrap: wrap;
  }

  .mms-pre-pill {
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  /* Form card: reduce p-5 padding on mobile */
  .mms-card.p-5 {
    padding: 20px !important;
  }

  /* Footer: full width columns on xs */
  .mms-footer .col-lg-2 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Footer buttons full width on xs */
  .mms-footer .mms-btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer zentriert auf xs */
  .mms-footer .col-lg-4,
  .mms-footer .col-lg-2,
  .mms-footer .col-sm-6 {
    text-align: center;
  }

  .mms-footer-social {
    justify-content: center;
  }

  .mms-footer-contact {
    justify-content: center;
    display: flex;
    align-items: center;
  }
}

/* Extra-small: 320px–400px */
@media (max-width: 400px) {
  .mms-hero-title {
    font-size: 1.55rem;
  }

  .mms-section-title {
    font-size: 1.25rem;
  }

  /* Stat cards: clamp large numbers */
  .mms-stat-number {
    font-size: clamp(1.4rem, 7vw, 2.2rem) !important;
  }

  .mms-navbar-brand img {
    height: 36px;
  }
}


/* ============================================================
   17. Missing / Supplemental styles
   ============================================================ */

/* Footer additional classes */
.mms-footer-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  line-height: 1.6;
}
.mms-footer-contact {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
}
.mms-footer-contact-link {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}
.mms-footer-contact-link:hover {
  color: #fff;
}

/* Footer outline-light button */
.mms-btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  font-family: var(--mms-font);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 3px;
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.mms-btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

/* Logo-Switching: geregelt direkt bei .mms-navbar-brand img oben */

/* Pre-header avatar & chevron */
.mms-pre-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0;
}
.mms-pre-avatar-btn:hover .nav-avatar {
  opacity: 0.85;
}
.mms-pre-chevron {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.7);
  transition: transform 0.2s;
}
.mms-pre-user-wrap {
  position: relative;
}
.mms-pre-user-wrap #mms-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  z-index: 1100;
}
.mms-pre-user-wrap #mms-user-dropdown.show {
  display: block;
}
[aria-expanded="true"] .mms-pre-chevron {
  transform: rotate(180deg);
}

/* Navbar avatar button (desktop + mobile) */
.mms-nav-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mms-dark);
  padding: 0;
  display: flex;
  align-items: center;
}
.mms-nav-avatar-btn:hover .nav-avatar { opacity: 0.85; }
.mms-nav-chevron {
  font-size: 0.6rem;
  color: var(--mms-text-light);
  transition: transform 0.2s;
}
[aria-expanded="true"] .mms-nav-chevron { transform: rotate(180deg); }

/* Nav user dropdowns */
.mms-nav-user-wrap {
  position: relative;
}
.mms-nav-user-wrap .nav-user-dropdown {
  position: fixed;
  right: 0;
  top: 62px;
  display: none;
  z-index: 1200;
  border-top: none;
  border-radius: 0 0 var(--mms-radius) var(--mms-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.mms-nav-user-wrap .nav-user-dropdown.show {
  display: block;
}

/* Theme toggle button: ☀ [track] ☽ */
.mms-theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  line-height: 1;
}
.mms-theme-toggle-btn:hover { color: #fff; }
.mms-toggle-track {
  width: 30px;
  height: 17px;
  background: rgba(255,255,255,0.25);
  border-radius: 9px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.mms-toggle-thumb {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.15s;
}
.mms-theme-toggle-btn.is-dark .mms-toggle-track { background: var(--mms-red); }
.mms-theme-toggle-btn.is-dark .mms-toggle-thumb { left: 15px; }
/* Keep Around theme dark mode toggle working */
[data-bs-theme="dark"] .mms-navbar {
  background: #1e1e1e;
  border-bottom-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] .mms-nav-link {
  color: rgba(255,255,255,0.85);
}
[data-bs-theme="dark"] .mms-nav-link:hover,
[data-bs-theme="dark"] .mms-nav-link--active {
  color: #fff;
}
[data-bs-theme="dark"] .mms-mega {
  background: #242424;
  border-bottom-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .mms-mega-title { color: #fff; }
[data-bs-theme="dark"] .mms-mega-item:hover { background: rgba(255,255,255,0.06); }

/* Navbar brand */
.mms-navbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Main flex grow for sticky footer */
main.flex-grow-1 {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Service cards (legacy + new) */
.service-card-3d, .mms-card {
  background: var(--mms-white);
  border: 1px solid var(--mms-border);
  border-radius: var(--mms-radius);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card-3d:hover, .mms-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}


/* ============================================================
   18. Dark mode — body, sections, cards
   ============================================================ */

[data-bs-theme="dark"] body {
  background: #1a1a1a;
  color: rgba(255,255,255,0.8);
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-section {
  background: #1a1a1a;
}

[data-bs-theme="dark"] .mms-section--grey {
  background: #242424;
}

[data-bs-theme="dark"] .mms-section-title {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-section-subtitle {
  color: rgba(255,255,255,0.6);
}

[data-bs-theme="dark"] .mms-section-label {
  color: var(--mms-red);
}

[data-bs-theme="dark"] .mms-card,
[data-bs-theme="dark"] .service-card-3d {
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}

[data-bs-theme="dark"] .mms-card-title {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-card-desc {
  color: rgba(255,255,255,0.6);
}

[data-bs-theme="dark"] .mms-card-icon {
  background: var(--mms-red);
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-card:hover,
[data-bs-theme="dark"] .service-card-3d:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

[data-bs-theme="dark"] .mms-section p,
[data-bs-theme="dark"] .mms-body-text {
  color: rgba(255,255,255,0.8) !important;
}

[data-bs-theme="dark"] a {
  color: #e05555;
}

[data-bs-theme="dark"] a:hover {
  color: #ff6b6b;
}

[data-bs-theme="dark"] .text-primary {
  color: #e05555 !important;
}

[data-bs-theme="dark"] .mms-btn-primary,
[data-bs-theme="dark"] .mms-btn-primary:hover,
[data-bs-theme="dark"] .mms-btn-outline-light,
[data-bs-theme="dark"] .mms-btn-outline-light:hover {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-footer a,
[data-bs-theme="dark"] .mms-footer-link,
[data-bs-theme="dark"] .mms-footer-link:hover,
[data-bs-theme="dark"] .mms-footer-bottom a,
[data-bs-theme="dark"] .mms-footer-bottom a:hover,
[data-bs-theme="dark"] .mms-footer-social-link,
[data-bs-theme="dark"] .mms-footer-contact-link,
[data-bs-theme="dark"] .mms-footer-contact-link:hover {
  color: rgba(255,255,255,0.65);
}

[data-bs-theme="dark"] .mms-footer-link:hover,
[data-bs-theme="dark"] .mms-footer-bottom a:hover,
[data-bs-theme="dark"] .mms-footer-contact-link:hover {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-footer .mms-section-label {
  color: rgba(255,255,255,0.5);
}

[data-bs-theme="dark"] .mms-pre-header {
  background: #111;
}

[data-bs-theme="dark"] .mms-pre-header-link {
  color: rgba(255,255,255,0.8);
}

[data-bs-theme="dark"] .mms-pre-header-link:hover {
  color: #ffffff;
}

[data-bs-theme="dark"] .mms-pre-pill {
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}

[data-bs-theme="dark"] .mms-pre-pill:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
}

[data-bs-theme="dark"] .mms-nav-collapse {
}

[data-bs-theme="dark"] .mms-hamburger-line {
  background: rgba(255,255,255,0.85);
}

[data-bs-theme="dark"] .mms-hamburger {
  color: rgba(255,255,255,0.85);
}
