:root {
  --white: #fff;
  --teal-light: #a3c6c6;
  --teal-dark: #2a646f;
  --brown: #c69c6d;
  --pale: rgba(163,198,198,0.10);
  --text: #1c1c1c;
  --text-mid: #4a4a4a;
  --text-soft: #888;
  --r: 40px;
  --sans: "Satoshi", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.blog-public {
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  margin: 0;
  overflow-x: hidden;
}

.blog-wrap {
  margin: 0 auto;
  max-width: 1140px;
  padding: 0 48px;
}

.blog-wrap-art {
  margin: 0 auto;
  max-width: 900px;
  padding: 0 48px;
}

.blog-header {
  background: var(--teal-dark);
  padding: 64px 0 0;
}

.blog-header-inner {
  padding-bottom: 52px;
  text-align: center;
}

.blog-eyebrow,
.related-label {
  color: var(--teal-light);
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.blog-header h1 {
  color: #fff;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 16px;
}

.blog-header h1 .w300 {
  color: rgba(255,255,255,.55);
  font-weight: 300;
}

.blog-header-sub {
  color: rgba(255,255,255,.68);
  font-size: 1rem;
  margin: 0 auto;
  max-width: 560px;
}

.filter-bar {
  border-top: 1px solid rgba(163,198,198,.2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
}

.filter-btn {
  background: rgba(255,255,255,.10);
  border: 0;
  border-radius: var(--r);
  color: rgba(255,255,255,.75);
  cursor: pointer;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 9px 20px;
  text-transform: uppercase;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--brown);
  color: #fff;
}

.filter-tab-indicator {
  background: rgba(163,198,198,.15);
  border-radius: 2px 2px 0 0;
  height: 3px;
  margin-top: 20px;
}

.blog-main {
  padding: 64px 0 96px;
}

.featured {
  background: var(--pale);
  border-radius: var(--r);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 72px;
  min-height: 440px;
  overflow: hidden;
}

.featured.hidden,
.article-card.hidden,
.load-more-wrap.hidden {
  display: none;
}

.featured-img,
.card-img,
.hero-image,
.inline-img {
  background: linear-gradient(145deg, rgba(163,198,198,.35), rgba(42,100,111,.22));
  overflow: hidden;
  position: relative;
}

.featured-img img,
.card-img img,
.hero-image img,
.inline-img img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.img-placeholder,
.img-ph {
  align-items: center;
  color: var(--teal-dark);
  display: flex;
  font-size: .7rem;
  font-weight: 700;
  height: 100%;
  justify-content: center;
  letter-spacing: .1em;
  min-height: 240px;
  opacity: .55;
  text-transform: uppercase;
}

.featured-badge,
.card-cat-badge,
.cat-pill {
  background: var(--brown);
  border-radius: var(--r);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 6px 14px;
  text-transform: uppercase;
}

.featured-badge,
.card-cat-badge {
  left: 24px;
  position: absolute;
  top: 24px;
}

.cat-pill {
  background: var(--teal-dark);
}

.read-time {
  align-items: center;
  display: inline-flex;
  font-weight: 500;
  gap: 6px;
}

.read-time svg {
  fill: none;
  height: 13px;
  stroke: var(--teal-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 13px;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 48px;
}

.featured-cat,
.card-cat {
  color: var(--teal-dark);
  display: block;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .16em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.featured-title {
  color: var(--teal-dark);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.18;
  margin: 0 0 18px;
}

.featured-excerpt,
.card-excerpt,
.article-subtitle {
  color: var(--text-mid);
}

.featured-meta,
.card-meta,
.article-info-row,
.article-meta-top {
  align-items: center;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .78rem;
}

.dot,
.cdot {
  background: var(--teal-light);
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

.btn-read,
.btn-load {
  align-items: center;
  background: var(--marrone-chiaro);
  border: 0;
  border-radius: var(--r);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: .71rem;
  font-weight: 800;
  gap: 8px;
  letter-spacing: .12em;
  padding: 13px 30px;
  text-decoration: none;
  text-transform: uppercase;
  margin-top: 30px;
}

.articles-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}

.articles-label h2 {
  color: var(--teal-dark);
  font-size: 1.3rem;
  margin: 0;
}

.articles-grid,
.related-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card {
  background: #fff;
  border: 1px solid rgba(163,198,198,.22);
  border-radius: 24px;
  color: inherit;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.article-card:hover {
  box-shadow: 0 18px 45px rgba(42,100,111,.12);
  transform: translateY(-3px);
}

.card-img {
  aspect-ratio: 4 / 3;
}

.card-body {
  padding: 24px;
}

.card-title {
  color: var(--teal-dark);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 12px;
}

.empty-state {
  background: var(--pale);
  border-radius: 20px;
  color: var(--text-mid);
  display: none;
  padding: 30px;
  text-align: center;
}

.empty-state.visible {
  display: block;
}

.load-more-wrap {
  margin-top: 38px;
  text-align: center;
}

.newsletter {
  background: var(--teal-dark);
  border-radius: 28px;
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr auto;
  margin-bottom: 0;
  padding: 34px;
}

.newsletter h2,
.newsletter p {
  margin: 0;
}

.newsletter span {
  color: var(--teal-light);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.newsletter-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.newsletter-form input,
.newsletter-form button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  padding: 13px 18px;
}

.newsletter-form button {
  background: var(--brown);
  color: #fff;
  font-weight: 800;
}

/* Keep global footer assets untouched even if blog.css is loaded after style.css. */
body.blog-public > footer {
  margin-top: clamp(80px, 9vw, 120px);
}

footer .social img {
  width: 60px;
}

footer catapultismo img {
  display: inline-block;
  height: auto;
  margin-top: -3px;
  max-width: 25px;
  padding-left: 5px;
  width: 25px;
}

.progress-bar {
  background: var(--brown);
  height: 4px;
  left: 0;
  position: fixed;
  top: 0;
  width: 0;
  z-index: 9999;
}

.article-header {
  padding: 72px 0 38px;
}

.article-title {
  color: var(--teal-dark);
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  line-height: 1.05;
  margin: 20px 0;
}

.article-info-row {
  border-bottom: 1px solid rgba(163,198,198,.35);
  border-top: 1px solid rgba(163,198,198,.35);
  justify-content: space-between;
  margin-top: 34px;
  padding: 20px 0;
}

.article-date {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 500;
}

.share-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.share-label {
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin-right: 4px;
  text-transform: uppercase;
}

.share-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--marrone-chiaro);
  border-radius: 50%;
  color: var(--marrone-chiaro);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
  width: 34px;
}

.share-btn:hover,
.share-btn:focus-visible,
.share-btn.copied {
  background: var(--marrone-chiaro);
  border-color: var(--marrone-chiaro);
  color: #fff;
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-btn:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

.share-btn svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 14px;
}

.hero-image {
  background: none;
  border-radius: 30px;
  min-height: 0;
}

.hero-image img,
.inline-img img {
  display: block;
  height: auto;
  object-fit: contain;
}

.article-body {
  color: var(--text-mid);
  font-size: 1.08rem;
  padding: 52px 0 0;
}

.article-body h2 {
  color: var(--teal-dark);
  font-size: 1.8rem;
  line-height: 1.18;
  margin: 42px 0 16px;
}

.article-body p,
.article-body ul {
  margin: 0 0 22px;
}

.article-body li {
  margin-bottom: 8px;
}

.inline-img {
  background: none;
  border-radius: 24px;
  margin: 34px 0 10px;
  min-height: 0;
}

.inline-img-caption {
  color: var(--text-soft);
  font-size: .86rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.article-tag {
  background: var(--pale);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: .76rem;
  font-weight: 800;
  padding: 8px 13px;
  text-decoration: none;
}

.author-box {
  background: var(--pale);
  border-radius: 28px;
  display: grid;
  gap: 20px;
  grid-template-columns: 86px 1fr;
  margin-top: 56px;
  padding: 28px;
}

.author-photo {
  align-items: center;
  background: var(--teal-dark);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-weight: 800;
  height: 86px;
  justify-content: center;
  width: 86px;
}

.author-label {
  color: var(--brown);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.author-name {
  color: var(--teal-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

.section-divider {
  background: rgba(163,198,198,.45);
  height: 1px;
  margin-bottom: 40px;
}

.related-title {
  color: var(--teal-dark);
  margin: 0 0 24px;
}

@media (max-width: 900px) {
  .featured,
  .newsletter,
  .author-box {
    grid-template-columns: 1fr;
  }

  .articles-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-wrap,
  .blog-wrap-art {
    padding: 0 22px;
  }

  .blog-header {
    padding-top: 48px;
  }

  .articles-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .article-info-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body.blog-public > footer {
    margin-top: 72px;
  }
}

@media (max-width: 480px) {
  footer .social img {
    width: 40px;
  }
}

@media (max-width: 375px) {
  footer .social img {
    width: 35px;
  }
}
