/* =========================================================
   Sectoral CERT - namespaced styles
   File: assets/css/sectoral-cert.css
========================================================= */

/* ===== Hero ===== */
.sc-hero-banner {
  position: relative;
  border-radius: 40px;
}

.sc-hero-ratio::before {
  content: "";
  display: block;
  padding-top: 100%;
}

@media (min-width: 640px) {
  .sc-hero-ratio::before {
    padding-top: 80%;
  }
}

@media (min-width: 1024px) {
  .sc-hero-ratio::before {
    padding-top: 50%;
  }
}

.sc-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.sc-hero-inner {
  padding: 20px;
}

@media (min-width: 768px) {
  .sc-hero-inner {
    padding: 56px;
  }
}

@media (min-width: 1280px) {
  .sc-hero-inner {
    padding: 80px;
  }
}

@media (min-width: 1536px) {
  .sc-hero-inner {
    padding: 112px;
  }
}

.sc-hero-title {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-size: 32px;
}

@media (min-width: 640px) {
  .sc-hero-title {
    font-size: 44px;
  }
}

@media (min-width: 1024px) {
  .sc-hero-title {
    font-size: 56px;
  }
}

.sc-hero-desc {
  margin-top: 16px;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.75;
}

@media (min-width: 640px) {
  .sc-hero-desc {
    font-size: 16px;
  }
}

@media (min-width: 1024px) {
  .sc-hero-desc {
    margin-top: 20px;
    font-size: 18px;
  }
}

.sc-hero-cta {
  margin-top: 20px;
}

@media (min-width: 640px) {
  .sc-hero-cta {
    margin-top: 28px;
  }
}

.sc-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 9999px;
  background: #fff;
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.sc-btn-pill:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.sc-btn-pill:focus-visible {
  outline: 2px solid rgba(105, 56, 239, 0.95);
  outline-offset: 3px;
}

.sc-btn-icon {
  width: 20px;
  height: 20px;
}

/* ===== Floating cards under hero ===== */
.sc-hero-cards {
  margin-top: 24px;
}

@media (min-width: 768px) {
  .sc-hero-cards {
    margin-top: -80px;
  }
}

@media (min-width: 1024px) {
  .sc-hero-cards {
    margin-top: -96px;
    padding-left: 56px;
    padding-right: 56px;
  }
}

@media (min-width: 1280px) {
  .sc-hero-cards {
    padding-left: 80px;
    padding-right: 80px;
  }
}

@media (min-width: 1536px) {
  .sc-hero-cards {
    padding-left: 112px;
    padding-right: 112px;
  }
}

.sc-card {
  min-height: 200px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.sc-card:hover {
  box-shadow: 0 30px 86px rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
}

.sc-card:focus-within {
  outline: 2px solid rgba(105, 56, 239, 0.95);
  outline-offset: 4px;
}

.sc-card-link {
  border-radius: 24px;
}

.sc-card-title {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
}

@media (min-width: 1024px) {
  .sc-card-title {
    font-size: 20px;
  }
}

.sc-card-meta {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.6;
}

/* ===== Reusable badges ===== */
.sc-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
}

.sc-badge-green {
  background: #ecfdf3;
  color: #027a48;
}

.sc-badge-amber {
  background: #fffaeb;
  color: #b54708;
}

.sc-badge-blue {
  background: #eff8ff;
  color: #175cd3;
}

/* ===== Clamp helper ===== */
.sc-line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ===== News section ===== */
.sc-news-wrap {
  max-width: 1240px;
  margin-inline: auto;
}

.sc-news-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 36px;
}

@media (min-width: 900px) {
  .sc-news-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.sc-news-heading {
  margin: 0;
  color: #111827;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dark .sc-news-heading {
  color: rgba(255,255,255,0.92);
}

.sc-news-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.sc-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 9999px;
  background: #fff;
  color: rgba(55, 65, 81, 1);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.sc-chip:hover {
  background: rgba(249, 250, 251, 1);
  transform: translateY(-1px);
}

.sc-chip--active {
  border-color: rgba(17, 24, 39, 1);
  background: rgba(17, 24, 39, 1);
  color: #fff;
}

.dark .sc-chip {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.dark .sc-chip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dark .sc-chip--active {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(17, 24, 39, 1);
}

.sc-viewall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 9999px;
  background: #fff;
  color: rgba(55, 65, 81, 1);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.sc-viewall:hover {
  background: rgba(249, 250, 251, 1);
  transform: translateY(-1px);
}

.dark .sc-viewall {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}

.dark .sc-viewall:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Mixed news layout ===== */
.sc-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 768px) {
  .sc-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1200px) {
  .sc-news-grid {
    grid-template-columns: 1.45fr 1fr 1fr;
    gap: 24px;
  }
}

.sc-story {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.10);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sc-story:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 72px rgba(15, 23, 42, 0.14);
}

.sc-story-link {
  position: relative;
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}

.sc-story--lg .sc-story-link,
.sc-story--sm .sc-story-link {
  aspect-ratio: 16 / 10;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .sc-story--lg .sc-story-link {
    aspect-ratio: 16 / 10;
  }

  .sc-story--sm .sc-story-link {
    aspect-ratio: 16 / 11;
  }
}

@media (min-width: 1200px) {
  .sc-story--lg .sc-story-link {
    aspect-ratio: 16 / 10;
  }

  .sc-story--sm .sc-story-link {
    aspect-ratio: 4 / 5;
  }
}

.sc-story-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sc-story-link{
  position: relative;
  display:block;
  width:100%;
  height:100%;
  overflow:hidden;
}

.sc-story-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.40) 40%,
      rgba(0, 0, 0, 0.12) 70%,
      rgba(0, 0, 0, 0.04) 100%
    );
  z-index: 1;
}

.sc-story-topmeta {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.sc-story-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.92);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.sc-story-pill--hot {
  color: #e11d48;
}

.sc-story-save {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  color: #111827;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.sc-story-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 18px 18px 16px;
}

@media (min-width: 1200px) {
  .sc-story--lg .sc-story-content {
    padding: 20px 20px 18px;
  }

  .sc-story--sm .sc-story-content {
    padding: 16px;
  }
}

.sc-story-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.94);
  color: rgb(59, 130, 246);
  font-size: 12px;
  line-height: 20px;
  font-weight: 700;
}

.sc-story-title {
  margin: 12px 0 0;
  color: rgba(255,255,255,0.97);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.14);
}

@media (min-width: 1200px) {
  .sc-story--lg .sc-story-title {
    font-size: 21px;
  }

  .sc-story--sm .sc-story-title {
    font-size: 18px;
  }
}

.sc-story-excerpt {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.84);
  font-size: 13px;
  line-height: 1.6;
}

.sc-story--sm .sc-story-excerpt {
  display: none;
}

.sc-story-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(255,255,255,0.76);
  font-size: 12px;
  line-height: 1.5;
}

.sc-news-more {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

.sc-btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, 1);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.sc-btn-dark:hover {
  background: rgba(31, 41, 55, 1);
  transform: translateY(-1px);
}

.sc-story-link:focus-visible,
.sc-chip:focus-visible,
.sc-viewall:focus-visible,
.sc-btn-dark:focus-visible,
.sc-card-link:focus-visible {
  outline: 2px solid rgba(105, 56, 239, 0.95);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .sc-card,
  .sc-btn-pill,
  .sc-story,
  .sc-chip,
  .sc-btn-dark,
  .sc-viewall {
    transition: none;
  }

  .sc-card:hover,
  .sc-btn-pill:hover,
  .sc-story:hover,
  .sc-chip:hover,
  .sc-btn-dark:hover,
  .sc-viewall:hover {
    transform: none;
  }
}