/*!
 * Gastroenterologie am Claraplatz - Links Page (Figma Complete)
 * Mobile-First Responsive Design
 * Based on Figma design (node 44:74)
 *
 * 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
   ======================================== */

.links {
  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;
}

/* ========================================
   HERO IMAGES SECTION
   ======================================== */

.hero-images-section {
  position: relative;
  width: 100%;
  height: 416px;
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  z-index: 1;
}

.hero-images-grid {
  display: flex;
  width: 100%;
  height: 100%;
}

.hero-image-wrapper {
  position: relative;
  height: 416px;
  overflow: hidden;
  flex: 1;
  max-width: 33.333%;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ========================================
   INTRO SECTION
   ======================================== */

.intro-section {
  padding: var(--space-2xl) var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.intro-container {
  max-width: 1200px;
  margin: 0 auto;
}

.intro-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.intro-description {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-secondary);
  white-space: normal;
}

/* ========================================
   LINKS & LOGOS SECTION
   ======================================== */

.links-section {
  padding: var(--space-2xl) var(--container-padding);
  background-color: transparent;
  width: 100%;
}

.links-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16rem;
}

/* External Links Column */
.external-links-column {
  display: flex;
  flex-direction: column;
}

.links-label {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: #e91e63; /* Pink color for "Neue Links:" label */
  margin-bottom: var(--space-md);
  font-style: italic;
}

.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.link-item {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
}

.link-item::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 24px;
  line-height: 1.4;
}

.link-anchor {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: #003974;
  text-decoration: underline;
  text-decoration-color: #003974;
  transition: var(--transition-fast);
  display: inline;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.link-anchor:hover {
  color: #00698c;
  text-decoration-color: #00698c;
}

.footnote-asterisk {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: #003974;
  text-decoration: none !important;
  display: inline;
}

.links-footnote {
  margin-top: var(--space-lg);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-primary);
  font-style: normal;
}

/* Partner Logos Column */
.partner-logos-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  align-items: flex-start;
}

.partner-logo-link {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  transition: var(--transition-base);
}

.partner-logo-link:hover {
  opacity: 0.8;
}

.partner-logo {
  max-width: 280px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}

/* ========================================
   DOWNLOADS SECTION
   ======================================== */

.downloads-section {
  padding: var(--space-2xl) var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.downloads-container {
  max-width: 1200px;
  margin: 0 auto;
}

.downloads-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: var(--space-xl);
  text-align: left;
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background-color: transparent;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-base);
}

.download-card:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.download-icon,
.icon-file-5,
.icon-file-6 {
  width: 36px;
  height: 40px;
  background-image: url('/assets/images/icons/pdf-document.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.download-title {
  flex: 1;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  color: #003974;
}

.download-size {
  font-size: 16px;
  font-weight: 400;
  color: #003974;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ========================================
   CONTACT FORM SECTION
   ======================================== */

.contact-form-section {
  padding: var(--space-2xl) var(--container-padding);
  background-color: transparent;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

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

.contact-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.contact-description {
  font-size: var(--font-size-base);
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.contact-cta-button {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-base);
}

.contact-cta-button:hover {
  background-color: var(--color-link-hover);
  transform: translateY(-2px);
}

.contact-form {
  margin-top: var(--space-xl);
}

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

.form-field input,
.form-field textarea {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-gray-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  transition: var(--transition-fast);
}

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

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}

.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);
}

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

textarea {
  resize: vertical;
  min-height: 220px;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

.form-privacy {
  margin-bottom: 0;
}

.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.privacy-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

.privacy-link {
  color: var(--color-link);
  text-decoration: underline;
  font-weight: 600;
  transition: var(--transition-fast);
}

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

.form-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.btn {
  padding: var(--space-sm) var(--space-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: var(--transition-base);
  text-transform: uppercase;
}

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

.btn-primary:hover {
  background-color: #003974;
  transform: translateY(-2px);
}

/* ========================================
   MOBILE (< 768px)
   ======================================== */

@media (max-width: 767px) {
  .hero-images-section {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 2 Spalten nebeneinander */
    gap: 0;
    width: 100%;
    overflow: hidden;
    height: auto;
  }

  .hero-images-grid {
    display: contents;  /* Grid-Items werden direkte Kinder */
  }

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

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

  /* Hide 3rd hero image on mobile - show only 2 images like Angebot page */
  .hero-image-wrapper:nth-child(3) {
    display: none;
  }
}

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

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

  /* Show 3rd hero image on tablet/desktop */
  .hero-image-wrapper:nth-child(3) {
    display: block;
  }

  .intro-title {
    font-size: var(--font-size-3xl);
  }

  .links-container {
    grid-template-columns: 1.5fr 1fr;
  }

  .partner-logos-column {
    align-items: flex-start;
  }

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

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

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

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

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

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

@media print {
  .navigation,
  .btn,
  .contact-cta-button,
  .contact-form,
  .hero-image {
    display: none;
  }

  .links {
    max-width: 100%;
  }

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

  .link-anchor::after {
    content: " (" attr(href) ")";
    font-size: var(--font-size-xs);
    color: #666;
  }
}
