/* ========================================================================= */
/* General Styles */
/* ========================================================================= */
body {
  background-color: #f5f7fa;
  color: #1e293b;
  font-family: 'PT Sans', 'Segoe UI', Tahoma, Verdana, sans-serif;
  margin: 0;
  line-height: 1.6;
}

h1, h2, .btn-main {
  font-family: 'Inter', sans-serif;
}

header {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  color: #1e293b;
  padding: 10px 10px;
  text-align: center;
  margin-bottom: 5px;
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-content span {
  font-weight: 600;
  font-size: 2.8em;
  margin-bottom: 10px;
  color: #1e40af;
}

.header-content h1 {
  font-weight: 600;
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #1e40af;
}

.header-content p {
  font-size: 1.2em;
  color: #475569;
}

@media (max-width: 768px) {
  .header-content {
    padding: 5px 5px;
    border-radius: 12px;
  }

  .header-content span {
    font-size: 1.8em;
  }

  .header-content h1 {
    font-size: 1em;
  }
}

h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
}

/* Sections */
section {
  max-width: 1000px;
  margin: 0 auto 40px;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

section h2 {
  font-size: 1.6em;
  color: #2563eb;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cards and Grids */
.features,
.cases,
.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.card {
  background-color: #f8fafc;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .features,
  .cases,
  .testimonials {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
button,
.expert-btn,
.btn-main {
  background-color: #2563eb;
  color: #ffffff;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.expert-btn:hover,
.btn-main:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}

/* Form Page */
form {
  max-width: 70%;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

label {
  display: block;
  margin-bottom: 8px;
  margin-top: 20px;
  color: #334155;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1em;
}

.required::after {
  content: " *";
  color: #e11d48;
}

/* Contact Method Checkboxes */
.contact-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.contact-option {
  background-color: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.3s;
  color: #1e293b;
}

.contact-option.selected {
  border-color: #2563eb;
  background-color: #e0e7ff;
}

.contact-option input {
  display: none;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: #e2e8f0;
  color: #475569;
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9em;
  border-top: 1px solid #cbd5e1;
}

/* ========================================================================= */
/* Chat Page Styles */
/* ========================================================================= */
.chat-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  height: calc(80vh - 200px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 3em;
}

.messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  border-radius: 12px;
  background: #f9fafb;
}

.message {
  padding: 15px 20px;
  border-radius: 12px;
  max-width: 80%;
  position: relative;
  animation: slideIn 0.4s ease-out;
  transition: all 0.3s ease;
}

.user-message {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bot-message {
  background: #e2e8f0;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-message {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #ef4444;
}

.consultation-message {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #10b981;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.success-message {
  display: none;
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  padding: 8px;
  background-color: #e6f4ea;
  border-radius: 4px;
}

.consultation-message a {
  background: #10b981;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.consultation-message a:hover {
  background: #059669;
  transform: translateY(-2px);
}

.loading-message {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e2e8f0;
  color: #1e293b;
  animation: pulse 1.5s infinite ease-in-out;
}

.loading-message::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #64748b;
  border-radius: 50%;
  animation: loadingDots 0.8s infinite alternate;
}

.loading-message::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #64748b;
  border-radius: 50%;
  animation: loadingDots 0.8s infinite alternate 0.2s;
}

.loading-message span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #64748b;
  border-radius: 50%;
  animation: loadingDots 0.8s infinite alternate 0.4s;
}

.input-container {
  display: flex;
  gap: 12px;
  padding: 15px;
  background: #f1f5f9;
  border-radius: 12px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-container input {
  flex: 1;
  padding: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-container input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.2);
}

.input-container button {
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transition: background 0.3s ease, transform 0.2s ease;
}

.input-container button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
}

/* ========================================================================= */
/* Consultation Page Styles */
/* ========================================================================= */
.consultation-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  margin-bottom: 40px;
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.section-icon {
  font-size: 1.2em;
  color: #2563eb;
}

.situation-card {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
}

.consultation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.consultation-card {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.consultation-card h3 {
  margin: 0 0 10px;
  font-size: 1.2em;
  color: #1e40af;
}

.probability-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.probability-circle {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.probability-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* Start progress from top */
}

.probability-circle circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.probability-circle .circle-bg {
  stroke: #e2e8f0;
}

.probability-circle .circle-progress {
  stroke: #10b981;
  stroke-dasharray: 314; /* Circumference of circle (2 * π * 50) */
  stroke-dashoffset: calc(314 * (100 - var(--probability)) / 100);
  transition: stroke-dashoffset 0.5s ease;
}

.probability-circle span {
  position: absolute;
  font-size: 1.4em;
  font-weight: bold;
  color: #1e293b;
}

.explanation-card {
  grid-column: span 2;
}

.references-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.reference-card {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
}

.reference-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.reference-header .title {
  font-weight: 600;
  color: #1e293b;
}

.toggle-icon {
  font-size: 0.9em;
  color: #64748b;
  transition: transform 0.3s ease;
}

.reference-card.active .toggle-icon {
  transform: rotate(180deg);
}

.reference-card .dropdown-content {
  padding: 15px 20px;
  background: #ffffff;
  color: #475569;
  font-size: 0.95em;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 20px;
}

.case-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.3s ease, transform 0.3s ease;
}

.case-card:hover {
  background: #e0e7ff;
  transform: translateY(-3px);
}

.case-card p {
  margin: 0;
  font-size: 0.95em;
}

.external-link-icon {
  font-size: 0.9em;
  color: #2563eb;
}

.disclaimer-card {
  background: #fef2f2;
  border: 1px solid #f87171;
  padding: 25px;
  text-align: center;
  color: #991b1b;
}

.expert-card {
  text-align: center;
  padding: 25px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #10b981;
}

.expert-card p {
  margin: 0 0 20px;
  color: #065f46;
}

.expert-btn {
  background: #10b981;
  padding: 15px 30px;
  font-weight: 600;
}

.expert-btn:hover {
  background: #059669;
}

/* Responsive Design */
@media (max-width: 768px) {
  .consultation-grid {
    grid-template-columns: 1fr;
  }

  .explanation-card {
    grid-column: span 1;
  }

  .probability-circle::before {
    width: 80px;
    height: 80px;
  }

  .probability-circle span {
    font-size: 1.2em;
  }

  .section {
    padding: 20px;
  }
}

/* ========================================================================= */
/* Animations */
/* ========================================================================= */
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes loadingDots {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(37, 99, 235, 0.5);
  }
  100% {
    transform: translateY(-4px);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.8);
  }
}

.animate-slide-in {
  animation: slideIn 0.5s ease-out;
}

/* ========================================================================= */
/* Dropdown Styles (Non-Chat) */
/* ========================================================================= */
.dropdown-item {
  cursor: pointer;
}

.dropdown-content {
  display: none;
  transition: all 0.3s ease;
}

.dropdown-item.active .dropdown-content {
  display: block;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}


/* ========================================================================= */
/* Mobile (Consultation) */
/* ========================================================================= */
