/*!
 * Gastroenterologie am Claraplatz - Arzt Page (Figma Complete)
 * Mobile-First Responsive Design
 * Based on Figma design (node 44:199)
 *
 * Architecture Principles:
 * ✅ Mobile-First (320px base → progressive enhancement)
 * ✅ NO fixed heights (content determines size)
 * ✅ Flexbox/Grid layouts (NO absolute positioning)
 * ✅ Shared components (navigation.css, footer.css imported)
 * ✅ CSS Custom Properties (Design Tokens)
 */

/* ========================================
   IMPORTS - Shared Components
   ======================================== */

@import url('components/navigation.css');
@import url('components/footer.css');

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */

:root {
  /* Colors - Brand Palette */
  --color-primary: #003974;
  --color-secondary: #6dc8bf;
  --color-accent: #bbd976;
  --color-text: #003974;
  --color-background: #ffffff;
  --color-gray-light: #f8f9fa;
  --color-gray-border: #e0e0e0;
  --color-link: #00a88e;
  --color-link-hover: #007a6b;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Container */
  --container-max: 1440px;
  --container-padding: 1.25rem; /* 20px mobile */

  /* Typography Scale */
  --font-size-xs: 0.875rem;
  --font-size-sm: 1rem;
  --font-size-base: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Font Families */
  --font-primary: 'Roboto', sans-serif;
  --font-heading: 'Dosis', sans-serif;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 40px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  min-height: 100vh;
}

body {
  font-family: var(--font-primary);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-background);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-sm);
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.arzt {
  position: relative;
  background-color: var(--color-background);
  width: 100%;
  min-width: 320px;
  max-width: var(--container-max);
  margin: 0 auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ========================================
   PRACTICE IMAGES SECTION
   ======================================== */

.practice-images-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: 1;
}

.practice-image {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

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

/* ========================================
   ZUWEISUNG SECTION
   ======================================== */

.zuweisung-section {
  padding: 104px var(--container-padding) var(--space-2xl); /* Figma: 104px top spacing from images */
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.zuweisung-title {
  font-family: var(--font-heading);
  font-size: 40px; /* Figma: 40px */
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 114px; /* Figma: 114px on mobile, grid-gap on desktop */
  line-height: 1.369;
}

.zuweisung-text {
  width: 100%;
}

.zuweisung-description,
.zuweisung-intro {
  font-family: var(--font-primary); /* Roboto */
  font-size: 20px; /* Figma: 20px */
  font-weight: 400; /* Regular */
  line-height: 28px; /* Figma: 28px */
  letter-spacing: 0.2px; /* Figma: tracking 0.2px */
  color: var(--color-primary); /* #003974 */
  margin-bottom: var(--space-md);
}

.zuweisung-requirements {
  list-style-position: inside;
  margin-left: var(--space-md);
  margin-bottom: var(--space-md);
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0.2px;
  color: var(--color-primary);
}

.zuweisung-requirements li {
  margin-bottom: var(--space-xs);
}

.zuweisung-contact-box {
  background-color: transparent; /* Kein grauer Hintergrund */
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Mehr Abstand zwischen Label und Content */
  align-items: flex-start; /* Button nimmt nur benötigte Breite */
}

.contact-label {
  font-family: var(--font-heading);
  font-size: 24px; /* Figma: 24px */
  font-weight: 600;
  color: #00a88e; /* Figma: specific color */
  line-height: 48px;
  margin-bottom: 0;
}

.contact-description {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  color: #003974; /* Dunkelblau */
  line-height: 1.5;
  margin: 0;
}

.phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px; /* Schmaler: weniger horizontales padding */
  background-color: #6dc8bf; /* Figma: türkis */
  color: white;
  text-decoration: none;
  border-radius: 999px; /* Perfekte Pillenform */
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  transition: var(--transition-base);
  text-align: center;
  min-width: auto; /* Auto width für schmaleren Button */
  height: 47px; /* Figma: button height */
  white-space: nowrap;
}

.phone-button:hover {
  background-color: #003974; /* Dunkelblau wie andere buttons */
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 57, 116, 0.4);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 12px; /* Figma: 12px gap */
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700; /* Roboto Bold */
  line-height: 32px;
  transition: var(--transition-base);
}

.download-link:hover {
  color: var(--color-link-hover);
}

.file-icon {
  width: 35.333px;
  height: 40px;
  background-image: url('/assets/images/icons/pdf-document.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}

.email-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-position: from-font;
  font-family: var(--font-primary);
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  transition: var(--transition-base);
}

.email-link:hover {
  text-decoration: underline;
  color: var(--color-link-hover);
}

.practice-address {
  font-style: normal;
  font-family: var(--font-primary);
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  color: var(--color-primary);
}

/* ========================================
   REFERRAL FORM SECTION
   ======================================== */

.referral-form-section {
  padding: var(--space-2xl) var(--container-padding);
  background-color: transparent; /* Kein grauer Hintergrund */
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.referral-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 64px; /* Figma: 64px Abstand zwischen Formgruppen */
  border: none;
  padding: 0;
}

.form-group-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 16px; /* Figma: 16px Abstand zu Formularfeldern/Checkboxen */
  text-transform: capitalize;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 17px 12px; /* Figma: 17px vertical, 12px horizontal */
  border: 1px solid #b3b3b3; /* Figma: #b3b3b3 */
  border-radius: 8px; /* Figma: 8px */
  font-family: var(--font-primary); /* Roboto */
  font-size: 20px; /* Figma: 20px */
  font-weight: 400; /* Regular */
  line-height: 28px; /* Figma: 28px */
  letter-spacing: 0.2px; /* Figma: 0.2px */
  color: var(--color-primary);
  transition: var(--transition-fast);
}

/* Select Field Styling */
.form-field select {
  width: 100%;
  padding: 17px 12px;
  border: 1px solid #b3b3b3;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--color-primary);
  background-color: white;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23003974' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-field select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(109, 200, 191, 0.1);
}

/* Placeholder option color (first empty option) */
.form-field select option[value=""] {
  color: #b3b3b3;
}

/* iOS Date Input Fix - Override native styling */
.form-field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: white;
  min-height: 62px; /* Gleiche Höhe wie andere Inputs */
}

/* iOS Date Picker Icon styling */
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #b3b3b3; /* Figma: placeholder color */
  font-weight: 400;
  opacity: 1;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(109, 200, 191, 0.1);
}

textarea {
  width: 100%;
  padding: 17px 12px; /* Figma: 17px vertical, 12px horizontal */
  border: 1px solid #b3b3b3; /* Figma: #b3b3b3 */
  border-radius: 8px; /* Figma: 8px */
  font-family: var(--font-primary); /* Roboto */
  font-size: 20px; /* Figma: 20px */
  font-weight: 400; /* Regular */
  line-height: 28px; /* Figma: 28px */
  letter-spacing: 0.2px; /* Figma: 0.2px */
  color: var(--color-primary);
  resize: vertical;
  min-height: 120px;
}

textarea::placeholder {
  color: #b3b3b3; /* Figma: placeholder color */
  font-weight: 400;
  opacity: 1;
}

textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(109, 200, 191, 0.1);
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: row; /* Horizontal auf allen Breakpoints */
  flex-wrap: wrap;
  gap: 16px; /* Figma: 16px Abstand zwischen Checkbox-Items */
  align-items: center;
}

/* Grid-Layout für Gewünschte Untersuchung (3x2) */
.checkbox-group-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 Spalte */
  gap: 16px; /* Mobile: gleicher Abstand vertikal */
  align-items: start;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px; /* Figma: Abstand zwischen Checkbox und Label */
  white-space: nowrap; /* Verhindert Zeilenumbruch innerhalb eines Items */
}

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

.checkbox-item label {
  cursor: pointer;
  user-select: none;
}

.inline-input {
  flex: 0 0 auto; /* Keine automatische Breitenerweiterung */
  width: 140px; /* Mobile: schmaler für Kalender-Icon Zugang */
  min-width: 120px;
  margin-left: 16px; /* Figma: Abstand zum vorherigen Checkbox-Item */
  padding: 17px 12px; /* Figma: 17px vertical, 12px horizontal */
  border: 1px solid #b3b3b3; /* Figma: #b3b3b3 */
  border-radius: 8px; /* Figma: 8px */
  font-family: var(--font-primary); /* Roboto */
  font-size: 16px; /* Mobile: etwas kleiner */
  font-weight: 400; /* Regular */
  line-height: 28px; /* Figma: 28px */
  letter-spacing: 0.2px; /* Figma: 0.2px */
  color: var(--color-primary);
}

.inline-input::placeholder {
  color: #b3b3b3; /* Figma: placeholder color */
  font-weight: 400;
  opacity: 1;
}

/* Form Footer - Privacy Checkbox and Submit Button on same line */
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* Form Actions (deprecated - keeping for compatibility) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 48px; /* Wie button-4: 48px Höhe */
  border: none;
  border-radius: 999px; /* Pillenform */
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px; /* Wie button-4 */
  letter-spacing: 0.72px; /* Wie button-4 */
  line-height: 1; /* Wie button-4 */
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
}

.btn-primary {
  background-color: #6dc8bf; /* Wie button-4 */
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #003974; /* Dunkelblau wie button-4 hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 57, 116, 0.4);
}

.btn-primary:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.btn-secondary {
  background-color: white;
  color: var(--color-primary);
  border: 2px solid var(--color-gray-border);
}

.btn-secondary:hover {
  background-color: var(--color-gray-light);
}

.form-disclaimer,
.form-note {
  font-size: var(--font-size-sm);
  color: #666;
  margin-top: var(--space-md);
  line-height: 1.5;
}

/* ========================================
   TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
  :root {
    --container-padding: 2.5rem; /* 40px */
  }

  .zuweisung-title {
    font-size: var(--font-size-4xl);
  }

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

  .form-field.full-width {
    grid-column: 1 / -1;
  }

  /* 3-Spalten-Layout für Gewünschte Untersuchung auf Tablet+ */
  .checkbox-group-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
    gap: 16px 25px; /* Figma: 16px vertikal, 25px horizontal */
  }

  /* Wunschtermin Datumfeld - größer auf Tablet+ */
  .inline-input {
    width: 300px;
    font-size: 20px;
  }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
  :root {
    --container-padding: 6rem; /* 96px */
  }

  .practice-images-section {
    height: 416px;
  }

  /* Zuweisung Section - Side-by-side layout */
  .zuweisung-section {
    display: grid;
    grid-template-columns: 1fr 401px; /* Text column + Contact box */
    grid-template-areas:
      "title contact"
      "text contact";
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
  }

  .zuweisung-title {
    grid-area: title;
    margin-bottom: 114px; /* Space to text */
  }

  .zuweisung-text {
    grid-area: text;
  }

  .zuweisung-contact-box {
    grid-area: contact;
    align-self: start;
    width: 401px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 Spalten wie im Figma-Design */
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .navigation,
  .btn,
  .phone-button {
    display: none;
  }

  .arzt {
    max-width: 100%;
  }

  .practice-images-section {
    height: auto;
  }
}

/* ========================================
   ADDITIONAL CLINICAL INFO ELEMENTS
   ======================================== */

/* Horizontal checkbox group for medication */
.checkbox-group-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

/* File Upload Area */
.file-upload-area {
  width: 100%;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-family: var(--font-primary);
  font-size: 16px;
  color: #003974;
  line-height: 1.5;
}

.file-upload-label:hover {
  border-color: #00a88e;
  background-color: rgba(0, 168, 142, 0.05);
}

.file-upload-info {
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  /* Practice Images - 2-Spalten-Grid wie Angebot-Seite */
  .practice-images-section {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 2 Spalten nebeneinander */
    gap: 0;
    width: 100%;
    overflow: hidden;
    height: auto;
  }

  .practice-image {
    width: 100%;
    height: 172px;  /* Einheitliche Höhe wie Angebot */
  }

  .practice-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* Hide 3rd practice image on mobile - show only 2 images like Angebot page */
  .practice-image-3 {
    display: none;
  }

  .checkbox-group-horizontal {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .file-upload-label {
    padding: 32px 16px;
    font-size: 14px;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-footer .btn {
    width: 100%;
  }
}
