/* ==========================================================================
   Custom Styles for AMD GenAI Website
   ========================================================================== */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.page__hero--overlay {
  min-height: 30vh;
}

.page__hero--overlay h1 {
  margin-bottom: 0.5rem;
}

.page__hero--overlay .page__lead {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

.page__hero--overlay .btn {
  margin-top: 1rem;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #111;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.5rem;
}

.section-header--centered {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 2rem 0 1rem 0;
  text-align: center;
  border-bottom: none;
}

/* ==========================================================================
   News Cards (Featured Releases)
   ========================================================================== */

.news-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  justify-content: center;
}

.news-card {
  position: relative;
  width: calc(33% - 1.2rem);
  max-height: 180px;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}

.news-card__content {
  position: relative;
  z-index: 1;
  padding: 0 0.75rem 0.2rem;
  background: rgba(0, 0, 0, 0.4);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.news-card__btn {
  color: #ffffff !important;
  font-weight: bold;
  text-decoration: none;
  margin-top: 0.5rem;
}

.news-card__btn:hover {
  text-decoration: underline;
}

/* News card background images */
.card-bg-1 {
  background: url('../images/bg-1.png') center/cover no-repeat;
}

.card-bg-2 {
  background: url('../images/bg-2.png') center/cover no-repeat;
}

.card-bg-3 {
  background: url('../images/bg-3.png') center/cover no-repeat;
}

/* ==========================================================================
   Mission Section
   ========================================================================== */

.mission-section {
  position: relative;
  background: #eaecf0;
  padding: 4rem 1rem;
  text-align: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.mission-section .mission-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #0e0d0d;
}

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

.mission-section .mission-content a {
  color: #555;
  text-decoration: none;
  font-weight: bold;
}

.mission-section .mission-content a:hover {
  text-decoration: underline;
}

.mission-logo {
  position: absolute;
  bottom: 1rem;
  left: 5rem;
  max-width: 160px;
  height: auto;
}

.small-text {
  font-size: 0.7rem !important;
  color: #999;
}

/* ==========================================================================
   Blog Cards
   ========================================================================== */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1200px;
  justify-content: center;
}

.blog-card {
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
  border-radius: 6px;
}

.blog-card > * {
  position: relative;
  z-index: 1;
}

.blog-item {
  display: block;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  color: #000 !important;
  text-decoration-color: #000 !important;
  transition: box-shadow 0.2s ease;
}

.blog-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration-color: #666;
  color: #666 !important;
}

.blog-title {
  font-size: 1.1rem;
  font-weight: bold;
}

.blog-meta {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.2rem;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Publication Cards
   ========================================================================== */

.pub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1200px;
  justify-content: center;
}

.pub-card {
  flex: 1 1 calc(33% - 1rem);
  max-width: 380px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pub-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.pub-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.pub-content > .btn {
  margin-top: auto;
}

.pub-tag {
  font-size: 0.75rem;
  background: #eee;
  color: #333;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.pub-year {
  font-size: 0.9rem;
  color: #555;
}

.pub-title {
  font-weight: bold;
}

.pub-desc {
  font-size: 0.85rem;
  color: #666;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
  text-align: center;
  margin-top: 1rem;
}

/* ==========================================================================
   Hugging Face-Inspired Cards (Models & Datasets)
   ========================================================================== */

.hf-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.hf-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin: 2.5rem auto 1rem;
  max-width: 1200px;
  padding: 0 1rem;
}

.hf-section-icon {
  width: 24px;
  height: 24px;
  color: #6b7280;
}

.hf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin: 1.5rem auto;
  padding: 0 1rem;
  max-width: 1200px;
}

.hf-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hf-card:hover {
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
  transform: translateY(-2px);
}

.hf-card--dataset:hover {
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

.hf-card--code:hover {
  border-color: #34d399;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.15);
}

.hf-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hf-icon {
  width: 20px;
  height: 20px;
  color: #fbbf24;
  flex-shrink: 0;
}

.hf-icon--dataset {
  color: #60a5fa;
}

.hf-icon--code {
  color: #34d399;
}

.hf-card__name {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  line-height: 1.3;
}

.hf-card__desc {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.hf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.hf-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.hf-tag--dataset {
  background: #dbeafe;
  color: #1e40af;
}

.hf-tag--code {
  background: #d1fae5;
  color: #065f46;
}

.hf-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
  margin-top: auto;
}

.hf-source {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.hf-source svg {
  opacity: 0.7;
}

.hf-arrow {
  color: #d1d5db;
  font-size: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.hf-card:hover .hf-arrow {
  transform: translateX(4px);
  color: #fbbf24;
}

.hf-card--dataset:hover .hf-arrow {
  color: #60a5fa;
}

.hf-card--code:hover .hf-arrow {
  color: #34d399;
}

.hf-cta {
  text-align: center;
  margin: 2rem 0 3rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .news-card {
    width: 100%;
  }

  .pub-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .mission-logo {
    position: static;
    margin-top: 1rem;
  }

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

