/* === AI Vanguard Custom Styles === */

/* --- Use NVIDIA theme defaults for primary color and fonts ---
 * Light mode: --pst-color-primary: #004831 (dark green)
 * Dark mode:  --pst-color-primary: #76b900 (bright green)
 * Font:       NVIDIA Sans (loaded by nvidia-sphinx-theme.css)
 *
 * We do NOT override --pst-color-primary or --pst-font-family-base
 * so the nvidia_sphinx_theme defaults take effect.
 */

/* --- Hide redundant h1 on homepage (hero section has the title) --- */
#ai-vanguard > h1 {
    display: none;
}

/* --- Article images --- */
article img {
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* --- Hide duplicate search icon (search-field already present) --- */
.bd-header .search-button__button {
    display: none !important;
}

/* --- Navbar logo spacing --- */
.bd-header .navbar-brand img {
    height: 2.5rem;
    padding: 0.2rem 0;
    margin-right: 0.5rem;
}

/* --- Footer monochrome logo --- */
.footer-brand.logo {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 2rem;
    filter: grayscale(1) brightness(0.55) contrast(20);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer-logo:hover {
    opacity: 1;
}

html[data-theme="dark"] .footer-logo {
    filter: grayscale(1) brightness(0.55) contrast(20) invert(1);
}

/* --- Typography --- */
article.bd-article {
    line-height: 1.8;
}

article.bd-article > section {
    max-width: 48rem;
}

article h2 {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 2rem;
}

html[data-theme="dark"] article h2 {
    border-top-color: #333;
}

/* --- Hero section (homepage) --- */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: white;
    min-height: 280px;
}

.hero-section__title {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-section__subtitle {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 1.25rem;
}

.hero-section__cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- Hero background image layer --- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section__bg {
    position: absolute;
    inset: 0;
    background: url("../img/hero-banner-light.jpg") center / cover no-repeat;
    z-index: 0;
}

html[data-theme="dark"] .hero-section__bg {
    background-image: url("../img/hero-banner-dark.jpg");
}

.hero-section__title,
.hero-section__subtitle,
.hero-section__cta {
    position: relative;
    z-index: 1;
}

/* --- Learning path steps --- */
.learning-path {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.learning-path__step {
    background: #f0f0f0;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.8rem;
    flex: 1;
    min-width: 80px;
}

html[data-theme="dark"] .learning-path__step {
    background: #2a2a3a;
}

.learning-path__step--active {
    background: #76b900;
    color: white;
    font-weight: 600;
}

.learning-path__arrow {
    color: #ccc;
    font-size: 0.75rem;
    flex-shrink: 0;
}

html[data-theme="dark"] .learning-path__arrow {
    color: #555;
}

/* --- Accent cards (green left border) --- */
.accent-card.sd-card {
    border-left: 4px solid #76b900;
}

/* --- Course number label on cards --- */
.course-label {
    font-size: 0.7rem;
    color: #76b900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.course-topic-tags {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

/* --- Green buttons matching NVIDIA green --- */
.sd-btn-success,
.accent-card .sd-btn-success {
    background-color: #76b900 !important;
    border-color: #76b900 !important;
    color: #fff !important;
}

.sd-btn-success:hover,
.accent-card .sd-btn-success:hover {
    background-color: #669e00 !important;
    border-color: #669e00 !important;
}

/* --- Admonitions: clean left-border style --- */
.admonition {
    border: none;
    border-left: 3px solid #6366f1;
    background: #f0f0ff;
    border-radius: 0 6px 6px 0;
}

html[data-theme="dark"] .admonition {
    background: #1a1a2e;
}

.admonition.tip,
.admonition.hint {
    border-left-color: #76b900;
    background: #f0f7e6;
}

html[data-theme="dark"] .admonition.tip,
html[data-theme="dark"] .admonition.hint {
    background: #1a2a10;
}

.admonition.warning,
.admonition.caution {
    border-left-color: #f0a000;
    background: #fff8e6;
}

html[data-theme="dark"] .admonition.warning,
html[data-theme="dark"] .admonition.caution {
    background: #2a2410;
}

.admonition.danger,
.admonition.error {
    border-left-color: #dc2626;
    background: #fef2f2;
}

html[data-theme="dark"] .admonition.danger,
html[data-theme="dark"] .admonition.error {
    background: #2a1010;
}

/* --- Page metadata header --- */
.page-metadata {
    margin-bottom: 1rem;
}

.page-metadata__course-label {
    font-size: 0.7rem;
    color: #76b900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-metadata__info {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-metadata__separator {
    border: none;
    border-top: 1px solid #eee;
    margin: 0.75rem 0 0;
}

html[data-theme="dark"] .page-metadata__separator {
    border-top-color: #333;
}

/* --- Course header (landing pages) --- */
.course-header {
    background: #1a1a2e;
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.course-header__label {
    font-size: 0.7rem;
    color: #76b900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.course-header__stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #ccc;
    flex-wrap: wrap;
}

.course-header__tags {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.course-tag {
    font-size: 0.7rem;
    color: #aaa;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* --- Course module list --- */
.course-module-list {
    margin-bottom: 1.5rem;
}

.course-module-list__items {
    list-style: decimal;
    padding-left: 1.5rem;
}

.course-module-list__items li {
    padding: 0.35rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-module-time {
    color: #888;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.course-next {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f0f7e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

html[data-theme="dark"] .course-next {
    background: #1a2a10;
}

/* --- Prev/next position counter (sits above the prev/next row) --- */
.prev-next-counter {
    text-align: center;
    background: #f5f5f5;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    display: inline-block;
    margin: 0 auto 0.75rem;
    width: fit-content;
}

/* Center the counter above prev-next-area */
.prev-next-counter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

html[data-theme="dark"] .prev-next-counter {
    background: #2a2a3a;
}

/* --- Card base --- */
.sd-card {
    position: relative;
    overflow: hidden;
}
