/* ===== Base Styles ===== */
body {
  background-color: #f9f9f7;
  color: #222;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ===== Newspaper Template ===== */
.newspaper-template {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* ===== Masthead Styles ===== */
.newspaper-masthead {
  text-align: center;
  border-bottom: 3px double #000;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.newspaper-masthead h1 {
  font-size: 3rem;
  margin: 0.5rem 0 0;
  letter-spacing: 1px;
  font-weight: normal;
  text-transform: uppercase;
}

.newspaper-url {
  font-style: italic;
  color: #555;
  margin: 0.3rem 0;
}

.newspaper-tagline {
  font-style: italic;
  margin: 0.3rem 0;
}

.newspaper-since {
  font-style: italic;
  color: #777;
  margin: 0.3rem 0;
}

/* ===== Article Content ===== */
.newspaper-article {
  margin-top: 1.5rem;
}

.article-featured-img {
  margin: 1.5rem 0;
  text-align: center;
}

.article-featured-img img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.img-caption {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

.headline {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 1.5rem 0 0.5rem;
  text-align: center;
  font-weight: bold;
}

.subhead {
  font-size: 1.3rem;
  text-align: center;
  font-weight: normal;
  color: #555;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* ===== Article Body ===== */
.article-body {
  font-size: 1.1rem;
}

.article-body p {
  margin-bottom: 1.2rem;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.first-paragraph {
  font-size: 1.2rem;
  line-height: 1.7;
}

.drop-cap {
  float: left;
  font-size: 4rem;
  line-height: 0.8;
  padding: 0.5rem 0.5rem 0 0;
  font-weight: bold;
}

/* ===== Article Footer ===== */
.article-footer {
  border-top: 1px dashed #aaa;
  margin-top: 2rem;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
}

.author {
  font-weight: bold;
}

.author-bio {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.3rem;
}

.publish-date {
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
}

/* ===== Social Sharing ===== */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-share span {
  font-style: italic;
  color: #666;
}

.social-icon {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  color: white;
  font-style: normal;
  transition: opacity 0.3s;
}

.social-icon:hover {
  opacity: 0.9;
}

.twitter {
  background-color: #1da1f2;
}
.facebook {
  background-color: #4267b2;
}
.linkedin {
  background-color: #0077b5;
}

/* ===== Related Articles ===== */
.related-articles {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.related-articles h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-article {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s;
}

.related-article:hover {
  transform: translateY(-3px);
}

.related-article img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  border: 1px solid #eee;
}

.related-article h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .newspaper-template {
    padding: 1rem;
  }

  .newspaper-masthead h1 {
    font-size: 2.2rem;
  }

  .headline {
    font-size: 1.8rem;
  }

  .subhead {
    font-size: 1.1rem;
  }

  .article-footer {
    flex-direction: column;
  }

  .social-share {
    justify-content: flex-start;
    margin-top: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Print Styles ===== */
@media print {
  body {
    background: none;
    font-size: 12pt;
  }

  .newspaper-template {
    max-width: 100%;
    padding: 0;
    box-shadow: none;
  }

  .social-share,
  .related-articles {
    display: none;
  }

  .article-body p {
    text-align: left;
    -webkit-hyphens: none;
    hyphens: none;
  }
}
.article-page {
  background-color: #f8f9fa;
  color: #333;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

.article-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Featured Article Slider */
.featured-articles {
  margin-bottom: 3rem;
}

.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.mySlides {
  display: none;
  position: relative;
}

.mySlides.active {
  display: block;
}

.slide-content {
  position: relative;
}

.article-img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.5s;
}

.read-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.read-overlay i {
  color: white;
  font-size: 3rem;
  background: rgba(8, 111, 182, 0.8);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-img:hover .read-overlay {
  opacity: 1;
}

.article-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 1.5rem;
  color: white;
}

.featured-badge {
  display: inline-block;
  background: #e63946;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
}

.article-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.article-meta i {
  margin-right: 0.3rem;
}

.read-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #086fb6;
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.read-button:hover {
  background: #065a99;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  -webkit-user-select: none;
  user-select: none;
}

.next {
  right: 20px;
}

.prev {
  left: 20px;
}

.prev:hover,
.next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.dots-container {
  text-align: center;
  padding: 1rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #086fb6;
  transform: scale(1.2);
}

/* Article Content Layout */
.article-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

.section-article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-article-title {
  color: #011131;
  font-size: 1.8rem;
  margin: 0;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #086fb6;
}

.view-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-label {
  font-size: 0.9rem;
  color: #666;
}

.view-option {
  background: none;
  border: 1px solid #ddd;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.view-option.active {
  background: #086fb6;
  color: white;
  border-color: #086fb6;
}

.view-option:hover {
  background: #f0f7fc;
}

/* Articles List View */
.articles-container.list-view .article-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.articles-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.articles-container.grid-view .article-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.articles-container.grid-view .article-image {
  height: 180px;
}

.articles-container.grid-view .article-details {
  padding: 1rem;
}

.article-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-image {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-image:hover img {
  transform: scale(1.05);
}

.article-image:hover .read-overlay {
  opacity: 1;
}

.article-details {
  display: flex;
  flex-direction: column;
}

.article-header {
  margin-bottom: 1rem;
}

.item-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.item-title a {
  color: #011131;
  text-decoration: none;
  transition: color 0.3s;
}

.item-title a:hover {
  color: #086fb6;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
}

.item-meta i {
  margin-right: 0.3rem;
  color: #086fb6;
}

.item-excerpt {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.item-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

.save-button,
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.save-button {
  border: 1px solid #086fb6;
  color: #086fb6;
  background: white;
}

.save-button:hover {
  background: #f0f7fc;
}

.share-button {
  border: 1px solid #666;
  color: #666;
  background: white;
}

.share-button:hover {
  background: #f5f5f5;
}

/* Sidebar Styling */
.article-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  color: #011131;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 0.8rem;
}

.category-list a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #555;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s;
}

.category-list a:hover {
  background: #f0f7fc;
  color: #086fb6;
}

.category-list i {
  width: 20px;
  text-align: center;
  color: #086fb6;
}

.subscribe-form input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.subscribe-form input:focus {
  border-color: #086fb6;
  box-shadow: 0 0 0 3px rgba(8, 111, 182, 0.2);
  outline: none;
}

.subscribe-form button {
  width: 100%;
  padding: 0.8rem;
  background: #086fb6;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.subscribe-form button:hover {
  background: #065a99;
}

.subscribe-options {
  margin-top: 1.5rem;
}

.subscribe-options p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.8rem;
}

.article-platforms {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.platform-button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.platform-button.rss {
  background: #f26522;
  color: white;
}

.platform-button.email {
  background: #34a853;
  color: white;
}

.platform-button.twitter {
  background: #1da1f2;
  color: white;
}

.platform-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.popular-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-article {
  display: flex;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 6px;
  transition: all 0.3s;
}

.popular-article:hover {
  background: #f5f5f5;
}

.popular-image {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}

.popular-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-details {
  flex: 1;
}

.popular-details h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.popular-details h4 a {
  color: #333;
  text-decoration: none;
}

.popular-details h4 a:hover {
  color: #086fb6;
}

.popular-views {
  font-size: 0.8rem;
  color: #666;
}

.popular-views i {
  margin-right: 0.3rem;
  color: #086fb6;
}

/* ===== Comments Section ===== */
.comments-section {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 2px solid #eee;
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comments-title::before {
  content: '\f086';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #086fb6;
}

/* Comment Form */
.comment-form-container {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid #dee2e6;
}

.comment-form-container h5 {
  margin: 0 0 1rem;
  color: #333;
  font-size: 1.1rem;
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #333;
}

.comment-form .required {
  color: #dc3545;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: 0;
  border-color: #086fb6;
  box-shadow: 0 0 0 0.2rem rgba(8, 111, 182, 0.25);
}

.comment-form textarea {
  resize: vertical;
  min-height: 100px;
}

.email-privacy-note {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.3rem;
  font-style: italic;
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.3rem;
}

.submit-comment-btn {
  background: #086fb6;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-comment-btn:hover:not(:disabled) {
  background: #0056b3;
}

.submit-comment-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* Comments Display */
.comments-container {
  margin-top: 1.5rem;
}

.loading-comments {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.loading-comments i {
  margin-right: 0.5rem;
}

.no-comments {
  text-align: center;
  padding: 2rem;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.no-comments i {
  margin-right: 0.5rem;
  color: #086fb6;
}

.comment-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s ease-in-out;
}

.comment-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f3f4;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
}

.comment-author i {
  color: #086fb6;
  font-size: 1.1rem;
}

.comment-date {
  font-size: 0.8rem;
  color: #666;
}

.comment-content {
  color: #333;
  line-height: 1.5;
}

/* Success Message */
.success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-message i {
  color: #28a745;
}

/* Reply Functionality */
.comment-reply {
  margin-left: 2rem;
  position: relative;
}

.reply-indicator {
  color: #086fb6;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.comment-actions {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f3f4;
}

.reply-btn {
  background: none;
  border: 1px solid #086fb6;
  color: #086fb6;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.reply-btn:hover {
  background: #086fb6;
  color: white;
}

.reply-form-container {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.reply-form .form-group {
  margin-bottom: 0.8rem;
}

.reply-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.reply-form input,
.reply-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.reply-form input:focus,
.reply-form textarea:focus {
  outline: 0;
  border-color: #086fb6;
  box-shadow: 0 0 0 0.15rem rgba(8, 111, 182, 0.25);
}

.reply-form textarea {
  resize: vertical;
  min-height: 40px;
  height: 40px;
}

.reply-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.submit-reply-btn {
  background: #086fb6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.submit-reply-btn:hover:not(:disabled) {
  background: #0056b3;
}

.submit-reply-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.cancel-reply-btn {
  background: none;
  border: 1px solid #6c757d;
  color: #6c757d;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.cancel-reply-btn:hover {
  background: #6c757d;
  color: white;
}

.replies-container {
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .comments-section {
    margin: 2rem 0;
    padding: 1rem 0;
  }
  
  .comment-form-container {
    padding: 1rem;
  }
  
  .comment-header {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .comment-date {
    align-self: flex-start;
  }
  
  .comment-reply {
    margin-left: 1rem;
  }
  
  .reply-form-container {
    padding: 0.8rem;
  }
  
  .reply-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .submit-reply-btn,
  .cancel-reply-btn {
    width: 100%;
    justify-content: center;
  }
}