/* ==========================================================================
   PROSTATA-GESUNDHEIT.DE - CUSTOM DESIGN SYSTEM
   Modern, trustworthy, medical-grade styling for German health portal
   ========================================================================== */

:root {
  /* Color Palette - Medical Slate & Teal Accents */
  --color-primary: #0f2b48;       /* Deep Navy Slate */
  --color-primary-light: #1e40af; /* Deep Royal Navy */
  --color-accent: #0d9488;        /* Medical Teal */
  --color-accent-light: #f0fdf4;  /* Very Soft Teal/Green Tint */
  --color-accent-hover: #0f766e;
  --color-brand-blue: #0284c7;    /* Trust Blue */
  
  --color-bg-main: #ffffff;
  --color-bg-alt: #f8fafc;        /* Slate Light */
  --color-bg-card: #ffffff;
  --color-bg-highlight: #f1f5f9;

  --color-text-main: #1e293b;     /* Dark Slate Text */
  --color-text-muted: #64748b;    /* Medium Gray Text */
  --color-text-heading: #0f172a;  /* Near Black */

  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;

  --color-warning-bg: #fffbe6;
  --color-warning-border: #ffe58f;
  --color-warning-text: #854500;

  /* Typography & Layout */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 30px -10px rgba(15, 23, 42, 0.2);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

/* Typography Utility */
h1, h2, h3, h4, h5 {
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-main);
  font-size: 1.05rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-brand-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none !important;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--color-text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-main);
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--color-accent-light);
  color: var(--color-accent-hover);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-title {
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none !important;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(15, 43, 72, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 43, 72, 0.28);
}

.btn-accent {
  background-color: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: white;
  border-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.hero-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-card-header svg {
  color: var(--color-accent);
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.feature-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.feature-text p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.section-header p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

/* Content Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Standard Cards */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.card-body {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  flex-grow: 1;
}

/* Anatomical Box & Infographics */
.info-box {
  background: white;
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

.info-box-title {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Symptom Checklist / Warning Cards */
.symptom-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.symptom-bullet {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--color-brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.symptom-content h4 {
  margin-bottom: 0.35rem;
  color: var(--color-primary);
}

.symptom-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Doctor Preparation Interactive Tool */
.tool-container {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 2rem;
}

.tool-header {
  background-color: var(--color-primary);
  color: white;
  padding: 1.75rem 2rem;
}

.tool-header h3 {
  color: white;
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.tool-body {
  padding: 2rem;
}

.tool-step {
  margin-bottom: 2rem;
}

.tool-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .checklist-options {
    grid-template-columns: 1fr;
  }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background-color: var(--color-bg-alt);
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.checkbox-label:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.tool-output {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border: 1px dashed var(--color-border-hover);
  border-radius: var(--radius-md);
  display: none;
}

.tool-output.active {
  display: block;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--color-border-hover);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 1rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Trust & Transparency Banner (Section 5) */
.transparency-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a8a 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  box-shadow: var(--shadow-lg);
}

.transparency-banner h2 {
  color: white;
  margin-bottom: 1rem;
}

.transparency-banner p {
  color: #cbd5e1;
  font-size: 1.1rem;
  max-width: 750px;
  margin-bottom: 2rem;
}

.transparency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.transparency-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.transparency-card h4 {
  color: white;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transparency-card p {
  color: #94a3b8;
  font-size: 0.925rem;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background-color: #0b1727;
  color: #94a3b8;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.disclaimer-banner {
  background-color: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 1.5rem 0;
}

.disclaimer-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #fecaca;
  font-size: 0.95rem;
  line-height: 1.5;
}

.disclaimer-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #f87171;
}

.footer-main {
  padding: 4rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #64748b;
  font-size: 0.9rem;
}

.footer-column h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.925rem;
}

.footer-links a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid #1e293b;
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Cookie Consent Banner (DSGVO / TDDDG) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
  padding: 1.5rem 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner-text h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.cookie-banner-text p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Cookie Settings Cards in Preferences Modal */
.cookie-option-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.cookie-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cookie-option-title {
  font-weight: 700;
  color: var(--color-primary);
}

/* Custom UI Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-accent);
}

input:disabled + .slider {
  background-color: #94a3b8;
  cursor: not-allowed;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Modals for Legal & Information */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-bg-alt);
}

.modal-header h3 {
  color: var(--color-primary);
  margin-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: var(--color-text-heading);
  background-color: var(--color-border);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  font-size: 0.975rem;
  line-height: 1.6;
}

.modal-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.modal-body h4:first-child {
  margin-top: 0;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text-heading);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .hero-grid, .grid-2 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .transparency-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .cookie-banner-actions .btn {
    flex: 1;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0;
  }

  .section {
    padding: 3.5rem 0;
  }

  .transparency-banner {
    padding: 2rem 1.5rem;
  }
}

/* Print Styles for Checklist Tool */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-checklist, #printable-checklist * {
    visibility: visible;
  }
  #printable-checklist {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
  }
}
