/* Premium News / Blog Module Styles */

/* Hero / Search area */
.news-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(0, 163, 108, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.news-hero .container {
  position: relative;
  z-index: 1;
}

.news-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 16px 0 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.news-hero p {
  color: rgba(255,255,255,0.85);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.7;
}

.news-hero .eyebrow {
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.35);
}

/* Premium search box */
.toolbar-search {
  width: 100%;
  max-width: 460px;
}

.toolbar-search .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-field {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  gap: 8px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-field:focus-within {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 4px rgba(33, 63, 118, 0.12);
}

.search-field-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-field-icon svg {
  width: 100%;
  height: 100%;
}

.search-field input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.search-field input::placeholder {
  color: var(--muted);
}

.search-field button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--navy-700);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.search-field button:hover {
  background: var(--navy-900);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 28, 63, 0.22);
}

.search-field button:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.search-field button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .search-field input {
    min-width: 0;
  }
}

/* Category chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  background: rgba(255,255,255,0.08);
  transition: all 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
  background: #fff !important;
  color: var(--navy-900) !important;
  border-color: #fff !important;
}

/* Section */
.news-section {
  padding: 64px 16px;
  background: var(--surface);
}

@media (min-width: 768px) {
  .news-section {
    padding: 64px 0;
  }
}

.news-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
}

.news-main {
  min-width: 0;
}

/* Featured article */
.featured-article {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  margin-bottom: 48px;
}

.featured-image {
  display: block;
  overflow: hidden;
  min-height: 360px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-article:hover .featured-image img {
  transform: scale(1.04);
}

.featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-body h2 {
  font-size: 2rem;
  margin: 16px 0;
  color: var(--navy-900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.featured-body h2 a {
  color: inherit;
  text-decoration: none;
}

.featured-body h2 a:hover {
  color: var(--green-600);
}

.featured-body p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .featured-article {
    grid-template-columns: 1fr;
  }
  .featured-image {
    min-height: 220px;
  }
}

/* Sort toolbar */
.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .news-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .toolbar-search {
    max-width: none;
  }
  .sort-box {
    justify-content: space-between;
    width: 100%;
  }
  .sort-box select {
    flex: 1;
  }
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.sort-box select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  outline: none;
}

/* Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.news-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.news-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.news-image {
  display: block;
  height: auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--surface);
}

.news-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-body h3 {
  font-size: 1.15rem;
  margin: 12px 0;
  color: var(--navy-900);
  line-height: 1.35;
  font-weight: 700;
}

.news-card-body h3 a {
  color: inherit;
  text-decoration: none;
}

.news-card-body h3 a:hover {
  color: var(--green-600);
}

.news-card-body p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Meta */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.category-pill {
  display: inline-block;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.read-more:hover {
  color: #fff;
  background: var(--navy-700);
  border-color: var(--navy-700);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination a {
  background: var(--navy-700);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.pagination a:hover {
  background: var(--navy-900);
}

.page-info {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Sidebar */
.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-block {
  background: #fff;
  padding: 28px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-block h4 {
  margin: 0 0 18px;
  color: var(--navy-900);
  font-size: 1.1rem;
  font-weight: 700;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li + li {
  border-top: 1px solid var(--line);
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  transition: color 0.2s;
}

.category-list a:hover,
.category-list a.active {
  color: var(--green-600);
}

.category-list a::after {
  content: "→";
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.category-list a:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

.sidebar-news {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-news li a {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.sidebar-news li a:hover {
  color: var(--green-600);
}

.sidebar-news img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.newsletter input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  outline: none;
}

.newsletter input:focus {
  border-color: var(--navy-700);
}

/* Article detail */
.article-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 80px 0;
  color: #fff;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 28, 63, 0.95) 0%, rgba(10, 28, 63, 0.6) 50%, rgba(10, 28, 63, 0.3) 100%);
  z-index: 1;
}

.article-hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.article-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 900px;
  margin: 20px 0 24px;
  letter-spacing: -0.02em;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}

.article-breadcrumb a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.article-breadcrumb .current {
  color: rgba(255,255,255,0.6);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-hero-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.author-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
}

.author-hero-info strong {
  display: block;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.2;
}

.author-hero-info span {
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
}

.article-hero .meta-row {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.article-hero .category-pill {
  background: var(--green-600);
}

.article-section {
  padding: 64px 0;
  background: #fff;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.article-main {
  min-width: 0;
}

.article-excerpt {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--green-600);
}

.article-featured-image {
  margin: 0 0 40px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content {
  color: var(--ink);
  line-height: 1.9;
  font-size: 1.08rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.article-content th,
.article-content td {
  border: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.article-content th {
  background: var(--surface);
  font-weight: 700;
  color: var(--navy-900);
}

.article-content tbody tr:nth-child(even) {
  background: #fafbfc;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--navy-900);
  margin-top: 40px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-content h2 {
  font-size: 1.7rem;
}

.article-content p {
  margin-bottom: 22px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 22px;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content img {
  max-width: 100%;
  border-radius: 16px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.article-content a {
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  border-left: 4px solid var(--green-600);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--surface);
  border-radius: 0 16px 16px 0;
  font-style: italic;
  color: var(--navy-900);
}

.article-tags {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.article-tags h4 {
  margin-bottom: 14px;
  color: var(--navy-900);
  font-size: 1.05rem;
}

.tag-link {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
  padding: 8px 16px;
  background: var(--navy-100);
  color: var(--navy-700);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.tag-link:hover {
  background: var(--navy-700);
  color: #fff;
}

.article-share {
  margin-top: 32px;
}

.article-share h4 {
  margin-bottom: 14px;
  color: var(--navy-900);
  font-size: 1.05rem;
}

.article-share a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  margin-bottom: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--navy-700);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.article-share a:hover {
  background: var(--navy-700);
  color: #fff;
  border-color: var(--navy-700);
}

.article-nav {
  margin-top: 40px;
}

.author-card {
  text-align: center;
}

.author-card .author-info {
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy-100);
}

.author-info strong {
  display: block;
  color: var(--navy-900);
  font-size: 1.05rem;
}

.author-info span {
  font-size: 0.9rem;
  color: var(--muted);
}

.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.related-articles h2 {
  color: var(--navy-900);
  margin-bottom: 28px;
  font-size: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.empty-state h3 {
  color: var(--navy-900);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .news-hero {
    padding: 64px 0 48px;
  }

  .news-hero h1 {
    font-size: 1.9rem;
  }

  .news-hero p {
    font-size: 1rem;
  }

  .category-chips {
    gap: 8px;
    margin-top: 20px;
  }

  .category-chip {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .news-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .featured-article {
    border-radius: 16px;
  }

  .featured-body {
    padding: 24px;
  }

  .featured-body h2 {
    font-size: 1.45rem;
  }

  .news-card-body {
    padding: 20px;
  }

  .article-hero {
    min-height: 300px;
    padding: 48px 0;
  }

  .article-hero h1 {
    font-size: 1.7rem;
    margin: 12px 0 18px;
  }

  .article-breadcrumb {
    font-size: 0.78rem;
    gap: 6px;
  }

  .article-breadcrumb .current {
    max-width: 140px;
  }

  .article-hero-author {
    margin-top: 12px;
  }

  .article-section {
    padding: 32px 0;
  }

  .article-excerpt {
    font-size: 1.05rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 1.35rem;
    margin-top: 28px;
    margin-bottom: 16px;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  .article-featured-image {
    border-radius: 12px;
    margin-bottom: 28px;
  }

  .article-content img {
    border-radius: 12px;
  }

  .article-content blockquote {
    padding: 16px 18px;
    margin: 24px 0;
  }

  .related-articles h2 {
    font-size: 1.25rem;
  }
}
