/* ============================================
   Structural Optimism - Custom Styling
   ============================================ */

/* Evidence Rating Stars (★ System)
   ============================================ */
.evidence-rating {
  color: #ffd700;
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: 0.1em;
}

/* Star ratings in admonitions */
.admonition .evidence-rating {
  display: inline-block;
  margin-right: 0.5em;
}

/* Confidence Indicators
   ============================================ */
.confidence-high {
  color: #4caf50;
  font-weight: bold;
}

.confidence-medium {
  color: #ff9800;
  font-weight: bold;
}

.confidence-low {
  color: #f44336;
  font-weight: bold;
}

/* Confidence badges */
.confidence-badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: bold;
  margin-left: 0.5em;
}

.confidence-badge.high {
  background-color: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.confidence-badge.medium {
  background-color: rgba(255, 152, 0, 0.1);
  color: #ff9800;
  border: 1px solid #ff9800;
}

.confidence-badge.low {
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid #f44336;
}

/* Content Pyramid Navigation
   ============================================ */
.pyramid-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1em;
  margin: 2em 0;
}

.pyramid-level {
  flex: 1 1 200px;
  min-width: 180px;
  text-align: center;
  padding: 1.5em 1em;
  border: 2px solid var(--md-primary-fg-color);
  border-radius: 8px;
  background-color: var(--md-default-bg-color);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--md-typeset-color);
}

.pyramid-level:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--md-accent-fg-color);
  background-color: var(--md-code-bg-color);
}

.pyramid-level h3 {
  margin: 0 0 0.5em 0;
  color: var(--md-primary-fg-color);
  font-size: 1.2em;
}

.pyramid-level p {
  margin: 0;
  font-size: 0.9em;
  opacity: 0.8;
}

/* Pyramid level colors */
.pyramid-level.level-1 {
  border-color: #4caf50;
}

.pyramid-level.level-2 {
  border-color: #2196f3;
}

.pyramid-level.level-3 {
  border-color: #ff9800;
}

.pyramid-level.level-4 {
  border-color: #9c27b0;
}

.pyramid-level.level-5 {
  border-color: #f44336;
}

/* Safety Warnings
   ============================================ */
.safety-warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 4px;
}

[data-md-color-scheme="slate"] .safety-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-left-color: #ffc107;
}

.safety-warning h4 {
  margin-top: 0;
  color: #f57c00;
  font-weight: bold;
}

.safety-warning p:last-child {
  margin-bottom: 0;
}

/* Enhanced safety warning for integration content */
.safety-warning.critical {
  background-color: #ffebee;
  border-left-color: #f44336;
}

[data-md-color-scheme="slate"] .safety-warning.critical {
  background-color: rgba(244, 67, 54, 0.1);
}

.safety-warning.critical h4 {
  color: #c62828;
}

/* Citation Links
   ============================================ */
.citation {
  font-size: 0.9em;
  color: var(--md-primary-fg-color);
  font-style: italic;
}

.citation a {
  text-decoration: none;
  border-bottom: 1px dotted var(--md-primary-fg-color);
}

.citation a:hover {
  border-bottom-style: solid;
}

/* DOI and source links */
.source-link {
  display: inline-block;
  margin: 0.5em 0;
  padding: 0.3em 0.8em;
  background-color: var(--md-code-bg-color);
  border-radius: 4px;
  font-size: 0.85em;
  font-family: var(--md-code-font-family);
}

.source-link:before {
  content: "📄 ";
}

/* Evidence Admonition Enhancements
   ============================================ */
.admonition.success {
  border-left-color: #4caf50;
}

.admonition.info {
  border-left-color: #2196f3;
}

.admonition.warning {
  border-left-color: #ff9800;
}

/* Custom admonition for speculative content */
.admonition.speculative {
  border-left-color: #9c27b0;
}

.admonition.speculative > .admonition-title {
  background-color: rgba(156, 39, 176, 0.1);
}

.admonition.speculative > .admonition-title:before {
  content: "🔮";
  margin-right: 0.5em;
}

/* Level Indicators
   ============================================ */
.level-indicator {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-indicator.level-1 {
  background-color: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
}

.level-indicator.level-2 {
  background-color: rgba(33, 150, 243, 0.2);
  color: #1565c0;
}

.level-indicator.level-3 {
  background-color: rgba(255, 152, 0, 0.2);
  color: #e65100;
}

.level-indicator.level-4 {
  background-color: rgba(156, 39, 176, 0.2);
  color: #6a1b9a;
}

.level-indicator.level-5 {
  background-color: rgba(244, 67, 54, 0.2);
  color: #c62828;
}

/* Responsive Design
   ============================================ */
@media screen and (max-width: 768px) {
  .pyramid-nav {
    flex-direction: column;
  }
  
  .pyramid-level {
    min-width: 100%;
  }
}

/* Print Styles
   ============================================ */
@media print {
  .pyramid-level {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
  
  .safety-warning {
    border: 2px solid #000;
    page-break-inside: avoid;
  }
}

/* Accessibility Enhancements
   ============================================ */
.pyramid-level:focus {
  outline: 3px solid var(--md-accent-fg-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .pyramid-level {
    border-width: 3px;
  }
  
  .safety-warning {
    border-left-width: 6px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .pyramid-level {
    transition: none;
  }
  
  .pyramid-level:hover {
    transform: none;
  }
}


/* Claims Grid
   ============================================ */
.claims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  margin: 1.5em 0;
}

.claim-card {
  padding: 1.5em;
  border: 2px solid var(--md-primary-fg-color);
  border-radius: 8px;
  background-color: var(--md-default-bg-color);
  transition: all 0.3s ease;
}

.claim-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--md-accent-fg-color);
}

.claim-card h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.claim-card h3 a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
}

.claim-card h3 a:hover {
  text-decoration: underline;
}

.claim-card p {
  margin: 0;
  font-size: 0.95em;
  color: var(--md-typeset-color);
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  .claims-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .claim-card {
    transition: none;
  }
  
  .claim-card:hover {
    transform: none;
  }
}


/* ============================================
   Homepage - Phone Down Eyes Up Smile
   ============================================ */

/* Practice Card - The Core Message */
.practice-card {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
  color: white;
  padding: 2em;
  border-radius: 12px;
  margin: 2em 0;
  text-align: center;
}

.practice-card h3 {
  color: white;
  margin: 0.5em 0;
  font-size: 1.4em;
}

.practice-card p {
  margin: 0.3em 0;
  opacity: 0.9;
}

[data-md-color-scheme="slate"] .practice-card {
  background: linear-gradient(135deg, #3f51b5 0%, #7c4dff 100%);
}

/* Path Grid - Choose Your Journey */
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin: 2em 0;
}

.path-card {
  padding: 1.5em;
  border: 2px solid var(--md-primary-fg-color);
  border-radius: 12px;
  background-color: var(--md-default-bg-color);
  transition: all 0.3s ease;
  text-align: center;
}

.path-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--md-accent-fg-color);
}

.path-card h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.2em;
  color: var(--md-primary-fg-color);
}

.path-card a {
  color: var(--md-accent-fg-color);
  font-weight: bold;
  text-decoration: none;
}

.path-card a:hover {
  text-decoration: underline;
}

.path-card p {
  margin: 0.5em 0 0 0;
  font-size: 0.9em;
  opacity: 0.8;
}

/* Responsive */
@media screen and (max-width: 600px) {
  .path-grid {
    grid-template-columns: 1fr;
  }
  
  .practice-card {
    padding: 1.5em;
  }
  
  .practice-card h3 {
    font-size: 1.2em;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .path-card {
    transition: none;
  }
  
  .path-card:hover {
    transform: none;
  }
}

/* ============================================
   Problem Pages - Extraction Economy Theme
   ============================================ */

/* Warning callout for extraction content */
.extraction-warning {
  background-color: rgba(244, 67, 54, 0.1);
  border-left: 4px solid #f44336;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 4px;
}

.extraction-warning h4 {
  margin-top: 0;
  color: #c62828;
}

/* Solution highlight */
.solution-highlight {
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid #4caf50;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 4px;
}

.solution-highlight h4 {
  margin-top: 0;
  color: #2e7d32;
}

/* ============================================
   Typography Enhancements
   ============================================ */

/* Larger, more impactful headings on homepage */
.md-content h1 {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 0.5em;
}

/* Blockquote styling for key messages */
blockquote {
  border-left: 4px solid var(--md-primary-fg-color);
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
  opacity: 0.9;
}

/* Emphasis for key phrases */
strong {
  color: var(--md-primary-fg-color);
}

[data-md-color-scheme="slate"] strong {
  color: var(--md-accent-fg-color);
}



/* ============================================
   Try It Now - Interactive Call to Action
   ============================================ */

.try-it-now {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5em;
  border-radius: 16px;
  margin: 2em 0;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.try-it-now::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.try-it-now p {
  color: white;
  margin: 1rem 0;
  position: relative;
  z-index: 1;
}

.try-it-now strong {
  color: white;
}

.try-it-now ol {
  text-align: left;
  display: inline-block;
  margin: 1.5rem auto;
  position: relative;
  z-index: 1;
}

.try-it-now ol li {
  margin: 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 500;
}

[data-md-color-scheme="slate"] .try-it-now {
  background: linear-gradient(135deg, #5c6bc0 0%, #7e57c2 100%);
}

/* Hero styling for main message */
.md-content > .md-content__inner > h1:first-of-type {
  font-size: 2.8rem !important;
  text-align: center;
  margin-bottom: 0.3rem !important;
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle styling */
.md-content > .md-content__inner > h1:first-of-type + p {
  text-align: center;
  font-size: 1.4rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

/* Story section styling */
.md-content h2 + p + p + p + p + p + p {
  font-style: italic;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .try-it-now::before {
    animation: none;
  }
}

/* Mobile responsive */
@media screen and (max-width: 600px) {
  .try-it-now {
    padding: 1.5em;
  }
  
  .try-it-now ol li {
    font-size: 1rem;
  }
  
  .md-content > .md-content__inner > h1:first-of-type {
    font-size: 2rem !important;
  }
}


/* ============================================
   Share Card - Printable/Shareable Format
   ============================================ */

.share-card {
  background: white;
  color: #1a1a2e;
  padding: 2.5em;
  border-radius: 16px;
  margin: 2em auto;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 3px solid #667eea;
}

.share-card h2 {
  color: #667eea;
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 0.5em;
}

.share-card p {
  color: #1a1a2e;
  margin: 0.5em 0;
}

.share-card strong {
  color: #1a1a2e;
}

.share-card hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 1.5em 0;
}

.share-card ol {
  text-align: left;
  display: inline-block;
  margin: 1em auto;
}

.share-card ol li {
  margin: 0.5em 0;
  font-weight: 500;
}

.share-card em {
  color: #667eea;
  font-size: 0.9em;
}

/* Dark mode override for share card - keep it light for printing */
[data-md-color-scheme="slate"] .share-card {
  background: white;
  color: #1a1a2e;
}

[data-md-color-scheme="slate"] .share-card h2,
[data-md-color-scheme="slate"] .share-card p,
[data-md-color-scheme="slate"] .share-card strong {
  color: #1a1a2e;
}

/* Print styles for share card */
@media print {
  .share-card {
    box-shadow: none;
    border: 2px solid #000;
    page-break-inside: avoid;
  }
}


/* ============================================
   Struggling Note - Pointer to Self-Acceptance Guide
   ============================================ */

.struggling-note {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(156, 39, 176, 0.1) 100%);
  border: 2px solid #e91e63;
  border-radius: 16px;
  padding: 1.5em 2em;
  margin: 2em 0;
  text-align: center;
}

.struggling-note p {
  margin: 0.75em 0;
}

.struggling-note strong {
  color: #c2185b;
}

[data-md-color-scheme="slate"] .struggling-note {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.15) 0%, rgba(156, 39, 176, 0.15) 100%);
}

[data-md-color-scheme="slate"] .struggling-note strong {
  color: #f48fb1;
}


/* ============================================
   Share Box - Social Sharing Section
   ============================================ */

.share-box {
  background: linear-gradient(135deg, rgba(92, 107, 192, 0.1) 0%, rgba(124, 77, 255, 0.1) 100%);
  border: 2px solid var(--md-primary-fg-color);
  border-radius: 12px;
  padding: 2em;
  margin: 2em 0;
  text-align: center;
}

.share-box pre {
  background: var(--md-code-bg-color);
  padding: 1.5em;
  border-radius: 8px;
  margin: 1em 0;
  text-align: left;
  font-size: 0.95em;
  line-height: 1.6;
  overflow-x: auto;
}

.share-box code {
  background: transparent;
  padding: 0;
}

.share-box button,
.share-box a {
  display: inline-block;
  margin: 10px 5px;
  transition: all 0.3s ease;
}

.share-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-box a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-md-color-scheme="slate"] .share-box {
  background: linear-gradient(135deg, rgba(92, 107, 192, 0.15) 0%, rgba(124, 77, 255, 0.15) 100%);
}

/* Mobile responsive */
@media screen and (max-width: 600px) {
  .share-box {
    padding: 1.5em;
  }
  
  .share-box button,
  .share-box a {
    display: block;
    width: 100%;
    margin: 10px 0;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .share-box button:hover,
  .share-box a:hover {
    transform: none;
  }
}
