:root {
  --primary-color: #bb1919;
  --secondary-color: #111;
  --accent-color: #f4f4f4;
  --text-dark: #222;
  --text-light: #666;
  --border-color: #ddd;
  --success-color: #28a745;
  --error-color: #dc3545;
  --primary-dark: #8a0d0d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
    font-family: 'AdorshoLipi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
}

/* Header */
.site-header {
  background: var(--secondary-color);
  color: #fff;
  padding: 20px 0;
  margin-bottom: 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  flex: 0 0 auto;
}

.brand h1 {
  font-size: 28px;
  margin-bottom: 5px;
  margin-top: 0;
}

.brand h1 a {
  color: var(--primary-color);
  text-decoration: none;
}

.brand h1 a:hover {
  color: #ff2828;
}

.tagline {
  font-size: 12px;
  color: #ccc;
  font-weight: normal;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-menu {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #fff;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 15px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 0;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: border-color 0.3s;
  white-space: nowrap;
}

.main-nav a:hover {
  border-bottom-color: var(--primary-color);
}

.search-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.search-bar input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  max-width: 400px;
}

.search-btn {
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Alerts */
.alert {
  max-width: 1200px;
  margin: 20px auto;
  padding: 15px 20px;
  border-radius: 4px;
}

.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Content */
.content-wrapper {
  max-width: 1200px;
  margin: 12px auto;
  padding: 0 20px;
  min-height: calc(100vh - 400px);
}

/* Home Page */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 40px 20px;
  margin-bottom: 40px;
  border-radius: 4px;
  text-align: center;
}

.hero-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.hero-section p {
  font-size: 16px;
  opacity: 0.9;
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 10px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.featured-card {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  background: #fff;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  width: 100%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  margin-bottom: 10px;
  margin-top: 0;
  font-size: 18px;
  line-height: 1.4;
}

.card-content h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.card-content h3 a:hover {
  color: var(--primary-color);
}

.card-summary {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
}

.card-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  margin-top: 0;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
}

.read-more:hover {
  text-decoration: underline;
}

/* Articles List */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.list-item {
  display: flex;
  gap: 20px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: background 0.3s;
  background: #fff;
}

.list-item:hover {
  background: var(--accent-color);
}

.list-image {
  flex: 0 0 150px;
  height: 100px;
  overflow: hidden;
  border-radius: 4px;
}

.list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-content {
  flex: 1;
}

.list-content h4 {
  margin-bottom: 8px;
  margin-top: 0;
  line-height: 1.4;
}

.list-content h4 a {
  color: var(--text-dark);
  text-decoration: none;
}

.list-content h4 a:hover {
  color: var(--primary-color);
}

.list-content p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 8px;
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Article Detail */
.article-detail {
  max-width: 800px;
  margin: 0 auto 60px;
}

.article-header {
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
}

.article-meta-top {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  flex-wrap: wrap;
}

.category-link {
  background: var(--accent-color);
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}

.category-link:hover {
  background: #e8e8e8;
}

.article-detail h1 {
  font-size: 36px;
  margin-bottom: 15px;
  margin-top: 0;
  line-height: 1.3;
}

.article-summary {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 15px;
  margin-top: 0;
}

.article-byline {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

.article-featured-image {
  margin: 30px 0;
  border-radius: 4px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 40px;
}

.article-body p {
  margin-bottom: 15px;
}

.article-body h2,
.article-body h3 {
  margin: 20px 0 10px;
}

.article-tags {
  margin: 30px 0;
  padding: 20px;
  background: var(--accent-color);
  border-radius: 4px;
}

.article-tags h4 {
  margin-bottom: 10px;
  margin-top: 0;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.tag {
  background: var(--secondary-color);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.3s;
  display: inline-block;
}

.tag:hover {
  background: var(--primary-color);
}

/* Related Articles */
.related-articles {
  margin: 40px 0;
  padding: 30px;
  background: var(--accent-color);
  border-radius: 4px;
}

.related-articles h3 {
  margin-bottom: 20px;
  margin-top: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.related-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s;
}

.related-card:hover {
  transform: translateY(-3px);
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.related-card h5 {
  padding: 10px;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.related-card h5 a {
  color: var(--text-dark);
  text-decoration: none;
}

.related-card h5 a:hover {
  color: var(--primary-color);
}

.related-card p {
  padding: 0 10px 10px;
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* Comments */
.comments-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

.comments-section h3 {
  margin-bottom: 30px;
  margin-top: 0;
}

.comment-form {
  background: var(--accent-color);
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 30px;
}

.comment-form h4 {
  margin-bottom: 20px;
  margin-top: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  margin-top: 0;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(187, 25, 25, 0.2);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}

.comment-date {
  color: #999;
}

.comment-body {
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}

.no-comments {
  text-align: center;
  color: var(--text-light);
  padding: 20px;
}

.no-results {
  text-align: center;
  color: var(--text-light);
  padding: 40px 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--primary-color);
}

.btn-small {
  padding: 8px 12px;
  font-size: 12px;
}

.btn-primary {
  background: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success-color);
}

.btn-success:hover {
  background: #1e7e34;
}

.btn-danger {
  background: var(--error-color);
}

.btn-danger:hover {
  background: #bb2d3b;
}

/* Footer */
.site-footer {
  background: var(--secondary-color);
  color: #fff;
  margin-top: 60px;
  padding: 40px 20px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin-bottom: 15px;
  margin-top: 0;
}

.footer-section p {
  margin: 0;
  margin-bottom: 10px;
  color: #ccc;
  font-size: 14px;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  color: #999;
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.pagination {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.admin-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  padding: 30px 20px;
  margin: -20px -20px 30px;
  border-radius: 0 0 4px 4px;
}

.admin-header h2 {
  font-size: 24px;
  margin-bottom: 5px;
  margin-top: 0;
}

.admin-actions {
  margin-bottom: 30px;
}

.articles-table {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.articles-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.articles-table th {
  background: var(--secondary-color);
  color: #fff;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.articles-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.articles-table tbody tr:hover {
  background: var(--accent-color);
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

/* Form Styles */
.form-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 30px 20px;
    margin: -20px -20px 30px;
    border-radius: 0 0 4px 4px;
}

.form-header h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 5px;
}

.article-form {
    max-width: 900px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Comments Table */
.comments-table {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.comments-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.comments-table th {
    background: var(--secondary-color);
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.comments-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comments-table tbody tr:hover {
    background: var(--accent-color);
}

.no-data {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

/* Search and Category Headers */
.search-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 40px 20px;
    margin: -20px -20px 40px;
    border-radius: 0 0 4px 4px;
}

.search-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    margin-top: 0;
}

.search-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.category-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 40px 20px;
    margin: -20px -20px 40px;
    border-radius: 0 0 4px 4px;
}

.category-header h2 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .brand {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .main-nav {
    flex-direction: column;
    gap: 0;
    border-bottom: none;
  }

  .main-nav a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar input {
    max-width: 100%;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .list-item {
    flex-direction: column;
  }

  .list-image {
    flex: 0 0 100%;
    height: 200px;
  }

  .article-detail h1 {
    font-size: 24px;
  }

  .article-summary {
    font-size: 16px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-meta-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 20px;
  }

  .form-row .form-group {
    flex: 1;
  }
}