/* ── Site-specific overrides for the Astro migration ── */

/* Nav */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
#site-nav.nav-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
/* Remove underline from nav links and buttons */
.header-nav-link,
.button-2,
.btn-primary {
  text-decoration: none;
}


/* Mobile nav open state */
@media (max-width: 991px) {
  #nav-menu.nav-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--neutral--100, #fff);
    z-index: 200;
    padding: 2rem;
    justify-content: center;
    align-items: center;
  }
  #nav-menu.nav-open .header-nav-menu-list {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* Hamburger bars — animate to × when open */
#nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#nav-toggle.is-open .hamburger-menu-bar.top {
  transform: translate3d(0, 8px, 0) rotate(45deg);
}
#nav-toggle.is-open .hamburger-menu-bar.bottom {
  transform: translate3d(0, -8px, 0) rotate(-45deg);
}

/* Ticker track */
.ticker-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  line-height: 1.5em;
  color: var(--secondary--color-4, #888);
  z-index: -1;
  font-size: inherit;
}

/* FAQ — reset button to look like the original div */
.rl-faq_question {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.rl-faq_question .faq-05_icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Blog post layout */
.blog-post-header {
  margin-bottom: 2rem;
}
.blog-post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-top: 1rem;
}
.blog-post-description {
  font-size: 1.2rem;
  color: var(--neutral--600, #666);
  margin-top: 0.5rem;
}
.blog-post-hero {
  margin-bottom: 2rem;
}
.blog-hero-image {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.blog-post-body {
  max-width: 760px;
  margin: 0 auto;
}
.blog-post-body h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.blog-post-body h3 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.blog-post-body p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.blog-post-body th,
.blog-post-body td {
  border: 1px solid #e0e0e0;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.blog-post-body th {
  background: #f5f5f5;
  font-weight: 600;
}
.blog-post-body pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
.blog-post-body code {
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
  background: #f0f0f0;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.blog-post-body pre code {
  background: none;
  padding: 0;
}
.blog-post-body ul,
.blog-post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.blog-post-body li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
/* Image spacing */
.blog-post-body img {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}
/* Nested lists */
.blog-post-body li > ul,
.blog-post-body li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
  padding-left: 1.25rem;
}
.blog-post-body li > ul li,
.blog-post-body li > ol li {
  margin-bottom: 0.25rem;
}

/* Blog card link */
.blog-card-wrapper-2 {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Scroll progress bar ──────────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--secondary--color-4, #ff4a60);
  z-index: 150;
  transition: width 0.08s linear;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
}

/* ── Blog listing ─────────────────────────────────────────────────────────── */
.blog-listing-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 0 5rem;
}
.blog-listing-header {
  margin-bottom: 2.5rem;
}
.blog-listing-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--neutral--800, #0b0b0b);
  margin: 0 0 0.75rem;
}
.blog-listing-intro {
  font-size: 1.1rem;
  color: var(--neutral--600, #555);
  margin: 0 0 0.4rem;
}
.blog-listing-count {
  font-size: 0.875rem;
  color: var(--neutral--400, #999);
  margin: 0;
}
.blog-empty {
  color: var(--neutral--400, #999);
  padding: 2rem 0;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-list-item {
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}
.post-list-item:last-child {
  border-bottom: 1px solid rgba(11, 11, 11, 0.08);
}
.post-list-link {
  display: block;
  padding: 1.75rem 0;
  text-decoration: none;
  color: inherit;
}
.post-list-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.post-list-date {
  font-size: 0.85rem;
  color: var(--neutral--400, #999);
}
.post-list-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--neutral--800, #0b0b0b);
  margin: 0 0 0.5rem;
  transition: color 0.15s ease;
}
.post-list-link:hover .post-list-title {
  color: var(--secondary--color-4, #ff4a60);
}
.post-list-excerpt {
  font-size: 0.95rem;
  color: var(--neutral--600, #555);
  line-height: 1.6;
  margin: 0;
}

/* ── Blog post page ───────────────────────────────────────────────────────── */
.post-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}
.post-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral--600, #555);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.15s ease;
}
.post-back-btn:hover {
  color: var(--secondary--color-4, #ff4a60);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--neutral--400, #999);
  margin-top: 0.75rem;
}
.post-meta-sep {
  color: var(--neutral--300, #bbb);
}

/* Table of contents */
.toc-container {
  border: 1px solid rgba(11, 11, 11, 0.1);
  border-radius: 0.75rem;
  margin: 2rem 0;
  overflow: hidden;
  background: rgba(250, 249, 246, 0.6);
}
.toc-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--neutral--800, #0b0b0b);
}
.toc-summary::-webkit-details-marker { display: none; }
.toc-summary::marker { display: none; }
.toc-summary::after {
  content: '';
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
details[open].toc-container .toc-summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.toc-nav {
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}
.toc-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.toc-nav li a {
  font-size: 0.875rem;
  color: var(--neutral--600, #555);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 0.15rem 0;
  transition: color 0.15s ease;
}
.toc-nav li a:hover {
  color: var(--secondary--color-4, #ff4a60);
}
.toc-nav li.toc-h3 {
  padding-left: 1.25rem;
}
.toc-nav li.toc-h3 a {
  font-size: 0.825rem;
}

/* Share section */
.share-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}
.share-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neutral--400, #999);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 0.5rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--neutral--800, #0b0b0b);
  text-decoration: none;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.share-btn:hover {
  background: var(--neutral--800, #0b0b0b);
  color: var(--neutral--200, #faf9f6);
  border-color: var(--neutral--800, #0b0b0b);
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--neutral--800, #0b0b0b);
  color: var(--neutral--200, #faf9f6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--secondary--color-4, #ff4a60);
}

/* Copy code buttons */
.blog-post-body pre {
  position: relative;
}
.copy-code-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.3rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.5;
}
.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.copy-code-btn.copied {
  color: var(--secondary--color-5, #81e644);
  border-color: var(--secondary--color-5, #81e644);
}

/* Heading anchor links */
.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4 {
  position: relative;
}
.heading-anchor {
  position: absolute;
  left: -1.4rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--neutral--400, #999);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.85em;
  transition: opacity 0.15s ease;
  padding-right: 0.25rem;
}
.blog-post-body h2:hover .heading-anchor,
.blog-post-body h3:hover .heading-anchor,
.blog-post-body h4:hover .heading-anchor {
  opacity: 1;
}

@media (max-width: 900px) {
  .blog-listing-layout { padding: 2rem 0 4rem; }
  .post-layout { padding: 1.5rem 0 4rem; }
  .blog-listing-title { font-size: 2rem; }
  .heading-anchor { display: none; }
  #back-to-top { bottom: 1.25rem; right: 1.25rem; }
}


/* Extras section — consistent image heights so headlines align */
.card-info .img-about {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.25rem;
}

/* Pricing cards — space between subtitle and CTA button */
.rl-pricing_button-wrapper {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── Services tag cloud ───────────────────────────────────────────────────── */
.services-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
  align-items: center;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  background: #f0f0f0;
  color: var(--neutral--800, #0b0b0b);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  cursor: default;
}
.service-tag:hover {
  background: var(--neutral--800, #0b0b0b);
  color: #fff;
  transform: translateY(-2px);
}

.service-tag.tag-accent {
  background: rgba(255, 74, 96, 0.1);
  color: #c0303f;
}
.service-tag.tag-accent:hover {
  background: var(--secondary--color-4, #ff4a60);
  color: #fff;
}

.service-tag.tag-lg {
  font-size: 1.05rem;
  padding: 0.55rem 1.35rem;
  font-weight: 600;
}
.service-tag.tag-md {
  font-size: 0.95rem;
  padding: 0.5rem 1.2rem;
}
.service-tag.tag-sm {
  font-size: 0.8rem;
  padding: 0.38rem 0.95rem;
  font-weight: 400;
}

@media (max-width: 767px) {
  .services-cloud {
    gap: 0.5rem;
  }
  .service-tag.tag-lg {
    font-size: 0.95rem;
    padding: 0.5rem 1.1rem;
  }
}

/* Ready to Start — vertically center text and buttons */
.cta.custom {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-text.custom {
  display: flex;
  align-items: center;
  width: 100%;
}
/* Form states */
.form-success,
.form-error {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}
.form-success { background: #e8f5e9; color: #2e7d32; }
.form-error   { background: #fce4ec; color: #c62828; }
