

/* Same blog-card and title-link style from blog_slider_tabs */
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.blog-card img {
  width: 100%;
  aspect-ratio: 960 / 640;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover img {
  transform: scale(1.05);
}
.title-link {
  padding: 1rem 0;
  color: #2563eb;
  transition: transform 0.3s ease;
}
.title-link:hover {
  transform: translateY(-3px);
}

/* 🧩 Prevent Swiper transforms from affecting blog content */
main.main-content,
main.main-content img,
main.main-content .video-container {
  transform: none !important;
  perspective: none !important;
  backface-visibility: visible !important;
  isolation: isolate;
  position: relative;
  z-index: 10;
}

/* Specific Page Content Area (Narrower for readability) */
.main-content {
    max-width: 56rem; /* Keep your specific narrow width */
    margin: 0 auto;  /* Center it */
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    /* --- Updated Spacing --- */
    /* Mobile: Matches the 2rem top and 1.5rem sides */
    padding: 2rem 1rem; 
}

@media (min-width: 1024px) {
    .main-content {
        /* Desktop: Matches the 4rem top and 2rem sides */
        padding: 4rem 2rem; 
    }
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.prose h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
.prose h2 { font-size: 1.875rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.prose-text { font-size: 1.125rem; color: #4b5563; line-height: 1.625; margin-bottom: 1rem; }
.text-bold { font-weight: bold; }
.text-underline { text-decoration: underline; }
.prose img {
  width: 100%; border-radius: 0.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
              0 2px 4px -1px rgba(0,0,0,0.06);
}
.prose a {
  color: #2563eb; font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.prose a:hover { text-decoration: underline; transform: translateY(-2px); }




/* ==================================================
   SWIPER CORE (LAYOUT SAFE)
   ================================================== */
.related-swiper {
    padding-bottom: 80px;
    perspective: 1200px;

    /* ✅ keep swiper inside page layout */
    overflow: hidden;

    isolation: isolate; /* prevents 3D bleed */
}

/* ==================================================
   BASE SLIDE
   ================================================== */
.related-swiper .swiper-slide {
    width: 100%;
    max-width: 300px; /* ✅ prevents horizontal overflow */
    height: auto;

    display: flex;
    flex-direction: column;

    transform-style: preserve-3d;
    backface-visibility: hidden;

    opacity: 0.6;
    transition:
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.4s ease;
}

/* ==================================================
   ACTIVE SLIDE (FRONT)
   ================================================== */
.related-swiper .swiper-slide-active {
    transform: translateZ(110px) scale(1.06);
    opacity: 1;
    z-index: 10;
}

/* ==================================================
   PREVIOUS / NEXT DEPTH CONTROL
   ================================================== */
.related-swiper .swiper-slide-prev {
    transform: translateX(-50px) rotateY(14deg) translateZ(-80px);
}

.related-swiper .swiper-slide-next {
    transform: translateX(50px) rotateY(-14deg) translateZ(-80px);
}

/* ==================================================
   NAVIGATION BUTTONS (INSIDE LAYOUT)
   ================================================== */
.related-prev,
.related-next {
    position: absolute !important;
    top: 40% !important;

    width: 44px !important;
    height: 44px !important;

    background: rgba(17, 24, 39, 0.9) !important;
    color: #ffffff !important;

    border-radius: 9999px !important;
    z-index: 20 !important;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

/* ✅ keep arrows INSIDE container */
.related-prev { left: 8px !important; }
.related-next { right: 8px !important; }

@media (min-width: 1280px) {
    .related-prev { left: 12px !important; }
    .related-next { right: 12px !important; }
}

.related-prev::after,
.related-next::after {
    font-size: 18px !important;
    font-weight: 700;
}

.related-prev:hover,
.related-next:hover {
    background: #2563eb !important;
    transform: scale(1.1);
}

/* ==================================================
   PAGINATION (PREMIUM STYLE)
   ================================================== */
.related-pagination .swiper-pagination-bullet {
    background: rgba(37, 99, 235, 0.4);
    transition: all 0.25s ease;
}

.related-pagination .swiper-pagination-bullet-active {
    width: 26px;
    border-radius: 12px;
    background: #2563eb;
}

/* Force the button container to stay row-based even if cramped */
.mt-auto.flex-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

/* Ensure buttons don't get squashed below their text width */
.mt-auto.flex-row a {
    min-width: 0; /* Allows flex-1 to work correctly in narrow containers */
    display: block;
}
