/* ==========================================================================
   MILLCURA PFLEGEDIENST - ZENTRALES STYLESHEET
   Farbschema: Original Millcura Rubinrot & Akzente
   ========================================================================== */

:root {
  --primary: #b71c1c;        /* Original Millcura Weinrot */
  --primary-dark: #7f0000;   /* Dunkles Bordeaux */
  --primary-soft: #fdf2f2;   /* Zarter roter Hintergrund für Boxen */
  --accent: #dfa696;         /* Original Zartrosé/Sand */
  --text-main: #1f1f1f;
  --text-muted: #555555;
  --bg-page: #fbfbfc;
  --bg-surface: #ffffff;
  --border-color: #e5e7eb;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.65;
}

h1, h2, h3, .serif-font {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  font-weight: bold;
}

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Top Emergency Bar */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-bar a { color: #ffcdd2; text-decoration: none; font-weight: bold; }
.top-bar a:hover { color: #fff; text-decoration: underline; }

/* Header & Nav */
header {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-box img { max-height: 65px; width: auto; display: block; }

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
}
nav li { position: relative; }
nav > ul > li > a {
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 10px;
  display: block;
  border-radius: 4px;
}
nav > ul > li > a:hover,
nav > ul > li > a.active {
  color: var(--primary);
  text-decoration: none;
  background-color: rgba(183, 28, 28, 0.04);
}

/* Desktop Dropdowns */
nav li ul,
nav li ul.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border-radius: var(--radius);
  flex-direction: column;
  min-width: 230px;
  padding: 8px 0;
  z-index: 1000;
  margin: 0;
  list-style: none;
}
nav li:hover > ul,
nav li:hover > ul.dropdown {
  display: flex;
}
nav li ul li,
nav li ul.dropdown li { width: 100%; }
nav li ul a,
nav li ul.dropdown a {
  padding: 9px 18px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  display: block;
}
nav li ul a:hover,
nav li ul.dropdown a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
  padding: 5px;
}

/* Banner / Emotion Header */
.emotion-banner {
  background-color: #eee;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  text-align: center;
}
.emotion-banner img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}
.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  padding: 35px 20px 20px;
  text-align: center;
}
.banner-overlay h2 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.banner-overlay p {
  color: #f8fafc;
  font-size: 1.05rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Grid Layout */
.main-wrapper {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 35px;
  padding: 40px 0;
}
.main-wrapper.full-width { grid-template-columns: 1fr; }

.content-area h1 { font-size: 2rem; margin-bottom: 20px; line-height: 1.25; }
.content-area h2 { font-size: 1.45rem; margin: 32px 0 14px; line-height: 1.3; }
.content-area h3 { font-size: 1.2rem; margin-bottom: 8px; }
.content-area p { margin-bottom: 16px; }
.content-area ul, .content-area ol { margin: 0 0 20px 24px; }
.content-area li { margin-bottom: 6px; }

.highlight-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 25px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.highlight-box em { font-size: 1.05rem; color: var(--primary-dark); font-style: italic; }

/* Team & Galerien */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}
.team-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 15px;
  text-align: center;
  box-shadow: var(--shadow);
}
.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--accent);
}
.team-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.team-card .role { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 25px 0;
}
.gallery-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}
.gallery-grid img:hover { transform: scale(1.03); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.sidebar-box h4 {
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}
.sidebar-box p { margin-bottom: 10px; font-size: 0.95rem; }
.partner-logos { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.partner-logos img { max-width: 140px; height: auto; }

/* Buttons & Formulare */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }

.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: #212529;
  color: #ccc;
  padding: 40px 0 20px;
  font-size: 0.9rem;
  border-top: 4px solid var(--primary);
  margin-top: 60px;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}
.footer-wrap a { color: #fff; }
.footer-bottom {
  text-align: center;
  border-top: 1px solid #374151;
  padding-top: 18px;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ==========================================================================
   MOBILE NAVIGATION (Scrollbar & Klapp-Menü)
   ========================================================================== */
@media (max-width: 900px) {
  .main-wrapper { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 15px 20px 30px;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
    gap: 4px;
    align-items: stretch;

    /* WICHTIG: Begrenzt die Höhe und macht das Menü auf jedem Handy voll scrollbar */
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav ul.show { display: flex; }
  nav > ul > li { width: 100%; }
  nav > ul > li > a {
    padding: 12px 6px;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
  }

  /* Auf Mobilgeräten standardmäßig ZUGEKLAPPT */
  nav li ul,
  nav li ul.dropdown {
    position: static;
    display: none !important;
    box-shadow: none;
    border: none;
    padding-left: 12px;
    margin: 4px 0 10px;
    background: #fbfbfc;
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
    width: 100%;
  }

  /* Klappt nur auf, wenn das Menü angetippt wurde (.open) */
  nav li.open > ul,
  nav li.open > ul.dropdown {
    display: flex !important;
    flex-direction: column;
  }

  nav li ul a,
  nav li ul.dropdown a {
    padding: 9px 12px;
    font-size: 0.92rem;
    border-bottom: 1px solid #f3f4f6;
  }

  .emotion-banner img { max-height: 240px; }
  .banner-overlay h2 { font-size: 1.35rem; }
  .banner-overlay p { font-size: 0.9rem; }
}
