/* News Detail Loader */
.detail-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 2rem;
  gap: 1rem;
}

.detail-loader__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid rgba(var(--primary-rgb, 52, 73, 94), 0.2);
  border-top-color: rgb(var(--primary-rgb, 52, 73, 94));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.detail-loader__text {
  color: #999;
  font-size: 0.875rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* News Detail Error */
.detail-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 1.5rem;
  background-color: #fee;
  border-left: 4px solid #c33;
  border-radius: 0.25rem;
}

.detail-error__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.detail-error__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: #c33;
}

.detail-error__text {
  color: #933;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 28rem;
}

/* Language Selector */
.language-selector-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.language-selector-label {
  color: #999;
  font-size: 0.875rem;
  font-family: sans-serif;
  white-space: nowrap;
}

.language-selector {
  background-color: #f3f3f3;
  color: #222;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid #ddd;
  font-family: sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: fit-content;
}

.language-selector:hover:not(:disabled) {
  border-color: #bbb;
  background-color: #fff;
}

.language-selector:focus {
  outline: none;
  border-color: rgb(var(--primary-rgb, 52, 73, 94));
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 52, 73, 94), 0.1);
}

.language-selector:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f0f0f0;
}

/* Featured Image */
.news-featured-image {
  margin: 2rem 0;
  overflow: hidden;
  border-radius: 0.25rem;
}

.news-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* News Detail Content Typography */

/* Headings */
.news-detail__body h2,
.news-detail__body h3,
.news-detail__body h4,
.news-detail__body h5,
.news-detail__body h6 {
  margin: 1.5rem 0 0.75rem 0;
  color: #222;
  font-weight: 700;
  line-height: 1.4;
}

.news-detail__body h2 {
  font-size: 1.75rem;
}

.news-detail__body h3 {
  font-size: 1.5rem;
}

.news-detail__body h4 {
  font-size: 1.25rem;
}

.news-detail__body h5 {
  font-size: 1.1rem;
}

.news-detail__body h6 {
  font-size: 1rem;
  color: #555;
}

/* Paragraphs */
.news-detail__body p {
  margin: 1rem 0;
  line-height: 1.8;
  color: #333;
}

/* Bold and Italic */
.news-detail__body strong,
.news-detail__body b {
  font-weight: 700;
  color: #222;
}

.news-detail__body em,
.news-detail__body i {
  font-style: italic;
  color: #444;
}

/* Links */
.news-detail__body a {
  color: rgb(var(--primary-rgb, 52, 73, 94));
  text-decoration: underline;
  transition: color 0.2s ease;
}

.news-detail__body a:hover {
  color: #222;
  text-decoration: none;
}

.news-detail__body a:visited {
  color: #666;
}

/* Lists */
.news-detail__body ul,
.news-detail__body ol {
  margin: 1rem 0;
  padding-left: 2rem;
  color: #333;
}

.news-detail__body ul {
  list-style-type: disc;
}

.news-detail__body ol {
  list-style-type: decimal;
}

.news-detail__body ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.news-detail__body ul ul ul {
  list-style-type: square;
}

.news-detail__body ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.news-detail__body li {
  margin: 0.5rem 0;
  line-height: 1.8;
}

.news-detail__body li p {
  margin: 0.25rem 0;
}

/* Blockquotes */
.news-detail__body blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid rgb(var(--primary-rgb, 52, 73, 94));
  background-color: #f9f9f9;
  font-style: italic;
  color: #555;
}

/* Code blocks and inline code */
.news-detail__body code {
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  padding: 0.2rem 0.4rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #d63384;
}

.news-detail__body pre {
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.news-detail__body pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: #333;
}

/* Horizontal Rules */
.news-detail__body hr {
  margin: 2rem 0;
  border: none;
  border-top: 2px solid #ddd;
}

/* Tables */
.news-detail__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid #ddd;
}

.news-detail__body table thead {
  background-color: #f9f9f9;
}

.news-detail__body table th {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  font-weight: 700;
  background-color: #f4f4f4;
}

.news-detail__body table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
}

.news-detail__body table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* News Page Styles */
body#page.news article#content .news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body#page.news article#content .news-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body#page.news article#content .news-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

body#page.news article#content .news-item__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
}

body#page.news article#content .news-item__date {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

body#page.news article#content .news-item__category {
  display: inline-block;
  background: #c59a2e;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 4px;
  text-align: center;
  min-width: 60px;
}

body#page.news article#content .news-item__title {
  margin: 0;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 600;
  color: #3c4462;
}

body#page.news article#content .news-item__title a {
  color: #3c4462;
  transition: color 0.3s ease;
}

body#page.news article#content .news-item__title a:hover {
  color: #c59a2e;
}

body#page.news article#content .news-item__excerpt {
  margin: 0;
  padding: 0 24px 16px;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

/* News Detail Page Styles */
body#page.news-detail article#content .news-detail-inner {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  border: 1px solid #e5e5e5;
}

body#page.news-detail article#content .news-detail__breadcrumb {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
  text-align: left;
}

body#page.news-detail article#content .news-detail__breadcrumb a {
  color: #666;
  transition: color 0.3s ease;
}

body#page.news-detail article#content .news-detail__breadcrumb a:hover {
  color: #c59a2e;
}

body#page.news-detail article#content .news-detail__title {
  font-size: 32px;
  font-weight: 700;
  color: #3c4462;
  margin: 0 0 20px;
  text-align: left;
  line-height: 1.4;
}

body#page.news-detail article#content .news-detail__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e5e5;
  margin-bottom: 32px;
  text-align: left;
  flex-wrap: wrap;
}

body#page.news-detail article#content .news-detail__date {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

body#page.news-detail article#content .news-detail__category {
  display: inline-block;
  background: #c59a2e;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 4px;
  text-align: center;
  min-width: 70px;
}

body#page.news-detail article#content .news-detail__body {
  text-align: left;
  margin-bottom: 32px;
  line-height: 1.8;
}

body#page.news-detail article#content .news-detail__body h3 {
  font-size: 20px;
  font-weight: 600;
  color: #3c4462;
  margin: 32px 0 16px;
}

body#page.news-detail article#content .news-detail__body h3:first-child {
  margin-top: 0;
}

body#page.news-detail article#content .news-detail__body p {
  margin-bottom: 16px;
  color: #333;
}

body#page.news-detail article#content .news-detail__footer {
  text-align: left;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
}

body#page.news-detail article#content .news-detail__back a {
  display: inline-block;
  color: #c59a2e;
  font-weight: bold;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 4px;
}

body#page.news-detail article#content .news-detail__back a:hover {
  background: #f5f4f3;
  color: #333;
}

body#page.news-detail article#content .news-navigation {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #e5e5e5;
}

body#page.news-detail article#content .news-navigation > div {
  flex: 1;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 8px;
  border-left: 4px solid #c59a2e;
}

body#page.news-detail article#content .news-navigation__prev p:first-child,
body#page.news-detail article#content .news-navigation__next p:first-child {
  margin: 0 0 8px;
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  font-weight: 500;
}

body#page.news-detail article#content .news-navigation__prev p:last-child,
body#page.news-detail article#content .news-navigation__next p:last-child {
  margin: 0;
  font-size: 16px;
}

body#page.news-detail article#content .news-navigation__prev a,
body#page.news-detail article#content .news-navigation__next a {
  color: #3c4462;
  font-weight: 600;
  transition: color 0.3s ease;
}

body#page.news-detail article#content .news-navigation__prev a:hover,
body#page.news-detail article#content .news-navigation__next a:hover {
  color: #c59a2e;
}

/* Responsive Design for News Pages */
@media screen and (max-width: 750px) {
  body#page.news article#content .news-item {
    border-radius: 6px;
  }

  body#page.news article#content .news-item__header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  body#page.news article#content .news-item__date {
    flex: 1;
  }

  body#page.news article#content .news-item__category {
    flex: 0 0 auto;
  }

  body#page.news article#content .news-item__title {
    padding: 12px 16px;
    font-size: 16px;
  }

  body#page.news article#content .news-item__excerpt {
    padding: 0 16px 12px;
    font-size: 14px;
  }

  body#page.news-detail article#content .news-detail-inner {
    padding: 24px;
    border-radius: 6px;
  }

  body#page.news-detail article#content .news-detail__title {
    font-size: 24px;
  }

  body#page.news-detail article#content .news-detail__body h3 {
    font-size: 18px;
  }

  body#page.news-detail article#content .news-navigation {
    flex-direction: column;
    gap: 16px;
  }

  body#page.news-detail article#content .news-navigation > div {
    border-left: 4px solid #c59a2e;
  }
}

/* Dynamic News Loading Styles */
.news-loader,
.news-empty,
.news-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.news-loader__content,
.news-empty__content,
.news-error__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.news-loader__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e5e5;
  border-top-color: #c59a2e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.news-loader__text,
.news-empty__text {
  color: #999;
  font-size: 14px;
}

.news-error {
  background: #fee;
  border-left: 4px solid #e74c3c;
  border-radius: 4px;
}

.news-error__icon {
  color: #e74c3c;
  width: 32px;
  height: 32px;
}

.news-error__text {
  color: #c33;
  font-size: 14px;
  line-height: 1.6;
}

.news-empty {
  background: #eef6ff;
  border-left: 4px solid #3498db;
  border-radius: 4px;
}

.news-empty__icon {
  color: #3498db;
  width: 32px;
  height: 32px;
}

.news-empty__text {
  color: #003d99;
  font-size: 14px;
}

/* New Dynamic News Element Styles */
body#page.news article#content .news-item__badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

body#page.news article#content .news-item__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

body#page.news article#content .news-item__badge--new {
  background: #ffebee;
  color: #c33;
}

body#page.news article#content .news-item__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body#page.news article#content .news-item__footer {
  padding: 12px 24px 16px;
  text-align: right;
}

body#page.news article#content .news-item__link {
  color: #c59a2e;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.3s ease;
}

body#page.news article#content .news-item:hover .news-item__link {
  color: #a67c1e;
}

/* Category Filter Styles */
#category-filter-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.news-category__btn {
  padding: 8px 16px;
  border: 2px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-category__btn:hover {
  border-color: #c59a2e;
}

.news-category__btn--active {
  border-color: #c59a2e;
  background: #c59a2e;
  color: #fff;
}

/* Load More Button Styles */
#load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 30px;
}

.news-load-more__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid #c59a2e;
  background: #c59a2e;
  color: #fff;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-load-more__button:hover {
  background: #a67c1e;
  border-color: #a67c1e;
  transform: translateY(-2px);
}

.news-load-more__loader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  color: #c59a2e;
  font-weight: 600;
  font-size: 14px;
}

.news-load-more__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e5e5;
  border-top-color: #c59a2e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

