/* Custom styles to improve Baustein page layout */

/* Refined spacing for main content */
.baustein-content {
  margin: 6rem auto 0 !important;
  max-width: 1000px;
}

/* Enhance the Baustein pill badge to make it more tappable and interactive */
.baustein-badge {
  display: inline-block !important;
  padding: 0.4rem 1rem !important;
  background-color: var(--current-baustein-primary, var(--baustein-01-primary)) !important;
  color: white !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Subtle glassy border */
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out !important;
}

.baustein-badge:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.baustein-body {
  padding: 2rem !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 3rem !important;
}

/* Better content spacing */
.layout-container > * {
  margin-bottom: 2rem !important;
}

.layout-container > *:last-child {
  margin-bottom: 0 !important;
}

/* Improve section headings - NEW */
.layout-container h2.section-heading {
  font-size: 1.75rem !important;
  color: #333 !important;
  margin-top: 3rem !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #eee !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* First section heading needs less top margin */
.layout-container h2.section-heading:first-of-type {
  margin-top: 1.5rem !important;
}

/* Typography improvements */
.baustein-body h2 {
  color: #444 !important;
  margin-bottom: 1rem !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
}

/* Clean up quote styling */
.baustein-quote {
  margin: 2.5rem 0 !important;
  padding: 2rem 3rem !important;
  background-color: #f9f9f9 !important;
  border-left: 3px solid var(--baustein-01-primary) !important;
  position: relative !important;
}

.baustein-quote p {
  font-size: 1.25rem !important;
  line-height: 1.5 !important;
  font-style: italic !important;
  color: #444 !important;
  margin: 0 !important;
}

.baustein-quote cite {
  display: block !important;
  margin-top: 1rem !important;
  font-size: 1rem !important;
  font-style: normal !important;
  text-align: right !important;
  color: #666 !important;
}

/* Improve two-column layout */
.two-column-blocks {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem !important;
  margin-bottom: 2rem !important;
}

/* Table improvements */
.data-table-section h2 {
  margin-bottom: 1rem !important;
}

.baustein-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 0.5rem !important;
  margin-bottom: 1.5rem !important;
}

.baustein-table th {
  background-color: var(--baustein-01-primary) !important;
  color: white !important;
  padding: 0.75rem 1rem !important;
  text-align: left !important;
}

.baustein-table td {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #eee !important;
}

/* Add thin gray divider between table rows for better legibility */
.baustein-table tr:not(:last-child) td {
  border-bottom: 1px solid #e0e0e0 !important;
}

/* Outcomes section improvement */
.outcomes h2 {
  margin-bottom: 1rem !important;
}

.outcomes-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
}

.outcome-box {
  background-color: var(--baustein-01-primary) !important;
  color: white !important;
  padding: 1.5rem !important;
  border-radius: 8px !important;
  text-align: center !important;
  height: auto !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.outcome-box:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.outcome-box p {
  margin: 0 !important;
  font-size: 1rem !important;
}

/* FIXED: Markdown section with proper width and subtle background */
.baustein-body .markdown-content {
  width: 66.66% !important; /* Make it occupy 2/3 of the width */
  margin-left: 0 !important; /* Left-align with other content */
  margin-right: auto !important;
  padding: 1.5rem 2rem !important;
  xxbackground-color: #f8f7fa !important; /* More subtle background */
  xxborder-radius: 8px !important;
  xxbox-shadow: 0 1px 8px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
  grid-column: 1 / span 3;
  grid-row: 6;
}

/* Full-height background image with gradient overlay */
body::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 33.33% !important; /* Take up the remaining width (100% - 66.66%) */
  height: 100vh !important;
  background-image: url("/images/baustein01-margin-alpha.png") !important;
  background-position: center right !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  opacity: 0.6 !important;
  z-index: -1 !important; /* Place it behind content */
  pointer-events: none !important;
}

/* NEW: Better heading for markdown section */
.baustein-body .markdown-content h2 {
  font-size: 1.5rem !important;
  color: #6b4c94 !important; /* Purple for visual consistency */
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid rgba(107, 76, 148, 0.2) !important;
}

.markdown-content ul {
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  padding-left: 1.5rem !important;
}

.markdown-content ul li {
  margin-bottom: 0.5rem !important;
}

/* NEW: Add back-to-top button */
.back-to-top {
  position: fixed !important;
  bottom: 2rem !important;
  right: 2rem !important;
  background-color: var(--baustein-01-primary) !important;
  color: white !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  z-index: 100 !important;
}

.back-to-top.visible {
  opacity: 0.8 !important;
}

.back-to-top:hover {
  opacity: 1 !important;
}

/* Improved responsive design */
@media (max-width: 768px) {
  .baustein-body .markdown-content {
    width: 100% !important; /* Full width on mobile */
  }
  
  .two-column-blocks {
    grid-template-columns: 1fr !important; /* Stack on mobile */
    gap: 1.5rem !important;
  }
  
  .outcomes-grid {
    grid-template-columns: 1fr !important; /* Stack on mobile */
  }
  
  /* Better table handling on mobile */
  .baustein-table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Reduce some spacing on mobile */
  .baustein-body {
    padding: 1.5rem !important;
  }
  
  .baustein-quote {
    padding: 1.5rem 2rem !important;
  }
  
  .baustein-quote p {
    font-size: 1.1rem !important;
  }
}

/* FOOTER REDESIGN */

/* Page structure */
body.baustein-page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

main {
  flex: 1 0 auto !important;
}

/* Overview cards section */
.measure-cards-footer {
  background-color: #f6f6f8 !important;
  padding: 3rem 1rem !important;
  margin-top: 2rem !important;
}

.measure-cards-footer h2 {
  text-align: center !important;
  margin-bottom: 2rem !important;
  font-size: 1.75rem !important;
  color: #333 !important;
}

/* Mini card design - ONLY IN FOOTER */
.measure-cards-footer .grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  gap: 1rem !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.measure-cards-footer .measure-card {
  height: 90px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.measure-cards-footer .measure-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.measure-cards-footer .measure-card-front {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0.5rem !important;
  text-align: center !important;
}

.measure-cards-footer .ap-number {
  font-size: 1rem !important;
  font-weight: bold !important;
  margin-bottom: 0.25rem !important;
}

.measure-cards-footer .measure-card-front h3 {
  font-size: 0.9rem !important;
  margin: 0 !important;
  color: white !important;
}

/* Hide description & back side in FOOTER ONLY */
.measure-cards-footer .measure-card-front p,
.measure-cards-footer .measure-card-back {
  display: none !important;
}

/* FIXED: PRESERVE ORIGINAL MEASURE CARDS ON LANDING PAGE */
.measures-grid .measure-card {
  height: auto !important; /* Reset height */
  border-radius: 12px !important; /* Original border radius */
  overflow: visible !important; /* Ensure content visibility */
}

.measures-grid .measure-card-front,
.measures-grid .measure-card-back {
  padding: 1.5rem !important;
  height: auto !important;
}

.measures-grid .measure-card-front p {
  display: block !important; /* Make sure descriptions are visible */
  margin-top: 0.5rem !important;
  font-size: 0.9rem !important;
  opacity: 0.9 !important;
}

.measures-grid .measure-card-back {
  display: block !important; /* Make sure back is visible on hover */
}

.measures-grid .ap-number {
  font-size: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}

.measures-grid .measure-card-front h3 {
  font-size: 1.2rem !important;
  margin-bottom: 0.75rem !important;
  color: white !important;
}

/* Footer positioning - UNIVERSAL FOOTER STYLING */
.footer-section {
  background-color: #333 !important;
  color: #fff !important;
  padding: 1.5rem !important;
  text-align: center !important;
  margin-top: auto !important;
  flex-shrink: 0 !important;
}

.footer-section p {
  max-width: 800px !important;
  margin: 0 auto !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  opacity: 0.9 !important;
}

/* ============================================
   AKTIVITÄTEN & ERGEBNISSE LINKS SECTION
   ============================================ */
.baustein-links-section {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,247,250,0.95) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.baustein-links-section h2 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin-bottom: 1.25rem !important;
  text-align: left !important;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.baustein-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
}

.baustein-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 50px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: center;
  width: calc(50% - 0.375rem);
}

.baustein-link:hover {
  color: white;
  border-color: transparent;
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Baustein-specific hover colors */
[data-baustein="01"] .baustein-link:hover { background: var(--bakule-color-01); }
[data-baustein="02"] .baustein-link:hover { background: var(--bakule-color-02); }
[data-baustein="03"] .baustein-link:hover { background: var(--bakule-color-03); }
[data-baustein="04"] .baustein-link:hover { background: var(--bakule-color-04); }
[data-baustein="05"] .baustein-link:hover { background: var(--bakule-color-05); }
[data-baustein="06"] .baustein-link:hover { background: var(--bakule-color-06); }
[data-baustein="07"] .baustein-link:hover { background: var(--bakule-color-07); }
[data-baustein="08"] .baustein-link:hover { background: var(--bakule-color-08); }
[data-baustein="09"] .baustein-link:hover { background: var(--bakule-color-09); }
[data-baustein="10"] .baustein-link:hover { background: var(--bakule-color-10); }

.baustein-link svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.baustein-link:hover svg {
  opacity: 1;
}

.baustein-link span {
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .baustein-links-section {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .baustein-links {
    flex-direction: column;
  }

  .baustein-link {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    width: 100%;
  }

  .baustein-link span {
    font-size: 0.9rem;
  }
} 