/*
 * Single blog post layout.
 * Kept separate from style.css so the reading/sidebar treatment stays isolated.
 */

.hp-single-post-page {
  --single-ink: #081326;
  --single-muted: #5f7188;
  --single-line: #d8e4f2;
  --single-blue: #2563eb;
  --single-cyan: #06b6d4;
  --single-radius: 14px;
  overflow: clip;
  background:
    radial-gradient(circle at 8% 34%, rgba(6, 182, 212, 0.08), transparent 25rem),
    linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
}

.hp-single-post-page .single-post-hero-grid {
  grid-template-columns: minmax(0, 1180px);
  justify-content: start;
  padding-top: clamp(3.2rem, 6vw, 5.4rem);
  padding-bottom: clamp(3.2rem, 6vw, 5.4rem);
}

.hp-single-post-page .single-post-hero-copy h1 {
  max-width: 1180px;
  text-wrap: balance;
}

.hp-single-post-page .single-post-shell {
  display: block;
  width: min(100% - 2rem, 1320px);
  padding-top: clamp(2.2rem, 4.5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.hp-single-post-page .single-post-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: clamp(1.25rem, 2.8vw, 2.2rem);
  align-items: start;
}

.hp-single-post-page .single-post-article {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--single-radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 19, 38, 0.1);
}

.hp-single-post-page .single-post-article .wp-featured {
  border-bottom: 1px solid var(--single-line);
  background: #dfeaf6;
}

.hp-single-post-page .single-post-article .wp-content {
  padding: clamp(1.25rem, 3vw, 2.45rem);
}

/* Keep post tables at the full reading-column width without page overflow. */
.hp-single-post-page .single-post-article .wp-content .wp-block-table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.hp-single-post-page .single-post-article .wp-content .wp-block-table table {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  margin: 0;
  table-layout: auto;
  border-collapse: collapse;
}

.hp-single-post-page .single-post-article .wp-content .wp-block-table th,
.hp-single-post-page .single-post-article .wp-content .wp-block-table td {
  min-width: 0;
  padding: clamp(0.62rem, 2vw, 0.9rem);
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
}

.hp-single-post-page .single-post-article .wp-content .wp-block-table figcaption {
  width: 100%;
  margin-inline: 0;
}

@media (max-width: 640px) {
  .hp-single-post-page .single-post-article .wp-content .wp-block-table table {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .hp-single-post-page .single-post-article .wp-content .wp-block-table th,
  .hp-single-post-page .single-post-article .wp-content .wp-block-table td {
    padding: 0.58rem;
  }
}

.hp-single-post-page .single-post-support-column {
  min-width: 0;
  align-self: stretch;
}

.hp-single-post-page .single-post-support-sticky {
  position: relative;
  display: grid;
  min-height: 100%;
  gap: 1rem;
  align-content: start;
}

.hp-single-post-page .single-post-form-origin {
  position: sticky;
  top: 96px;
  z-index: 2;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
  scrollbar-color: rgba(118, 229, 246, 0.72) rgba(255, 255, 255, 0.12);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.hp-single-post-page .single-post-mobile-form-slot {
  display: none;
}

.hp-single-post-page .single-post-form-card {
  max-width: none;
  padding: 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--single-radius);
  background:
    radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.24), transparent 15rem),
    linear-gradient(145deg, #07172e 0%, #103c78 100%);
  box-shadow: 0 24px 64px rgba(8, 19, 38, 0.2);
  backdrop-filter: none;
}

.hp-single-post-page .single-post-form-heading {
  display: grid;
  gap: 0.2rem;
  padding: 0.25rem 0.35rem 0.5rem;
}

.hp-single-post-page .single-post-form-heading .eyebrow {
  margin: 0;
  color: #76e5f6;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.hp-single-post-page .single-post-form-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.15;
  text-wrap: balance;
}

.hp-single-post-page .single-post-form-heading p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.5;
}

.hp-single-post-page .single-post-form-card .home-contact-form {
  gap: 0.42rem !important;
  padding: 0.58rem !important;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.hp-single-post-page .single-post-form-card .home-project-notice {
  padding: 0.34rem 0.45rem;
}

.hp-single-post-page .single-post-form-card .home-project-notice strong {
  font-size: 0.64rem;
}

.hp-single-post-page .single-post-form-card .home-project-notice p {
  display: none;
}

.hp-single-post-page .single-post-form-card .home-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
}

.hp-single-post-page .single-post-form-card .home-form-grid .home-phone-field,
.hp-single-post-page .single-post-form-card .home-form-grid > label:last-child {
  grid-column: 1 / -1;
}

.hp-single-post-page .single-post-form-card .home-form-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.4rem !important;
}

.hp-single-post-page .single-post-form-card .home-contact-form label,
.hp-single-post-page .single-post-form-card .home-phone-label,
.hp-single-post-page .single-post-form-card .home-service-label {
  font-size: 0.64rem !important;
}

.hp-single-post-page .single-post-form-card .home-contact-form input,
.hp-single-post-page .single-post-form-card .home-contact-form select,
.hp-single-post-page .single-post-form-card .home-contact-form textarea,
.hp-single-post-page .single-post-form-card .home-country-dropdown summary,
.hp-single-post-page .single-post-form-card .home-service-dropdown summary {
  min-height: 34px !important;
  padding: 0.4rem 0.5rem !important;
  font-size: 0.72rem !important;
}

.hp-single-post-page .single-post-form-card .home-phone-combo {
  grid-template-columns: 96px minmax(0, 1fr);
}

.hp-single-post-page .single-post-form-card .home-contact-form textarea {
  min-height: 56px !important;
}

.hp-single-post-page .single-post-form-card .home-service-options {
  grid-template-columns: 1fr;
}

.hp-single-post-page .single-post-form-card .home-service-options label {
  font-size: 0.64rem !important;
}

.hp-single-post-page .single-post-form-card .home-consent-check {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.hp-single-post-page .single-post-form-card .home-contact-form .btn {
  width: 100%;
  min-height: 36px !important;
  justify-self: stretch !important;
  font-size: 0.72rem;
}

.hp-single-post-page .single-post-form-card .home-whatsapp-line {
  margin-top: -0.18rem !important;
  font-size: 0.62rem !important;
  text-align: center;
}

.hp-single-post-page .single-inline-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: clamp(1.6rem, 3vw, 2.25rem) 0;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.14), transparent 16rem),
    #eef5ff;
}

.hp-single-post-page .single-inline-cta-copy {
  display: grid;
  gap: 0.28rem;
}

.hp-single-post-page .single-inline-cta-copy span {
  color: var(--single-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-single-post-page .single-inline-cta-copy strong {
  color: var(--single-ink);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.35;
}

.hp-single-post-page .single-inline-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.hp-single-post-page .single-inline-cta-actions .btn {
  min-height: 44px;
  padding: 0.72rem 1rem;
  color: #fff;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.hp-single-post-page .single-inline-cta-actions .btn:visited,
.hp-single-post-page .single-inline-cta-actions .btn:hover,
.hp-single-post-page .single-inline-cta-actions .btn:focus,
.hp-single-post-page .single-inline-cta-actions .btn:focus-visible {
  color: #fff;
  text-decoration: none;
}

.hp-single-post-page .single-inline-form {
  display: grid;
  gap: 1rem;
  margin: clamp(1.9rem, 4vw, 2.8rem) 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--single-radius);
  background:
    radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.2), transparent 18rem),
    linear-gradient(145deg, #07172e 0%, #103c78 100%);
  box-shadow: 0 20px 48px rgba(8, 19, 38, 0.16);
}

.hp-single-post-page .single-inline-form-heading {
  display: grid;
  gap: 0.4rem;
}

.hp-single-post-page .single-inline-form-heading .eyebrow,
.hp-single-post-page .single-inline-form-heading h2,
.hp-single-post-page .single-inline-form-heading p {
  margin: 0;
}

.hp-single-post-page .single-inline-form-heading .eyebrow {
  color: #76e5f6;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.hp-single-post-page .single-inline-form-heading h2 {
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.18;
}

.hp-single-post-page .single-inline-form-heading p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hp-single-post-page .single-inline-form .home-contact-form {
  margin: 0;
}

.hp-single-post-page .single-related-posts {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: var(--single-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(8, 19, 38, 0.08);
}

.hp-single-post-page .single-related-heading {
  display: grid;
  gap: 0.2rem;
}

.hp-single-post-page .single-related-heading .eyebrow {
  margin: 0;
  color: var(--single-blue);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
}

.hp-single-post-page .single-related-heading h2 {
  margin: 0;
  color: var(--single-ink);
  font-size: 1.2rem;
  line-height: 1.15;
}

.hp-single-post-page .single-related-list {
  display: grid;
  gap: 0.6rem;
}

.hp-single-post-page .single-related-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0.72rem;
  align-items: center;
  min-width: 0;
  padding: 0.52rem;
  border: 1px solid #e0e9f4;
  border-radius: 10px;
  background: #f8fbff;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.hp-single-post-page .single-related-card:hover,
.hp-single-post-page .single-related-card:focus-within {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 14px 30px rgba(8, 19, 38, 0.08);
  transform: translateY(-2px);
}

.hp-single-post-page .single-related-media {
  display: grid;
  width: 78px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  color: #fff !important;
  background:
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.38), transparent 4rem),
    linear-gradient(135deg, #0b2348, #2563eb);
  text-decoration: none !important;
}

.hp-single-post-page .single-related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-single-post-page .single-related-media span {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hp-single-post-page .single-related-copy {
  min-width: 0;
}

.hp-single-post-page .single-related-copy > p {
  margin: 0 0 0.22rem;
  overflow: hidden;
  color: #708198;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-single-post-page .single-related-copy h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.84rem;
  line-height: 1.35;
}

.hp-single-post-page .single-related-copy h3 a {
  color: var(--single-ink);
  text-decoration: none;
}

.hp-single-post-page .single-related-copy h3 a:hover,
.hp-single-post-page .single-related-copy h3 a:focus-visible {
  color: var(--single-blue);
}

.hp-single-post-page .single-related-more {
  justify-self: start;
  color: var(--single-blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.hp-single-post-page .single-post-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0 clamp(1.25rem, 3vw, 2.4rem) clamp(1.25rem, 3vw, 2rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--single-line);
}

.hp-single-post-page .single-post-navigation-link {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  padding: 0.9rem;
  border: 1px solid var(--single-line);
  border-radius: 11px;
  color: var(--single-ink) !important;
  background:
    radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.09), transparent 8rem),
    #f8fbff;
  text-decoration: none !important;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.hp-single-post-page .single-post-navigation-link.is-next {
  text-align: right;
}

.hp-single-post-page .single-post-navigation-link:only-child.is-next {
  grid-column: 2;
}

.hp-single-post-page .single-post-navigation-link:hover,
.hp-single-post-page .single-post-navigation-link:focus-visible {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 14px 34px rgba(8, 19, 38, 0.09);
  transform: translateY(-2px);
}

.hp-single-post-page .single-post-navigation-link span {
  color: var(--single-blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hp-single-post-page .single-post-navigation-link strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.9rem;
  line-height: 1.35;
}

@media (max-width: 1099px) {
  .hp-single-post-page .single-post-reading-grid {
    grid-template-columns: 1fr;
  }

  .hp-single-post-page .single-post-support-sticky {
    position: static;
    min-height: 0;
  }

  .hp-single-post-page .single-post-form-origin,
  .hp-single-post-page .single-post-mobile-form-slot {
    display: none;
  }

  .hp-single-post-page .single-post-mobile-form-slot {
    margin: clamp(1.8rem, 5vw, 3rem) clamp(-2.45rem, -3vw, -1.25rem);
  }

  .hp-single-post-page .single-post-mobile-form-slot .single-post-form-card {
    width: auto;
  }

  .hp-single-post-page .single-related-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hp-single-post-page .single-related-card {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .hp-single-post-page .single-related-media {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .hp-single-post-page .single-post-shell {
    width: min(100% - 1.2rem, 1320px);
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .hp-single-post-page .single-related-list,
  .hp-single-post-page .single-post-navigation {
    grid-template-columns: 1fr;
  }

  .hp-single-post-page .single-related-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .hp-single-post-page .single-related-media {
    width: 96px;
    aspect-ratio: 4 / 3;
  }

  .hp-single-post-page .single-post-navigation-link.is-next,
  .hp-single-post-page .single-post-navigation-link:only-child.is-next {
    grid-column: auto;
    text-align: left;
  }

  .hp-single-post-page .single-post-navigation-link {
    min-height: 96px;
  }

  .hp-single-post-page .single-inline-cta {
    grid-template-columns: 1fr;
  }

  .hp-single-post-page .single-inline-cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hp-single-post-page .single-inline-cta-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hp-single-post-page .single-post-form-card .home-form-grid,
  .hp-single-post-page .single-post-form-card .home-form-pair {
    grid-template-columns: 1fr !important;
  }

  .hp-single-post-page .single-post-form-card .home-form-grid .home-phone-field,
  .hp-single-post-page .single-post-form-card .home-form-grid > label:last-child {
    grid-column: auto;
  }

  .hp-single-post-page .single-post-form-card {
    padding: 0.55rem;
  }

  .hp-single-post-page .single-post-form-card .home-contact-form {
    padding: 0.68rem !important;
  }

  .hp-single-post-page .single-inline-form {
    margin-right: -0.55rem;
    margin-left: -0.55rem;
    padding: 0.75rem;
  }

  .hp-single-post-page .single-related-posts {
    padding: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-single-post-page .single-related-card,
  .hp-single-post-page .single-post-navigation-link {
    transition: none;
  }
}
