/* ============================================
   VESPERIS - INSTITUTIONAL KNOWLEDGE PORTAL
   Makronährstoffe verstehen
   ============================================ */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-bg: #F5F5F5;
  --secondary-bg: #E0E0E0;
  --primary-text: #1F456E;
  --accent-green: #5D8E7D;
  --accent-blue: #BCCCDC;
  --white: #FFFFFF;
  --border-color: #D0D0D0;
  --spacing-unit: 16px;
  --max-width: 1440px;
  --transition: all 0.2s ease-in-out;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-bg);
  color: var(--primary-text);
  line-height: 1.6;
  font-size: 16px;
}

/* Typography */
h1 {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin: calc(var(--spacing-unit) * 2) 0 calc(var(--spacing-unit) * 1.5) 0;
  color: var(--primary-text);
  text-balance: balance;
}

h2 {
  font-family: 'Georgia', 'Garamond', serif;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: calc(var(--spacing-unit) * 1.5) 0 var(--spacing-unit) 0;
  color: var(--primary-text);
  text-balance: balance;
}

h3 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin: var(--spacing-unit) 0 calc(var(--spacing-unit) * 0.75) 0;
  color: var(--primary-text);
}

p {
  margin: var(--spacing-unit) 0;
  line-height: 1.65;
  font-size: 1rem;
  text-align: justify;
}

a {
  color: var(--primary-text);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

a:hover {
  border-bottom-color: var(--accent-green);
}

/* Container and Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

section {
  padding: calc(var(--spacing-unit) * 3) 0;
  border-bottom: 1px solid var(--border-color);
}

section:last-child {
  border-bottom: none;
}

/* Header and Navigation */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-unit) 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-text);
  letter-spacing: 2px;
  font-family: 'Georgia', serif;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 1.5);
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--primary-text);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-green);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

body {
  padding-top: 80px;
}

/* Hero Section */
.hero {
  background-color: var(--white);
  padding: calc(var(--spacing-unit) * 4) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: var(--spacing-unit);
  color: var(--primary-text);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  color: #555;
}

.hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* CTA Buttons - Readable Links */
.cta-link {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
  background-color: var(--primary-text);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  border-radius: 2px;
  text-decoration: none;
  border-bottom: none;
  margin-right: var(--spacing-unit);
  margin-bottom: var(--spacing-unit);
}

.cta-link:hover {
  background-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93, 142, 125, 0.3);
  border-bottom: none;
}

.cta-secondary {
  background-color: transparent;
  color: var(--primary-text);
  border: 2px solid var(--primary-text);
}

.cta-secondary:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--white);
}

/* Two-Column Content Section */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
}

.two-column img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.two-column.reverse {
  grid-template-columns: 1fr 1fr;
}

.two-column.reverse img {
  order: -1;
}

/* Cards Section */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
  margin: calc(var(--spacing-unit) * 2) 0;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: calc(var(--spacing-unit) * 1.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-green);
  transform: scale(1.01);
}

.card h3 {
  color: var(--accent-green);
  margin-bottom: var(--spacing-unit);
}

.card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* Lists */
ul, ol {
  margin: var(--spacing-unit) 0 var(--spacing-unit) calc(var(--spacing-unit) * 2);
  line-height: 1.8;
}

li {
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* Disclaimer Section */
.disclaimer {
  background-color: var(--secondary-bg);
  border-left: 4px solid var(--accent-blue);
  padding: calc(var(--spacing-unit) * 1.5);
  margin: calc(var(--spacing-unit) * 2) 0;
  border-radius: 2px;
  font-size: 0.9rem;
  color: #555;
}

.disclaimer h4 {
  color: var(--primary-text);
  margin-bottom: var(--spacing-unit);
  font-weight: 600;
}

/* Full-Width Image Section */
.full-width-image {
  margin: calc(var(--spacing-unit) * 2) calc(-var(--spacing-unit));
  position: relative;
}

.full-width-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

/* Footer */
footer {
  background-color: var(--primary-text);
  color: var(--white);
  padding: calc(var(--spacing-unit) * 3) 0;
  margin-top: calc(var(--spacing-unit) * 3);
}

footer a {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

footer a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.footer-section h4 {
  color: var(--accent-blue);
  margin-bottom: var(--spacing-unit);
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-unit);
  text-align: center;
  font-size: 0.9rem;
}

.footer-contact {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-contact p {
  margin: calc(var(--spacing-unit) * 0.5) 0;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .nav-links {
    flex-direction: column;
    gap: var(--spacing-unit);
  }

  .hero-content,
  .two-column {
    grid-template-columns: 1fr;
  }

  .two-column.reverse {
    grid-template-columns: 1fr;
  }

  .two-column.reverse img {
    order: 0;
  }

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

  section {
    padding: calc(var(--spacing-unit) * 2) 0;
  }

  body {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .nav-links {
    gap: calc(var(--spacing-unit) * 0.75);
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .cta-link {
    display: block;
    margin-right: 0;
    text-align: center;
  }
}
