/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== VARIABLES ===== */
:root {
    /* Colors */
    --primary: #089289;
    --primary-light: #ccf0eb;       /* Lighter teal tint */
    --primary-dark: #066f6a;        /* Darker teal for hover states */
    
    --jupyter-blue: #3b7dd8;        /* Cooler blue to match teal */
    --jupyter-blue-dark: #2f66b3;
    
    --text-primary: #1f2d2d;        /* Slightly softened near-black */
    --text-secondary: #5f7c7c;      /* Muted teal-gray for secondary info */
    
    --background: #ffffff;
    --background-light: #f2f2f2;
    
    --border-light: #d9e3e3;        /* Soft cool gray for subtle borders */
    
    --error-bg: #fff5f5;
    --error-border: #f08a8a;        /* Softer than pure red */
    --error-text: #c03535;
    
    /* syntax-highlight Colors for Code Cells */
    --syntax-highlight-bg: #282a36;
    --syntax-highlight-line: #44475a;
    --syntax-highlight-fg: #f8f8f2;
    --syntax-highlight-comment: #6272a4;
    --syntax-highlight-cyan: #8be9fd;
    --syntax-highlight-green: #50fa7b;
    --syntax-highlight-orange: #ffb86c;
    --syntax-highlight-pink: #ff79c6;
    --syntax-highlight-purple: #bd93f9;
    --syntax-highlight-red: #ff5555;
    --syntax-highlight-yellow: #f1fa8c;
    --syntax-highlight-output-bg: #1e1f29;
    
    /* Typography */
    --font-sans: 'Barlow', sans-serif;
    --font-condensed: 'Barlow Condensed', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    
    
    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --radius: .5rem;
    --radius-lg: 1rem;
}

/* Grundlegende Stile */

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

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-font-smoothing: antialiased;
}

p {
  letter-spacing: -0.2px;
  line-height: 1.5em;
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.container {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header und Navigation */
header {
  background-color: var(--syntax-highlight-bg);
  color: var(--syntax-highlight-fg);
  padding: 1rem 0;
  margin-bottom: 2rem;
  position: sticky;
  top:0;
  z-index: 1000;
}

header h1 {
  margin-bottom: 0.5rem;
  color: var(--syntax-highlight-fg);
  text-align: center;
}

.site-title {
  color: var(--syntax-highlight-fg);
  text-decoration: none;
  transition: color 0.3s;
}

.site-title:hover {
  color: var(--primary-light);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li {
  margin-right: 1rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
}

nav ul li a:hover {
  text-decoration: underline;
}

#header-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-top: 2rem;
  align-items: center;
}


/* Notebook-Grid auf der Startseite */

#intro-container {
  width: 100%;
  max-width: 1080px;
  margin: 6rem auto;
  padding: 4rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8rem;
  background: #f8f9fa;
  border-radius: 1.5rem;
}

#intro-container img {
  max-width: 8rem;
}

#intro-container h2 {
  margin-top: 0;
}

/* Intro Call-to-Action Styling */
.intro-cta {
  margin-top: 2rem;
  text-align: left;
}

.intro-cta p {
  margin: 0 0 1.5rem 0;
  color: #5f7c7c;
  font-size: 1rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #067569;
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

h2.landing-page {
  text-transform: none;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

h3.landing-page {
  text-align: center;
  margin-bottom: 1rem;
  margin-top: 4rem;
}

h4.landing-page {
  text-align: center;
  font-weight: 400;
  text-transform: none;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Notebook grid is now using datasets-grid and dataset-card classes */

.btn {
  display: inline-block;
  background-color: var(--primary);
  color: var(--syntax-highlight-fg);
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 1rem 2rem;
  margin-top: 2rem;
  border-radius: 0 0 1rem 1rem;
  text-decoration: none;
  text-align: right;
  transition: all 0.3s ease;
}

/* ===== UNIFIED DATASET CARDS ===== */
.datasets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 1024px) {
  .datasets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .datasets-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.dataset-card {
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dataset-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
}

/* Downloads count on dataset cards */
.card-downloads {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.5rem;
  gap: 0.25rem;
}
.card-downloads svg {
  stroke: #07A299;
}
.card-downloads span {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Category More Button Styling */
.category-more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.more-btn {
  background: #f8f9fa;
  color: #5a6c7d;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  width: 100%;
  max-width: 250px;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 0.9rem;
}

.more-btn:hover {
  background: #ffffff;
  border-color: #089289;
  color: #089289;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(8, 146, 137, 0.1);
}

.more-btn-icon {
  background: #e9ecef;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.more-btn:hover .more-btn-icon {
  background: rgba(8, 146, 137, 0.1);
  color: #089289;
}

.more-btn h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
}

.more-btn p {
  margin: 0;
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.3;
}

.more-btn:hover p {
  color: #5a6c7d;
}

.dataset-card .card-image,
.dataset-card .card-image-placeholder {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--primary-light);
  position: relative;
}

/* Fallback for missing images */
.dataset-card .card-image {
  background-image: linear-gradient(135deg, var(--primary-light) 0%, rgba(8, 146, 137, 0.1) 100%);
}

.dataset-card .card-image::before {
  content: "📊";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.3;
  color: var(--primary);
}

/* When image loads successfully, hide the fallback icon */
.dataset-card .card-image[style*="background-image: url"]::before {
  display: none;
}

.dataset-card .card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dataset-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  line-height: 1.3;
}

.dataset-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

.dataset-card .card-btn {
  display: block;
  background-color: var(--primary);
  color: white;
  padding: 1rem 2rem;
  margin: 0;
  border-radius: 0 0 1rem 1rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  width: 100%;
  text-decoration: none;
  position: relative;
  left: 0;
  bottom: 0;
}

.dataset-card:hover .card-btn {
  background-color: var(--primary-dark);
  letter-spacing: .5px;
}

/* Disabled cards */
.dataset-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dataset-card.disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.dataset-card .card-btn.disabled {
  background-color: var(--primary-light);
  color: var(--text-secondary);
}

.dataset-card.disabled:hover .card-btn {
  background-color: var(--primary-light);
  letter-spacing: normal;
}

/* Compact dataset cards for landing page */
.dataset-card-compact {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-light);
}

.dataset-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
}

.dataset-card-compact .card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--primary-light);
  position: relative;
}

.dataset-card-compact .card-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  opacity: 0.1;
}

.dataset-card-compact .card-image[style*="background-image: url"]::before {
  opacity: 0;
}

.dataset-card-compact .card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dataset-card-compact h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.dataset-card-compact p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.dataset-card-compact .card-downloads {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: auto;
}

.dataset-card-compact .card-btn {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: auto;
}

.dataset-card-compact:hover .card-btn {
  background: var(--primary-dark);
  letter-spacing: 0.5px;
}

.dataset-card-compact.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dataset-card-compact.disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.dataset-card-compact .card-btn.disabled {
  background-color: var(--primary-light);
  color: var(--text-secondary);
}

.dataset-card-compact.disabled:hover .card-btn {
  background-color: var(--primary-light);
  letter-spacing: normal;
}

/* Legacy support for existing featured datasets */
.featured-datasets {
  margin: 6rem 0;
}

.featured-datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.btn.disabled {
  background-color: var(--primary-light);
  color: var(--syntax-highlight-bg);
}

.btn:hover {
  background-color: var(--primary-dark);
  letter-spacing: .5px;
}

.btn.disabled:hover {
  background-color: var(--primary-light);
  letter-spacing: normal;
  cursor: not-allowed;
}

/* Footer */
footer {
  background-color: var(--syntax-highlight-bg);
  color: var(--syntax-highlight-fg);
  padding: 5rem 0;
  margin-top: 2rem;
  text-align: center;
}

.footerlink {
  color: var(--syntax-highlight-fg);
}

.ai-attribution {
  font-size: 0.85em;
  color: var(--syntax-highlight-comment);
  margin-top: 1rem;
  opacity: 0.8;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

h1 {
    font-size: 2.4em;
    font-weight: 700;
    margin-top: 0;
    line-height: 1.2;
}



/* Responsive Design */
@media (max-width: 768px) {
  .notebook-grid {
    grid-template-columns: 1fr;
  }

  #intro-container {
    flex-direction: column-reverse;
  }

  .intro-cta {
    margin-top: 1.5rem;
  }

  .cta-button {
    padding: 0.7rem 1.8rem;
    font-size: 0.9rem;
  }

  .category-datasets-grid {
    grid-template-columns: 1fr;
  }

    /* Mobile header optimizations */
    #header-row > :nth-child(2) {
      display: none !important;
    }
    #header-row {
      align-items: flex-start;
      padding: 1rem;
      gap: 0.5rem;
    }
    #header-row > * {
      width: 100%;
      box-sizing: border-box;
    }
    #header-row .logo {
      margin-bottom: 0.5rem;
      max-width: 180px;
      height: auto;
    }
    #header-row nav {
      width: 100%;
      margin: 0;
      padding: 0.5rem 0 0 0;
    }
    #header-row .search {
      width: 100%;
      margin: 0.5rem 0 0 0;
    }
}

/* ===== CATEGORY RECOMMENDATIONS ===== */
.category-recommendations {
  margin: 6rem 0;
  background: #f8f9fa;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
}

.category-sections {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin: 3rem 0;
}

.category-section {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
}

.category-header {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: none;
  letter-spacing: 0;
  display: block;
  color: #333;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #089289;
}

.category-header::before {
  display: none;
}

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

@media (max-width: 768px) {
  .category-datasets-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.datasets-button-container {
  background: linear-gradient(135deg, var(--background-light) 0%, rgba(8, 146, 137, 0.1) 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.button-primary {
  display: inline-block;
  padding: 1em 2em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 146, 137, 0.3);
  text-decoration: none;
  color: white;
}

/* ===== Comments Section Styles ===== */
.notebook-feedback {
	margin: 3rem 0;
	padding: 2rem;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.notebook-feedback .feedback-header h3 {
	margin: 0 0 0.5rem 0;
	color: #07A299;
	font-size: 1.25rem;
}

.notebook-feedback .feedback-header p {
	margin: 0 0 1rem 0;
	color: #586069;
	font-size: 0.95rem;
}

.notebook-feedback .discussion-links {
	padding: 0.75rem;
	background: rgba(7, 162, 153, 0.05);
	border-radius: 6px;
	border-left: 3px solid #07A299;
	margin-bottom: 1rem;
}

.notebook-feedback .discussion-links a {
	color: #07A299;
	text-decoration: none;
}

.notebook-feedback .discussion-links a:hover {
	text-decoration: underline;
}

.notebook-feedback .giscus-container {
	margin-top: 1.5rem;
}

/* Notebook-spezifische Anpassungen */
.notebook-feedback .giscus-frame {
	border-radius: 8px;
	border: 1px solid #d1d9e0;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
	.notebook-feedback {
		margin: 2rem 0;
		padding: 1.5rem;
	}
	.notebook-feedback .discussion-links {
		font-size: 0.85rem;
	}
}

/* Integration ins Notebook-Layout */
.notebook-layout .notebook-feedback {
	grid-column: 1 / -1; /* Spannen über die gesamte Breite */
	max-width: none;
}

/* Spezielle Anpassungen für Notebook-Container */
.notebook-content .notebook-feedback {
	margin-left: 0;
	margin-right: 0;
}