.health-articles-page,
.health-article-detail-page {
  padding: 2rem 1rem 3.5rem;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card-media {
  aspect-ratio: 16 / 10;
  background-color: var(--brand-very-light);
  overflow: hidden;
}

.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
}

.article-card-body {
  padding: 1rem 1.1rem 1.25rem;
}

.article-card-body h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.article-card-body p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.article-card-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.article-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.article-pagination a {
  color: var(--brand-primary);
}

.article-pagination span {
  color: var(--text-muted);
}

/* Detail page */
.article-back-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
}

.article-detail {
  max-width: 760px;
  margin: 0 auto 3rem;
}

.article-detail h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.article-detail-meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
}

.article-detail-cover {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.article-detail-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
}

.article-detail-body p {
  margin-bottom: 1.1rem;
}

.article-related {
  max-width: 960px;
  margin: 0 auto;
}

.article-related .section-title {
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Social Sharing
   ========================================================================== */
.article-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-share:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.share-fb { background-color: #1877F2; }
.share-x { background-color: #000000; }
.share-ig { background-color: #E1306C; } /* Real IG uses a gradient, solid is fine for icon bg */
.share-copy { 
  background-color: var(--bg-white); 
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}
.share-copy:hover {
  background-color: var(--border-light);
}

.share-btn-wrapper {
  position: relative;
}

/* ==========================================================================
   Feedback & Comments
   ========================================================================== */
.article-feedback-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.feedback-status-msg, .login-prompt {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.login-prompt p {
  margin-bottom: 1rem;
}

.feedback-form, .comment-form {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.form-header {
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.textarea-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.feedback-textarea, .comment-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  background-color: var(--bg-main);
  color: var(--text-main);
}

.feedback-textarea:focus, .comment-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.char-counter {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-submit {
  background-color: var(--brand-primary);
  color: var(--text-white);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.btn-submit:hover {
  background-color: var(--brand-primary-hover);
}

.btn-cancel {
  background-color: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.btn-cancel:hover {
  color: var(--text-main);
}

.form-error {
  margin-top: 1rem;
  color: #dc2626;
  font-size: 0.875rem;
}

[data-theme="dark"] .form-error {
  color: #f87171;
}

.form-success {
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.875rem;
}

/* Feedback List */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feedback-item {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.feedback-header, .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  background-color: var(--brand-light);
  color: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.avatar-small {
  width: 32px;
  height: 32px;
  background-color: var(--border-medium);
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.meta {
  display: flex;
  flex-direction: column;
}

.meta .name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
}

.meta .time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  gap: 0.25rem;
}

.btn-icon {
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  transition: color 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: var(--bg-main);
  color: var(--text-main);
}

.feedback-body, .comment-body {
  font-size: 0.9375rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feedback-footer, .comment-footer {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-reply-toggle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-reply-toggle:hover {
  text-decoration: underline;
}

/* Comments Section (Nested) */
.comments-section {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-light);
}

@media (min-width: 640px) {
  .comments-section {
    padding-left: 1.5rem;
    margin-left: 1rem;
  }
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background-color: var(--bg-main);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.comment-reply {
  margin-left: 1rem;
  border-left: 2px solid var(--border-medium);
}

.pagination-actions {
  margin-top: 2rem;
  text-align: center;
}

.btn-outline {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-outline:hover {
  background-color: var(--brand-primary);
  color: var(--text-white);
}

/* ==========================================================================
   Report Modal
   ========================================================================== */
.report-modal {
  padding: 2rem;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
  margin: auto;
}

.report-modal::backdrop {
  background-color: rgba(15, 23, 42, 0.5);
}

.report-modal h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

.report-modal p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.report-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
