/* Minimal custom CSS - Material theme defaults */

/* NVIDIA black color - matching logo */
:root {
  --md-primary-fg-color: #000000;
  --md-primary-fg-color--light: #1a1a1a;
  --md-primary-fg-color--dark: #000000;
  --md-accent-fg-color: #76b900;         /* NVIDIA Green */
  --md-accent-fg-color--transparent: rgba(118, 185, 0, 0.1);
}

/* Make header pure black to match logo */
.md-header {
  background-color: #000000 !important;
}

/* Make NVIDIA logo larger to match header bar height */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: auto !important;
  height: 3.5rem !important;
  max-height: 3.5rem !important;
}

.md-header__button.md-logo {
  padding: 0.2rem 0.4rem !important;
}

/* Active/selected page color - NVIDIA green and bold */
.md-nav__link--active {
  color: #76b900 !important;
  font-weight: 700 !important;
}

.md-nav__link[data-md-state="blur"] {
  color: #76b900 !important;
  font-weight: 700 !important;
}

/* Active navigation items in sidebar */
.md-nav__item--active > .md-nav__link {
  color: #76b900 !important;
  font-weight: 700 !important;
}

/* All links - NVIDIA green (except release-link and hero-cta buttons) */
.md-typeset a:not(.release-link):not(.hero-cta) {
  color: #76b900 !important;
}

.md-typeset a:not(.release-link):not(.hero-cta):hover {
  color: #5a8f00 !important;
  text-decoration: underline !important;
}

/* Navigation links hover - darker green and underline */
.md-nav__link:hover {
  color: #5a8f00 !important;
  text-decoration: underline !important;
}

/* Header links */
.md-header__button {
  color: rgba(255, 255, 255, 0.7) !important;
}

.md-header__button:hover {
  color: #76b900 !important;
}

/* Remove border-bottom from h1 only; ensure title is bold and black */
.md-typeset h1 {
  border-bottom: none !important;
  font-weight: 700 !important;
  color: #000 !important;
}

/* Add border-bottom line to h2 subtitles like "Overview"; titles black */
.md-typeset h2 {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
  color: #000 !important;
}

.md-typeset h3 {
  color: #000 !important;
}

/* ===== HOMEPAGE HERO ===== */

/* Inline subtitle next to h1 – smaller, muted */
.md-typeset h1 .homepage-subtitle {
  font-size: 0.75em;
  font-weight: 700;
  color: inherit;
  margin-left: 0.35em;
  vertical-align: middle;
}

.homepage-tagline {
  margin-bottom: 1.75rem;
}

.hero-box {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #fff;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 0.75rem 0;
  justify-content: center;
}

.hero-cta,
.md-typeset .hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
  color: #fff !important;
}

.hero-cta:focus {
  outline: 2px solid #76b900;
  outline-offset: 2px;
}

.hero-cta--green,
.md-typeset .hero-cta--green {
  background-color: #76b900;
  color: #fff !important;
  border-color: #76b900;
}

.hero-cta--green:hover,
.md-typeset .hero-cta--green:hover {
  background-color: #5a8f00;
  border-color: #5a8f00;
  color: #fff !important;
}

.hero-cta--black,
.md-typeset .hero-cta--black {
  background-color: #000;
  color: #fff !important;
  border-color: #000;
}

.hero-cta--black:hover,
.md-typeset .hero-cta--black:hover {
  background-color: #333;
  border-color: #333;
  color: #fff !important;
}

.hero-cta--outline,
.md-typeset .hero-cta--outline {
  background-color: #000;
  color: #fff !important;
  border-color: #000;
}

.hero-cta--outline:hover,
.md-typeset .hero-cta--outline:hover {
  background-color: #333;
  border-color: #333;
  color: #fff !important;
}

.hero-box .hero-more {
  margin: 0;
}

.hero-more {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 2rem 0;
}

.hero-more a {
  color: #76b900 !important;
}

.hero-more a:hover {
  color: #5a8f00 !important;
  text-decoration: underline !important;
}

/* ===== SIDEBAR GROUPING - CONTENTS & QUICK LINKS ===== */

/* Style the first empty separator as "Contents" header */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) {
  pointer-events: none;
  margin-top: 16px;
  margin-bottom: 12px;
}

.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) .md-nav__link {
  font-size: 0 !important;
  padding: 8px 16px 4px 12px !important;
}

.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) .md-nav__link::before {
  content: "Contents";
  font-size: 0.68rem;
  font-weight: 700;
  color: inherit;
  display: block;
  text-align: left;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Style the second empty separator as "Quick Links" header */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) {
  pointer-events: none;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) .md-nav__link {
  font-size: 0 !important;
  padding: 8px 16px !important;
}

.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) .md-nav__link::before {
  content: "Quick Links";
  font-size: 0.62rem;
  font-weight: 700;
  color: inherit;
  display: block;
  text-align: left;
}

/* Style Quick Links items - smaller than main nav */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(n+7) .md-nav__link {
  font-size: 0.72rem !important;
  font-weight: 400 !important;
}

/* External link icon for Quick Links */
.md-nav__link[href^="http"]::after {
  content: " ↗";
  font-size: 0.65rem;
  opacity: 0.5;
}

/* ===== SDK LIBRARY CARDS ===== */

/* Compact grid for library cards */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

/* Compact library card */
.library-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.library-card:hover {
  border-color: #76b900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Library card heading */
.library-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 5px 0;
}

/* Library card description */
.library-card p {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Library learn more link */
.library-learn-link {
  display: inline-block;
  font-weight: 500;
  font-size: 0.75rem;
  color: #76b900 !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.library-learn-link:hover {
  color: #5a8f00 !important;
  text-decoration: underline;
}

/* ===== GETTING STARTED BUTTONS ===== */

.release-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.md-typeset .release-link,
.release-link {
  display: inline-block;
  padding: 5px 12px;
  background-color: #76b900;
  color: white !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.md-typeset .release-link:hover,
.release-link:hover {
  background-color: #5a8f00;
  color: white !important;
  text-decoration: none !important;
}

.md-typeset .release-link.secondary,
.release-link.secondary {
  background-color: transparent;
  color: #76b900 !important;
  border: 2px solid #76b900;
  text-decoration: none !important;
}

.md-typeset .release-link.secondary:hover,
.release-link.secondary:hover {
  background-color: #76b900;
  color: white !important;
  text-decoration: none !important;
}

/* ===== RESOURCE CARDS (Documentation, Resources) ===== */

/* Grid layout for resource cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

/* Individual resource card */
.resource-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border-color: #76b900;
}

/* Card heading */
.resource-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

/* Card description */
.resource-card p {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Card link */
.card-link {
  display: inline-block;
  font-weight: 500;
  font-size: 0.75rem;
  color: #76b900 !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: #5a8f00 !important;
  text-decoration: underline;
}

/* ===== RELEASE CARDS (for Release Blog and Technical Blog) ===== */

/* Release card container */
.release-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #76b900;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s ease;
}

.release-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Release header with version and date */
.release-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* Release header h3 - title on the left */
.release-header h3 {
  margin: 0;
  flex: 1;
}

.release-version {
  font-size: 0.75rem;
  font-weight: 700;
  color: #76b900;
  letter-spacing: 0.5px;
}

.release-date {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
}

/* Application tags */
.app-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 12px;
  margin-right: 6px;
  letter-spacing: 0.3px;
}

/* Tags container - groups all tags on the right */
.app-tags {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* First tag (Tutorial) - NVIDIA green */
.app-tags .app-tag:first-child {
  color: #ffffff;
  background: #76b900;
}

/* Release card title */
.release-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

/* Release description with 2-line truncation */
.release-card p {
  font-size: 0.75rem;
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Architecture diagram iframe: fixed height at all viewport sizes */
@media (max-width: 768px) {
  iframe[src*="cupqc_architecture.html"] {
    height: 520px !important;
    max-height: 520px !important;
  }
}

@media (max-width: 480px) {
  iframe[src*="cupqc_architecture.html"] {
    height: 520px !important;
    max-height: 520px !important;
  }
}

/* ===== CODE BLOCK FONT SIZES ===== */

/* Code block font size options:
 * - Original: 0.85rem (Material default, ~13.6px)
 * - Recommended: 0.8rem (~12.8px) - currently active
 * - Compact: 0.75rem (~12px)
 */

/* Code font size - currently using 0.6rem */
.md-typeset pre,
.md-typeset pre code,
.md-typeset code,
.md-typeset .highlight,
.md-typeset .highlight code {
  font-size: 0.6rem !important;
}

/* To use original size (0.85rem), replace above with:
.md-typeset pre {
  font-size: 0.85rem;
}
.md-typeset code {
  font-size: 0.85rem;
}
*/

/* To use compact size (0.75rem), replace above with:
.md-typeset pre {
  font-size: 0.75rem;
}
.md-typeset code {
  font-size: 0.75rem;
}
*/
