/* Simple Timeline for History Content Only */

.simple-timeline {
  margin: 1.5rem 0;
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
}

.timeline-event {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  position: relative;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 1rem;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2px solid white;
}

.timeline-event strong {
  color: #3b82f6;
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .simple-timeline {
    padding-left: 0.75rem;
    margin: 1rem 0;
    border-left: 2px solid #cbd5e1;
  }
  
  .timeline-event {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .timeline-event::before {
    left: -1rem;
    width: 6px;
    height: 6px;
    top: 0.75rem;
  }
  
  .timeline-event strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
  }
}

/* Themed Mindmap Section Styling */
.themed-section[data-subject="mindmap"] .themed-summary {
  background: linear-gradient(135deg, var(--primary-color, #007BFF) 0%, var(--secondary-color, #0056b3) 100%);
  color: white;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.themed-section[data-subject="mindmap"] .themed-summary:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transition: all 0.3s ease;
}

.themed-section[data-subject="mindmap"] .themed-collapsible {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

/* Enhanced Mindmap Styles - Responsive & Theme Aligned */
.mindmap-container {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #f8fafb 0%, #f0f4f8 50%, #f8f9fb 100%);
  border-radius: 0 0 12px 12px;
  padding: 2rem;
  margin: 0;
  border: none;
  border-top: 1px solid #e5e7eb;
  box-shadow: none;
  overflow: visible;
  min-height: 550px;
}

.mindmap-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.mindmap-nodes {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  min-height: 500px;
}

.mindmap-node {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mindmap-node:hover {
  z-index: 10;
}

/* Base node styling */
.node-content {
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Central node - Primary color from theme */
.central-node .central-content {
  background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%);
  font-size: 1rem;
  padding: 1.25rem 1.5rem;
  min-width: 140px;
  box-shadow: 0 6px 24px rgba(0, 123, 255, 0.35);
}

.central-node .central-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: mindmapShimmer 3s infinite;
  z-index: -1;
}

@keyframes mindmapShimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Branch nodes - Light theme with accent colors on hover */
.branch-node .branch-content {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: #1f2937;
  padding: 0.875rem 1.125rem;
  min-width: 110px;
  max-width: 150px;
  font-size: 0.875rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #d1d5db;
  transition: all 0.3s ease;
}

.branch-node:hover .branch-content {
  background: linear-gradient(135deg, #00CFFF 0%, #0099CC 100%);
  color: white;
  border-color: #00CFFF;
  box-shadow: 0 4px 20px rgba(0, 207, 255, 0.3);
  transform: scale(1.08);
}

.branch-node .branch-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.5s ease;
}

.branch-node:hover .branch-content::before {
  left: 100%;
}

.node-icon {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  display: block;
  flex-shrink: 0;
}

.node-text {
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 600;
  word-wrap: break-word;
}

/* SVG styling */
.mindmap-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
}

.mindmap-container svg[viewBox] {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
}

/* Connection lines */
.connection-branch {
  stroke: #94a3b8;
  stroke-width: 2;
  fill: none;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.connection-branch:hover {
  stroke: #00CFFF;
  stroke-width: 3;
  opacity: 1;
}

/* Tablet responsiveness (768px and below) */
@media (max-width: 768px) {
  .themed-section[data-subject="mindmap"] .themed-summary {
    font-size: 1rem;
    padding: 0.9rem 1.25rem;
  }

  .mindmap-container {
    padding: 1.5rem 1rem;
    min-height: 500px;
    margin: 0;
  }

  .mindmap-nodes {
    min-height: 450px;
  }

  .node-content {
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
  }

  .central-node .central-content {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    min-width: 120px;
  }

  .branch-node .branch-content {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    min-width: 100px;
    max-width: 140px;
  }

  .node-text {
    font-size: 0.75rem;
  }

  .node-icon {
    font-size: 1.1rem;
  }

  .connection-branch {
    stroke-width: 1.5;
  }
}

/* Mobile responsiveness (640px and below) */
@media (max-width: 640px) {
  .themed-section[data-subject="mindmap"] .themed-summary {
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }

  .mindmap-container {
    padding: 1.25rem 1rem;
    min-height: 420px;
    margin: 0;
    border-radius: 0 0 12px 12px;
  }

  .mindmap-nodes {
    min-height: 380px;
  }

  .node-content {
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
  }

  .central-node .central-content {
    padding: 0.9rem 1.15rem;
    font-size: 0.9rem;
    min-width: 115px;
  }

  .branch-node .branch-content {
    padding: 0.65rem 0.95rem;
    font-size: 0.77rem;
    min-width: 95px;
    max-width: 135px;
  }

  .branch-node:hover .branch-content {
    transform: scale(1.06);
  }

  .node-text {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .node-icon {
    font-size: 1rem;
    margin-bottom: 0.15rem;
  }

  .connection-branch {
    stroke-width: 1.2;
  }

  .connection-branch:hover {
    stroke-width: 2;
  }
}

/* Extra small phones (480px and below) */
@media (max-width: 480px) {
  .themed-section[data-subject="mindmap"] .themed-summary {
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
  }

  .mindmap-container {
    padding: 1rem 0.75rem;
    min-height: 360px;
    margin: 0;
    border-radius: 0 0 12px 12px;
  }

  .mindmap-nodes {
    min-height: 320px;
  }

  .node-content {
    padding: 0.45rem 0.6rem;
    font-size: 0.7rem;
  }

  .central-node .central-content {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    min-width: 105px;
  }

  .branch-node .branch-content {
    padding: 0.55rem 0.8rem;
    font-size: 0.72rem;
    min-width: 85px;
    max-width: 120px;
  }

  .branch-node:hover .branch-content {
    transform: scale(1.04);
  }

  .node-text {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .node-icon {
    font-size: 0.9rem;
    margin-bottom: 0.08rem;
  }

  .connection-branch {
    stroke-width: 1;
  }

  .connection-branch:hover {
    stroke-width: 1.5;
  }
}

/* Additional themed sections mobile improvements */
@media (max-width: 640px) {
  .themed-section,
  .summary-mindmap,
  .summary-timeline,
  .summary-process {
    margin: 1rem 0;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
  }
  
  .themed-section h2,
  .themed-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }
  
  /* Themed section improvements */
  .themed-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    clear: both;
    width: 100%;
    margin: 1rem 0;
  }
  
  .themed-summary {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
  }
  
  .themed-content {
    padding: 0.75rem;
  }
  
  /* Prevent any floating issues on mobile */
  .themed-section::after,
  .mindmap-container::after {
    content: "";
    display: table;
    clear: both;
  }
  
  /* Mobile typography improvements */
  .themed-section h1,
  .themed-section h2,
  .themed-section h3 {
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
}