/* Custom CSS for Beyond Quality - Recreating the Lovable design */
/* Cache bust: v8.0 - Removed date functionality completely */

/* CSS Variables for Design System */
:root {
  /* Colors */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --border: 214.3 31.8% 91.4%;
  --card-background: 0 0% 100%;
  --hover-border: 214.3 31.8% 78.4%;
  
  /* Typography */
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  
  /* Spacing */
  --container-max-width: 896px;
  --section-spacing: 3rem;
  
  /* Border radius */
  --radius: 0.5rem;
}

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

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Navigation */
.nav {
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-brand:hover {
  color: hsl(var(--muted-foreground));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.nav-link:hover,
.nav-link.active {
  color: hsl(var(--foreground));
}

/* Main Content */
.main-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0 0 1.5rem 0;
  color: hsl(var(--foreground));
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Section headings - consistent smaller size */
.section h2,
.grid h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* Links */
a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--muted-foreground));
}

/* Cards */
.card {
  background-color: hsl(var(--card-background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
  margin-bottom: 1rem;
}

.card:hover {
  border-color: hsl(var(--hover-border));
}

.card-content {
  padding: 1rem 0 1rem 1.2rem;
}

.card-header {
  padding: 1.5rem 1.5rem 0.75rem 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 400;
  color: hsl(var(--foreground));
  margin: 0;
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0.75rem 0 0 0;
}

/* Sections */
.section {
  margin-bottom: var(--section-spacing);
}

.section-large {
  margin-bottom: 2.5rem;
}

/* About Section */
.about-content {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.about-content p {
  margin-bottom: 1rem;
}

/* Podcast Section */
.podcast-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /*padding: 0.5rem;*/
}

.podcast-thumbnail-link {
  position: relative;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0.5rem;
  margin: -0.5rem;
  margin-top: 0;
}

.podcast-thumbnail-link:hover img {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.podcast-thumbnail-link::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.podcast-thumbnail-link:hover::after {
  opacity: 1;
}

.podcast-thumbnail {
  width: 100%;
  max-width: 12rem;
  height: auto;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.podcast-content {
  flex: 1;
  margin-left: .5rem;
  margin-top: .3rem;
}

.podcast-title {
  font-size: 1.125rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.podcast-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0;
  line-height: 1.5;
}

.podcast-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}

.podcast-links a {
  text-decoration: underline;
  transition: color 0.2s ease;
}

.podcast-links a:hover {
  color: hsl(var(--foreground));
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
}

.grid-2-cols {
  grid-template-columns: 1fr;
}

/* Research Cards */
.research-title {
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.footer-sponsors {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.sponsor {
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* GitHub Discussions Integration */
#github-discussions {
  margin-top: 1rem;
}

.discussion-item {
  background-color: hsl(var(--card-background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.discussion-item:hover {
  border-color: hsl(var(--hover-border));
}

.discussion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.discussion-category {
  display: none;
  background-color: #f8fafc;
  color: hsl(var(--muted-foreground));
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.discussion-date {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
}

#github-discussions .discussion-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 400;
  font-family: var(--font-serif) !important;
}

#github-discussions .discussion-title a {
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.2s ease;
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  font-size: 1.125rem !important;
}

.discussion-title a:hover {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
}

.discussion-body {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.discussion-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.discussion-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.author-avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
}

.discussion-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.upvotes, .answers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.discussions-loading,
.discussions-error {
  text-align: center;
  padding: 2rem;
  color: hsl(var(--muted-foreground));
}

.discussions-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
}

.discussions-error a {
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

.discussions-error a:hover {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
}

/* Responsive design for discussions */
@media (max-width: 768px) {
  .discussion-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .discussion-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .grid-2-cols {
    grid-template-columns: 1fr 1fr;
  }
  
  .podcast-card {
    flex-direction: row;
  }
  
  .podcast-thumbnail {
    max-width: 16rem;
  }
}

.podcast-links span { display: none; }

@media (max-width: 767px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 1rem 1.5rem;
  }
  
  .nav-links {
    margin-top: 1rem;
    gap: 1.5rem;
  }
  
  /* Mobile navigation text replacement */
  .nav-link[data-mobile] {
    font-size: 0;
  }

  .card-content { padding-right: 1rem; }
  
  .nav-link[data-mobile]::after {
    content: attr(data-mobile);
    font-size: 0.875rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    transition: color 0.2s ease;
  }
  
  .nav-link[data-mobile]:hover::after,
  .nav-link[data-mobile].active::after {
    color: hsl(var(--foreground));
    font-weight: 500;
  }
  
  .footer-sponsors {
    gap: 2rem;
  }
  
  .main-content {
    padding: 2rem 1.5rem;
  }
  
  /* Mobile podcast card optimizations */
  .podcast-card {
    gap: 1rem;
  }
  
  .podcast-thumbnail {
    max-width: 100%;
    width: 100%;
  }
  
  .podcast-content {
    margin-left: 0;
    margin-top: 0;
  }
  
  .podcast-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .podcast-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    /* Allow text to wrap naturally instead of truncating */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* Keep podcast links in one line on mobile with better spacing */
  .podcast-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  
  .podcast-links span {
    margin-right: 0.5rem;
  }
  
  .podcast-links a {
    display: inline;
    padding: 0;
    border-bottom: none;
    width: auto;
    text-align: left;
    white-space: nowrap;
  }
}