/* ====== Base Reset & Font ====== */
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: white;
  color: #222;
  line-height: 1.6;
  width: 100vw;
  min-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====== Navbar ====== */
.navbar {
  font-weight: 600;
  font-size: 16px;
  background-color: #212529 !important;
}
.navbar-brand img {
  max-height: 50px;
}
.navbar-nav > li > a {
  padding: 10px 15px;
}

/* ====== Footer ====== */
.footer {
    font-weight: 600;
    font-size: 16px;
    background-color: #212529 !important;
}


/* ====== Buttons ====== */
.btn, .level-button {
  background-color: #4CAF50;
  color: white !important;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background 0.3s ease;
  font-weight: 600;
}
.btn:hover, .level-button:hover {
  background-color: #388e3c;
}

/* ====== Cards & Containers ====== */
.card, .reading-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.reading-container, .content-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
}

/* ====== Headings ====== */
h1, h2, h3, h4 {
  font-family: 'Georgia', serif;
  font-weight: 700;
  color: #222;
}


/* ====== Text Display ====== */
.text-display {
  background: #f1f1f1;
  padding: 20px;
  border-radius: 10px;
  white-space: pre-line;
  min-height: 100px;
  width: 100%;
  box-sizing: border-box;
}

/* ====== Quarto Margin Sidebar ====== */
div#quarto-margin-sidebar {
  background-color: white;
}

/* ====== Sidebar Enhancements ====== */
.sidebar-item a {
  font-weight: 600;
  color: #333;
}
.sidebar-item a:hover {
  color: #4CAF50;
}

/* ====== Code Blocks ====== */
code, pre {
  font-family: 'Courier New', monospace;
  font-size: 90%;
  background: #f4f4f4;
  padding: 4px 6px;
  border-radius: 4px;
}

/* ====== Mobile Responsiveness ====== */
@media (max-width: 768px) {
  .reading-card, .card, .content-block {
    width: 95% !important;
  }
  .navbar-brand img {
    max-height: 40px;
  }
}

/* ====== Dark Theme Enhancements ====== */
body[data-theme="dark"] {
  color: #e0e0e0;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .reading-card {
  background: #1f1f1f;
  color: #e0e0e0;
}
body[data-theme="dark"] .btn {
  background-color: #66bb6a;
}
body[data-theme="dark"] .audio-player {
  background-color: #2e7d32;
  color: #fff;
}


/* Add this to your CSS file */
.content-visible {
  opacity: 1 !important;
  filter: none !important;
  transition: opacity 0.3s ease;
}

/* Ensure no parent elements are causing blur */
body, html, #quarto-content {
  overflow-x: hidden;
  backdrop-filter: none !important;
}

/* ===== Fix Blurring Issues ===== */
body.about-page, 
#about-page {
  filter: none !important;
  backdrop-filter: none !important;
}

/* ===== Menu/Text Accessibility Fixes ===== */
span.menu-text {
  color: #040D12 !important; /* Dark color for better contrast */
  background-color: #FFFFFF !important; /* White background */
  font: 16px "Segoe UI", Tahoma, sans-serif !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
}

/* ===== Navigation Dropdown Fixes ===== */
nav .dropdown-menu {
  background: white !important;
  border: 1px solid #ddd !important;
}

nav .dropdown-item {
  color: #040D12 !important;
  font: 16px "Segoe UI", Tahoma, sans-serif !important;
}

/* ===== Contrast Improvements ===== */
a, .nav-link {
  color: #e9ecef !important; /* Better blue for accessibility */
}

a:hover, .nav-link:hover {
  color: #0a8f4f !important;
  text-decoration: underline !important;
}

/* ===== Focus States for Keyboard Navigation ===== */
a:focus, button:focus, .menu-text:focus {
  outline: 3px solid #143f81 !important;
  outline-offset: 2px !important;
}


/* ===== Link & Clickable Elements Fix ===== */
a, 
button, 
input[type="button"], 
input[type="submit"], 
.clickable-element {
  color: #00b312 !important;         /* Accessible blue */
  font: 17px "Segoe UI", Tahoma, sans-serif !important;
  font-weight: 600 !important;
  cursor: pointer;
  text-decoration: none;
}

/* ===== Navbar Title Size Increase ===== */
.navbar-title {
  font-size: 24px !important;  /* Increased from 17px */
  font-weight: 700 !important;
  padding: 10px 0 !important;
  letter-spacing: 0.5px !important;
}


/* ===== FORCE GREEN BUTTONS GLOBALLY ===== */
/* Targets ALL buttons and button-like elements */
.btn, 
.btn-primary, 
a[class*="btn"], 
button, 
[role="button"], 
input[type="submit"], 
input[type="button"] {
  /* Green Theme */
  background-color: #4CAF50 !important;  /* Your green from screenshot */
  color: white !important;               /* White text */
  border: none !important;
  
  /* Font & Spacing */
  font: 17px "Segoe UI", Tahoma, sans-serif !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  
  /* Interaction States */
  transition: all 0.2s ease !important;
  
  /* Hover State */
  &:hover {
    background-color: #3d8b40 !important;  /* 10% darker green */
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 100, 0, 0.15);
  }
  
  /* Focus State (Accessibility) */
  &:focus {
    outline: 3px solid #FFD700 !important;  /* Gold outline for contrast */
    background-color: #4CAF50 !important;
  }
  
  /* Active State */
  &:active {
    background-color: #367c39 !important;  /* 20% darker green */
    transform: translateY(0);
  }
}

/* Fix for Links Styled as Buttons */
a.btn {
  display: inline-block !important;
  text-decoration: none !important;
  text-align: center !important;
}

/* Override Quarto's Default Blue Buttons */
div.quarto-post .listing-categories .category,
div.quarto-title-meta-heading {
  background-color: #4CAF50 !important;
  color: white !important;
}

