/* public/css/blog.css ------------------------------------------------- */
/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Parallax featured image (uses inline background-image on the figure) */
.parallax-figure {
    --parallax-speed: 0.16; /* lower = subtler */
    background-size: cover;
    background-position: center 50%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 320px;
    overflow: hidden;
    position: relative;
    display: block;
    will-change: background-position;
}

/* Keep an accessible image for screen readers but visually hide it */
.parallax-figure .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Larger hero height on wide screens */
@media (min-width: 992px) {
    .parallax-figure {
        min-height: 420px;
    }
}

/* Sticky sidebar */
.blog-sidebar-sticky {
  position: sticky;
  top: 20px;
  align-self: start;
}

/* Disable sticky & fixed background on small screens */
@media (max-width: 991.98px) {
  .blog-sidebar-sticky { position: static; top: auto; }
  .parallax-figure { background-attachment: scroll; }
}

/* Small helpers for spacing and look */
.blog-content-card { padding: 1.25rem; background: #fff; border-radius: 6px; box-shadow: 0 6px 18px rgba(28,40,50,0.04); }
.blog-sidebar .blog-widget { margin-bottom: 1.25rem; }
.blog-sidebar-sticky { max-width: 100%; }
.parallax-figure img { max-width: 100%; height: auto; display: block; }

/* Note: parallax movement is provided via background-attachment on large screens; a small JS enhancement
   could provide smoother multi-layer parallax if desired. */
.blog-detail-page {
    background: #ffffff;
    color: #1f2937;
    overflow-x: hidden;
}

.blog-detail-hero {
    align-items: center;
    background-position: center;
    background-size: cover;
    display: flex;
    min-height: 520px;
    padding: 110px 0;
    position: relative;
}

.blog-detail-overlay {
    background: linear-gradient(90deg, rgba(11, 18, 32, 0.82), rgba(11, 18, 32, 0.56));
    inset: 0;
    position: absolute;
}

.blog-detail-breadcrumb .breadcrumb-item,
.blog-detail-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    text-decoration: none;
}

.blog-detail-breadcrumb .breadcrumb-item.active {
    color: #ffffff;
}

.blog-detail-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.55);
}

.blog-detail-kicker {
    color: #93c5fd;
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.blog-detail-title {
    color: #ffffff;
    font-size: clamp(2.25rem, 5vw, 4.7rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0;
}

.blog-meta-section {
    margin-top: -54px;
    position: relative;
    z-index: 2;
}

.blog-meta-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
    padding: 24px 28px;
}

.blog-author-avatar {
    border: 3px solid #eff6ff;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.blog-meta-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-author-name {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
}

.blog-meta-info {
    color: #475569;
    font-size: 0.96rem;
    font-weight: 700;
}

.blog-meta-info span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.blog-meta-info i {
    color: #2563eb;
    font-size: 1.18rem;
}

.blog-detail-main {
    padding: 82px 0 70px;
}

.blog-detail-main .row {
    align-items: flex-start;
}

.blog-content-card,
.blog-widget,
.comment-form-card,
.comment-empty,
.comment-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.blog-content-card {
    padding: 32px;
}

.blog-featured-image,
.image-zoom-wrap {
    border-radius: 14px;
    display: block;
    overflow: hidden;
}

.blog-featured-image img,
.image-zoom-wrap img {
    display: block;
    transition: transform 0.45s ease;
    width: 100%;
}

.image-zoom-wrap:hover img,
.blog-featured-image:hover img {
    transform: scale(1.045);
}

.blog-content {
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.9;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #111827;
    font-weight: 800;
    line-height: 1.25;
    margin: 2.1rem 0 1rem;
}

.blog-content h2 {
    font-size: 2rem;
}

.blog-content h3 {
    font-size: 1.55rem;
}

.blog-content p {
    margin-bottom: 1.35rem;
}

.blog-content img {
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    height: auto;
    margin: 20px 0;
    max-width: 100%;
}

.blog-content blockquote {
    background: #f8fafc;
    border-left: 5px solid #2563eb;
    border-radius: 14px;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.75;
    margin: 28px 0;
    padding: 24px 26px;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.35rem;
}

.blog-content li {
    margin-bottom: 0.65rem;
}

.blog-sidebar {
    position: sticky;
    top: 90px; /* adjust for header */
    align-self: flex-start;
    z-index: 10;
}

.blog-detail-main .col-lg-4,
.blog-detail-main .col-lg-8 {
    overflow: visible;
}

.blog-sidebar.is-stuck {
    transform: translateY(6px);
}

.blog-widget {
    margin-bottom: 24px;
    padding: 26px;
}

.blog-widget-title {
    color: #0f172a;
    font-size: 1.22rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    position: relative;
}

.blog-widget-title::after {
    background: #2563eb;
    bottom: 0;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    width: 42px;
}

.blog-search-form .form-control {
    border-color: #e2e8f0;
    border-radius: 12px 0 0 12px;
    box-shadow: none;
    min-height: 50px;
}

.blog-search-form .btn {
    align-items: center;
    border-radius: 0 12px 12px 0;
    display: inline-flex;
    justify-content: center;
    min-width: 54px;
}

.recent-post-item {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 14px;
    text-decoration: none;
}

.recent-post-thumb {
    border-radius: 12px;
    flex: 0 0 86px;
    height: 72px;
}

.recent-post-thumb img {
    height: 100%;
    object-fit: cover;
}

.recent-post-title {
    color: #111827;
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.recent-post-date {
    color: #64748b;
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 6px;
}

.recent-post-item:hover .recent-post-title {
    color: #2563eb;
}

.blog-category-list .list-group-item {
    border-color: #eef2f7;
    color: #334155;
    font-weight: 700;
    padding: 14px 0;
}

.blog-category-list .list-group-item:first-child,
.blog-category-list .list-group-item:last-child {
    border-radius: 0;
}

.blog-category-list .list-group-item:hover {
    color: #2563eb;
}

.blog-tag-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 9px 13px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.blog-tag-badge:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
}

.blog-after-content {
    background: #f8fafc;
    padding: 78px 0 88px;
}

.section-heading-row {
    margin-bottom: 28px;
}

.blog-section-heading {
    color: #0f172a;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.related-post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.related-post-card:hover {
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
    transform: translateY(-4px);
}

.related-post-media {
    border-radius: 0;
    height: 220px;
}

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

.related-post-body {
    padding: 22px;
}

.related-post-date {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
}

.related-post-body h3 {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
}

.related-post-body a {
    color: #111827;
    text-decoration: none;
}

.related-post-body a:hover {
    color: #2563eb;
}

.comments-area {
    margin-top: 74px;
}

.comment-form-card,
.comment-empty,
.comment-item {
    padding: 26px;
}

.comment-avatar {
    height: 54px;
    object-fit: cover;
    width: 54px;
}

.comment-item h3 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.comment-item p,
.comment-empty p {
    color: #64748b;
    line-height: 1.7;
}

.comment-form-card .form-control {
    border-color: #e2e8f0;
    border-radius: 12px;
    min-height: 50px;
    padding: 12px 15px;
}

.comment-form-card textarea.form-control {
    min-height: 145px;
}

.blog-submit-btn {
    border-radius: 12px;
    font-weight: 800;
    min-height: 48px;
    padding: 12px 24px;
}

.fade-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .blog-detail-hero {
        min-height: 440px;
        padding: 86px 0;
    }

    .blog-detail-main {
        padding: 64px 0 56px;
    }

    .blog-sidebar {
        position: static;
        transform: none !important;
    }

    .blog-content-card {
        padding: 26px;
    }
}

@media (max-width: 767.98px) {
    .blog-detail-hero {
        min-height: 390px;
        padding: 72px 0;
    }

    .blog-meta-section {
        margin-top: -36px;
    }

    .blog-meta-card {
        padding: 20px;
    }

    .blog-content-card,
    .blog-widget,
    .comment-form-card,
    .comment-empty,
    .comment-item {
        border-radius: 14px;
        padding: 20px;
    }

    .blog-content {
        font-size: 1rem;
        line-height: 1.78;
    }

    .blog-content h2 {
        font-size: 1.55rem;
    }

    .blog-after-content {
        padding: 58px 0 68px;
    }

    .comments-area {
        margin-top: 54px;
    }
}
