/* Texts Page Styles */

.texts-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 4rem 0;
}

/* Sidebar filter */
.texts-sidebar {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  height: max-content;
  position: sticky;
  top: 100px;
}

.search-box {
  margin-bottom: 2rem;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-text);
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-group {
  margin-bottom: 2rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 0.5rem;
}

.filter-list {
  list-style: none;
}

.filter-list li {
  margin-bottom: 0.5rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.filter-checkbox:hover {
  color: var(--primary-color);
}

/* Texts List */
.texts-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.text-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.text-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border-color: var(--accent-color);
}

.tc-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--bg-color);
  color: var(--accent-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.text-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.text-card h2 a {
  color: var(--primary-color);
}

.text-card h2 a:hover {
  color: var(--accent-color);
}

.tc-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tc-excerpt {
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Reading Page */
.reading-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  min-height: 100vh;
}

.reading-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.reading-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.reading-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.font-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.font-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-main);
}

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

.reading-content {
  font-family: var(--font-text);
  font-size: 1.1rem; /* default */
  line-height: 1.8;
  color: #1a1a1a;
  transition: font-size 0.3s ease;
}

.reading-content p {
  margin-bottom: 1.8rem;
}

.reading-content h3 {
  font-size: 1.5em;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.reading-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1em;
}

@media (max-width: 900px) {
  .texts-layout {
    grid-template-columns: 1fr;
  }
  
  .texts-sidebar {
    position: static;
  }
  
  .reading-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
