/* Main Styles for TMC Stock Analysis Website */

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --background-color: #f8f9fa;
  --text-color: #333;
  --light-gray: #ecf0f1;
  --dark-gray: #7f8c8d;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #c0392b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo span {
  color: var(--secondary-color);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('../images/stock-market-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

/* Main Content */
main {
  padding: 3rem 0;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Card Styles */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Analysis Section */
.analysis-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.analysis-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.analysis-content h3 {
  color: var(--secondary-color);
  margin: 1.5rem 0 0.5rem;
}

.analysis-content p {
  margin-bottom: 1rem;
}

.analysis-content ul, .analysis-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.analysis-content li {
  margin-bottom: 0.5rem;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

table th, table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

table th {
  background-color: var(--light-gray);
  font-weight: 600;
  color: var(--primary-color);
}

table tr:hover {
  background-color: rgba(236, 240, 241, 0.5);
}

/* Chart Container */
.chart-container {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-align: center;
}

/* Prediction Section */
.prediction-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.prediction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.prediction-title {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.prediction-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.baseline {
  color: var(--secondary-color);
}

.best-case {
  color: var(--success-color);
}

.worst-case {
  color: var(--danger-color);
}

/* Risk Factors */
.risk-factor {
  background-color: rgba(231, 76, 60, 0.1);
  border-left: 4px solid var(--accent-color);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0 4px 4px 0;
}

/* Growth Opportunities */
.opportunity {
  background-color: rgba(39, 174, 96, 0.1);
  border-left: 4px solid var(--success-color);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0 4px 4px 0;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  min-width: 300px;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--light-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
  }
  
  nav ul {
    margin-top: 1rem;
  }
  
  nav ul li {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Tab System */
.tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark-gray);
  transition: all 0.3s;
}

.tab-button.active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

.tab-button:hover {
  color: var(--secondary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-out forwards;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--secondary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s, background-color 0.3s;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  background-color: #2980b9;
}
