/* String Theory Page Specific Styles - Optimized Visualizations */

/* Hero Section */
.hero-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 2rem;
}

/* Intro Card */
.intro-card {
  max-width: 1000px;
  margin: 0 auto 2rem;
}

.key-insights {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.insight-card {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 1rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  text-align: center;
}

.insight-card i {
  font-size: 2rem;
  color: #3498db;
  margin-bottom: 0.5rem;
}

/* String Visualizations */
.string-visual {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: block;
}

.string-comparison {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.string-card {
  text-align: center;
  padding: 1rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  max-width: 250px;
}

/* Scale Visualizations */
.scale-comparison svg {
  max-width: 600px;
  height: auto;
  margin: 1rem auto;
  display: block;
}

/* Worldsheet Comparison */
.worldsheet-comparison {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.trace-item {
  max-width: 250px;
  text-align: center;
}

.trace-item svg {
  width: 200px;
  height: 220px;
  margin: 0 auto;
  display: block;
}

/* Action Cards */
.action-cards {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.action-card {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  padding: 1.5rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #f8f9fa;
}

.action-card svg {
  max-width: 220px;
  height: 150px;
  margin: 1rem auto;
  display: block;
}

/* Equation Boxes */
.equation-box {
  background: #f0f4f8;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
  text-align: center;
  overflow-x: auto;
}

.equation-box.primary {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.equation-box.highlighted {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
}

.equation-box.small {
  font-size: 0.9rem;
  padding: 0.5rem;
}

/* Wave Visualization */
.wave-visualization svg {
  max-width: 500px;
  height: 150px;
  margin: 1rem auto;
  display: block;
}

/* Boundary Conditions Grid */
.bc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.bc-card {
  padding: 1.5rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #f8f9fa;
}

.bc-card svg {
  max-width: 150px;
  height: 150px;
  margin: 1rem auto;
  display: block;
}

.bc-types {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.bc-type {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 1rem;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
}

.bc-type svg {
  width: 120px;
  height: 80px;
  margin: 0.5rem auto;
  display: block;
}

/* Theory Web Diagram */
.theory-web {
  max-width: 800px;
  margin: 2rem auto;
}

.theory-diagram {
  width: 100%;
  height: auto;
  max-height: 400px;
}

/* Theory Details Grid */
.theory-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.theory-card {
  padding: 1.5rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #f8f9fa;
}

.theory-card h4 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.theory-card ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.9rem;
}

.visual-hint svg {
  width: 100px;
  height: 50px;
  margin: 1rem auto 0;
  display: block;
}

/* Properties List */
.properties {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.property-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.property-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.property-item.warning {
  background: #fff3cd;
  color: #856404;
}

.property-item.info {
  background: #d1ecf1;
  color: #0c5460;
}

/* Group Structure */
.group-structure {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.group-tag {
  padding: 0.25rem 0.75rem;
  background: #3498db;
  color: white;
  border-radius: 4px;
  font-weight: bold;
}

/* Vibrational Modes */
.mode-spectrum {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.mode-spectrum svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.mode-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  background: #f0f4f8;
}

.mode-item.low-energy {
  background: #e8f5e9;
}

.mode-item.high-energy {
  background: #fce4ec;
}

.arrow {
  color: #666;
  font-weight: bold;
}

/* Advantage Tags */
.advantages {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.advantage-tag {
  padding: 0.25rem 0.5rem;
  background: #2ecc71;
  color: white;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Note Styling */
p.note {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Lead Text */
.lead-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .string-visual {
    width: 150px;
    height: 150px;
  }
  
  .theory-diagram {
    max-height: 300px;
  }
  
  .action-cards,
  .string-comparison,
  .worldsheet-comparison {
    flex-direction: column;
    align-items: center;
  }
  
  .bc-grid,
  .theory-details {
    grid-template-columns: 1fr;
  }
  
  .scale-comparison svg {
    max-width: 100%;
  }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
  .hero-section,
  .intro-card {
    max-width: 1400px;
  }
  
  .theory-web {
    max-width: 1000px;
  }
}

/* Print Styles */
@media print {
  .string-visual,
  .trace-item svg,
  .action-card svg,
  .wave-visualization svg,
  .bc-card svg,
  .theory-diagram {
    max-width: 3in;
  }
}

/* Section Styling */
.concepts-section,
.classical-string-section,
.string-theories-section {
  margin: 3rem 0;
}

.concepts-section h3,
.classical-string-section h3,
.string-theories-section h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.concepts-section h4,
.classical-string-section h4,
.string-theories-section h4 {
  color: #34495e;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Subtitle */
p.subtitle {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: 1.3rem;
  color: #666;
  font-style: italic;
}

/* SVG Arrow Marker Definition */
svg defs {
  display: none;
}

/* Ensure math displays properly */
.MathJax_Display {
  overflow-x: auto;
  max-width: 100%;
}

/* Code blocks */
pre {
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* General layout constraint for string theory page */
.page__content .full-width {
  max-width: 1400px !important;
  margin: 0 auto;
}