/* Truth & Tidings Page Styles */

.truthtidings-container {
  padding: 24px 20px 120px;
  min-height: calc(100vh - 90px);
  background: linear-gradient(180deg, #f6f3e2 0%, #eef4fd 100%);
}

/* Header */
.truthtidings-header {
  margin-bottom: 20px;
}

.truthtidings-title {
  font-size: 28px;
  font-weight: 700;
  color: #162b46;
  margin: 0 0 6px;
}

.truthtidings-subtitle {
  color: #5d6483;
  font-size: 15px;
  margin: 0;
}

/* Category Tabs */
.tt-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tt-tab {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,0.7);
  color: #5d6483;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tt-tab:hover {
  background: rgba(255,255,255,0.9);
}

.tt-tab.active {
  background: #1e3a8a;
  color: white;
}

/* Filter Bar */
.tt-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tt-filter-bar select,
.tt-filter-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  background: white;
}

.tt-filter-bar select {
  flex: 0.4;
  min-width: 120px;
}

.tt-filter-bar input {
  flex: 1;
  min-width: 180px;
}

.tt-filter-bar select:focus,
.tt-filter-bar input:focus {
  outline: none;
  border-color: #1e3a8a;
}

/* Articles List */
.tt-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Loading State */
.tt-loading {
  text-align: center;
  padding: 60px 20px;
  color: #5d6483;
}

/* Empty State */
.tt-empty {
  text-align: center;
  padding: 80px 20px;
  color: #5d6483;
}

.tt-empty.hidden {
  display: none;
}

.tt-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.tt-empty h3 {
  font-size: 20px;
  font-weight: 700;
  color: #162b46;
  margin: 0 0 8px;
}

.tt-empty p {
  margin: 0;
  font-size: 15px;
}

/* Article List Item */
.tt-list-item {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tt-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: #1e3a8a;
}

.tt-list-item.tt-truth {
  border-left: 4px solid #1e3a8a;
}

.tt-list-item.tt-article {
  border-left: 4px solid #059669;
}

.tt-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tt-item-category {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1e3a8a;
  background: rgba(30, 58, 138, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

.tt-list-item.tt-article .tt-item-category {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.tt-item-date {
  font-size: 13px;
  color: #6b7280;
}

.tt-item-title {
  font-size: 18px;
  font-weight: 700;
  color: #162b46;
  margin: 0 0 6px;
  line-height: 1.4;
}

.tt-item-author {
  font-size: 14px;
  color: #5d6483;
  margin: 0 0 10px;
  font-style: italic;
}

.tt-item-summary {
  font-size: 14px;
  color: #4b5563;
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}

/* Modal */
.tt-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tt-modal.hidden {
  display: none;
}

.tt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.tt-article-content {
  position: relative;
  background: white;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tt-article-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 16px;
}

.tt-article-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #374151;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s ease;
}

.tt-article-close:hover {
  background: white;
}

/* Article Hero */
.tt-article-hero {
  position: relative;
  height: 280px;
  margin-top: -56px;
}

.tt-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tt-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
}

.tt-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  color: white;
}

.tt-hero-category {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.tt-hero-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tt-hero-meta {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}

/* Article Text */
.tt-article-text {
  padding: 28px 24px;
  font-size: 16px;
  line-height: 1.8;
  color: #374151;
}

.tt-article-text p {
  margin: 0 0 20px;
}

/* Article Footer */
.tt-article-footer {
  padding: 20px 24px 32px;
  border-top: 1px solid #f3f4f6;
}

.tt-article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tt-tag {
  padding: 8px 14px;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ========== THEME SUPPORT ========== */

/* Dark Theme */
body.dark-theme .truthtidings-container {
  background: #12181f;
}

body.dark-theme .truthtidings-title,
body.dark-theme .tt-hero-title,
body.dark-theme .tt-article-text h2,
body.dark-theme .related-article-title {
  color: #ffffff;
}

body.dark-theme .truthtidings-subtitle,
body.dark-theme .tt-tab,
body.dark-theme .tt-hero-meta,
body.dark-theme .tt-article-text,
body.dark-theme .related-article-date {
  color: #e8e8e8;
}

body.dark-theme .tt-tab {
  background: #2d2d2d;
}

body.dark-theme .tt-tab:hover {
  background: #3d3d3d;
}

body.dark-theme .tt-tab.active {
  background: #3b82f6;
  color: #ffffff;
}

body.dark-theme .tt-article-card,
body.dark-theme .tt-article-detail,
body.dark-theme .tt-article-hero {
  background: #1e1e1e;
  border-color: #3d3d3d;
}

body.dark-theme .tt-article-card:hover {
  background: #2d2d2d;
}

body.dark-theme .tt-filter-bar select,
body.dark-theme .tt-filter-bar input {
  background: #1e1e1e;
  border-color: #3d3d3d;
  color: #e8e8e8;
}

body.dark-theme .tt-tag {
  background: #2d2d2d;
  color: #e8e8e8;
}

body.dark-theme .tt-article-card-title {
  color: #ffffff;
}

body.dark-theme .tt-article-card-meta {
  color: #e8e8e8;
}

body.dark-theme .tt-article-card-excerpt {
  color: #e8e8e8;
}

body.dark-theme .tt-article-footer {
  border-color: #3d3d3d;
}

body.dark-theme .tt-article-detail .tt-article-text {
  color: #e8e8e8;
}

body.dark-theme .related-articles-section {
  background: #1e1e1e;
  border-color: #3d3d3d;
}

body.dark-theme .related-articles-title {
  color: #ffffff;
}

body.dark-theme .related-article-card {
  background: #2d2d2d;
  border-color: #3d3d3d;
}

body.dark-theme .related-article-card:hover {
  background: #3d3d3d;
}

body.dark-theme .tt-list-item {
  background: #1e1e1e;
  border-color: #3d3d3d;
}

body.dark-theme .tt-list-item:hover {
  background: #2d2d2d;
  border-color: #3b82f6;
}

body.dark-theme .tt-item-title {
  color: #ffffff;
}

body.dark-theme .tt-item-author {
  color: #e8e8e8;
}

body.dark-theme .tt-item-summary {
  color: #e8e8e8;
}

body.dark-theme .tt-item-date {
  color: #a0a0a0;
}

body.dark-theme .tt-item-category {
  background: #2d2d2d;
  color: #e8e8e8;
}

body.dark-theme .tt-list-item.tt-truth .tt-item-category {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

body.dark-theme .tt-list-item.tt-article .tt-item-category {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

body.dark-theme .tt-article-content {
  background: #1e1e1e;
}

body.dark-theme .tt-article-content .tt-article-text {
  color: #e8e8e8;
}

body.dark-theme .tt-article-content .tt-article-footer {
  border-color: #3d3d3d;
}

body.dark-theme .tt-article-content .tt-tag {
  background: #2d2d2d;
  color: #e8e8e8;
}

/* Parchment Theme */
body.parchment-theme .truthtidings-container {
  background: #f5e6c8;
}

body.parchment-theme .truthtidings-title,
body.parchment-theme .tt-hero-title,
body.parchment-theme .tt-article-text h2,
body.parchment-theme .related-article-title {
  color: #1a1a1a;
}

body.parchment-theme .truthtidings-subtitle,
body.parchment-theme .tt-tab,
body.parchment-theme .tt-hero-meta,
body.parchment-theme .tt-article-text,
body.parchment-theme .related-article-date {
  color: #3d2914;
}

body.parchment-theme .tt-tab {
  background: #fff8e7;
}

body.parchment-theme .tt-tab:hover {
  background: #f0e6d0;
}

body.parchment-theme .tt-tab.active {
  background: #8b7355;
  color: #ffffff;
}

body.parchment-theme .tt-article-card,
body.parchment-theme .tt-article-detail,
body.parchment-theme .tt-article-hero {
  background: #fff8e7;
  border-color: #d4c4a8;
}

body.parchment-theme .tt-article-card:hover {
  background: #f0e6d0;
}

body.parchment-theme .tt-filter-bar select,
body.parchment-theme .tt-filter-bar input {
  background: #fff8e7;
  border-color: #d4c4a8;
  color: #3d2914;
}

body.parchment-theme .tt-tag {
  background: #f0e6d0;
  color: #3d2914;
}

body.parchment-theme .tt-list-item {
  background: #fff8e7;
  border-color: #d4c4a8;
}

body.parchment-theme .tt-list-item:hover {
  background: #f0e6d0;
  border-color: #8b7355;
}

body.parchment-theme .tt-item-title {
  color: #1a1a1a;
}

body.parchment-theme .tt-item-author {
  color: #3d2914;
}

body.parchment-theme .tt-item-summary {
  color: #3d2914;
}

body.parchment-theme .tt-item-date {
  color: #6b7280;
}

body.parchment-theme .tt-item-category {
  background: #f0e6d0;
  color: #3d2914;
}

body.parchment-theme .tt-list-item.tt-truth .tt-item-category {
  background: rgba(59, 130, 246, 0.2);
  color: #1e3a8a;
}

body.parchment-theme .tt-list-item.tt-article .tt-item-category {
  background: rgba(5, 150, 105, 0.2);
  color: #059669;
}

body.parchment-theme .tt-article-content {
  background: #fff8e7;
}

body.parchment-theme .tt-article-content .tt-article-text {
  color: #3d2914;
}

body.parchment-theme .tt-article-content .tt-article-footer {
  border-color: #d4c4a8;
}

body.parchment-theme .tt-article-content .tt-tag {
  background: #f0e6d0;
  color: #3d2914;
}

/* Light Theme */
body.light-theme .truthtidings-container {
  background: #f8fafc;
}

/* Mobile */
@media (max-width: 640px) {
  .truthtidings-title {
    font-size: 24px;
  }
  
  .tt-tabs {
    gap: 6px;
  }
  
  .tt-tab {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .tt-filter-bar {
    flex-direction: column;
  }
  
  .tt-filter-bar select,
  .tt-filter-bar input {
    width: 100%;
  }
  
  .tt-article-hero {
    height: 220px;
  }
  
  .tt-hero-title {
    font-size: 20px;
  }
  
  .tt-article-text {
    font-size: 15px;
    padding: 20px;
  }
}
