/*
Theme Name: Fsoft-news
Description: Tin tức và xu hướng công nghệ
Author: ChatGPT
Version: 2.9
*/

/* Reset and basic styles */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  background-color: #f7f7f7;
  color: #1f2937; /* Tailwind's gray‑800 equivalent */
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  /* Make the container span full width with horizontal padding,
     similar to the original React design. */
  width: 100%;
  max-width: 1400px;
  /* Center the container horizontally */
  margin-left: auto;
  margin-right: auto;
  /* Tailwind's container uses 2rem horizontal padding */
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb; /* Tailwind's gray‑200 */
  padding: 1rem 0;
}
.site-header .site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827; /* gray‑900 */
}
.site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
.site-header nav a {
  color: #374151; /* gray‑700 */
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-header nav a:hover {
  color: #111827; /* gray‑900 */
}

/* Breaking news banner */
.breaking-banner {
  background: linear-gradient(to right, #be123c, #e11d48); /* red gradient */
  color: #ffffff;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}
.breaking-banner .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  margin-right: 0.75rem;
}
.breaking-banner .banner-text {
  display: inline-block;
}

/* Main layout */
.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 1024px) {
  .content-area {
    grid-template-columns: 3fr 1fr;
  }
}

/* Featured news */
.featured-article {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.featured-article img {
  width: 100%;
  height: auto;
  display: block;
}
.featured-article .content {
  padding: 1.25rem;
}
.featured-article .category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #be123c;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.featured-article h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}
.featured-article p {
  margin: 0 0 1rem 0;
  color: #4b5563;
}
.featured-article .meta {
  font-size: 0.75rem;
  color: #6b7280;
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1280px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.news-card {
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.news-card .content {
  padding: 1rem;
  flex: 1;
}
.news-card .category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #be123c;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.news-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}
.news-card p {
  margin: 0 0 0.75rem 0;
  color: #4b5563;
  font-size: 0.875rem;
}
.news-card .meta {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Sidebar */
.sidebar {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar ul li {
  margin-bottom: 0.5rem;
}
.sidebar ul li a {
  color: #374151;
  transition: color 0.2s ease;
}
.sidebar ul li a:hover {
  color: #be123c;
}

/* Footer */
.site-footer {
  background: #1f2937; /* gray‑800 */
  color: #ffffff;
  padding: 2rem 0;
  margin-top: 3rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.site-footer p {
  margin: 0;
  font-size: 0.875rem;
}

/* Enhanced Typography for Post Content */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: #111827;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-content h1 {
  font-size: 2.25rem;
}

.article-content h2 {
  font-size: 1.875rem;
}

.article-content h3 {
  font-size: 1.5rem;
}

.article-content h4 {
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.article-content blockquote {
  border-left: 4px solid #be123c;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.25rem;
  color: #4b5563;
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: #be123c;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #e11d48;
}

.article-content img {
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-content code {
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #be123c;
}

.article-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Comment Styles */
.comment-item {
  transition: all 0.2s ease;
}

.comment-item:hover {
  background: #f3f4f6 !important;
}

.comment-reply-link {
  transition: all 0.2s ease;
}

.comment-reply-link:hover {
  background: rgba(190, 18, 60, 0.1);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
}

/* Share buttons hover effects */
.share-button {
  transition: all 0.2s ease;
}

.share-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Related posts hover effects */
.related-post-card {
  transition: all 0.3s ease;
}

.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shadow utilities */
.shadow-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* News primary color */
.text-news-primary {
  color: #be123c;
}

.bg-news-primary {
  background-color: #be123c;
}

.border-news-primary {
  border-color: #be123c;
}

.bg-news-primary\/10 {
  background-color: rgba(190, 18, 60, 0.1);
}

.hover\:bg-news-primary\/90:hover {
  background-color: rgba(190, 18, 60, 0.9);
}

.focus\:ring-news-primary:focus {
  --tw-ring-color: #be123c;
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1);
}

/* Content Typography Improvements */
.prose {
  color: #374151;
  max-width: none;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #111827;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h1 {
  font-size: 2.25rem;
  margin-top: 0;
}

.prose h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.5rem;
}

.prose h4 {
  font-size: 1.25rem;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  text-align: justify;
}

.prose ul, .prose ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.prose blockquote {
  border-left: 4px solid #3b82f6;
  background-color: #f8fafc;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #64748b;
}

.prose img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
}

.prose a {
  color: #3b82f6;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #1d4ed8;
}

.prose code {
  background-color: #f1f5f9;
  color: #e11d48;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #1e293b;
  color: #f1f5f9;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid #e5e7eb;
}

.prose th, .prose td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.prose th {
  background-color: #f9fafb;
  font-weight: 600;
}

.prose hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 3rem 0;
}

/* Page content specific styles */
.page-content.prose {
  font-size: 1.125rem;
  line-height: 1.75;
}

.article-content.prose {
  font-size: 1.125rem;
  line-height: 1.75;
}

/* Page links styling */
.page-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-links span {
  cursor: pointer;
}

/* Pagination Styles */
.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.pagination-nav .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pagination-nav .page-numbers:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
}

.pagination-nav .page-numbers.current {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
}

.pagination-nav .page-numbers.current:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  transform: none;
}

.pagination-nav .page-numbers.prev,
.pagination-nav .page-numbers.next {
  padding: 0.5rem 1rem;
  font-weight: 600;
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.pagination-nav .page-numbers.prev:hover,
.pagination-nav .page-numbers.next:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.pagination-nav .page-numbers.dots {
  border: none;
  background: none;
  color: #9ca3af;
  cursor: default;
  box-shadow: none;
  font-weight: 600;
}

.pagination-nav .page-numbers.dots:hover {
  background: none;
  border: none;
  color: #9ca3af;
  transform: none;
  box-shadow: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
  /* Reduce container padding on mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Reduce content area gap */
  .content-area {
    gap: 1rem;
    margin-top: 1rem;
  }
  
  /* Reduce featured article padding */
  .featured-article .content {
    padding: 1rem;
  }
  
  /* Reduce news card padding */
  .news-card .content {
    padding: 0.75rem;
  }
  
  /* Reduce news grid gap */
  .news-grid {
    gap: 1rem;
  }
  
  /* Reduce post content padding and margins */
  .article-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .article-content h1,
  .article-content h2,
  .article-content h3,
  .article-content h4,
  .article-content h5,
  .article-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .article-content h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
  }
  
  .article-content h3 {
    font-size: 1.25rem;
  }
  
  .article-content p {
    margin-bottom: 1rem;
    text-align: left;
  }
  
  .article-content blockquote {
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 1rem;
  }
  
  /* Fix post title display on mobile */
  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  /* Reduce post container padding */
  .bg-white.rounded-xl.shadow-card.p-8 {
    padding: 1rem !important;
  }
  
  /* Reduce featured image section padding */
  .absolute.bottom-0.left-0.right-0.p-6 {
    padding: 1rem !important;
  }

  .prose {
    font-size: 1rem;
  }
  
  .prose h1 {
    font-size: 1.875rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .prose p {
    text-align: left;
  }
  
  .prose ul, .prose ol {
    padding-left: 1.5rem;
  }
  
  .prose blockquote {
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }
  
  .prose pre {
    padding: 1rem;
    font-size: 0.875rem;
  }

  /* Mobile pagination */
  .pagination-nav {
    gap: 0.25rem;
    margin: 1.5rem 0;
    padding: 0.75rem 0;
  }
  
  .pagination-nav .page-numbers {
    min-width: 2rem;
    height: 2rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .pagination-nav .page-numbers.prev,
  .pagination-nav .page-numbers.next {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  /* Hide some page numbers on very small screens */
  @media (max-width: 480px) {
    .pagination-nav .page-numbers:not(.prev):not(.next):not(.current):not(.dots) {
      display: none;
    }
    
    .pagination-nav .page-numbers:not(.prev):not(.next):not(.current):not(.dots):nth-child(-n+2),
    .pagination-nav .page-numbers:not(.prev):not(.next):not(.current):not(.dots):nth-last-child(-n+2) {
      display: inline-flex;
    }
  }
}

/* Hide featured post description on very small screens */
@media (max-width: 520px) {
  .text-white\/90.mb-4.line-clamp-2 {
    display: none !important;
  }
}