/* ===================== NEWS PAGE HEADER (no hero) ===================== */
#news-head {
  position: relative;
  padding: 180px 0 60px;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

#news-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(123,45,255,.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(0,204,255,.06), transparent 70%);
  pointer-events: none;
}

#news-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0, rgba(255,255,255,.014) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0, rgba(255,255,255,.014) 1px, transparent 1px, transparent 40px);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, rgba(0,0,0,.5), transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, rgba(0,0,0,.5), transparent 80%);
  pointer-events: none;
}

.news-head-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

.news-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(123,45,255,.06);
  border: 1px solid rgba(123,45,255,.18);
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up .7s var(--ease) .2s both;
}

.news-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px rgba(123,45,255,.6);
  animation: pulse 1.8s ease-in-out infinite;
}

.news-title {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: 24px;
}

.news-title .rl {
  display: inline-block;
}

.news-sub {
  font-size: 16px;
  font-weight: 300;
  color: #9ea3b4;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
  opacity: 0;
  animation: fade-up .8s var(--ease) .9s both;
}

/* ===================== CATEGORY FILTER ===================== */
.news-filter {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(5,5,8,.92) 0%, rgba(5,5,8,.85) 80%, rgba(5,5,8,0) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 20px 0 28px;
  margin-bottom: 12px;
}

.news-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #a9aebf;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s, background .25s, border-color .25s, transform .25s;
  -webkit-tap-highlight-color: transparent;
}

.news-pill:hover {
  color: #ccc;
  border-color: rgba(255,255,255,.14);
  transform: translateY(-2px);
}

.news-pill.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(123,45,255,.22), rgba(0,204,255,.12));
  border-color: rgba(123,45,255,.4);
  box-shadow: 0 4px 16px rgba(123,45,255,.2);
}

.news-pill .count {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: inherit;
  opacity: .6;
}

.news-pill.active .count {
  background: rgba(255,255,255,.15);
  opacity: 1;
}

/* ===================== FEATURED POST ===================== */
.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.news-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.news-section-label h2 {
  font-size: 22px;
  font-weight: 400;
  color: #ddd;
  letter-spacing: -.01em;
}

.news-section-label .count-info {
  font-size: 11px;
  font-weight: 400;
  color: #9095a5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.news-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(123,45,255,.04), rgba(0,204,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  margin-bottom: 72px;
  position: relative;
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
}

.news-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(123,45,255,.4) 0%, transparent 40%, transparent 60%, rgba(0,204,255,.3) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.news-featured:hover {
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 40px 100px rgba(0,0,0,.4), 0 0 80px rgba(123,45,255,.08);
}

.news-featured:hover::before { opacity: 1; }

.news-featured-thumb {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(123,45,255,.18), rgba(5,5,8,.95) 70%);
  border: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-featured-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 24px);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.8), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.8), transparent 70%);
}

.news-featured-thumb svg {
  position: relative;
  z-index: 1;
  color: var(--cyan);
  filter: drop-shadow(0 0 30px rgba(0,204,255,.4));
  opacity: .9;
  transition: transform 6s cubic-bezier(.22,1,.36,1), opacity .4s;
}

.news-featured:hover .news-featured-thumb svg {
  transform: scale(1.08);
  opacity: 1;
}

.news-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.news-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--purple);
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(123,45,255,.08);
  border: 1px solid rgba(123,45,255,.2);
}

.news-featured-tag::before {
  content: '';
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.news-featured-title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.news-featured-title a {
  color: inherit;
  transition: color .3s;
}

.news-featured-title a:hover {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.news-featured-excerpt {
  font-size: 14px;
  font-weight: 300;
  color: #a9aebf;
  line-height: 1.8;
}

.news-featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 400;
  color: #9095a5;
  letter-spacing: .04em;
}

.news-featured-meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #333;
}

.news-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  color: #aaa;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  align-self: flex-start;
  margin-top: 6px;
  transition: all .3s;
}

.news-featured-cta:hover {
  color: #fff;
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.04);
  gap: 12px;
}

.news-featured-cta svg { transition: transform .3s; }
.news-featured-cta:hover svg { transform: translateX(3px); }

/* ===================== POST GRID ===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .3s;
  opacity: 0;
}

.news-card.visible { opacity: 1; }

.news-card.filtering-out {
  opacity: 0;
  transform: scale(.97);
  pointer-events: none;
}

.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 32px 80px rgba(0,0,0,.45);
}

.news-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.news-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 20px);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.8), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.8), transparent 75%);
  transition: opacity .4s;
}

.news-thumb svg {
  position: relative;
  z-index: 1;
  transition: transform 1.2s cubic-bezier(.22,1,.36,1), filter .4s;
  opacity: .85;
}

.news-card:hover .news-thumb svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 24px currentColor);
  opacity: 1;
}

/* Thumb color variants */
.news-thumb.tone-purple { background: radial-gradient(ellipse at center, rgba(123,45,255,.16), rgba(5,5,8,.92) 70%); color: #b090ff; }
.news-thumb.tone-cyan   { background: radial-gradient(ellipse at center, rgba(0,204,255,.14),  rgba(5,5,8,.92) 70%); color: var(--cyan); }
.news-thumb.tone-blue   { background: radial-gradient(ellipse at center, rgba(0,102,255,.14),  rgba(5,5,8,.92) 70%); color: #6699ff; }
.news-thumb.tone-green  { background: radial-gradient(ellipse at center, rgba(34,197,94,.10),  rgba(5,5,8,.92) 70%); color: #22c55e; }

.news-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-card-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.news-card-tag.tag-api    { color: var(--cyan); background: rgba(0,204,255,.08); border: 1px solid rgba(0,204,255,.18); }
.news-card-tag.tag-ia     { color: #b090ff; background: rgba(123,45,255,.08); border: 1px solid rgba(123,45,255,.2); }
.news-card-tag.tag-guia   { color: #6699ff; background: rgba(0,102,255,.07); border: 1px solid rgba(0,102,255,.18); }
.news-card-tag.tag-outros { color: #22c55e; background: rgba(34,197,94,.06); border: 1px solid rgba(34,197,94,.18); }

.news-card-title {
  font-size: 16px;
  font-weight: 500;
  color: #ddd;
  line-height: 1.35;
  letter-spacing: -.01em;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a {
  color: inherit;
  transition: color .25s;
}
.news-card:hover .news-card-title a { color: #fff; }

.news-card-excerpt {
  font-size: 12.5px;
  font-weight: 300;
  color: #9ea3b4;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}

.news-card-date {
  font-size: 10.5px;
  font-weight: 400;
  color: #9095a5;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-card-date svg { opacity: .6; }

.news-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .15em;
  color: #a9aebf;
  transition: color .2s, gap .25s;
}

.news-card:hover .news-card-cta {
  color: var(--cyan);
  gap: 10px;
}

/* Empty state */
.news-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: #9095a5;
  font-size: 14px;
  font-weight: 300;
  opacity: 0;
  transition: opacity .3s;
}

.news-empty.visible { opacity: 1; }

/* ===================== NEWSLETTER BANNER ===================== */
.news-newsletter {
  margin-top: 96px;
  margin-bottom: 40px;
  padding: 56px 40px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(123,45,255,.10), transparent 70%),
    radial-gradient(ellipse at 80% 50%, rgba(0,204,255,.06), transparent 70%),
    rgba(10,10,18,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.news-newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 32px);
  mask-image: radial-gradient(ellipse 90% 100% at 50% 50%, rgba(0,0,0,.5), transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 50% 50%, rgba(0,0,0,.5), transparent 80%);
  pointer-events: none;
}

.news-newsletter-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
}

.news-newsletter h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 300;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.news-newsletter p {
  font-size: 13px;
  font-weight: 300;
  color: #9ea3b4;
  line-height: 1.7;
  margin-bottom: 24px;
}

.news-newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 5px;
  transition: border-color .3s, background .3s;
}

.news-newsletter-form:focus-within {
  border-color: rgba(123,45,255,.3);
  background: rgba(255,255,255,.05);
}

.news-newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .01em;
}

.news-newsletter-form input::placeholder { color: #82869a; }

.news-newsletter-form { position: relative; flex-wrap: wrap; }
.news-newsletter-form input.has-error {
  outline: 1px solid rgba(255,77,94,.55);
  background: rgba(255,77,94,.06);
}
.news-newsletter-form .field-error {
  flex-basis: 100%;
  margin-top: 8px;
  min-height: 14px;
  font-size: 11.5px;
  font-weight: 400;
  color: #ff8a98;
  text-align: left;
}
.news-newsletter-form .field-error:empty { display: none; }
.news-newsletter-success {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.22);
  color: #7fd9b0;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 400;
}

.news-newsletter-form button {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-family: inherit;
}

.news-newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(123,45,255,.3);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .news-featured {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  #news-head { padding: 130px 0 40px; }
  .news-head-inner { padding: 0 20px; }
  .news-title { font-size: 42px; }
  .news-container { padding: 0 20px 40px; }
  .news-filter { top: 64px; padding: 16px 0 20px; }
  .news-filter-inner { padding: 0 20px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .news-filter-inner::-webkit-scrollbar { display: none; }
  .news-pill { flex-shrink: 0; }
  .news-featured { padding: 20px; gap: 20px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-newsletter { padding: 40px 24px; margin-top: 64px; }
  .news-newsletter-form { flex-direction: column; padding: 8px; }
  .news-newsletter-form button { padding: 12px; }
}
