/* --- Imports handled via HTML, specific page styles below --- */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-light);
}

.journal-btn {
  margin-top: 1.5rem;
  min-width: 220px;
}

/* --- 1. Featured Section (Carousel) --- */
.featured-section {
  background-color: #f9fdfa;
  border-bottom: 1px solid #eee;
}

.carousel-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease-in-out;
}

.t-card {
  min-width: calc(33.333% - 14px);
  /* Desktop */
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef7f2;
  display: flex;
  flex-direction: column;
}

.t-card-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
}

.t-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Random Avatar Colors */
.color-1 {
  background-color: #e67e22;
}

.color-2 {
  background-color: #3498db;
}

.color-3 {
  background-color: #9b59b6;
}

.color-4 {
  background-color: #2ecc71;
}

.t-meta h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.demographics {
  font-size: 0.8rem;
  color: var(--text-light);
  display: block;
}

.stars {
  color: #f1c40f;
  font-size: 0.8rem;
  margin-top: 2px;
}

.t-card-body p {
  font-style: italic;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* Carousel Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.prev-btn {
  left: 0;
}

.next-btn {
  right: 0;
}


/* --- 2. Journal Section (List View) --- */
.journal-section {
  background-color: var(--white);
}

/* The Collapsible Logic */
.journal-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  /* Optional: Fade in animation when shown */
  animation: fadeIn 0.5s ease-in-out;
}

.journal-list.collapsed {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.journal-entry {
  display: flex;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Column 1: Profile */
.j-profile {
  flex: 1;
  background-color: #f8f9fa;
  padding: 1.5rem;
  text-align: center;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.j-photo-placeholder {
  width: 80px;
  height: 80px;
  background-color: #e2e6ea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #adb5bd;
  margin-bottom: 1rem;
}

.j-profile h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.j-details,
.j-location,
.j-job {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.j-social {
  margin-top: 1rem;
}

.j-social a {
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Column 2: Clinical Details */
.j-clinical {
  flex: 2.5;
  padding: 1.5rem;
}

.disease-badge {
  background-color: var(--accent-color);
  color: white;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.clinical-row {
  margin-bottom: 1rem;
}

.clinical-row strong {
  color: var(--primary-dark);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.clinical-row p {
  font-size: 0.95rem;
  margin: 0;
}

/* Column 3: Visuals */
.j-visuals {
  flex: 1.5;
  background-color: #f1f8f6;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visual-box {
  text-align: center;
  flex: 1;
}

.visual-box span {
  display: block;
  font-weight: bold;
  font-size: 0.8rem;
  color: var(--text-light);
}

.visual-box small {
  display: block;
  font-size: 0.7rem;
  color: #777;
  margin-bottom: 5px;
}

.img-mock {
  background-color: #ccc;
  height: 100px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #555;
  font-weight: bold;
  border: 2px solid white;
}

.visual-box.after .img-mock {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.arrow-connector {
  color: var(--primary-color);
}

.cta-banner {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background-color: #eef7f2;
  border-radius: 8px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .t-card {
    min-width: calc(50% - 10px);
  }

  .journal-entry {
    flex-direction: column;
  }

  .j-profile {
    border-right: none;
    border-bottom: 1px solid #eee;
    flex-direction: row;
    gap: 20px;
    text-align: left;
  }

  .j-visuals {
    border-top: 1px solid #eee;
  }
}

@media (max-width: 600px) {
  .carousel-wrapper {
    padding: 0 0px;
  }

  .t-card {
    min-width: 100%;
  }

  .carousel-btn {
    top: auto;
    bottom: -50px;
    transform: none;
  }

  .prev-btn {
    left: 30%;
  }

  .next-btn {
    right: 30%;
  }

  .featured-section {
    padding-bottom: 4rem;
  }

  .j-profile {
    flex-direction: column;
    text-align: center;
  }
}