/* Custom background styling for Li Family website */

:root {
  --md-default-bg-color: #f5f5f5;
}

/* Apply background to the entire page */
.md-content {
  background: transparent;
}

.md-main {
  background: transparent;
}

/* Static light gradient background - Soft family theme */
body {
  background: linear-gradient(135deg,
    #e3f2fd 0%,
    #f3e5f5 50%,
    #fce4ec 100%);
  background-attachment: fixed;
}

/* Remove animation */
@keyframes gradientShift {
  /* Disabled */
}

/* Option to use background from relative path (commented out) */
/*
body {
  background-image: url('../background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
*/

/* Add semi-transparent overlay for better readability */
.md-content__inner {
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin: 1rem 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .md-content__inner {
  background: rgba(30, 30, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style the footer with darker background */
.md-footer {
  background: rgba(240, 240, 245, 0.98) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="slate"] .md-footer {
  background: rgba(20, 20, 25, 0.98) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Footer text colors */
.md-footer-meta__inner {
  color: rgba(0, 0, 0, 0.87);
}

[data-md-color-scheme="slate"] .md-footer-meta__inner {
  color: rgba(255, 255, 255, 0.87);
}

/* Footer links */
.md-footer a {
  color: #667eea;
  transition: color 0.2s ease;
}

.md-footer a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Social icons in footer */
.md-social__link {
  color: rgba(0, 0, 0, 0.87);
}

.md-social__link:hover {
  color: #667eea;
}

[data-md-color-scheme="slate"] .md-social__link {
  color: rgba(255, 255, 255, 0.87);
}

/* Optional: Gradient overlay for better text contrast */
.md-main::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure content is above the overlay */
.md-content {
  position: relative;
  z-index: 1;
}

/* Style adjustments for cards on custom background */
.md-typeset .grid.cards > * {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.md-typeset .grid.cards > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > * {
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header adjustments - Match light background */
.md-header {
  background: linear-gradient(135deg,
    rgba(227, 242, 253, 0.95) 0%,
    rgba(243, 229, 245, 0.95) 50%,
    rgba(252, 228, 236, 0.95) 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.87) !important;
}

/* Header text colors */
.md-header__title,
.md-header__button,
.md-header-nav__button,
.md-header .md-search__input {
  color: rgba(0, 0, 0, 0.87) !important;
}

.md-header__topic {
  color: rgba(0, 0, 0, 0.87) !important;
}

/* Navigation tabs - Match light background */
.md-tabs {
  background: linear-gradient(135deg,
    rgba(227, 242, 253, 0.9) 0%,
    rgba(243, 229, 245, 0.9) 50%,
    rgba(252, 228, 236, 0.9) 100%) !important;
  backdrop-filter: blur(10px);
  color: rgba(0, 0, 0, 0.87) !important;
}

/* Tab link colors */
.md-tabs__link {
  color: rgba(0, 0, 0, 0.87) !important;
  opacity: 0.7;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: rgba(0, 0, 0, 0.87) !important;
  opacity: 1;
}

/* Icon colors in header */
.md-header svg,
.md-header .md-icon {
  fill: rgba(0, 0, 0, 0.87) !important;
  color: rgba(0, 0, 0, 0.87) !important;
}

/* Sidebar adjustments with glass effect */
.md-sidebar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-md-color-scheme="slate"] .md-sidebar {
  background: rgba(30, 30, 30, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fix all navigation text colors */
.md-nav__item,
.md-nav__link,
.md-nav__title,
.md-nav__list {
  color: rgba(0, 0, 0, 0.87);
}

[data-md-color-scheme="slate"] .md-nav__item,
[data-md-color-scheme="slate"] .md-nav__link,
[data-md-color-scheme="slate"] .md-nav__title,
[data-md-color-scheme="slate"] .md-nav__list {
  color: rgba(255, 255, 255, 0.87);
}

/* Table of contents (TOC) styling - Right sidebar */
.md-sidebar--secondary .md-nav__link {
  color: rgba(0, 0, 0, 0.87) !important;
}

[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav__link {
  color: rgba(255, 255, 255, 0.87) !important;
}

.md-sidebar--secondary .md-nav__link--active {
  color: #667eea !important;
  font-weight: 600;
}

.md-sidebar--secondary .md-nav__link:hover {
  color: #667eea !important;
}

/* Left sidebar - Primary navigation (Family Members, etc) */
.md-sidebar--primary .md-nav__item {
  color: rgba(0, 0, 0, 0.87);
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav__item {
  color: rgba(255, 255, 255, 0.87);
}

.md-sidebar--primary .md-nav__link {
  color: rgba(0, 0, 0, 0.87) !important;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav__link {
  color: rgba(255, 255, 255, 0.87) !important;
}

.md-sidebar--primary .md-nav__link--active {
  color: rgba(0, 0, 0, 0.87) !important;
  background-color: rgba(102, 126, 234, 0.15) !important;
  border-radius: 4px;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav__link--active {
  color: rgba(255, 255, 255, 0.87) !important;
  background-color: rgba(102, 126, 234, 0.15) !important;
}

.md-sidebar--primary .md-nav__link:hover {
  color: rgba(0, 0, 0, 0.87) !important;
  background-color: rgba(102, 126, 234, 0.08);
  border-radius: 4px;
}

[data-md-color-scheme="slate"] .md-sidebar--primary .md-nav__link:hover {
  color: rgba(255, 255, 255, 0.87) !important;
}

/* Navigation section titles */
.md-nav__title {
  color: rgba(0, 0, 0, 0.7) !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

[data-md-color-scheme="slate"] .md-nav__title {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Navigation item text */
.md-nav__item .md-nav__link {
  color: rgba(0, 0, 0, 0.87) !important;
}

[data-md-color-scheme="slate"] .md-nav__item .md-nav__link {
  color: rgba(255, 255, 255, 0.87) !important;
}

/* Nested navigation items (Parents, Children) */
.md-nav__item--nested > .md-nav__link {
  color: rgba(0, 0, 0, 0.7) !important;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-nav__item--nested > .md-nav__link {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Fix scrollbar in sidebar */
.md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 4px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background-color: rgba(102, 126, 234, 0.3);
  border-radius: 2px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
  background-color: rgba(102, 126, 234, 0.5);
}

/* Admonition boxes styling */
.md-typeset .admonition {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset .admonition {
  background: rgba(40, 40, 40, 0.9);
}

/* Button styling */
.md-button {
  border-radius: 6px;
  transition: all 0.2s ease;
  min-width: 200px;
  display: inline-block;
  text-align: center;
}

.md-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.md-button--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  min-width: 200px;
}

.md-button--primary:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}