/* AI Stock Tickers - Unified Case Study Styling */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", Times, serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  font-size: 12pt;
  max-width: 8.5in;
  margin: 0 auto;
  padding: 1in;
}

/* Header Section */
.case-header {
  text-align: center;
  border-bottom: 2px solid #333;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.platform-branding {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.platform-logo {
  font-size: 24pt;
  font-weight: bold;
  margin-bottom: 10px;
}

.platform-tagline {
  font-size: 11pt;
  opacity: 0.9;
  margin-bottom: 8px;
}

.platform-description {
  font-size: 10pt;
  opacity: 0.8;
  line-height: 1.4;
}

.case-title {
  font-size: 18pt;
  font-weight: bold;
  margin: 20px 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.case-subtitle {
  font-size: 14pt;
  font-style: italic;
  color: #666;
  margin-bottom: 15px;
}

.case-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
}

.detail-group {
  font-size: 10pt;
}

.detail-label {
  font-weight: bold;
  color: #333;
}

/* Content Sections */
h1 {
  font-size: 16pt;
  font-weight: bold;
  margin: 30px 0 15px 0;
  text-transform: uppercase;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

h2 {
  font-size: 14pt;
  font-weight: bold;
  margin: 25px 0 12px 0;
  color: #444;
}

h3 {
  font-size: 12pt;
  font-weight: bold;
  margin: 20px 0 10px 0;
  color: #555;
}

p {
  margin-bottom: 12px;
  text-align: justify;
  font-size: 11pt;
}

ul, ol {
  margin: 12px 0 12px 30px;
  font-size: 11pt;
}

li {
  margin-bottom: 6px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 10pt;
}

th, td {
  border: 1px solid #333;
  padding: 8px 12px;
  text-align: left;
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
  text-align: center;
}

.number {
  text-align: right;
}

/* Financial Data Boxes */
.financial-highlight {
  background-color: #f8f9fa;
  border-left: 4px solid #667eea;
  padding: 15px;
  margin: 20px 0;
  font-size: 11pt;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.metric-card {
  border: 1px solid #ddd;
  padding: 15px;
  text-align: center;
  background-color: #fafafa;
}

.metric-value {
  font-size: 14pt;
  font-weight: bold;
  color: #667eea;
  display: block;
}

.metric-label {
  font-size: 9pt;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Highlighted Content Boxes */
.highlight-box {
  background-color: #f0f8ff;
  border: 1px solid #4682b4;
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
}

.success-box {
  background-color: #f0fff0;
  border: 1px solid #32cd32;
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
}

.warning-box {
  background-color: #fff8dc;
  border: 1px solid #ffa500;
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
}

/* AI Analysis Sections */
.ai-analysis {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
}

.ai-analysis h3 {
  color: #667eea;
  margin-top: 0;
  text-align: center;
}

/* Conclusion Section */
.conclusion {
  background-color: #f8f9fa;
  border: 2px solid #333;
  padding: 20px;
  margin: 30px 0;
  border-radius: 5px;
}

.conclusion h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* Navigation */
.navigation {
  text-align: center;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid #ddd;
}

.nav-link {
  color: #667eea;
  text-decoration: none;
  font-weight: bold;
  margin: 0 20px;
  font-size: 11pt;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Footer */
.case-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px solid #333;
  font-size: 9pt;
  color: #666;
  text-align: center;
}

.disclaimer {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  padding: 15px;
  margin: 20px 0;
  font-size: 8pt;
  line-height: 1.4;
  text-align: center;
}

.disclaimer h4 {
  font-size: 10pt;
  margin-bottom: 10px;
  color: #333;
}

.text-center {
  text-align: center;
}

.footer-link {
  display: inline-block;
  margin-top: 10px;
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Print Optimization */
@media print {
  body {
    padding: 0.5in;
    font-size: 11pt;
  }
  
  .platform-branding {
    background: #f0f0f0 !important;
    color: #333 !important;
  }
  
  .case-header {
    page-break-inside: avoid;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  table {
    page-break-inside: avoid;
  }
  
  .navigation {
    display: none;
  }
}

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
  body {
    padding: 20px;
    font-size: 11pt;
  }
  
  .case-details {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .platform-logo {
    font-size: 20pt;
  }
  
  .case-title {
    font-size: 16pt;
  }
  
  .case-subtitle {
    font-size: 12pt;
  }
  
  h1 {
    font-size: 14pt;
  }
  
  h2 {
    font-size: 12pt;
  }
  
  h3 {
    font-size: 11pt;
  }
  
  .nav-link {
    display: block;
    margin: 10px 0;
  }
  
  table {
    font-size: 9pt;
  }
  
  th, td {
    padding: 6px 8px;
  }
}

/* Additional Mobile Optimization for Very Small Screens */
@media (max-width: 480px) {
  body {
    padding: 15px;
    font-size: 10pt;
  }
  
  .platform-logo {
    font-size: 18pt;
  }
  
  .case-title {
    font-size: 14pt;
    letter-spacing: 0.5px;
  }
  
  .case-subtitle {
    font-size: 11pt;
  }
  
  h1 {
    font-size: 13pt;
  }
  
  h2 {
    font-size: 11pt;
  }
  
  h3 {
    font-size: 10pt;
  }
  
  p, ul, ol {
    font-size: 10pt;
  }
  
  table {
    font-size: 8pt;
  }
  
  th, td {
    padding: 4px 6px;
  }
}

/* Case Studies List Styling */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Fixed 2 columns */
  gap: 25px;
  padding: 20px;
  max-width: 1200px; /* Limit max width */
  margin: 0 auto; /* Center the grid */
}


.case-study-card {
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-height: 240px;
}

.card-content {
  flex: 1 0 auto;
  min-height: 110px; /* Adjust as needed for tallest title */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.case-study-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.case-study-card h3 {
  margin: 0;
  padding: 16px 20px 8px;
  font-size: 18px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.case-study-card p {
  margin: 6px 20px;
  color: #555;
  font-size: 14px;
  line-height: 1.3;
}

.case-study-card .outcome {
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 4px;
  display: block;
  margin: 0 20px 10px 20px;
  width: calc(100% - 40px);
  text-align: center;
  min-height: 28px;
}

.case-study-card .success {
  background-color: #e6f7e6;
  color: #2e7d32;
}

.case-study-card .failure {
  background-color: #ffebee;
  color: #c62828;
}

.view-button {
  margin: auto 20px 20px;
  padding: 10px 15px;
  background-color: #1976d2;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  transition: background-color 0.3s;
}

.view-button:hover {
  background-color: #1565c0;
}

.error-message {
  background-color: #ffebee;
  border-left: 4px solid #f44336;
  padding: 15px 20px;
  margin: 20px;
  border-radius: 4px;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr; /* Single column on smaller screens */
  }
}
