/*
 * Company announcements sit between the navigation and the brand mark. The
 * card is a frame, not a layout: the announcement fills it edge to edge and the
 * only chrome is a hairline border. Height stays fixed so switching cards cannot
 * shift the sidebar under the pointer.
 *
 * The frame keeps one 5px inset and nothing else. Every inner padding was
 * removed with it, so an image or a text announcement owns the whole panel
 * instead of sitting in a box inside a box.
 */
.fs-company-news {
  position: relative;
  display: grid;
  padding: 5px;
  overflow: hidden;
  touch-action: pan-y;
  background: var(--fs-color-surface);
  border: 1px solid var(--fs-color-border-subtle);
  border-radius: var(--fs-radius-md);
  box-shadow: var(--fs-shadow-sm);
}

/*
 * Floated over the announcement so it never takes a row from the content, and
 * pinned to the top: the switcher is reached before the announcement is read,
 * and the bottom of the card stays free for the announcement itself.
 */
.fs-company-news__dots {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  background: rgb(255 255 255 / 72%);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.fs-company-news__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--fs-color-border);
  cursor: pointer;
  transition: background-color 0.16s ease, width 0.16s ease;
}

.fs-company-news__dot:hover {
  background: var(--fs-color-text-muted);
}

/* Neutral, not accent: a page indicator is not an action. */
.fs-company-news__dot[aria-selected="true"] {
  width: 12px;
  background: var(--fs-color-text-muted);
}

.fs-company-news__dot:focus-visible {
  outline: 0;
  box-shadow: var(--fs-focus-ring);
}

/* Reserved height keeps the sidebar from shifting between cards. */
.fs-company-news__deck {
  display: grid;
  height: 178px;
  overflow: hidden;
  border-radius: calc(var(--fs-radius-md) - 5px);
}

/*
 * A column rather than a grid of content-sized rows: the text costs exactly the
 * rows it needs and the image takes everything left over, so the announcement
 * always reaches the bottom of the deck instead of leaving a dead strip there.
 */
.fs-company-news__card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  grid-area: 1 / 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.fs-company-news__card[hidden] {
  display: none;
}

.fs-company-news__image {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: calc(var(--fs-radius-md) - 5px);
}

/*
 * The switcher floats over the top-right corner. Only the first row has to keep
 * clear of it — over an image it costs nothing, over a headline it would sit on
 * the words.
 */
.fs-company-news:has(.fs-company-news__dots) .fs-company-news__link,
.fs-company-news:has(.fs-company-news__dots) .fs-company-news__title {
  padding-right: 38px;
}

.fs-company-news__link,
.fs-company-news__title {
  color: var(--fs-color-text);
  font-size: var(--fs-text-sm);
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.fs-company-news__link:hover {
  color: var(--fs-color-primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fs-company-news__summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fs-color-text-secondary);
  font-size: var(--fs-text-xs);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Only the sidebar copy needs to outrank the navigation frieze behind it. */
.fs-company-news--sidebar {
  z-index: 1;
  margin: 0 var(--fs-space-2) var(--fs-space-2);
}

.fs-company-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fs-space-3);
  padding: 20px 26px;
}

.fs-company-news-grid__heading {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--fs-color-text);
  font-size: var(--fs-text-lg);
  font-weight: 700;
}

.fs-company-news-grid__card {
  display: grid;
  min-height: 166px;
  overflow: hidden;
  background: var(--fs-color-surface-subtle);
  border: 1px solid var(--fs-color-border-subtle);
  border-radius: var(--fs-radius-md);
}

.fs-company-news-grid__image {
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.fs-company-news-grid__copy {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: var(--fs-space-3);
}

.fs-company-news-grid__title {
  color: var(--fs-color-text);
  font-size: var(--fs-text-sm);
  font-weight: 600;
  line-height: 1.35;
}

a.fs-company-news-grid__title:hover {
  color: var(--fs-color-primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fs-company-news-grid__copy p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fs-color-text-secondary);
  font-size: var(--fs-text-xs);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 1100px) {
  .fs-company-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/*
 * Hero: the announcement opens the mobile home as a cover rather than a framed
 * card. The photo becomes the surface, the headline sits on it, and the frame
 * inset and hairline go away — a border around a full-bleed image only reads as
 * a second edge inside the screen edge.
 */
.fs-company-news--hero {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.fs-company-news--hero .fs-company-news__deck {
  height: 300px;
  border-radius: 0;
}

/* The sheet below laps 16px over the foot of the photo — the copy clears it. */
.fs-company-news--hero .fs-company-news__card {
  position: relative;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 18px 34px;
  border-radius: 0;
}

/*
 * Bottom right, not top right: the top of the cover belongs to the mark and the
 * assistant, and the headline owns the bottom left.
 */
.fs-company-news--hero .fs-company-news__dots {
  top: auto;
  right: 14px;
  bottom: 36px;
}

/*
 * Only a card that actually carries a photo becomes a cover. A text-only
 * announcement keeps the page text colours on a panel of its own — white copy
 * over a white panel is what a blanket cover treatment would produce.
 */
.fs-company-news--hero .fs-company-news__card:not(:has(.fs-company-news__image)) {
  background: var(--fs-color-surface);
}

.fs-company-news--hero .fs-company-news__card:has(.fs-company-news__image) .fs-company-news__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.fs-company-news--hero .fs-company-news__card:has(.fs-company-news__image)::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgb(20 17 13 / 34%) 0%,
    rgb(20 17 13 / 0%) 34%,
    rgb(20 17 13 / 62%) 68%,
    rgb(20 17 13 / 92%) 100%
  );
  border-radius: inherit;
  content: "";
}

.fs-company-news--hero .fs-company-news__badge,
.fs-company-news--hero .fs-company-news__link,
.fs-company-news--hero .fs-company-news__title,
.fs-company-news--hero .fs-company-news__summary {
  position: relative;
  z-index: 1;
}

.fs-company-news--hero .fs-company-news__card:has(.fs-company-news__image) .fs-company-news__link,
.fs-company-news--hero .fs-company-news__card:has(.fs-company-news__image) .fs-company-news__title,
.fs-company-news--hero .fs-company-news__card:has(.fs-company-news__image) .fs-company-news__summary {
  color: #fff;
  text-shadow: 0 1px 3px rgb(20 17 13 / 45%);
}

/*
 * The hero carries no block heading above it, so the badge is what names the
 * block. Every other placement keeps its heading and does not need it.
 */
.fs-company-news__badge {
  display: none;
}

.fs-company-news--hero .fs-company-news__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 8px;
  color: var(--fs-color-text);
  background: var(--fs-color-news-accent);
  border-radius: var(--fs-radius-sm);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-company-news--hero .fs-company-news__badge--cover {
  color: var(--fs-color-text);
  background: color-mix(in srgb, var(--fs-color-surface) 82%, transparent);
}

.fs-company-news--hero .fs-company-news__link,
.fs-company-news--hero .fs-company-news__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.fs-company-news--hero .fs-company-news__summary {
  font-size: var(--fs-text-sm);
  -webkit-line-clamp: 2;
}
