/* Shared site theme – matches homepage */
:root {
  --color-primary: #264B01;
  --color-primary-dark: #173404;
  --color-accent: #639922;
  --color-accent-bright: #3B6D11;
  --color-surface: #F6FAF2;
  --color-surface-light: #F0FFE0;
  --color-btn: #C5FF8C;
  --color-text: #484848;
  --color-text-muted: #3D5229;
  --nav-height: 88px;
}

html {
  scroll-padding-top: calc(var(--nav-height, 88px) + 12px);
}

body {
  font-family: 'Urbanist', sans-serif;
  background: #ffffff;
  color: var(--color-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.site-content {
  padding-top: var(--nav-height);
}

/* Video pages – compact layout below navbar */
.Background.wrapper.site-content {
  min-height: auto;
  padding-bottom: 0;
}

.Background.wrapper .hero-section {
  min-height: auto !important;
  margin-bottom: 0 !important;
}

.Background.wrapper .overlay-content {
  padding: 12px 20px !important;
}

.Background.wrapper + .content-wrapper {
  margin-top: 12px !important;
  margin-bottom: 24px;
}

/* Footer theme */
footer.site-footer,
.custom-footer {
  width: 100%;
  padding: clamp(32px, 5%, 48px) clamp(16px, 5%, 120px);
  background: #173404;
  color: white;
  box-sizing: border-box;
}

footer.site-footer .footer-top,
.custom-footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

footer.site-footer a,
.custom-footer a {
  color: #C5FF8C;
}

footer.site-footer .footer-bottom,
.custom-footer .footer-bottom {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
}

/* Video / inner pages */
.hero-section {
  background: linear-gradient(135deg, #3B6D11, #264B01) !important;
}

.overlay-title-top {
  color: #C5FF8C !important;
}

.sidebar {
  background: var(--color-surface) !important;
  border: 1px solid rgba(59, 109, 17, 0.15) !important;
  top: calc(var(--nav-height) + 16px) !important;
}

.sidebar-heading,
.sidebarStd {
  color: var(--color-primary) !important;
}

.sidebar-heading {
  border-bottom-color: var(--color-accent) !important;
}

.sidebarStd:hover,
.sidebarStd.active {
  background: var(--color-surface-light) !important;
  color: var(--color-accent-bright) !important;
}

.mainContent h2 {
  color: var(--color-primary-dark);
}

/* About us page */
.aboutus-main-section {
  background: var(--color-surface) !important;
  padding-top: 24px !important;
}

.aboutus-title {
  color: var(--color-primary-dark) !important;
}

.aboutus-container {
  border: 1px solid rgba(59, 109, 17, 0.12);
  box-shadow: 0 8px 32px rgba(38, 75, 1, 0.08) !important;
}

.erc-highlights-card,
.erc-project-card {
  border-color: rgba(59, 109, 17, 0.2) !important;
}

.erc-highlights-title,
.erc-project-title,
.aboutus-projects-title {
  color: var(--color-accent-bright) !important;
}

.erc-number {
  color: var(--color-accent) !important;
}

.erc-link {
  color: var(--color-accent-bright) !important;
}

/* Knowledge bank */
.kb-container {
  max-width: 1400px;
  margin: 12px auto 48px;
  padding: 0 clamp(16px, 5%, 120px) 32px;
  box-sizing: border-box;
}

.kb-container.site-content .kb-header h1 {
  color: var(--color-primary-dark) !important;
}

.kb-header p {
  color: var(--color-text-muted) !important;
}

.topic-card {
  background: #ffffff !important;
  border: 1px solid rgba(59, 109, 17, 0.12) !important;
  box-shadow: 0 8px 32px rgba(38, 75, 1, 0.08) !important;
}

.topic-card:hover {
  border-color: var(--color-accent) !important;
  box-shadow: 0 12px 32px rgba(38, 75, 1, 0.12) !important;
}

.topic-card h2 {
  color: var(--color-accent-bright) !important;
}

.topic-card p {
  color: var(--color-text) !important;
}

.article-count {
  background: var(--color-surface-light) !important;
  color: var(--color-primary) !important;
  border: 1px solid rgba(59, 109, 17, 0.15) !important;
}

#back-to-top-btn {
  display: none;
  position: fixed;
  bottom: 110px;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #173404;
  color: #C5FF8C;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  font-size: 18px;
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 12px rgba(38, 75, 1, 0.2);
  transition: opacity 0.4s, transform 0.4s;
  opacity: 0;
  transform: translateY(100px);
}

#back-to-top-btn.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#back-to-top-btn:hover {
  background-color: #264B01;
}

/* Game pages */
.book-grid {
  background: #ffffff !important;
  border: 1px solid rgba(59, 109, 17, 0.12) !important;
  box-shadow: 0 8px 32px rgba(38, 75, 1, 0.08) !important;
}

.stdTitle {
  color: var(--color-primary-dark) !important;
  background: var(--color-surface) !important;
  border-color: rgba(59, 109, 17, 0.15) !important;
}

.stdMedium {
  color: var(--color-primary) !important;
  background: var(--color-surface-light) !important;
}

.bookCard {
  border-color: rgba(59, 109, 17, 0.12) !important;
}

.bookCard:hover {
  border-color: var(--color-accent) !important;
}

.pagefont {
  color: var(--color-primary) !important;
}

.bookCard:hover .pagefont {
  color: var(--color-accent-bright) !important;
}

.button {
  background: var(--color-btn) !important;
  color: var(--color-primary) !important;
}

.buttonlink {
  color: var(--color-primary) !important;
}

.chat-label {
  background-color: var(--color-primary-dark) !important;
  font-family: 'Urbanist', sans-serif !important;
}

/* Winners pages */
.winner-page {
  max-width: 1400px;
  margin: 12px auto 48px;
  padding: 0 clamp(16px, 5%, 120px) 32px;
  box-sizing: border-box;
}

/* Gallery pages */
.gallery-page {
  max-width: 1400px;
  margin: 12px auto 48px;
  padding: 0 clamp(16px, 5%, 120px) 32px;
  box-sizing: border-box;
}

html:has(.gallery-page),
body:has(.gallery-page) {
  background: #ffffff !important;
  background-image: none !important;
  font-family: 'Urbanist', sans-serif !important;
}

.gallery-page .main-project-heading {
  color: #173404 !important;
}

.gallery-page .group-heading {
  color: #3B6D11 !important;
}
