/* ========================================
   Apotheke am Römer – Notdienst-Tool
   CI: Charcoal + Apotheken-Grün + Rot
   ======================================== */

:root {
  --dark: #1a1a1a;
  --dark-2: #2a2a2a;
  --dark-3: #333;
  --mid: #6c6c6c;
  --light: #f8f8f8;
  --border: rgba(0,0,0,0.1);
  --white: #fff;

  /* Apotheke-Farben */
  --green: #009a44;
  --green-dark: #007a36;
  --green-light: rgba(0,154,68,0.08);
  --red: #e2001a;
  --red-light: rgba(226,0,26,0.08);
  --orange: #ff6200;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  --bg: var(--white);
  --bg-2: var(--light);
  --text: #212121;
  --text-2: var(--mid);
  --card-bg: var(--white);
  --header-bg: var(--dark);
}

[data-theme="dark"] {
  --bg: #111;
  --bg-2: #1a1a1a;
  --text: #f0f0f0;
  --text-2: #a0a0a0;
  --card-bg: #1e1e1e;
  --border: rgba(255,255,255,0.1);
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* ---- Header ---- */
header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--green);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
}

.logo-link { display: flex; align-items: center; }
.logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.85; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--green); }

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.25s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--dark-2);
  padding: 12px 20px 16px;
}
.mobile-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
}
.mobile-nav.open { display: flex; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  color: white;
  padding: 80px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23009a44' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.label {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}
.hero h1 span { color: var(--green); }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: white;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover {
  border-color: white;
  background: rgba(255,255,255,0.08);
}

.hero-cross {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  opacity: 0.06;
  pointer-events: none;
}
.hero-cross svg { width: 100%; fill: var(--green); }

/* ---- Sections ---- */
.section {
  padding: 72px 0;
  background: var(--bg);
}
.section-alt {
  background: var(--bg-2);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.section-header p {
  color: var(--text-2);
  font-size: 1rem;
  margin: 0;
}

/* ---- Search Card ---- */
.search-card {
  max-width: 680px;
  margin: 0 auto 40px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.search-top {
  background: var(--red);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-badge {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.search-powered {
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
}

.search-form {
  padding: 24px 24px 8px;
}

.search-row {
  display: flex;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.search-row:focus-within { border-color: var(--green); }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
}
.search-input::placeholder { color: var(--text-2); }

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: white;
  border: none;
  padding: 0 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-btn:hover { background: var(--green-dark); }
.search-btn svg { width: 18px; height: 18px; }

.search-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}

.hint-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.15s;
}
.hint-chip:hover {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
}

.search-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 20px;
  font-size: 0.8rem;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.search-note svg { width: 16px; height: 16px; flex-shrink: 0; fill: var(--text-2); }

/* ---- Quick Links ---- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.quick-link-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(0,154,68,0.12);
  transform: translateY(-2px);
}

.quick-link-icon { font-size: 1.5rem; flex-shrink: 0; }

.quick-link-card strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}
.quick-link-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--green);
}

/* ---- Calendar Steps ---- */
.calendar-info {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.calendar-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 260px;
  flex: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.step-text span {
  font-size: 0.85rem;
  color: var(--text-2);
}

.social-promo {
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 32px;
  border: 1px solid var(--border);
  max-width: 480px;
  margin: 0 auto;
}
.social-promo p {
  margin: 0 0 16px;
  font-size: 1rem;
}

.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: white;
  padding: 11px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-instagram:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-instagram svg { width: 18px; height: 18px; }

/* ---- Info Grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.info-icon { font-size: 2rem; margin-bottom: 12px; }

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.hours-table td {
  padding: 4px 0;
  color: var(--text-2);
}
.hours-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}
.hours-table .closed { color: var(--red); }

address {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 12px;
}

.map-link {
  font-size: 0.85rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.map-link:hover { text-decoration: underline; }

.contact-list, .service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li, .service-list li {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.contact-list a, .service-list a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-list a:hover, .service-list a:hover { color: var(--green); }

/* ---- Emergency Banner ---- */
.emergency-banner {
  background: #fff8f5;
  border-top: 1px solid #ffe4d4;
  padding: 32px 0;
}
[data-theme="dark"] .emergency-banner {
  background: #1f1410;
  border-top-color: #3d1f10;
}

.emergency-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.emergency-icon { font-size: 2rem; flex-shrink: 0; }
.emergency-inner > div:nth-child(2) { flex: 1; min-width: 200px; }
.emergency-inner strong { font-size: 0.95rem; }
.emergency-inner p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-2);
}

.emergency-numbers { display: flex; gap: 12px; flex-shrink: 0; }
.emergency-btn {
  background: var(--red);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.emergency-btn:hover { opacity: 0.88; }

/* ---- Footer ---- */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
}

.footer-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--red));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  height: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}
.footer-brand p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.85); }

.footer-credit {
  margin: 0;
  font-size: 0.78rem;
}
.footer-credit a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-nav { display: none; }
  .burger { display: flex; }

  .hero { padding: 56px 20px 60px; }
  .hero-cross { display: none; }

  .quick-links { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }

  .calendar-info { flex-direction: column; align-items: center; }

  .emergency-inner { flex-direction: column; align-items: flex-start; }

  .footer-inner { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .footer-brand { flex-direction: column; justify-content: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

/* Mobile form zoom fix */
@media (max-width: 768px) {
  .search-input { font-size: max(16px, 1em); }
}
