/* Dark mode by default */
:root {
  color-scheme: dark;
}

/* Hero Section - Two Column Layout */
.hero-section {
  margin: 0.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
  margin: 0 0 2rem 0;
}

.hero-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hero-quote {
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-quote blockquote {
  border-left: 4px solid #2b7fff;
  padding-left: 1.5rem;
  margin: 0;
  font-style: normal;
}

/* Testimonials - Centered Grid (adapts from 1 to 3 columns) */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
  gap: 2rem;
  margin: 2rem 0;
  justify-content: center;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.testimonial-image {
  margin-bottom: 1rem;
}

.testimonial-image img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
}

.testimonial-card strong {
  display: block;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #8ec5ff;
}

.testimonial-card em {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
}

.testimonial-card blockquote {
  border-left: none;
  padding: 0;
  margin: 1rem 0 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* CTA Section */
.cta-section {
  text-align: center;
  margin: 5rem 0 1.5rem 0;
  padding: 2rem 0;
}

.cta-section .md-button {
  font-size: 1.2rem;
  padding: 1.25rem 3rem;
  border-radius: 8px;
  font-weight: 600;
  text-transform: none;
  transition: all 0.3s;
}

.cta-section .md-button--primary {
  background-color: #2b7fff;
  color: white;
  border: none;
}

.cta-section .md-button--primary:hover {
  background-color: #1d6ed4;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(43, 127, 255, 0.4);
}

/* Grid cards styling improvements for dark mode */
.grid.cards > * {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid.cards > *:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 197, 255, 0.3);
}

/* Section spacing */
h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(43, 127, 255, 0.3);
  padding-bottom: 0.5rem;
}

/* Feature List - "What I Take Off Your Plate" section - Based on mkdocs-material mdx-expect */
.feature-section {
  margin: 48px 0 0 !important;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  list-style: none;
  margin: 10px 0;
  padding: 0;
}

.feature-section .feature-list .feature-list__item {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  flex: 1 0 calc((100% - 32px) / 2) !important;
  max-width: calc(50% - 16px) !important;
  padding: 0 !important;
  margin: 0 !important;
}

.feature-list__icon {
  display: block;
  width: 44px;
  height: 44px;
  padding: 8px;
  background-color: rgba(226, 228, 233, 0.12);
  border-radius: 100%;
  flex-shrink: 0;
  margin: 0;
}

.feature-list__icon svg {
  width: 28px;
  height: 28px;
  fill: rgba(226, 228, 233, 0.82);
  display: block;
}

.feature-list__description {
  display: block;
  flex: 1;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.feature-list__description h2 {
  font-size: 25px !important;
  font-weight: 700 !important;
  line-height: 35px !important;
  color: rgba(226, 228, 233, 0.82) !important;
  margin: 4.375px 0 16px !important;
  padding: 0 !important;
  border: none !important;
}

.feature-list__description p {
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 25.6px !important;
  color: rgba(226, 228, 233, 0.82) !important;
  margin: 16px 0 0 -56px !important;
  padding: 0 !important;
}

/* Hide "On This Page" sidebar */
.xl\:flex.w-72 {
  display: none !important;
}

/* Hide GitHub icon and repo link */
header a[href*="github"],
header a[rel="noreferrer"][target="_blank"]:has(svg[viewBox="0 0 438.549 438.549"]) {
  display: none !important;
}

/* Remove underline from all buttons */
.cta-section .md-button,
.md-button,
a.md-button {
  text-decoration: none !important;
}

/* Hide left sidebar navigation for single-page site */
div[data-slot="sidebar"] {
  display: none !important;
}

/* Adjust main content to full width when sidebar is hidden */
div[data-slot="sidebar-wrapper"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Back to home button on imprint page - subtle styling */
.md-button:not(.md-button--primary) {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-block;
}

.md-button:not(.md-button--primary):hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

/* Make header site name much bigger */
header h1 {
  font-size: 1.75rem !important;
  font-weight: 600;
  line-height: 1.2;
}

/* Show site title on mobile (override hidden class) */
header a[data-slot="button"] {
  display: flex !important;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none !important;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-flag:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.flag-emoji {
  font-size: 24px;
  line-height: 1;
  user-select: none;
}

/* Mobile header: stack vertically with menu left, title centered */
@media screen and (max-width: 1023px) {
  header .flex.items-center.gap-2 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    height: auto !important;
    padding: 12px 1rem !important;
  }

  /* Menu button stays on the left with matching padding */
  header button[id="menu-button"] {
    align-self: flex-start !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Title with same padding as menu */
  header a[data-slot="button"] {
    align-self: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  header a[data-slot="button"] h1 {
    text-align: left !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Language switcher on mobile - stays visible in header, NOT in menu */
  .language-switcher {
    position: absolute;
    top: 12px;
    right: 1rem;
    gap: 8px;
    z-index: 100;
  }

  .lang-flag {
    width: 36px;
    height: 36px;
  }

  .flag-emoji {
    font-size: 20px;
  }
}

/* AI Loop Section - Spotlight Style Layout (Based on mkdocs-material mdx-spotlight) */
.ai-loop-section {
  display: block;
  padding: 0;
  margin: 20px 0 0;
}

.ai-loop-feature {
  display: flex;
  gap: 64px;
  align-items: normal;
  padding: 0;
  margin: 0 0 64px;
}

.ai-loop-feature:nth-child(odd) {
  flex-direction: row-reverse;
}

.ai-loop-feature:nth-child(even) {
  flex-direction: row;
}

.ai-loop-feature__icon {
  display: block;
  width: 200px;
  height: auto;
  flex: 0 0 auto;
  flex-shrink: 0;
  overflow: visible;
  text-align: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.ai-loop-feature__icon svg {
  width: 200px;
  height: 200px;
  fill: rgba(139, 197, 255, 0.8);
  display: block;
  margin: 0 auto;
}

.ai-loop-feature figcaption {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  text-align: left !important;
}

.ai-loop-feature figcaption.md-typeset {
  text-align: left !important;
}

.ai-loop-feature .md-typeset h2,
.ai-loop-feature h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 35px !important;
  color: rgba(226, 228, 233, 0.87) !important;
  margin-top: 4.375px !important;
  margin-bottom: 16px !important;
  padding-bottom: 0 !important;
  border: none !important;
  text-align: left !important;
}

.ai-loop-feature .md-typeset p,
.ai-loop-feature p {
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 25.6px !important;
  color: rgba(226, 228, 233, 0.87) !important;
  margin-top: 16px !important;
  margin-bottom: 16px !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image img {
    max-width: 200px;
    margin: 0 auto;
    display: block;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-list {
    gap: 24px;
  }

  .feature-section .feature-list .feature-list__item {
    flex: 1 0 100% !important;
    gap: 16px !important;
  }

  .feature-list__description p {
    margin-left: 0;
  }

  .cta-section .md-button {
    font-size: 1rem;
    padding: 0.8rem 2rem;
  }

  /* Adjust header size for mobile */
  header h1 {
    font-size: 1.25rem !important;
  }

  /* AI Loop - Mobile Layout */
  .ai-loop-feature {
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 64px;
  }

  .ai-loop-feature__icon {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .ai-loop-feature__icon svg {
    width: 150px;
    height: 150px;
  }
}

@media screen and (max-width: 1024px) and (min-width: 769px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
