/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(120deg, #f9f9fb 0%, #e0e7ff 100%);
  color: #333;
  line-height: 1.6;
}

.hero {
  background: linear-gradient(to right, #1e3c72, #2a5298);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 40px;
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #ffd166;
}

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

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  background-color: #ffd166;
  color: #1e3c72;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #f0cb6d;
}

.features {
  padding: 60px 20px;
  text-align: center;
}

.features h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.feature:hover {
  transform: translateY(-5px);
}

.about {
  padding: 60px 20px;
  background-color: #f0f4f8;
  text-align: center;
}

.about h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.footer {
  background-color: #1e3c72;
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 40px;
}

.upload-page {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 80px ;
  margin-bottom: 40px;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.upload-page h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

.upload-page p {
  margin-bottom: 2rem;
  color: #555;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

input[type="file"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* .go-back {
    text-decoration: none;
    /* font-weight: 00; */

/* .go-back:hover {
   
  } */

.Graphs {
  display: none;
  flex-wrap: nowrap; /* Changed from wrap to nowrap */
  justify-content: center;
   gap: 1.9rem;   /*Reduced gap for better horizontal fit */
  padding: 1rem;
  max-width: 100%;
  overflow-x: auto; /* Allow horizontal scroll if needed */
}

.divcanvas {
  width: 450px;
  height: 450px; /* Increased height to accommodate bottom legend */
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.divcanvas canvas {
  width: 100% !important;
  height: calc(100% - 40px) !important; /* Reduced height to make room for bottom legend */
  max-width: 100%;
  display: block;
}

/* Graph title styling */
.graph-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e3c72;
}


.button {
  display: inline-flex;
  border: 2px solid white;
  border-radius: 21px;
  color: rgb(34, 33, 33);
  background-color: white;
  padding: 12px;
  margin-left: 30px;
  margin-right: 30px;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.btn-div {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

#ai-btn {
    display: inline-flex;
    border: 2px solid white;
    border-radius: 30px;
    background-color: #2a5298;  
     color: ghostwhite;
    padding: 22px;
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 30px;
    align-items: center;
    justify-content: center;
    font-weight: bold;
  display: none;
}

.ai-generated-summary{
display: none;
height: max-content;

background-color: white;
border-radius: 25px;
margin-top: 10px;
margin-right: 70px;
margin-left: 70px;
padding: 10px 75px;
}

.hero_upload{
  background: linear-gradient(to right, #1e3c72, #2a5298);
  color: white;
  padding: 20px; /* Reduced from 60px to 20px */
  text-align: center;
}
.navbar_upload{
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto; 
}

.upload-btn-primary {
  display: inline-block;
  background-color: #2a5298;  /* Changed from #140e0e to match the site's theme */
  color: ghostwhite;
  padding: 0.8rem 1.5rem;
  border-radius: 21px;
  font-weight: bolder;
  text-decoration: none;
  transition: background-color 0.3s;
}

/* Add hover effect for better interaction */
.upload-btn-primary:hover {
  background-color: #1e3c72;
  transition: background-color 0.3s ease;
}

/* Add these media queries at the end of index.css */

@media screen and (max-width: 768px) {
  /* Navigation */
  .navbar, .navbar_upload {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    text-align: center;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  /* Upload Page */
  .upload-page {
    margin: 20px;
    padding: 1rem;
  }

  /* Graphs Section */
  .Graphs {
    flex-direction: column;
    padding: 0.5rem;
  }

  .divcanvas {
    width: 100%;
    height: 400px;
    margin: 10px 0;
  }

  /* AI Summary Section */
  .ai-generated-summary {
    width: 90%;
    margin: 10px auto;
    padding: 15px;
  }

  /* Buttons */
  .button {
    margin: 10px;
    width: 80%;
  }

  .btn-div {
    margin: 15px 0;
  }

  .upload-btn-primary {
    width: 100%;
  }
}

/* For extra small devices */
@media screen and (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .upload-page h1 {
    font-size: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    margin: 10px;
  }
}

/* Fix for chart responsiveness */
.divcanvas canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Update the AI summary styles to use neutral theme colors */
.ai-generated-summary {
  line-height: 1.8;
}

.ai-generated-summary h1 {
  color: #1e3c72;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #2a5298;
  padding-bottom: 0.5rem;
}

.ai-generated-summary h2 {
  color: #2a5298;
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem 0;
}

.ai-generated-summary h3 {
  color: #3b4d71;
  font-size: 1.2rem;
  margin: 1.2rem 0 0.8rem 0;
}

.ai-generated-summary p {
  margin-bottom: 1rem;
  color: #333;
}

.ai-generated-summary ul, 
.ai-generated-summary ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.ai-generated-summary li {
  margin-bottom: 0.5rem;
  color: #444;
}

.ai-generated-summary strong {
  color: #1e3c72;
  font-weight: 600;
}

.ai-generated-summary em {
  color: #2a5298;
  font-style: italic;
}

/* Single highlight color for important information */
.ai-generated-summary .highlight-info {
  color: #2a5298;
  font-weight: 500;
}

/* Keep the code block styling */
.ai-generated-summary pre,
.ai-generated-summary code {
  background-color: #f3f4f6;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-family: monospace;
}
