.news-modal-open { overflow: hidden !important; }

/* Native hidden could be overwritten by old site styles. Keep states strict. */
.triosoft-news-loading[hidden],
.triosoft-news-error[hidden],
.triosoft-news-content[hidden] {
  display: none !important;
  visibility: hidden !important;
}

.news-card,
[data-news-card] {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  min-height: 185px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.news-card > *,
[data-news-card] > * { min-width: 0; max-width: 100%; }

.news-card h1,
.news-card h2,
.news-card h3,
.news-card h4,
[data-news-card] h1,
[data-news-card] h2,
[data-news-card] h3,
[data-news-card] h4 {
  overflow-wrap: anywhere;
}

.news-card p,
[data-news-card] p {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.news-card:hover,
.news-card:focus-visible,
[data-news-card]:hover,
[data-news-card]:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb, 155, 124, 255), .42) !important;
  background: rgba(var(--accent-rgb, 155, 124, 255), .055) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .24), 0 0 0 1px rgba(var(--accent-rgb, 155, 124, 255), .08);
  outline: none;
}

.news-card.is-opening,
[data-news-card].is-opening { opacity: .7; pointer-events: none; }

.triosoft-news-card-arrow {
  position: static !important;
  inset: auto !important;
  flex: 0 0 auto;
  align-self: flex-start;
  width: auto !important;
  height: 38px !important;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: auto 0 0 !important;
  padding: 0 13px;
  border: 1px solid rgba(var(--accent-rgb, 155, 124, 255), .18);
  border-radius: 12px;
  color: var(--accent, #9b7cff);
  background: rgba(var(--accent-rgb, 155, 124, 255), .08);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.triosoft-news-card-arrow b { font-size: 15px; line-height: 1; }

.news-card:hover .triosoft-news-card-arrow,
[data-news-card]:hover .triosoft-news-card-arrow {
  transform: translateX(3px);
  border-color: rgba(var(--accent-rgb, 155, 124, 255), .32);
  background: rgba(var(--accent-rgb, 155, 124, 255), .14);
}

.triosoft-news-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.triosoft-news-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.triosoft-news-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, .84);
  backdrop-filter: blur(15px);
}

.triosoft-news-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(var(--accent-rgb, 155, 124, 255), .16), transparent 38%),
    linear-gradient(145deg, #171922, #0d0f16 70%);
  box-shadow: 0 55px 150px rgba(0,0,0,.64);
  transform: translateY(18px) scale(.98);
  transition: transform .22s ease;
}

.triosoft-news-modal.is-open .triosoft-news-dialog { transform: translateY(0) scale(1); }
.triosoft-news-dialog::-webkit-scrollbar { width: 7px; }
.triosoft-news-dialog::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.12); }

.triosoft-news-close {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: #9b9fac;
  background: rgba(9,10,15,.82);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.triosoft-news-close:hover { color: #fff; border-color: rgba(255,255,255,.2); }

.triosoft-news-loading,
.triosoft-news-error {
  min-height: 410px;
  padding: 78px 28px 48px;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #9297a7;
  text-align: center;
}

.triosoft-news-loading > span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(var(--accent-rgb, 155, 124, 255), .17);
  border-top-color: var(--accent, #9b7cff);
  border-radius: 50%;
  animation: triosoft-news-spin .75s linear infinite;
}

@keyframes triosoft-news-spin { to { transform: rotate(360deg); } }

.triosoft-news-error > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 100, 125, .2);
  border-radius: 15px;
  color: #ff8396;
  background: rgba(255, 100, 125, .08);
  font-size: 21px;
  font-weight: 900;
}

.triosoft-news-error strong { color: #f2f3f7; font-size: 18px; }
.triosoft-news-error p { max-width: 420px; margin: 0; color: #8f94a3; font-size: 13px; line-height: 1.6; }
.triosoft-news-error button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(var(--accent-rgb, 155, 124, 255), .22);
  border-radius: 12px;
  color: #fff;
  background: rgba(var(--accent-rgb, 155, 124, 255), .12);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.triosoft-news-content { padding: 68px 54px 42px; }
.triosoft-news-header { padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.075); }
.triosoft-news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.triosoft-news-meta time { color: #777d8c; font-size: 12px; font-weight: 750; }
.triosoft-news-type {
  padding: 7px 10px;
  border: 1px solid rgba(var(--accent-rgb, 155, 124, 255), .18);
  border-radius: 999px;
  color: var(--accent, #9b7cff);
  background: rgba(var(--accent-rgb, 155, 124, 255), .08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.triosoft-news-header h2 {
  margin: 0;
  max-width: 650px;
  color: #f7f7fb;
  font-size: clamp(31px, 5vw, 50px);
  line-height: 1.04;
  letter-spacing: -1.7px;
  overflow-wrap: anywhere;
}

.triosoft-news-lead { margin: 18px 0 0; color: #adb1bf; font-size: 16px; line-height: 1.65; }
.triosoft-news-body { padding: 29px 0; color: #c2c5cf; font-size: 15px; line-height: 1.82; }
.triosoft-news-body p { margin: 0 0 18px; overflow-wrap: anywhere; }
.triosoft-news-body p:last-child { margin-bottom: 0; }

.triosoft-news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.075);
}

.triosoft-news-app { min-width: 0; display: flex; align-items: center; gap: 12px; }
.triosoft-news-app img,
.triosoft-news-app > span {
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent, #9b7cff), #5334d4);
  font-weight: 900;
}

.triosoft-news-app small,
.triosoft-news-app strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.triosoft-news-app small { color: #707685; font-size: 10px; }
.triosoft-news-app strong { margin-top: 4px; color: #e3e5ec; font-size: 13px; }
.triosoft-news-actions { display: flex; gap: 8px; }
.triosoft-news-actions a,
.triosoft-news-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  color: #d7d9e1;
  background: rgba(255,255,255,.035);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.triosoft-news-actions a:hover,
.triosoft-news-actions button:hover {
  border-color: rgba(var(--accent-rgb, 155, 124, 255), .32);
  background: rgba(var(--accent-rgb, 155, 124, 255), .09);
}

@media (max-width: 680px) {
  .triosoft-news-modal { padding: 12px; }
  .triosoft-news-dialog { max-height: calc(100vh - 24px); border-radius: 22px; }
  .triosoft-news-content { padding: 62px 22px 26px; }
  .triosoft-news-header h2 { font-size: 32px; letter-spacing: -1px; }
  .triosoft-news-lead, .triosoft-news-body { font-size: 14px; }
  .triosoft-news-footer { align-items: stretch; flex-direction: column; }
  .triosoft-news-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .triosoft-news-loading, .triosoft-news-error { min-height: 360px; }
  .triosoft-news-card-arrow { width: 100% !important; justify-content: space-between; }
}


.triosoft-news-body h2,
.triosoft-news-body h3,
.triosoft-news-body h4 {
  margin: 26px 0 14px;
  color: #f4f5fa;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.triosoft-news-body h2 { font-size: clamp(24px, 3vw, 30px); }
.triosoft-news-body h3 { font-size: clamp(20px, 2.6vw, 24px); }
.triosoft-news-body h4 { font-size: clamp(17px, 2.2vw, 20px); }

.triosoft-news-body ul,
.triosoft-news-body ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
}

.triosoft-news-body li {
  margin: 0 0 8px;
}

.triosoft-news-body blockquote {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid rgba(var(--accent-rgb, 155, 124, 255), .45);
  border-radius: 0 14px 14px 0;
  background: rgba(255,255,255,.03);
  color: #d1d4de;
}

.triosoft-news-body a {
  color: var(--accent, #9b7cff);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb, 155, 124, 255), .24);
}

.triosoft-news-body a:hover {
  border-bottom-color: rgba(var(--accent-rgb, 155, 124, 255), .55);
}

.triosoft-news-body code {
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: #f3f3f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

.triosoft-news-app {
  display: flex;
  align-items: center;
  gap: 14px;
}

.triosoft-news-app img,
.triosoft-news-app span {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(160deg, rgba(var(--accent-rgb, 155, 124, 255), .26), rgba(var(--accent-rgb, 155, 124, 255), .08));
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}

.triosoft-news-app span {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 26px;
}
