@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'DIN Condensed';
  src: url('../font/din-condensed-regular/din-condensed-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-body: 'Poppins', 'Segoe UI', Arial, Helvetica, sans-serif;
  --font-accent: 'DIN Condensed', 'Arial Narrow', 'Franklin Gothic Condensed', 'Arial', sans-serif;
  --orange: #E8541D;
  --orange-dark: #C7440F;
  --navy: #0150ba;
  --text-dark: #222;
  --text-gray: #666;
  --border: #e5e5e5;
  --bg-light: #f7f7f8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: #fff;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- Hero ---------- */
.news-hero {
  position: relative;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.news-hero-buildings {
  position: absolute;
  inset: 0;
  opacity: 1;
  z-index: 0;
}
.news-hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: auto;
  width: 50%;
  max-width: 920px;
  background: linear-gradient(90deg,
    rgba(8,14,26,0.90) 0%,
    rgba(8,14,26,0.80) 45%,
    rgba(8,14,26,0.0) 100%);
  pointer-events: none;
  z-index: 1;
}
.news-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px;
  color: #fff;
  max-width: 600px;
  font-family: var(--font-body);
}
.news-hero-content h1 {
  font-family: var(--font-accent);
  font-size: 43px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.news-hero-content p {
  font-size: 14px;
  line-height: 1.5;
  color: #e8e8e8;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 16px 40px;
  font-size: 13px;
  color: #888;
}
.breadcrumb a {
  color: var(--orange);
  font-weight: 600;
}
.breadcrumb span {
  margin: 0 6px;
  color: #bbb;
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 250px 1fr 260px;
  gap: 10px;
  padding: 0 20px;
  align-items: start;
}

.news-article-panel {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  position: relative;
  box-shadow: -10px 0 22px rgba(0, 0, 0, 0.10);
}

#article-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
}
.empty-state {
  flex: 1;
  min-height: 320px;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: none;
}
.empty-state .article-body { flex: 0 1 auto; align-items: center; }
.empty-state h2 {
  color: #555;
  font-size: 20px;
  margin-bottom: 8px;
}
.empty-state p {
  color: #888;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
}

/* ---------- Sidebar filter ---------- */
.panel {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 10px;
  position: relative;
  box-shadow: -10px 0 22px rgba(0, 0, 0, 0.10);
}
.panel h3 {
  color: var(--orange);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.4px;
}
.filter-search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}
.filter-search input {
  border: none;
  padding: 9px 10px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  outline: none;
}
.filter-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #fff;
  padding: 0 12px;
  min-width: 42px;
  color: #999;
  cursor: pointer;
}
.filter-search button svg { width: 16px; height: 16px; }

.filter-group { margin-bottom: 18px; }
.filter-group h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}
.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  margin-bottom: 9px;
  cursor: pointer;
}
.filter-group input { accent-color: var(--orange); }

.filter-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-apply,
.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn-apply {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 9px 18px;
  flex: 1;
}
.btn-reset {
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
  padding: 9px 18px;
}

/* ---------- Main article list ---------- */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.list-header span {
  color: #666;
  font-size: 13px;
}
.sort-select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  background: #fff;
  min-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23333' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 6px;
}
.sort-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,84,29,0.14);
}

.article {
  display: flex;
  gap: 20px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  min-height: auto;
}
.article:last-of-type { border-bottom: none; }
.article-thumb {
  width: 220px;
  height: 160px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.article-tag {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  display: block;
}
.article-body h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
  max-height: none;
}
.article-body h2 a:hover { color: var(--orange); }
.article-body p {
  color: var(--text-gray);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  min-height: 4.8em;
  max-height: 4.8em;
}
.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  min-height: 20px;
  padding: 0;
}
.article-date { color: #999; font-size: 12.5px; }
.read-more {
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  margin-left: 12px;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  align-items: center;
}
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: #444;
  padding: 0 6px;
}
.pagination a.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  font-weight: 700;
}
.pagination a:hover:not(.active) {
  border-color: var(--orange);
  color: var(--orange);
}

/* Placeholder / skeleton styles */
.article.placeholder { opacity: 0.6; pointer-events: none; background: transparent; }
.article.placeholder .article-thumb { background: #f5f5f5; }
.article.placeholder .article-tag,
.article.placeholder .article-body h2 a,
.article.placeholder .article-body p,
.article.placeholder .article-date,
.article.placeholder .read-more {
  background: #f5f5f5;
  color: transparent;
  border-radius: 4px;
  height: 14px;
  display: block;
}
.article.placeholder .article-tag {
  width: 80px;
  height: 12px;
  margin-bottom: 8px;
}
.article.placeholder .article-body h2 a {
  width: 60%;
  height: 18px;
  margin-bottom: 10px;
}
.article.placeholder .article-body p {
  height: 44px;
  margin-bottom: 12px;
}
.article.placeholder .article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Sidebar right ---------- */
#popular-list {
  display: flex;
  flex-direction: column;
  min-height: calc(5 * 84px);
}
.popular-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-end;
  min-height: 70px;
}
.popular-item:last-child { margin-bottom: 0; }
.popular-item > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 64px;
}
.popular-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
.popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.popular-item h5 {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.9em;
}
.popular-item span {
  font-size: 11.5px;
  color: #999;
  margin-top: auto;
  display: block;
}
.popular-item.placeholder .popular-thumb,
.popular-item.placeholder h5,
.popular-item.placeholder span {
  background: #f5f5f5;
  color: transparent;
  border-radius: 4px;
}
.popular-item.placeholder h5 {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
  display: block;
}
.popular-item.placeholder span {
  height: 12px;
  width: 70%;
  display: block;
}

.promo-ad {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.promo-ad .promo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.promo-ad::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(1,80,186,0.10) 0%, rgba(10,15,25,0.55) 55%, rgba(10,15,25,0.88) 100%);
}
.promo-ad .promo-logo,
.promo-ad h4,
.promo-ad a {
  position: relative;
  z-index: 2;
}
.promo-ad .promo-logo {
  color: var(--orange);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.promo-ad h4 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}
.promo-ad a {
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 3px;
}

/* ---------- Sidebar ad banner ---------- */
.sidebar-banner {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.sidebar-banner img {
  width: 100%;
  height: 825px;
  object-fit: cover;
  display: block;
}
.sidebar-banner .ad-label {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #999;
  padding: 4px 0;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--bg-light);
}

/* ---------- Image placeholder pattern ---------- */
.img-ph {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(160deg,#4a5f7a 0%, #7a94af 55%, #b7c6d6 100%);
}

/* ---------- Icons ---------- */
.icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 20px; height: 20px; vertical-align: middle; }
.search-bar button .icon { stroke: #fff; }
.filter-search button .icon { stroke: #999; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .news-hero-content { padding: 0 24px; }
}

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 0 14px;
  }

  .news-hero-content {
    padding: 14px 18px;
    max-width: 100%;
  }

  .news-hero-content h1 { font-size: 34px; }

  .breadcrumb { padding: 14px 18px; }

  .news-article-panel,
  .panel {
    padding: 16px;
    box-shadow: -8px 0 18px rgba(0, 0, 0, 0.08);
  }

  .filter-buttons { flex-direction: column; }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .article {
    flex-direction: column;
    gap: 14px;
  }

  .article-thumb {
    width: 100%;
    height: 180px;
  }

  .article-body h2 { font-size: 15px; }
}

@media (max-width: 480px) {
  .news-hero { height: 180px; }

  .news-hero-content h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .news-hero-content p { font-size: 12px; }

  .layout { padding: 0 10px; }

  .panel h3 { font-size: 14px; }

  .filter-group label,
  .article-body p,
  .article-date,
  .read-more,
  .popular-item h5,
  .popular-item span {
    font-size: 12px;
  }

  .article-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    width: 100%;
  }

  .article-date,
  .read-more {
    white-space: nowrap;
  }

  .popular-item { gap: 10px; }

  .popular-thumb {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 360px) {
  .news-hero-content { padding: 12px 14px; }

  .news-hero-content h1 { font-size: 24px; }

  .breadcrumb {
    padding: 12px 12px;
    font-size: 12px;
  }

  .panel,
  .news-article-panel {
    padding: 12px;
    box-shadow: -8px 0 18px rgba(0, 0, 0, 0.08);
  }

  .filter-search input,
  .filter-search button,
  .btn-apply,
  .btn-reset {
    font-size: 12px;
  }

  .article-thumb { height: 150px; }

  .article-body h2 { font-size: 14px; }

  .article-body p { line-height: 1.5; }

  .article-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .article-date {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .read-more {
    margin-left: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
}

@media (max-width: 700px) {
  .header { padding: 14px 18px; }
  .breadcrumb, .layout, .topbar { padding-left: 18px; padding-right: 18px; }
  .news-hero-content { padding: 12px; }
  .news-hero { height: 180px; }
  .article { flex-direction: column; }
  .article-thumb { width: 100%; height: 180px; }
}

/* Product News page specific styles */
.product_news-page .modal-overlay,
#productCustomDateModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#productCustomDateModal.open {
  display: flex;
}

#productCustomDateModal .custom-modal {
  background: #fff;
  padding: 16px;
  border-radius: 6px;
  width: 320px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

#productCustomDateModal .custom-modal h4 {
  margin: 0 0 8px;
}

#productCustomDateModal .fields {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#productCustomDateModal input[type="date"] {
  flex: 1;
  padding: 6px;
}

#productCustomDateModal .actions {
  text-align: right;
}

#productCustomDateModal .actions button {
  margin-left: 8px;
}
