/* ============================================
   SINGLE POST - DESIGN SYSTEM STRUCTURE
   ============================================ */

/* Component Wrapper - Handles max-width for Single Post */
.asl-component-wrapper.asl-single-post-wrapper {
  max-width: var(--max-width-container) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Apply full-width breakout to ALL screen sizes */
body .asl-single-post-section {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

/* Main Section - Design System Variables */
.asl-single-post-section {
  width: 100%;
  padding: var(--padding-desktop) var(--padding-sides-desktop) !important;
  background: var(--color-white) !important;
  position: relative;
}

/* Tablet Section Padding */
@media (max-width: 1024px) {
  .asl-single-post-section {
    padding: var(--padding-tablet) var(--padding-sides-desktop) !important;
  }
}

/* Mobile Section Padding */
@media (max-width: 768px) {
  .asl-single-post-section {
    padding: var(--padding-mobile) var(--padding-sides-mobile) !important;
  }
}

/* ========================================
   MAIN CONTENT CONTAINER
   ======================================== */

.asl-single-post-wrapper .asl-single-post-container {
  max-width: var(--max-width-container);
  margin: 0 auto;
  width: 100%;
}

/* ========================================
   BLOG LAYOUT - TWO COLUMN
   ======================================== */

.asl-single-post-wrapper .asl-single-post__layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 80px;
  align-items: start;
}

/* Tablet Layout */
@media (max-width: 1024px) {
  .asl-single-post-wrapper .asl-single-post__layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

/* Mobile Layout */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__layout {
    gap: 48px;
  }
}

/* ========================================
   MAIN ARTICLE CONTENT
   ======================================== */

.asl-single-post-wrapper .asl-single-post__main {
  max-width: 800px;
}

.asl-single-post-wrapper .asl-single-post__article {
  margin: 0;
}

/* Category Badge */
.asl-single-post-wrapper .asl-single-post__category {
  color: var(--color-gold);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
  font-family: var(--font-body);
}

/* Article Title - H1 */
.asl-single-post-wrapper .asl-single-post__title {
  font-family: Georgia, serif;
  font-size: 64px;
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 24px 0;
}

/* Tablet H1 */
@media (max-width: 1024px) {
  .asl-single-post-wrapper .asl-single-post__title {
    font-size: 48px;
  }
}

/* Mobile H1 */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__title {
    font-size: 32px;
  }
}

/* Meta Information */
.asl-single-post-wrapper .asl-single-post__meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--color-charcoal);
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 2px dashed var(--color-gold);
  font-family: var(--font-body);
}

/* Mobile Meta */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* Featured Image */
.asl-single-post-wrapper .asl-single-post__featured-image {
  width: 100%;
  height: 450px;
  border-radius: 4px;
  margin-bottom: 48px;
  overflow: hidden;
}

.asl-single-post-wrapper .asl-single-post__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tablet Featured Image */
@media (max-width: 1024px) {
  .asl-single-post-wrapper .asl-single-post__featured-image {
    height: 350px;
  }
}

/* Mobile Featured Image */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__featured-image {
    height: 250px;
  }
}

/* ========================================
   ARTICLE BODY CONTENT
   ======================================== */

.asl-single-post-wrapper .asl-single-post__body {
  font-family: var(--font-body) !important;
  font-size: 18px !important;
  font-weight: var(--weight-regular) !important;
  line-height: 1.8 !important;
  color: var(--color-charcoal) !important;
}

.asl-single-post-wrapper .asl-single-post__body p {
  margin-bottom: 24px;
}

.asl-single-post-wrapper .asl-single-post__body h2 {
  font-family: var(--font-body) !important;
  font-size: 40px !important;
  font-weight: var(--weight-bold) !important;
  color: var(--color-navy) !important;
  margin: 48px 0 24px 0 !important;
  line-height: 1.3 !important;
}

.asl-single-post-wrapper .asl-single-post__body h3 {
  font-family: var(--font-body) !important;
  font-size: var(--font-h3) !important;
  font-weight: var(--weight-medium) !important;
  color: var(--color-navy) !important;
  margin: 36px 0 20px 0 !important;
  line-height: var(--line-height-h3) !important;
}

.asl-single-post-wrapper .asl-single-post__body ul,
.asl-single-post-wrapper .asl-single-post__body ol {
  margin: 24px 0;
  padding-left: 30px;
}

.asl-single-post-wrapper .asl-single-post__body li {
  margin-bottom: 12px;
}

.asl-single-post-wrapper .asl-single-post__body a {
  color: var(--color-gold);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.asl-single-post-wrapper .asl-single-post__body a:hover {
  color: var(--color-navy);
}

.asl-single-post-wrapper .asl-single-post__body blockquote {
  font-family: Georgia, serif;
  font-size: 28px;
  font-style: italic;
  color: var(--color-navy);
  padding: 40px;
  border-left: 4px solid var(--color-gold);
  background: var(--color-mist);
  margin: 48px 0;
  border-radius: 2px;
}

.asl-single-post-wrapper .asl-single-post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 32px 0;
}

/* Mobile Body Text */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__body {
    font-size: 16px !important;
  }

  .asl-single-post-wrapper .asl-single-post__body h2 {
    font-size: 24px !important;
  }

  .asl-single-post-wrapper .asl-single-post__body blockquote {
    font-size: 22px;
    padding: 24px;
  }
}

/* Page Links for Paginated Posts */
.asl-single-post-wrapper .asl-single-post__page-links {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-silver);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
}

/* ========================================
   TAGS
   ======================================== */

.asl-single-post-wrapper .asl-single-post__tags {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-silver);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.asl-single-post-wrapper .asl-single-post__tags-label {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  color: var(--color-charcoal);
  font-size: 14px;
}

.asl-single-post-wrapper .asl-single-post__tag {
  display: inline-block;
  padding: 8px 20px;
  background: var(--color-mist);
  color: var(--color-charcoal);
  font-size: 13px;
  font-weight: var(--weight-medium);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

/* ========================================
   AUTHOR BIO
   ======================================== */

.asl-single-post-wrapper .asl-single-post__author-bio {
  margin-top: 60px;
  padding: 40px;
  background: var(--color-mist);
  border-radius: 4px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.asl-single-post-wrapper .asl-single-post__author-avatar {
  flex-shrink: 0;
}

.asl-single-post-wrapper .asl-single-post__author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.asl-single-post-wrapper .asl-single-post__author-name {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  margin: 0 0 12px 0;
}

.asl-single-post-wrapper .asl-single-post__author-description {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-charcoal);
  margin: 0;
}

/* Mobile Author Bio */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__author-bio {
    flex-direction: column;
    padding: 24px;
  }
}

/* ========================================
   POST NAVIGATION
   ======================================== */

.asl-single-post-wrapper .asl-single-post__navigation {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.asl-single-post-wrapper .asl-single-post__nav-previous,
.asl-single-post-wrapper .asl-single-post__nav-next {
  min-height: 100px;
}

.asl-single-post-wrapper .asl-single-post__nav-next {
  text-align: right;
}

.asl-single-post-wrapper .asl-single-post__nav-link {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--color-mist);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 100%;
}

.asl-single-post-wrapper .asl-single-post__nav-link:hover {
  background: var(--color-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(198, 161, 91, 0.2);
}

.asl-single-post-wrapper .asl-single-post__nav-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-charcoal);
  margin-bottom: 12px;
  display: block;
}

.asl-single-post-wrapper
  .asl-single-post__nav-link:hover
  .asl-single-post__nav-label {
  color: var(--color-white);
}

.asl-single-post-wrapper .asl-single-post__nav-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  line-height: 1.4;
}

.asl-single-post-wrapper
  .asl-single-post__nav-link:hover
  .asl-single-post__nav-title {
  color: var(--color-white);
}

/* Tablet Navigation */
@media (max-width: 1024px) {
  .asl-single-post-wrapper .asl-single-post__nav-link {
    padding: 20px;
    min-height: 90px;
  }

  .asl-single-post-wrapper .asl-single-post__nav-title {
    font-size: 17px;
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__navigation {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 60px;
  }

  .asl-single-post-wrapper .asl-single-post__nav-next {
    text-align: left;
  }

  .asl-single-post-wrapper .asl-single-post__nav-link {
    padding: 16px;
    min-height: 70px;
  }

  .asl-single-post-wrapper .asl-single-post__nav-title {
    font-size: 16px;
  }
}

/* ========================================
   SIDEBAR
   ======================================== */

.asl-single-post-wrapper .asl-single-post__sidebar {
  position: sticky;
  top: 40px;
  height: fit-content;
}

.asl-single-post-wrapper .asl-single-post__sidebar-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-silver);
}

/* ========================================
   RELATED POSTS
   ======================================== */

.asl-single-post-wrapper .asl-single-post__related-post {
  margin-bottom: 32px;
  transition: transform 0.3s ease;
}

.asl-single-post-wrapper .asl-single-post__related-post:hover {
  transform: translateX(8px);
}

.asl-single-post-wrapper .asl-single-post__related-image {
  width: 100%;
  height: 180px;
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
  display: block;
}

.asl-single-post-wrapper .asl-single-post__related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.asl-single-post-wrapper
  .asl-single-post__related-post:hover
  .asl-single-post__related-image
  img {
  transform: scale(1.05);
}

.asl-single-post-wrapper .asl-single-post__related-image--placeholder {
  background: linear-gradient(
    135deg,
    var(--color-mist) 0%,
    var(--color-silver) 100%
  );
  position: relative;
}

.asl-single-post-wrapper .asl-single-post__related-image--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(198, 161, 91, 0.1) 0%,
    rgba(30, 58, 95, 0.05) 100%
  );
}

.asl-single-post-wrapper .asl-single-post__related-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-semibold);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.asl-single-post-wrapper .asl-single-post__related-title a {
  color: var(--color-navy);
  text-decoration: none;
  transition: color 0.3s ease;
}

.asl-single-post-wrapper .asl-single-post__related-title a:hover {
  color: var(--color-gold);
}

.asl-single-post-wrapper .asl-single-post__related-excerpt {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-charcoal);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.asl-single-post-wrapper .asl-single-post__read-more {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

.asl-single-post-wrapper .asl-single-post__read-more::after {
  content: "→";
  margin-left: 8px;
  transition: margin-left 0.3s ease;
}

.asl-single-post-wrapper .asl-single-post__read-more:hover {
  color: var(--color-navy);
}

.asl-single-post-wrapper .asl-single-post__read-more:hover::after {
  margin-left: 12px;
}

/* Tablet Related Posts - Horizontal Layout */
@media (max-width: 1024px) {
  /* Stack sidebar below main content */
  .asl-single-post-wrapper .asl-single-post__layout {
    grid-template-columns: 1fr;
  }

  /* Make sidebar not sticky */
  .asl-single-post-wrapper .asl-single-post__sidebar {
    position: relative;
    top: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    grid-template-rows: auto;
  }

  /* Sidebar title spans full width */
  .asl-single-post-wrapper .asl-single-post__sidebar-title {
    grid-column: 1 / -1;
  }

  /* Remove hover translateX on tablet */
  .asl-single-post-wrapper .asl-single-post__related-post:hover {
    transform: none;
  }
}

/* Mobile Related Posts - Vertical Stack */
@media (max-width: 768px) {
  /* Stack related articles vertically */
  .asl-single-post-wrapper .asl-single-post__sidebar {
    grid-template-columns: 1fr;
  }

  /* Restore hover on mobile */
  .asl-single-post-wrapper .asl-single-post__related-post:hover {
    transform: translateX(8px);
  }
}
/* ========================================
   PHONE WIDTH - nothing wider than the screen
   A grid track sized "1fr" grows to fit its widest child. The price
   tables in a post are ~390px, so on a 375px phone the article column
   grew past the screen and the whole page slid sideways, cutting text
   and the Related Articles cards. minmax(0, 1fr) lets the column shrink;
   the table scrolls inside its own box instead.
   ======================================== */
.asl-single-post-wrapper .asl-single-post__layout {
  grid-template-columns: minmax(0, 1fr) 350px;
}

@media (max-width: 1024px) {
  .asl-single-post-wrapper .asl-single-post__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .asl-single-post-wrapper .asl-single-post__sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .asl-single-post-wrapper .asl-single-post__sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
}

.asl-single-post-wrapper .asl-single-post__main,
.asl-single-post-wrapper .asl-single-post__sidebar {
  min-width: 0;
}

.asl-single-post-wrapper .asl-single-post__body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.asl-single-post-wrapper .asl-single-post__body img,
.asl-single-post-wrapper .asl-single-post__body iframe {
  max-width: 100%;
  height: auto;
}

.asl-single-post-wrapper .asl-single-post__body {
  overflow-wrap: break-word;
}
