/* Lavio Digital blog listing page.
   Scoped to .blog-page so the legacy v11 markup can coexist with the current
   design system without changing shared header or service-page components. */

.blog-page {
  overflow-x: hidden;
}

.blog-page .soft {
  background: var(--bg-soft);
}

.blog-page .v11-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.1rem;
  padding-inline: .85rem;
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-full);
  background: rgba(238, 242, 255, .9);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.blog-page .v11-kicker::before {
  content: "";
  width: .45rem;
  height: .45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.blog-page .v11-btn {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.25rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: var(--sh-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.blog-page .v11-btn:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: var(--sh-lg);
}

.blog-page .v11-btn.primary {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

.blog-page .blog-start-here {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 8rem) 0 clamp(3.75rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line-2);
  background:
    radial-gradient(760px 420px at 82% 12%, rgba(37, 99, 235, .18), transparent 62%),
    radial-gradient(520px 320px at 10% 30%, rgba(14, 165, 233, .13), transparent 66%),
    linear-gradient(180deg, #fff 0%, #f6f8fb 100%);
}

.blog-page .blog-start-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.blog-page .blog-start-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(30, 64, 175, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, .06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 76%);
}

.blog-page .blog-start-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  background: rgba(37, 99, 235, .16);
  animation: blog-float 8s ease-in-out infinite;
}

.blog-page .blog-start-bg span:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 14%;
  right: 10%;
}

.blog-page .blog-start-bg span:nth-child(2) {
  width: 190px;
  height: 190px;
  left: 9%;
  bottom: 10%;
  background: rgba(14, 165, 233, .14);
  animation-delay: -2s;
}

.blog-page .blog-start-bg span:nth-child(3) {
  width: 120px;
  height: 120px;
  right: 34%;
  bottom: 20%;
  background: rgba(59, 130, 246, .12);
  animation-delay: -4s;
}

.blog-page .blog-start-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.blog-page .blog-start-copy h1 {
  max-width: 12ch;
  margin: .8rem 0 1.15rem;
  font-size: clamp(3.1rem, 5.6vw, 5.2rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.blog-page .blog-start-copy p {
  max-width: 38rem;
  font-size: var(--fs-lg);
  line-height: 1.65;
}

.blog-page .blog-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.blog-page .blog-start-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.blog-page .blog-start-cards a {
  position: relative;
  min-height: 9.75rem;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid rgba(191, 219, 254, .85);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 22px 70px rgba(15, 23, 42, .09);
  backdrop-filter: blur(18px);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.blog-page .blog-start-cards a::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: -45%;
  width: 85%;
  height: 75%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .18), transparent 70%);
}

.blog-page .blog-start-cards a:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .14);
}

.blog-page .blog-start-cards b,
.blog-page .blog-start-cards span {
  position: relative;
  z-index: 1;
  display: block;
}

.blog-page .blog-start-cards b {
  color: var(--ink);
  font-size: var(--fs-lg);
  line-height: 1.3;
}

.blog-page .blog-start-cards span {
  margin-top: .65rem;
  color: var(--ink-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.55;
}

.blog-page .v11-hero {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  border-bottom: 1px solid var(--line-2);
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .09), transparent 36%),
    linear-gradient(180deg, #fff, #f8fafc);
  text-align: center;
}

.blog-page .v11-hero h1 {
  max-width: 13ch;
  margin: 1rem auto 1.1rem;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.055em;
}

.blog-page .v11-hero p {
  max-width: 48rem;
  margin-inline: auto;
  font-size: var(--fs-lg);
  line-height: 1.65;
}

.blog-page .v11-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  box-shadow: var(--sh-md);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.blog-page .v11-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: var(--sh-xl);
}

.blog-page .v11-blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 1.4rem;
  align-items: stretch;
}

.blog-page .v11-featured-post {
  min-height: 31rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  overflow: hidden;
  border-radius: var(--r-2xl);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 17, 31, .16), rgba(7, 17, 31, .94)),
    url('/images/portfolio/n8n-workflow.png') center / cover;
  box-shadow: var(--sh-xl);
}

.blog-page .v11-featured-post .v11-kicker {
  width: fit-content;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  backdrop-filter: blur(12px);
}

.blog-page .v11-featured-post .v11-kicker::before {
  background: #7dd3fc;
}

.blog-page .v11-featured-post h2 {
  max-width: 17ch;
  margin: 1rem 0 .8rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.blog-page .v11-featured-post p {
  color: rgba(255, 255, 255, .78);
  font-weight: 600;
  line-height: 1.6;
}

.blog-page .v11-blog-side {
  display: grid;
  gap: .9rem;
}

.blog-page .v11-side-post {
  display: block;
  padding: 1.25rem;
}

.blog-page .v11-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding-inline: .7rem;
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-full);
  background: var(--bg-tint);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
}

.blog-page .v11-side-post h3 {
  margin: .8rem 0 .55rem;
  font-size: var(--fs-xl);
  line-height: 1.25;
}

.blog-page .v11-side-post p {
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.blog-page .v11-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.blog-page .v11-head h2 {
  max-width: 15ch;
  margin-top: .9rem;
  font-size: clamp(2.25rem, 4.5vw, 3.7rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.blog-page .v11-head > p {
  max-width: 40rem;
  line-height: 1.65;
}

.blog-page .v11-topic-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.5rem;
}

.blog-page .v11-topic-btn {
  min-height: 2.4rem;
  padding-inline: .9rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: var(--bg-elev);
  color: var(--ink-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.blog-page .v11-topic-btn:hover {
  border-color: #93c5fd;
  color: var(--accent);
}

.blog-page .v11-topic-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.blog-page .v11-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.blog-page .v11-topic {
  min-height: 11rem;
  display: block;
  padding: 1.1rem;
}

.blog-page .v11-topic > span {
  color: var(--accent-2);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.blog-page .v11-topic h3 {
  margin: .6rem 0 .55rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.blog-page .v11-topic p {
  font-size: .82rem;
  line-height: 1.5;
}

.blog-page .v11-seo-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.blog-page .v11-seo-block article {
  padding: clamp(1.35rem, 2.5vw, 1.75rem);
}

.blog-page .v11-seo-block h3 {
  margin-bottom: .7rem;
  font-size: var(--fs-2xl);
}

.blog-page .v11-seo-block p {
  line-height: 1.65;
}

.blog-page .footer {
  padding: clamp(3rem, 5vw, 4rem) 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
}

.blog-page .footer-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.25rem;
  color: #fff;
  font-size: var(--fs-xl);
  font-weight: 700;
}

.blog-page .footer-logo img {
  width: auto;
  height: 2.4rem;
}

.blog-page .footer h4 {
  margin-bottom: 1rem;
  color: #fff;
  font-size: var(--fs-sm);
}

.blog-page .contact-buttons {
  display: grid;
  gap: .75rem;
  max-width: 21rem;
}

.blog-page .contact-button {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .7rem 1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-weight: 600;
}

.blog-page .contact-button:hover {
  background: rgba(255, 255, 255, .1);
}

.blog-page .contact-button img {
  width: 1.2rem;
  height: 1.2rem;
  filter: brightness(0) invert(1);
}

.blog-page .phone-big {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: var(--fs-xl);
  font-weight: 700;
  white-space: nowrap;
}

@keyframes blog-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}

@media (max-width: 1100px) {
  .blog-page .v11-blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-page .v11-blog-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-page .v11-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .blog-page .blog-start-grid {
    grid-template-columns: 1fr;
  }

  .blog-page .blog-start-copy h1 {
    max-width: 14ch;
  }

  .blog-page .v11-head {
    display: block;
  }

  .blog-page .v11-head > p {
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  .blog-page .blog-start-here {
    padding: 4.25rem 0 3.5rem;
  }

  .blog-page .blog-start-copy h1 {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  .blog-page .blog-start-copy p,
  .blog-page .v11-hero p {
    font-size: var(--fs-md);
  }

  .blog-page .blog-start-actions,
  .blog-page .v11-blog-side {
    align-items: stretch;
  }

  .blog-page .blog-start-actions .v11-btn {
    flex: 1 1 10rem;
  }

  .blog-page .blog-start-cards,
  .blog-page .v11-blog-side,
  .blog-page .v11-topic-grid,
  .blog-page .v11-seo-block {
    grid-template-columns: 1fr;
  }

  .blog-page .blog-start-cards a {
    min-height: 8.75rem;
  }

  .blog-page .v11-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .blog-page .v11-featured-post {
    min-height: 27rem;
  }

  .blog-page .v11-topic {
    min-height: 0;
  }

  .blog-page .v11-topic-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .4rem;
    scrollbar-width: thin;
  }

  .blog-page .v11-topic-btn {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page .blog-start-bg span {
    animation: none;
  }
}
