/* =============================================================
   Single Post – Figma Blog Detail Page Styles
   ============================================================= */

/* ---- Hero Banner ---- */
.sp-hero {
  position: relative;
  min-height: 470px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

.sp-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 44, 77, 0.55);
  pointer-events: none;
}

.sp-hero__container {
  position: relative;
  z-index: 2;
  padding-bottom: 48px;
}

.sp-hero__content {
  max-width: 768px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-hero__badge {
  display: inline-flex;
  align-items: center;
  background: #158ee2;
  color: #004666;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  padding: 4px 10px;
  border-radius: 9999px;
  width: fit-content;
  text-transform: capitalize;
}

.sp-hero__title {
  font-family: 'Mulish', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.96px;
  margin: 0;
}

.sp-hero__meta {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.sp-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.sp-hero__meta-item svg {
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.9);
}

/* ---- Breadcrumb Bar ---- */
.sp-breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid #f1f2f9;
  padding: 20px 0;
}

.sp-breadcrumb-nav .breadcrumb-trail {
  display: block;
}

.sp-breadcrumb-nav .trail-browse {
  display: none;
}

.sp-breadcrumb-nav .trail-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-breadcrumb-nav .trail-item {
  display: flex;
  align-items: center;
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  position: static;
  padding: 0;
}

.sp-breadcrumb-nav .trail-item a,
.sp-breadcrumb-nav .trail-item span[itemprop="item"],
.sp-breadcrumb-nav .trail-item span[itemprop="name"] {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-size: 14px;
}

.sp-breadcrumb-nav .trail-item a:hover {
  color: #0b2c4d;
}

.sp-breadcrumb-nav .trail-item.trail-end > span[itemprop="item"],
.sp-breadcrumb-nav .trail-item.trail-end span[itemprop="name"] {
  color: #0b2c4d;
  font-weight: 700;
}

.sp-breadcrumb-nav .trail-item::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='5' height='8' viewBox='0 0 5 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L4 4L1 7' stroke='rgba(0%2C0%2C0%2C0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-color: transparent;
  margin: 0 8px;
  mask-image: none;
  position: static;
  transform: none;
}

.sp-breadcrumb-nav .trail-item.trail-begin::after {
  display: inline-block;
}

.sp-breadcrumb-nav .trail-item.trail-end::after {
  display: none;
}

/* ---- Body Layout ---- */
.sp-body {
  padding: 56px 0 96px;
}

.sp-layout {
  display: grid;
  grid-template-columns: 1fr 386px;
  gap: 48px;
  align-items: start;
}

/* ---- Main Content ---- */
.sp-main {
  min-width: 0;
}

.sp-content {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #0b2c4d;
  line-height: 1.5;
}

.sp-content > p:first-child {
  font-style: italic;
  color: #3985f8;
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.sp-content p {
  margin-bottom: 24px;
  line-height: 1.5;
}

.sp-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0b2c4d;
  margin: 40px 0 8px;
}

.sp-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0b2c4d;
  margin: 32px 0 8px;
}

.sp-content h4,
.sp-content h5,
.sp-content h6 {
  font-weight: 700;
  color: #0b2c4d;
  margin: 24px 0 8px;
}

.sp-content img {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 24px;
  display: block;
}

.sp-content figure {
  margin: 0 0 24px;
}

.sp-content figure img {
  border-radius: 16px;
}

.sp-content ul,
.sp-content ol {
  margin: 0 0 24px 24px;
}

.sp-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.sp-content blockquote {
  border-left: 3px solid #3985f8;
  padding: 8px 0 8px 20px;
  margin: 0 0 24px;
  font-style: italic;
  color: #3985f8;
}

.sp-content a {
  color: #0b2c4d;
  text-decoration: underline;
}

.sp-content strong,
.sp-content b {
  font-weight: 700;
}

/* ---- Sidebar ---- */
.sp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 24px;
}

.sp-widget {
  background: #fff;
  border: 1px solid #f1f2f9;
  border-radius: 12px;
  padding: 16px 17px;
  box-shadow: 0 5px 7.5px rgba(25, 33, 61, 0.06);
}

.sp-widget__label {
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

/* Search Widget */
.sp-search-form {
  margin: 0;
}

.sp-search-field {
  display: flex;
  align-items: center;
  background: #f8f9ff;
  border: 1px solid rgba(198, 198, 205, 0.5);
  border-radius: 8px;
  padding: 10px 12px 10px 17px;
  gap: 8px;
}

.sp-search-field input[type="search"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.7);
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
}

.sp-search-field input[type="search"]::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.sp-search-field button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sp-search-field button:hover {
  color: #0b2c4d;
}

/* Related Guides Widget */
.sp-widget--related {
  padding-bottom: 17px;
}

.sp-related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.sp-related-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-decoration: none;
}

.sp-related-item:hover .sp-related-item__info h4 {
  color: #158ee2;
}

.sp-related-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.sp-related-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.sp-related-item__info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.sp-related-item__info h4 {
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0b2c4d;
  letter-spacing: 0.7px;
  line-height: 1.43;
  margin: 0 0 6px;
  transition: color 0.2s;
}

.sp-related-item__info span {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1.5;
}

/* Newsletter Widget */
.sp-widget--newsletter {
  background: #131b2e;
  border-color: #131b2e;
  position: relative;
  overflow: hidden;
  padding: 32px;
  box-shadow: 0 5px 15px rgba(25, 33, 61, 0.06);
}

.sp-newsletter__deco {
  position: absolute;
  width: 128px;
  height: 128px;
  background: #006591;
  border-radius: 9999px;
  bottom: -32px;
  right: -32px;
  filter: blur(32px);
  opacity: 0.2;
  pointer-events: none;
}

.sp-newsletter__title {
  font-family: 'Mulish', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  position: relative;
  z-index: 1;
}

.sp-newsletter__desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.sp-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.sp-newsletter__input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(241, 242, 249, 0.2);
  border-radius: 8px;
  padding: 11px 17px;
  font-family: 'Mulish', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.sp-newsletter__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.sp-newsletter__input:focus {
  border-color: rgba(62, 169, 242, 0.5);
}

.sp-newsletter__btn {
  background: #3ea9f2;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'Mulish', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #004666;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: background 0.2s;
}

.sp-newsletter__btn:hover {
  background: #1a90d9;
}

/* ---- CF7 inside Newsletter widget ---- */
.sp-widget--newsletter .sp-newsletter__form .wpcf7 {
  position: relative;
  z-index: 1;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form p {
  margin: 0;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="email"],
.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="text"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(241, 242, 249, 0.2);
  border-radius: 8px;
  padding: 11px 17px;
  font-family: 'Mulish', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="email"]::placeholder,
.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="email"]:focus,
.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="text"]:focus {
  border-color: rgba(62, 169, 242, 0.5);
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="submit"] {
  background: #3ea9f2;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'Mulish', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #004666;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: background 0.2s;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-form input[type="submit"]:hover {
  background: #1a90d9;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-not-valid-tip {
  color: rgba(255, 100, 100, 0.9);
  font-size: 13px;
}

.sp-widget--newsletter .sp-newsletter__form .wpcf7-response-output {
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 12px;
  margin: 4px 0 0;
  border-color: rgba(62, 169, 242, 0.4);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

/* ---- Responsive ---- */
@media screen and (max-width: 1200px) {
  .sp-layout {
    grid-template-columns: 1fr 320px;
    gap: 32px;
  }
}

@media screen and (max-width: 1024px) {
  .sp-hero__title {
    font-size: 36px;
  }

  .sp-layout {
    grid-template-columns: 1fr 280px;
    gap: 24px;
  }
}

@media screen and (max-width: 768px) {
  .sp-hero {
    min-height: 320px;
  }

  .sp-hero__title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .sp-hero__meta {
    gap: 12px;
  }

  .sp-hero__meta-item {
    font-size: 14px;
  }

  .sp-layout {
    grid-template-columns: 1fr;
  }

  .sp-sidebar {
    position: static;
  }

  .sp-body {
    padding: 32px 0 60px;
  }
}

@media screen and (max-width: 480px) {
  .sp-hero {
    min-height: 260px;
  }

  .sp-hero__title {
    font-size: 22px;
  }

  .sp-hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .sp-hero__container {
    padding-bottom: 32px;
  }
}
