/**
 * Single Blog Post Widget Styles
 *
 * @package LeadershipAddons
 * @since   1.0.0
 */

/* ──────────────────────────────────────────────────────────────
 *  CONTAINER & LAYOUT
 * ────────────────────────────────────────────────────────────── */

.lael-single-post {
  max-width: 100%;
  margin: 0 auto;
  font-family: var(--lael-font-sans);
  width: 100% !important; /* Ensure full width */
}

.lael-single-post__layout {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* 32px */
  width: 100% !important; /* Ensure full width */
}

@media (min-width: 1024px) {
  .lael-single-post__layout {
    flex-direction: row;
    gap: 3rem; /* 48px */
  }
}

/* Sidebar-left layout reversal */
.lael-single-post__layout--sidebar-left {
  flex-direction: column;
}

@media (min-width: 1024px) {
  .lael-single-post__layout--sidebar-left {
    flex-direction: row-reverse;
  }
}

/* ── Main Content Area ── */

.lael-single-post__main {
  width: 100% !important; /* Force 100% width on mobile/tablet, override Elementor */
  min-width: 0; /* Prevent flex item from overflowing */
  order: 1; /* Show main content first on mobile/tablet */
}

@media (min-width: 1024px) {
  .lael-single-post__main {
    order: 0; /* Reset order on desktop */
    width: 100% !important; /* Reset to 100% by default */
  }

  .lael-single-post__main--with-sidebar {
    width: 66.6667% !important; /* lg:w-2/3 */
  }
}

@media (min-width: 1280px) {
  .lael-single-post__main--with-sidebar {
    width: 75% !important; /* xl:w-3/4 */
  }
}

.lael-single-post-notice {
  padding: 20px;
  background-color: #f0f0f1;
  border-left: 4px solid #2271b1;
  margin: 20px 0;
}

.lael-single-post-notice p {
  margin: 0;
  color: #2c3338;
}

/* ──────────────────────────────────────────────────────────────
 *  CONTENT
 * ────────────────────────────────────────────────────────────── */

.lael-single-post__content {
  font-size: 18px;
  line-height: 1.8;
  color: #333333;
  width: 100% !important; /* Ensure full width */
  max-width: 100% !important; /* Prevent overflow */
  word-wrap: break-word; /* Break long words */
  overflow-wrap: break-word; /* Modern browsers */
}

.lael-single-post__content p {
  margin-bottom: 1.5em;
  width: 100% !important;
  max-width: 100% !important;
}

.lael-single-post__content h2,
.lael-single-post__content h3,
.lael-single-post__content h4 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 700;
  color: var(--lael-brand-navy, #162345);
}

.lael-single-post__content h2 {
  font-size: 28px;
}

.lael-single-post__content h3 {
  font-size: 24px;
}

.lael-single-post__content h4 {
  font-size: 20px;
}

.lael-single-post__content ul,
.lael-single-post__content ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.lael-single-post__content li {
  margin-bottom: 0.5em;
}

.lael-single-post__content a {
  color: var(--lael-brand-purple, #5e439b);
  text-decoration: underline;
}

.lael-single-post__content a:hover {
  text-decoration: none;
}

.lael-single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2em 0;
}

.lael-single-post__content blockquote {
  margin: 2em 0;
  padding: 1.5em;
  border-left: 4px solid var(--lael-brand-purple, #5e439b);
  background-color: var(--lael-brand-light-bg, #f8f9fa);
  font-style: italic;
}

/* ──────────────────────────────────────────────────────────────
 *  RESPONSIVE
 * ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .lael-single-post__content {
    font-size: 16px;
  }
}

/* ──────────────────────────────────────────────────────────────
 *  BOTTOM CARDS (CTA & AUTHOR)
 * ────────────────────────────────────────────────────────────── */

.lael-single-post__bottom-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
  max-width: 100%;
  width: 100% !important; /* Ensure full width */
}

/* ── CTA Card ── */

.lael-single-post__cta-card {
  background: #6b5b95;
  border-radius: 32px;
  padding: 64px 72px;
  color: #ffffff;
  box-shadow: 0 8px 32px rgba(107, 91, 149, 0.25);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .lael-single-post__cta-card {
    padding: 56px 48px;
  }
}

@media (max-width: 768px) {
  .lael-single-post__cta-card {
    padding: 40px 32px;
    border-radius: 24px;
  }
}

.lael-single-post__cta-title {
  margin: 0 0 24px 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  /* Color controlled by Elementor */
  letter-spacing: -0.02em;
}

@media (max-width: 1024px) {
  .lael-single-post__cta-title {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .lael-single-post__cta-title {
    font-size: 32px;
    margin-bottom: 20px;
  }
}

.lael-single-post__cta-description {
  margin: 0 0 40px 0;
  font-size: 20px;
  line-height: 1.65;
  /* Color controlled by Elementor */
  max-width: 95%;
  font-weight: 400;
}

@media (max-width: 1024px) {
  .lael-single-post__cta-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .lael-single-post__cta-description {
    font-size: 17px;
    max-width: 100%;
    margin-bottom: 32px;
  }
}

.lael-single-post__cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  background: #ffffff;
  color: #6b5b95;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
}

@media (max-width: 768px) {
  .lael-single-post__cta-button {
    padding: 16px 32px;
    font-size: 17px;
  }
}

.lael-single-post__cta-button:hover {
  background: #f8f9fa;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #6b5b95;
}

.lael-single-post__cta-button:active {
  transform: translateY(-1px);
}

.lael-single-post__cta-arrow {
  font-size: 28px;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
}

.lael-single-post__cta-button:hover .lael-single-post__cta-arrow {
  transform: translateX(6px);
}

/* ── Author Card ── */

.lael-single-post__author-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem; /* 40px */
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .lael-single-post__author-card {
    padding: 2rem; /* 32px */
    border-radius: 16px;
  }
}

.lael-single-post__author-content {
  display: flex;
  gap: 2rem; /* 32px */
  align-items: flex-start;
}

@media (max-width: 768px) {
  .lael-single-post__author-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
}

.lael-single-post__author-image {
  flex-shrink: 0;
}

.lael-single-post__author-image img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #f3f4f6;
}

@media (max-width: 768px) {
  .lael-single-post__author-image img {
    width: 120px;
    height: 120px;
  }
}

.lael-single-post__author-info {
  flex: 1;
  min-width: 0;
}

.lael-single-post__author-label {
  display: inline-block;
  font-size: 0.6875rem; /* 11px */
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--lael-brand-purple, #5e439b);
  margin-bottom: 0.5rem;
}

.lael-single-post__author-name {
  margin: 0 0 0.375rem 0;
  font-size: 1.75rem; /* 28px */
  font-weight: 700;
  /* Color controlled by Elementor */
  line-height: 1.3;
}

@media (max-width: 768px) {
  .lael-single-post__author-name {
    font-size: 1.5rem; /* 24px */
  }
}

.lael-single-post__author-tagline {
  margin: 0 0 1.25rem 0;
  font-size: 1.0625rem; /* 17px */
  font-weight: 500;
  /* Color controlled by Elementor */
  line-height: 1.5;
}

@media (max-width: 768px) {
  .lael-single-post__author-tagline {
    font-size: 1rem; /* 16px */
  }
}

.lael-single-post__author-bio {
  margin: 0 0 1.75rem 0;
  font-size: 1rem; /* 16px */
  line-height: 1.7;
  /* Color controlled by Elementor */
}

@media (max-width: 768px) {
  .lael-single-post__author-bio {
    font-size: 0.9375rem; /* 15px */
  }
}

.lael-single-post__author-buttons {
  display: flex;
  gap: 0.875rem; /* 14px */
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .lael-single-post__author-buttons {
    justify-content: center;
  }
}

.lael-single-post__author-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem; /* 14px 28px */
  text-decoration: none;
  font-size: 1rem; /* 16px */
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.lael-single-post__author-button--primary {
  background: var(--lael-brand-purple, #5e439b);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(94, 67, 155, 0.2);
}

.lael-single-post__author-button--primary:hover {
  background: var(--lael-brand-navy, #162345);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(94, 67, 155, 0.3);
  text-decoration: none;
  color: #ffffff;
}

.lael-single-post__author-button--secondary {
  background: #ffffff;
  color: var(--lael-brand-navy, #162345);
  border: 2px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.lael-single-post__author-button--secondary:hover {
  border-color: var(--lael-brand-purple, #5e439b);
  color: var(--lael-brand-purple, #5e439b);
  background: #faf9fb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.lael-single-post__author-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────
 *  SIDEBAR
 * ────────────────────────────────────────────────────────────── */

.lael-single-post__sidebar {
  width: 100% !important; /* Force 100% width on mobile/tablet, override Elementor */
  min-width: 0; /* Prevent flex item from overflowing */
  order: 2; /* Show sidebar after main content on mobile/tablet */
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 24px gap between cards */
}

@media (min-width: 1024px) {
  .lael-single-post__sidebar {
    width: 33.3333% !important;
    order: 0;
    gap: 2rem; /* 32px gap on desktop */
    /* Make entire sidebar sticky on desktop */
    position: sticky;
    top: 1.5rem; /* 24px from top */
    align-self: flex-start; /* Prevent sidebar from stretching */
  }
}

@media (min-width: 1280px) {
  .lael-single-post__sidebar {
    width: 25% !important;
  }
}

/* ── Individual Sidebar Cards ── */

.lael-single-post__card {
  background-color: var(--lael-brand-light-bg, #f8f9fa);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.lael-single-post__card-title {
  margin: 0 0 1rem 0;
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  color: #5e439b; /* Default color - can be overridden by Elementor */
}

.lael-single-post__card-title--white {
  color: #ffffff;
}

/* ──────────────────────────────────────────────────────────────
 *  READING PROGRESS CARD
 * ────────────────────────────────────────────────────────────── */

/* Hide reading progress card on mobile and tablet */
.lael-single-post__card--progress {
  display: none;
}

@media (min-width: 1024px) {
  .lael-single-post__card--progress {
    display: block;
  }
}

.lael-reading-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lael-reading-progress__header .lael-single-post__card-title {
  margin: 0;
}

.lael-reading-progress__percent {
  font-size: 1.5rem; /* 24px */
  font-weight: 700;
  color: var(--lael-brand-navy, #162345);
  line-height: 1;
}

.lael-reading-progress__bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.lael-reading-progress__fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--lael-brand-purple, #5e439b) 0%,
    var(--lael-brand-navy, #162345) 100%
  );
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ──────────────────────────────────────────────────────────────
 *  RELATED POSTS CARD
 * ────────────────────────────────────────────────────────────── */

.lael-related-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* 20px */
}

.lael-related-post {
  margin: 0;
  padding: 0;
}

.lael-related-post__link {
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lael-related-post__link:hover {
  text-decoration: none;
}

.lael-related-post__category {
  display: inline-block;
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lael-brand-purple, #5e439b);
  margin-bottom: 0.5rem;
}

.lael-related-post__title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem; /* 16px */
  font-weight: 600;
  line-height: 1.4;
  color: var(--lael-brand-navy, #162345);
  transition: color 0.2s ease;
}

.lael-related-post__link:hover .lael-related-post__title {
  color: var(--lael-brand-purple, #5e439b);
}

.lael-related-post__read-time {
  font-size: 0.875rem; /* 14px */
  color: #6b7280;
}

/* ──────────────────────────────────────────────────────────────
 *  NEWSLETTER CARD
 * ────────────────────────────────────────────────────────────── */

.lael-single-post__card--newsletter {
  background: var(--lael-brand-purple, #5e439b);
  color: #ffffff;
  border: none;
}

.lael-single-post__card-description {
  margin: 0 0 1.25rem 0; /* 20px bottom */
  font-size: 0.9375rem; /* 15px */
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.lael-single-post__card-button {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1.25rem; /* 12px 20px */
  background: #ffffff;
  color: var(--lael-brand-purple, #5e439b);
  text-align: center;
  text-decoration: none;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  border-radius: 0.5rem; /* 8px */
  transition: all 0.2s ease;
}

.lael-single-post__card-button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.lael-single-post__card-button:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
