/* News – list & post (dark theme, harmonized) */

/* Color tokens (fallbacks; real values come from base.css) */
:root {
  --_news-bg:        var(--bg-color, #0b0b0b);
  --_news-panel:     var(--panel-color, #121212);
  --_news-border:    var(--border-color, #212121);
  --_news-text:      var(--text-color, #e7e7e7);
  --_news-muted:     var(--muted-color, #bdbdbd);
  --_news-muted-2:   var(--muted-2-color, #9a9a9a);
  --_news-accent:    var(--accent-color, #d4af37); /* gold */
}

/* Container - allineato alle altre pagine */
.news-page,
.news-post-page {
  max-width: var(--container-max-width, 1400px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  color: var(--_news-text);
}

/* Extra space so the footer doesn't cover the back link */
.news-post-page { padding-bottom: 3rem; }


/* Hero - allineato con hero-bio e hero-concerts */

.news-hero {
  margin-bottom: 2.5rem;
}

/* Gradient text uniformato - allineato con altre pagine */
.news-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  text-shadow: none; /* Override per gradient text */
}

.news-hero__claim {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  margin: 0 0 1.5rem;
  line-height: 1.4;
}

/* Visual hero with image - allineato con stile site-wide */
.news-hero--with-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 20px);
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.4),
    0 0 0 1px rgba(212, 175, 55, 0.1) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 350px;
}

.news-hero--with-image:hover {
  box-shadow:
    0 8px 30px rgba(0,0,0,0.6),
    0 0 0 1px rgba(212, 175, 55, 0.2) inset,
    0 0 40px rgba(212, 175, 55, 0.1);
  transform: translateY(-2px);
}
.news-hero__media {
  display: block;
  line-height: 0;
  position: relative;
}
.news-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}
.news-hero__media img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1) contrast(1.05);
  transition: transform 0.6s ease, filter 0.3s ease;
}
.news-hero--with-image:hover .news-hero__media img {
  transform: scale(1.02);
  filter: brightness(0.9) contrast(1.1);
}
.news-hero__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  z-index: 2;
}

/* Responsive text - ora gestito da clamp() sopra */
@media (min-width: 768px) {
  .news-hero--with-image {
    min-height: 400px;
  }
}

@media (max-width: 767px) {
  .news-hero--with-image {
    min-height: 300px;
  }
}

/* Tabs - completamente allineato con year-pill di concerts.css */
.news-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
}

.news-tab {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
}

.news-tab:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.5);
  color: #d4af37;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.news-tab.is-active {
  background: linear-gradient(135deg, #d4af37 0%, #f0d478 100%);
  border-color: #d4af37;
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.news-tab:focus-visible {
  outline: 2px solid var(--_news-accent);
  outline-offset: 3px;
}

.news-count {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Layout: grid main + aside */
.news-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
@media (min-width: 1024px) {
  .news-layout { grid-template-columns: 2fr 1fr; }
}

/* Grid of cards */
.news-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Card */
.news-card {
  list-style: none;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}
.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card__body {
  background: var(--_news-panel);
  border: 1px solid var(--_news-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-card__body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--_news-accent), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.news-card__body:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px color-mix(in srgb, var(--_news-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--_news-border) 30%, var(--_news-accent) 70%);
}
.news-card__body:hover::before {
  opacity: 1;
}

/* Media (1.91:1) */
.news-card__media {
  display: block;
  aspect-ratio: 1.91 / 1;
  background: #0f0f0f;
  overflow: hidden;
  position: relative;
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}
.news-card__body:hover .news-card__media img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* LQIP (blur-up) placeholders */
.news-card__media,
.post-hero { position: relative; overflow: hidden; }

.news-card__media .lqip,
.post-hero .lqip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.05);
  opacity: 1;
  transition: opacity .3s ease;
  z-index: 0;
}

/* ensure the real image sits above the LQIP */
.news-card__media img,
.post-hero img { position: relative; z-index: 1; }

.news-card__media .lqip.is-hidden,
.post-hero .lqip.is-hidden { opacity: 0; }

.news-card__media--placeholder {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg,#121212,#121212 12px,#161616 12px,#161616 24px);
}

/* Content */
.news-card__content {
  padding: 1.1rem 1.2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card__title {
  margin: 0 0 .5rem;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 600;
}
.news-card__title a {
  color: var(--_news-text);
  text-decoration: none;
  transition: color 0.25s ease;
  display: block;
}
.news-card__title a:hover {
  color: var(--_news-accent);
}
.news-card__meta {
  color: var(--_news-muted-2);
  font-size: .9rem;
  margin-bottom: .5rem;
  font-weight: 500;
}
.news-card__reading {
  opacity: 0.9;
}
.news-card__excerpt {
  margin: .4rem 0 .8rem;
  color: var(--_news-muted);
  line-height: 1.6;
  flex: 1;
}
.news-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .8rem;
}
.tag {
  display: inline-block;
  background: color-mix(in srgb, var(--_news-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--_news-accent) 25%, transparent);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .8rem;
  color: color-mix(in srgb, var(--_news-accent) 85%, white);
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}
.tag:hover {
  background: color-mix(in srgb, var(--_news-accent) 20%, transparent);
  border-color: var(--_news-accent);
  color: var(--_news-accent);
  transform: translateY(-1px);
}
.tag:active {
  transform: translateY(0);
}
.news-card__cta {
  margin: 0;
}
.link-more {
  color: var(--_news-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.link-more::after {
  content: '→';
  transition: transform 0.25s ease;
}
.link-more:hover {
  color: color-mix(in srgb, var(--_news-accent) 80%, white);
}
.link-more:hover::after {
  transform: translateX(3px);
}

/* Aside – newsletter */
.news-aside { position: sticky; top: 1rem; }
.newsletter-card { background: var(--_news-panel); border: 1px solid var(--_news-border); border-radius: 12px; padding: 1rem; color: var(--_news-text); }
.newsletter-card__title { margin: 0 0 .35rem; font-size: 1.1rem; }
.newsletter-card__text { margin: 0 0 .7rem; color: var(--_news-muted); font-size: .95rem; }
.newsletter-card__form { display: grid; grid-template-columns: 1fr; gap: .5rem; }
.newsletter-card__form .input { background: #0e0e0e; color: var(--_news-text); border: 1px solid var(--_news-border); border-radius: 8px; padding: .5rem .6rem; font-size: .95rem; }
.newsletter-card__form .input::placeholder { color: var(--_news-muted-2); }
.newsletter-preferences { display: flex; flex-direction: column; gap: .35rem; margin: .25rem 0; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--_news-text); cursor: pointer; user-select: none; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--_news-accent); }
.checkbox-label:hover span { color: var(--_news-accent); }
.newsletter-card__form .btn { border: 1px solid var(--_news-accent); background: var(--_news-accent); color: #111; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; font-weight: 600; }
.newsletter-card__form .btn:hover { filter: brightness(1.05); }
.newsletter-card__feedback { font-size: .9rem; margin-top: .25rem; min-height: 1.2rem; }

/* Empty state */
.news-empty { color: var(--_news-muted); padding: 1rem 0; }

/* -------- Post page -------- */
.post { max-width: 860px; margin: 0 auto; }
.post-header { margin-bottom: 1rem; }
.post-kicker { color: var(--_news-accent); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; margin: 0 0 .25rem; }
.post-title { font-size: 2.2rem; line-height: 1.12; margin: 0 0 .35rem; color: var(--_news-text); }
.post-meta { color: var(--_news-muted-2); font-size: .95rem; margin-bottom: .35rem; }
.post-excerpt { color: var(--_news-muted); margin: 0 0 .8rem; }
.post-hero { margin: 0 0 1rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--_news-border); background: #0f0f0f; }
.post-hero img { width: 100%; height: auto; display: block; }
.post-content { color: var(--_news-text); line-height: 1.7; }
.post-content p { margin: .85rem 0; }
.post-content a { color: var(--_news-accent); }
.post-content h2 { color: var(--_news-text); font-size: 1.5rem; margin: 1.2rem 0 .4rem; }
.post-content h3 { color: var(--_news-text); font-size: 1.25rem; margin: 1rem 0 .3rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0; }
.post-share { margin: 1rem 0; color: var(--_news-muted); }
.post-share a { color: var(--_news-accent); text-decoration: none; }
.post-share a:hover { text-decoration: underline; }
.link-back-wrap { margin: 1.2rem 0 4rem; }
.link-back { color: var(--_news-muted); text-decoration: none; }
.link-back:hover { color: var(--_news-accent); text-decoration: underline; }

/* Minor tweaks on small screens */
@media (max-width: 420px) {
  .news-hero__title { font-size: 1.8rem; }
  .post-title { font-size: 1.8rem; }
}