/* ===== Tips / blog module ===== */

.tips-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.tips-hero__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.rp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 var(--space-3);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.rp-eyebrow::before,
.rp-eyebrow::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: color-mix(in srgb, var(--brand) 55%, transparent);
}

.tips-hero__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tips-hero__lead {
  margin: 0 auto;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
}

/* Filters */
.tips-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.tips-filter {
  display: inline-flex;
  align-items: center;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}

.tips-filter:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.tips-filter.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 28%, transparent);
}

.tips-filter.is-active:hover {
  color: #fff;
}

/* Grid */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}

@media (min-width: 640px) {
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tips-grid--related {
  margin-top: .25rem;
}

/* Card */
.tips-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out);
}

.tips-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3);
  border-color: color-mix(in srgb, var(--brand) 22%, var(--border));
}

.tips-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-2));
}

.tips-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease-out);
}

.tips-card:hover .tips-card__media img {
  transform: scale(1.04);
}

.tips-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: color-mix(in srgb, var(--brand) 55%, var(--muted));
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 50%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 45%),
    var(--surface-2);
}

.tips-card__body {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.15rem 1.2rem 1.25rem;
  flex: 1;
}

.tips-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.tips-card__tag {
  text-decoration: none;
}

.tips-card__time {
  font-size: .85rem;
  color: var(--muted);
  white-space: nowrap;
}

.tips-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.tips-card__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1.5px;
  transition: background-size .25s var(--ease-out), color .2s var(--ease-out);
}

.tips-card__title a:hover {
  color: var(--brand);
  background-size: 100% 1.5px;
}

.tips-card__excerpt {
  margin: 0;
  font-size: .95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tips-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: auto;
  padding-top: .35rem;
  font-size: .88rem;
  color: var(--muted);
}

.tips-card__author {
  font-weight: 550;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

.tips-card--compact .tips-card__body {
  gap: .5rem;
  padding: 1rem 1.05rem 1.1rem;
}

.tips-card--compact .tips-card__title {
  font-size: 1.05rem;
}

.tips-card__date {
  font-size: .85rem;
}

/* Empty */
.tips-empty {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  max-width: 32rem;
  margin: 0 auto;
}

.tips-empty__icon {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}

.tips-empty h1,
.tips-empty h2 {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.tips-empty p {
  margin: 0 0 1.35rem;
  line-height: 1.55;
}

/* CTA band */
.tips-cta-section {
  padding-top: 0;
}

.tips-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem) clamp(1.35rem, 3vw, 2.25rem);
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 70% at 100% 30%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-2);
}

.tips-cta__text {
  flex: 1 1 16rem;
  max-width: 36rem;
}

.tips-cta__text h2 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.tips-cta__text p {
  margin: 0;
  line-height: 1.55;
}

.tips-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* ===== Single article ===== */

.tip-hero {
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.25rem;
}

.tip-hero__inner {
  max-width: 46rem;
}

.tip-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.1rem;
  font-size: .9rem;
  color: var(--muted);
}

.tip-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s var(--ease-out);
}

.tip-breadcrumbs a:hover {
  color: var(--brand);
}

.tip-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  margin-bottom: 1rem;
  font-size: .92rem;
  color: var(--muted);
}

.tip-hero__title {
  margin: 0 0 .85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text);
}

.tip-hero__author {
  margin: 0;
  font-size: 1rem;
}

.tip-cover {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.tip-cover__frame {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  aspect-ratio: 21 / 9;
  background: var(--surface-2);
}

.tip-cover__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tip-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 960px) {
  .tip-layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
  }
}

.tip-content {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}

/* Article body typography */
.tip-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.tip-body > *:first-child {
  margin-top: 0;
}

.tip-body > *:last-child {
  margin-bottom: 0;
}

.tip-body h2,
.tip-body h3,
.tip-body h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 1.75em 0 .65em;
  color: var(--text);
}

.tip-body h2 { font-size: 1.45rem; }
.tip-body h3 { font-size: 1.22rem; }
.tip-body h4 { font-size: 1.08rem; }

.tip-body p {
  margin: 0 0 1.1em;
}

.tip-body a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tip-body a:hover {
  color: var(--brand-2);
}

.tip-body ul,
.tip-body ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.tip-body li {
  margin-bottom: .4em;
}

.tip-body li::marker {
  color: var(--brand);
}

.tip-body blockquote {
  margin: 1.4em 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface-2));
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  font-style: italic;
}

.tip-body blockquote p:last-child {
  margin-bottom: 0;
}

.tip-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.2em 0;
}

.tip-body pre,
.tip-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}

.tip-body code {
  padding: .12em .4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-2));
}

.tip-body pre {
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.tip-body pre code {
  padding: 0;
  background: none;
}

.tip-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: .95rem;
}

.tip-body th,
.tip-body td {
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.tip-body th {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  font-weight: 600;
}

.tip-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.tip-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Aside */
.tip-aside {
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .tip-aside {
    position: sticky;
    top: 5.5rem;
  }
}

.tip-aside__card {
  padding: 1.25rem 1.3rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}

.tip-aside__title {
  margin: 0 0 .55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tip-aside__card > .muted {
  margin: 0 0 1rem;
  font-size: .92rem;
  line-height: 1.5;
}

.tip-aside__btn {
  width: 100%;
  justify-content: center;
  margin-bottom: .65rem;
}

.tip-aside__link {
  display: inline-block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.tip-aside__link:hover {
  color: var(--brand-2);
}

.tip-aside__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tip-aside__list li + li {
  border-top: 1px solid var(--border);
}

.tip-aside__list a {
  display: block;
  padding: .65rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s var(--ease-out), padding-left .15s var(--ease-out);
}

.tip-aside__list a:hover {
  color: var(--brand);
  padding-left: .25rem;
}

/* Related */
.tip-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  margin-bottom: 1.35rem;
}

.tip-related__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}

.tip-related__all {
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.tip-related__all:hover {
  color: var(--brand-2);
}

/* Reveal stagger (visible without JS) */
html.js .tips-card.reveal,
html.js .tip-aside__card.reveal {
  transition-delay: var(--d, 0ms);
}

@media (max-width: 640px) {
  .tip-cover__frame {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }

  .tip-content {
    padding: 1.15rem 1.05rem 1.35rem;
  }

  .tips-cta {
    text-align: center;
  }

  .tips-cta__actions {
    width: 100%;
    justify-content: center;
  }
}