/* =====================================================
   FSY-HOT News Page
   Listing + pagination + detail template
   ===================================================== */

[hidden] {
  display: none !important;
}


/* ============== Listing Page Hero ============== */
.news-hero {
  position: relative;
  padding: calc(var(--space-xxl, 80px) + var(--space-xl, 48px)) 0 var(--space-xxl, 80px);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 180, 216, 0.18), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(26, 115, 232, 0.22), transparent 55%),
    linear-gradient(135deg, #0f1a2e 0%, #1a1a2e 60%, #1a2a44 100%);
  color: var(--color-white, #ffffff);
  overflow: hidden;
  isolation: isolate;
}

.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

.news-hero::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  right: -180px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.35), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

.news-hero .breadcrumb-item a,
.news-hero .breadcrumb-item {
  color: rgba(255, 255, 255, 0.65);
}

.news-hero .breadcrumb-item a:hover {
  color: var(--color-accent, #00b4d8);
}

.news-hero .breadcrumb-item.active {
  color: var(--color-accent, #00b4d8);
}

.news-hero-inner {
  max-width: 720px;
  position: relative;
}

.news-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding: 6px 14px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent, #00b4d8);
  background-color: rgba(0, 180, 216, 0.12);
  border: 1px solid rgba(0, 180, 216, 0.35);
  border-radius: var(--border-radius-full, 9999px);
  margin-bottom: var(--space-lg, 24px);
}

.news-hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent, #00b4d8);
  box-shadow: 0 0 8px var(--color-accent, #00b4d8);
}

.news-hero h1 {
  font-size: clamp(2rem, 4vw, var(--font-size-5xl, 48px));
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md, 16px);
  color: var(--color-white, #ffffff);
}

.news-hero p {
  font-size: var(--font-size-lg, 18px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
}


/* ============== Filters Row ============== */
.news-section {
  padding: var(--space-xl, 48px) 0 var(--space-xxl, 80px);
  background-color: var(--color-white, #ffffff);
}

.news-filters {
  position: sticky;
  top: 70px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md, 16px);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: var(--border-radius-lg, 16px);
  padding: var(--space-sm, 8px) var(--space-md, 16px);
  margin-bottom: var(--space-xl, 48px);
  max-width: 100%;
  overflow: hidden;
}

.news-filters .filter-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.news-filters .filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-sm, 8px);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border, #e0e0e0) transparent;
  padding-bottom: 2px;
  margin: 0;
  list-style: none;
  min-width: 0;
  max-width: 100%;
}

.news-filters .filter-tabs::-webkit-scrollbar {
  height: 4px;
}

.news-filters .filter-tabs::-webkit-scrollbar-thumb {
  background: var(--color-border, #e0e0e0);
  border-radius: var(--border-radius-full, 9999px);
}

.filter-tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  min-height: 40px;
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  color: var(--color-text, #333333);
  background-color: var(--color-bg-light, #f5f7fa);
  border: 1px solid transparent;
  border-radius: var(--border-radius-full, 9999px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  white-space: nowrap;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
}

.filter-tab:hover {
  color: var(--color-primary, #1a73e8);
  border-color: var(--color-primary-light, #e8f0fe);
  background-color: var(--color-white, #ffffff);
}

.filter-tab.active {
  color: var(--color-white, #ffffff);
  background-color: var(--color-primary, #1a73e8);
  border-color: var(--color-primary, #1a73e8);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.28);
}

.filter-tab .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 6px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 700;
  border-radius: var(--border-radius-full, 9999px);
  background-color: rgba(255, 255, 255, 0.22);
  color: inherit;
}

.filter-tab:not(.active) .filter-count {
  background-color: var(--color-bg-section, #eef2f7);
  color: var(--color-text-muted, #666666);
}

.news-total {
  flex: 0 0 auto;
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  color: var(--color-text-muted, #666666);
  white-space: nowrap;
  padding-left: var(--space-md, 16px);
  border-left: 1px solid var(--color-border, #e0e0e0);
}


/* ============== News Grid ============== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg, 24px);
  align-items: stretch;
}

.news-grid--related {
  margin-top: 0;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white, #ffffff);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: var(--border-radius-lg, 16px);
  overflow: hidden;
  transition: transform var(--transition-normal, 0.3s ease),
              box-shadow var(--transition-normal, 0.3s ease),
              border-color var(--transition-normal, 0.3s ease);
  text-decoration: none;
  color: inherit;
  height: 100%;
  opacity: 0;
  transform: translateY(20px);
  animation: newsCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes newsCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary-light, #e8f0fe);
  color: inherit;
}

.news-card .news-card-img {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-light, #e8f0fe), var(--color-bg-section, #eef2f7));
}

.news-card .news-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow, 0.5s ease);
}

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

.news-card .news-card-category {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-white, #ffffff);
  background-color: rgba(26, 26, 46, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--border-radius-full, 9999px);
  z-index: 2;
}

.news-card .news-card-body {
  padding: var(--space-lg, 24px);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card .news-card-date {
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  color: var(--color-text-muted, #666666);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm, 8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-card .news-card-date::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent, #00b4d8);
}

.news-card .news-card-title {
  font-size: var(--font-size-lg, 18px);
  color: var(--color-dark, #1a1a2e);
  margin-bottom: var(--space-sm, 8px);
  font-weight: 700;
  line-height: 1.4;
  transition: color var(--transition-fast, 0.2s ease);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card-title {
  color: var(--color-primary, #1a73e8);
}

.news-card .news-card-summary {
  font-size: var(--font-size-sm, 14px);
  color: var(--color-text-muted, #666666);
  line-height: 1.6;
  margin-bottom: var(--space-md, 16px);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  color: var(--color-primary, #1a73e8);
  margin-top: auto;
  transition: gap var(--transition-fast, 0.2s ease);
}

.news-card:hover .news-card-link {
  gap: 10px;
  color: var(--color-primary-dark, #1557b0);
}

.news-card .news-card-link::after {
  content: "→";
  font-size: var(--font-size-base, 16px);
  line-height: 1;
}


/* ============== Empty State ============== */
.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xxl, 80px) var(--space-md, 16px);
  background-color: var(--color-bg-light, #f5f7fa);
  border: 1px dashed var(--color-border, #e0e0e0);
  border-radius: var(--border-radius-lg, 16px);
}

.news-empty .empty-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg, 24px);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light, #e8f0fe), var(--color-bg-section, #eef2f7));
  color: var(--color-primary, #1a73e8);
  font-size: 32px;
  font-weight: 700;
}

.news-empty .empty-title {
  font-size: var(--font-size-xl, 20px);
  font-weight: 700;
  color: var(--color-dark, #1a1a2e);
  margin-bottom: var(--space-sm, 8px);
}

.news-empty .empty-hint {
  font-size: var(--font-size-base, 16px);
  color: var(--color-text-muted, #666666);
  max-width: 420px;
}


/* ============== Loading State ============== */
.news-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxl, 80px) 0;
  color: var(--color-text-muted, #666666);
  font-size: var(--font-size-base, 16px);
  gap: var(--space-sm, 8px);
}

.news-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border, #e0e0e0);
  border-top-color: var(--color-primary, #1a73e8);
  border-radius: 50%;
  animation: newsSpin 0.8s linear infinite;
}

@keyframes newsSpin {
  to { transform: rotate(360deg); }
}


/* ============== Detail Page Hero ============== */
.news-detail-hero {
  position: relative;
  padding: calc(var(--space-xxl, 80px) + var(--space-xl, 48px)) 0 var(--space-xl, 48px);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 180, 216, 0.18), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(26, 115, 232, 0.22), transparent 55%),
    linear-gradient(135deg, #0f1a2e 0%, #1a1a2e 60%, #1a2a44 100%);
  color: var(--color-white, #ffffff);
  overflow: hidden;
  isolation: isolate;
}

.news-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

.news-detail-hero .breadcrumb-item a,
.news-detail-hero .breadcrumb-item {
  color: rgba(255, 255, 255, 0.65);
}

.news-detail-hero .breadcrumb-item a:hover {
  color: var(--color-accent, #00b4d8);
}

.news-detail-hero .breadcrumb-item.active {
  color: var(--color-accent, #00b4d8);
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ============== Detail Layout ============== */
.news-detail {
  padding: var(--space-xxl, 80px) 0;
  background-color: var(--color-white, #ffffff);
}

.news-detail-grid {
  max-width: 880px;
  margin: 0 auto;
}

.news-detail-header {
  margin-bottom: var(--space-xl, 48px);
  text-align: left;
}

.news-detail-category {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary, #1a73e8);
  background-color: var(--color-primary-light, #e8f0fe);
  border-radius: var(--border-radius-full, 9999px);
  margin-bottom: var(--space-md, 16px);
}

.news-detail-title {
  font-size: clamp(1.75rem, 3.2vw, var(--font-size-4xl, 40px));
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-dark, #1a1a2e);
  margin-bottom: var(--space-md, 16px);
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm, 8px);
  font-size: var(--font-size-sm, 14px);
  color: var(--color-text-muted, #666666);
}

.news-detail-date,
.news-detail-author {
  font-weight: 500;
}

.news-detail-meta-sep {
  color: var(--color-text-muted, #666666);
  opacity: 0.6;
}

.news-detail-figure {
  margin: 0 0 var(--space-xl, 48px);
  border-radius: var(--border-radius-lg, 16px);
  overflow: hidden;
  background-color: var(--color-bg-light, #f5f7fa);
  border: 1px solid var(--color-border, #e0e0e0);
}

.news-detail-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-detail-summary {
  font-size: var(--font-size-lg, 18px);
  line-height: 1.7;
  font-weight: 500;
  color: var(--color-text, #333333);
  background-color: var(--color-primary-light, #e8f0fe);
  border-left: 4px solid var(--color-primary, #1a73e8);
  border-radius: 0 var(--border-radius-md, 8px) var(--border-radius-md, 8px) 0;
  padding: var(--space-md, 16px) var(--space-lg, 24px);
  margin-bottom: var(--space-xl, 48px);
}

.news-detail-content {
  font-size: var(--font-size-base, 16px);
  line-height: 1.85;
  color: var(--color-text, #333333);
}

.news-detail-content p {
  margin-bottom: var(--space-lg, 24px);
}

.news-detail-content p:last-child {
  margin-bottom: 0;
}

.news-detail-content p:first-child::first-letter {
  font-size: 1.6em;
  font-weight: 800;
  color: var(--color-primary, #1a73e8);
  float: left;
  line-height: 1;
  padding: 4px 8px 0 0;
}

.news-detail-actions {
  margin-top: var(--space-xl, 48px);
  padding-top: var(--space-xl, 48px);
  border-top: 1px solid var(--color-border, #e0e0e0);
  display: flex;
  gap: var(--space-md, 16px);
  flex-wrap: wrap;
}


/* ============== Prev/Next Navigation ============== */
.news-prev-next {
  max-width: 880px;
  margin: var(--space-xl, 48px) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md, 16px);
}

.news-prev-next-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-md, 16px) var(--space-lg, 24px);
  background-color: var(--color-bg-light, #f5f7fa);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: var(--border-radius-md, 8px);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast, 0.2s ease);
  min-height: 80px;
}

.news-prev-next-link:hover {
  background-color: var(--color-primary-light, #e8f0fe);
  border-color: var(--color-primary, #1a73e8);
  color: var(--color-primary-dark, #1557b0);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.news-prev-next-link.next {
  text-align: right;
  align-items: flex-end;
}

.news-prev-next-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary, #1a73e8);
}

.news-prev-next-link.prev .news-prev-next-label::before {
  content: "←";
  font-size: var(--font-size-base, 16px);
  line-height: 1;
}

.news-prev-next-link.next .news-prev-next-label::after {
  content: "→";
  font-size: var(--font-size-base, 16px);
  line-height: 1;
}

.news-prev-next-title {
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  color: var(--color-dark, #1a1a2e);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ============== Related News ============== */
.news-related {
  background-color: var(--color-bg-section, #eef2f7);
  padding: var(--space-xxl, 80px) 0;
}

.news-related .section-title {
  margin-bottom: var(--space-xl, 48px);
}


/* ============== Error State ============== */
.news-error {
  padding: var(--space-xxl, 80px) 0;
  text-align: center;
  background-color: var(--color-white, #ffffff);
}

.news-error .error-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-lg, 24px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light, #e8f0fe), var(--color-bg-section, #eef2f7));
  color: var(--color-primary, #1a73e8);
  font-size: 44px;
  font-weight: 700;
}

.news-error h2 {
  font-size: var(--font-size-2xl, 24px);
  font-weight: 700;
  color: var(--color-dark, #1a1a2e);
  margin-bottom: var(--space-md, 16px);
}

.news-error p {
  font-size: var(--font-size-base, 16px);
  color: var(--color-text-muted, #666666);
  max-width: 480px;
  margin: 0 auto var(--space-lg, 24px);
}

.news-error .error-actions {
  display: flex;
  gap: var(--space-md, 16px);
  justify-content: center;
  flex-wrap: wrap;
}


/* ============== Responsive ============== */
@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .news-total {
    border-left: none;
    border-top: 1px solid var(--color-border, #e0e0e0);
    padding-left: 0;
    padding-top: var(--space-sm, 8px);
  }
}

@media (max-width: 768px) {
  .news-filters {
    top: 60px;
  }
  .news-hero {
    padding-top: var(--space-xl, 48px);
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-card .news-card-body {
    padding: var(--space-md, 16px);
  }
  .news-prev-next {
    grid-template-columns: 1fr;
  }
  .news-detail-title {
    font-size: var(--font-size-2xl, 24px);
  }
  .news-detail-content p:first-child::first-letter {
    font-size: 1.4em;
  }
}

@media (max-width: 576px) {
  .news-detail-summary {
    padding: var(--space-md, 16px);
    font-size: var(--font-size-base, 16px);
  }
  .news-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .news-detail-actions .btn {
    width: 100%;
  }
  .news-error .error-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .news-error .error-actions .btn {
    width: 100%;
  }
}
