/* Trang Tin tức — listing + hero chi tiết */

/* Hero tiêu đề (banner DTSVN) */
.page-news-hero {
  position: relative;
  overflow: hidden;
  background-color: #0E245B;
  padding: 0;
}

.page-news-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 33.33%;
  height: 100%;
  background: linear-gradient(180deg, #2B6BB2 0%, rgba(43, 107, 178, 0) 66.66%);
  pointer-events: none;
}

/* Hero item có menu chia sẻ — không clip popup (overflow:hidden trên hero) */
.page-news-hero:has([data-page-share]) {
  overflow: visible;
  z-index: 15;
}

.page-news-hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(32px, 5vw, 56px) var(--site-gutter-x) clamp(40px, 6vw, 64px);
}

.page-news-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  padding: 0;
  list-style: none;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.page-news-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-news-hero__breadcrumb a:hover {
  color: #ffffff;
}

.page-news-hero__breadcrumb-sep {
  color: rgba(255, 255, 255, 0.45);
}

.page-news-hero__breadcrumb [aria-current="page"] {
  color: rgba(255, 255, 255, 0.9);
}

.page-news-hero__title {
  margin: 0;
  max-width: 40ch;
  font-family: "Lexend", sans-serif;
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3.25rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.page-news-hero__subtitle {
  margin: clamp(10px, 1.5vw, 14px) 0 0;
  max-width: 56ch;
  font-family: "Lexend", sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.page-news-hero__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 24px;
}

.page-news-hero__head-main {
  flex: 1 1 280px;
  min-width: 0;
}

.page-news-hero__head .page-news-hero__title {
  max-width: none;
}

.page-news-hero__share {
  position: relative;
  z-index: 25;
  flex: 0 0 auto;
  margin-left: auto;
}

.page-news-hero__share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: "Lexend", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.page-news-hero__share-btn:hover,
.page-news-hero__share-btn:focus-visible {
  opacity: 0.9;
  outline: none;
}

.page-news-hero__share-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
  border-radius: 6px;
}

.page-news-hero__share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
}

.page-news-hero__share-icon svg {
  display: block;
}

.page-news-hero__share-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  min-width: min(280px, calc(100vw - 40px));
  padding: 12px 0 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow:
    0 12px 40px rgba(10, 29, 77, 0.18),
    0 0 0 1px rgba(10, 29, 77, 0.06);
}

.page-news-hero__share-menu[hidden] {
  display: none !important;
}

.page-news-hero.is-share-open {
  overflow: visible;
  z-index: 200;
}

.page-news-hero.is-share-open .page-news-hero__share-menu {
  z-index: 210;
}

.page-news-hero__share-menu-title {
  margin: 0 0 6px;
  padding: 0 16px;
  font-family: "Lexend", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7a94;
}

.page-news-hero__share-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-news-hero__share-menu-divider {
  height: 1px;
  margin: 6px 12px;
  background: #e8edf3;
}

.page-news-hero__share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #0a1d4d;
  font-family: "Lexend", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
}

.page-news-hero__share-option:hover,
.page-news-hero__share-option:focus-visible {
  background: #f0f4f8;
  outline: none;
}

.page-news-hero__share-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

.page-news-hero__share-option--facebook .page-news-hero__share-option-icon {
  background: #1877f2;
}

.page-news-hero__share-option--zalo .page-news-hero__share-option-icon {
  background: #0068ff;
  font-weight: 800;
}

.page-news-hero__share-option--whatsapp .page-news-hero__share-option-icon {
  background: #25d366;
}

.page-news-hero__share-option--messenger .page-news-hero__share-option-icon {
  background: linear-gradient(135deg, #00b2ff 0%, #006aff 50%, #a033ff 100%);
}

.page-news-hero__share-option--linkedin .page-news-hero__share-option-icon {
  background: #0a66c2;
  font-size: 0.625rem;
}

.page-news-hero__share-option--telegram .page-news-hero__share-option-icon {
  background: #229ed9;
}

.page-news-hero__share-option--email .page-news-hero__share-option-icon {
  background: #64748b;
}

.page-news-hero__share-option--copy .page-news-hero__share-option-icon {
  background: #2b6bb2;
  font-size: 0.875rem;
}

.page-news-hero__share-feedback {
  margin: 8px 16px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-family: "Lexend", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.page-news-hero__share-feedback[hidden] {
  display: none !important;
}

@media (max-width: 767.98px) {
  .page-news-hero::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .page-news-hero__share {
    width: 100%;
    margin-left: 0;
  }

  .page-news-hero__share-btn {
    width: 100%;
    justify-content: center;
  }

  .page-news-hero__share-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }
}

/* Chi tiết item: hero dính header cố định (layout giống trang Giới thiệu) */
body.page-detail main.page-content > .page-news-hero:first-child {
  margin-top: 0;
}

body.page-detail main.page-content > .page-news-hero:first-child + .sec-blogDetail {
  padding-top: clamp(32px, 4vw, 48px);
}

/* Wrapper chứa 2 nút */
.page-news-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* Nút dùng chung */
.page-news-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 16px;
  border-radius: 0px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.page-news-hero__btn:hover {
  opacity: 0.9;
}

.page-news-hero__btn:active {
  transform: translateY(1px);
}

.page-news-hero__btn-label {
  display: inline-block;
}

.page-news-hero__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;   /* thêm mới */
  height: 20px;  /* thêm mới */
}

.page-news-hero__btn-icon svg {
  display: block;
  width: 100%;   /* thêm mới, để SVG lấp đầy container */
  height: 100%;  /* thêm mới */
}

/* Nút "Tải hồ sơ năng lực" — xanh lá */
.page-news-hero__btn--profile {
  background-color: #50D6AC;
  color: #0B3B5C;
}

.page-news-hero__btn--profile .page-news-hero__btn-icon svg path {
  stroke: #0B3B5C;
}

/* Nút "Yêu cầu demo" — xanh dương */
.page-news-hero__btn--demo {
  background-color: #2B6BB2;;
  color: #FFFFFF;
}

.page-news-hero__btn--demo .page-news-hero__btn-icon svg path {
  stroke: #FFFFFF;
}

/* Responsive — mobile xếp dọc, full width */
@media (max-width: 576px) {
  .page-news-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-news-hero__btn {
    justify-content: center;
  }
}

.page-news-hero__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Tag pills bên trái */
.page-news-hero__tags {
  display: flex;
  align-items: center;
  align-self: center;      /* ép chính nó căn giữa so với hàng cha */
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;                /* reset margin-block mặc định của <ul> */
  padding: 0;
}

.page-news-hero__tag {
  padding: 4px 14px;
  color: #2B6BB2;
  font-family: Lexend Deca;
  font-weight: 600;
  font-style: SemiBold;
  font-size: 0.8125rem;
  white-space: nowrap;
  background-color: #C6E2F7;
  line-height: 1;            /* tránh line-height mặc định đẩy chữ lệch tâm */
  box-sizing: border-box;
  margin: 0; 
}


/* Mobile: tag và button xuống 2 dòng riêng, tag full width phía trên */
@media (max-width: 575.98px) {
  .page-news-hero__meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}


.page-news {
  --pn-bg: #f0f4f8;
  --pn-card: #ffffff;
  --pn-title: #0a1d4d;
  --pn-meta: #6b7a94;
  --pn-border: #e2e8f0;
  --pn-accent: #2b6bb2;
  --pn-accent-hover: #1e5a9e;
  font-family: "Lexend", sans-serif;
  background-color: var(--pn-bg);
}

.page-news__inner {
  padding: clamp(32px, 5vw, 48px) var(--site-gutter-x) clamp(48px, 7vw, 72px);
}

/* Search bar — 3 khối tách, góc vuông (mockup) */
.page-news__search {
  margin: 0 0 clamp(20px, 2.5vw, 28px);
}

.page-news__search-form {
  display: grid;
  grid-template-columns: minmax(150px, 20%) minmax(0, 1fr) minmax(108px, 11%);
  align-items: stretch;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-news__search-select-wrap {
  position: relative;
  display: flex;
  min-width: 0;
  background: var(--pn-card);
  border: 0;
  border-radius: 0;
}

.page-news__search-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 32px 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
  appearance: none;
  cursor: pointer;
}

.page-news__search-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #9aa8bc;
  border-bottom: 2px solid #9aa8bc;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.page-news__search-input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: var(--pn-card);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--pn-title);
}

.page-news__search-input::placeholder {
  color: #9aa8bc;
  font-weight: 400;
}

.page-news__search-input:focus,
.page-news__search-select:focus {
  outline: 2px solid rgba(43, 107, 178, 0.35);
  outline-offset: 0;
}

.page-news__search-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: var(--pn-accent);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.page-news__search-btn:hover {
  background: var(--pn-accent-hover);
}

/* Category tabs */
.page-news__tabs {
  margin: 0 0 clamp(28px, 3.5vw, 40px);
  border-bottom: 1px solid var(--pn-border);
}

.page-news__tabs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 28px;
  margin: 0;
  padding: 0 0 0;
  list-style: none;
}

.page-news__tabs-item {
  margin: 0;
  padding: 0;
}

.page-news__tabs-link {
  display: inline-block;
  padding: 0 0 14px;
  font-size: clamp(0.9375rem, 0.85vw + 0.4rem, 1.0625rem);
  font-weight: 400;
  color: var(--pn-title);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.page-news__tabs-link:hover {
  color: var(--pn-accent);
}

.page-news__tabs-link.is-active {
  font-weight: 500;
  color: var(--pn-accent);
  border-bottom-color: var(--pn-accent);
}

/* News grid */
.page-news__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 576px) {
  .page-news__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .page-news__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 2.2vw, 28px);
  }
}

.page-news__card {
  display: flex;
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100%;
}

.page-news__card > article {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  height: 100%;
  margin: 0;
}

.page-news__card-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  height: 100%;
  background: var(--pn-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(10, 29, 77, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  padding: 20px;
  box-sizing: border-box;
}

.page-news__card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(10, 29, 77, 0.1);
}

.page-news__card-link:focus-visible {
  outline: 2px solid var(--pn-accent);
  outline-offset: 3px;
}

.page-news__thumb {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  background-color: #e8ecf1;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.page-news__thumb::before {
  content: none;
  display: none;
}

.page-news__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: clamp(16px, 2vw, 20px) 0 0;
}

.page-news__card-title {
  flex: 0 0 auto;
  margin: 0 0 12px;
  height: calc(1.45em * 3);
  min-height: calc(1.45em * 3);
  max-height: calc(1.45em * 3);
  font-size: clamp(0.9375rem, 0.85vw + 0.4rem, 1.0625rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--pn-title);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.page-news__meta {
  flex-shrink: 0;
  margin: auto 0 0;
  font-size: clamp(0.75rem, 0.65vw + 0.35rem, 0.8125rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--pn-meta);
}

/* Empty state */
.page-news__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: clamp(48px, 8vw, 80px) var(--site-gutter-x);
  text-align: center;
  background: var(--pn-card);
  border-radius: 8px;
  color: var(--pn-meta);
}

.page-news__empty h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pn-title);
}

.page-news__empty p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Footer */
.page-news__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 24px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(8px, 1vw, 12px);
}

.page-news__count {
  margin: 0;
  font-size: clamp(0.8125rem, 0.75vw + 0.35rem, 0.875rem);
  font-weight: 400;
  color: var(--pn-meta);
}

.page-news__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.page-news__pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d8dee6;
  border-radius: 4px;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--pn-title);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-news__pager-btn:hover:not(.page-news__pager-btn--active):not(.page-news__pager-btn--disabled) {
  border-color: var(--pn-accent);
  color: var(--pn-accent);
}

.page-news__pager-btn--active {
  border-color: var(--pn-accent);
  background: var(--pn-accent);
  color: #ffffff;
  cursor: default;
}

.page-news__pager-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-news__pager-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 0.875rem;
  color: var(--pn-meta);
  user-select: none;
}

@media (max-width: 767px) {
  .page-news__search-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page-news__search-select-wrap,
  .page-news__search-input,
  .page-news__search-btn {
    width: 100%;
  }

  .page-news__tabs-list {
    gap: 0 20px;
  }

  .page-news__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
