/* —— Blog detail —— */
.hp-blog-detail {
    --hp-blog-hero-cream: #f9f3ed;
    --hp-blog-related-muted: #666;
    /* ~558px në desktop të zakonshëm; zvogëlohet me vw/vh (monitor / dritare) */
    --hp-blog-hero-height: clamp(260px, min(34vw, 52vh), 558px);
}

/* Hero: full width of parent (.container-main / main), no 100vw hack (avoids broken calc + scrollbars) */
.hp-blog-detail .page-hero-wrapper {
    width: 100vw;          /* span full viewport width */
    margin-left: calc(-50vw + 50%); /* cancel parent centering */
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;      /* prevent shrinking */
}

/* 50 / 50: cream + title | photo — lartësi ~558px max, dinamike me ekranin */
.hp-blog-detail .page-hero-split--with-media .page-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    max-height: 558px;
    overflow: hidden;
}

.hp-blog-detail .page-hero-split--text-only .page-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: clamp(200px, min(28vw, 32vh), 380px);
    overflow: hidden;
}

.hp-blog-detail .page-hero-left-panel {
    box-sizing: border-box;
    min-width: 0;
    background-color: var(--hp-blog-hero-cream, #f9f3ed);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 5rem);
    text-align: center;
}

.hp-blog-detail .page-hero-left-inner {
    max-width: 35rem;
}

.hp-blog-detail .page-hero-header {
    margin: 0;
}

.hp-blog-detail .page-hero-title {
    margin: 0;
    color: #2a2a2a;
    font-size: 65px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hp-blog-detail .page-hero-right-panel {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
    display: flex;
    align-items: stretch;
    background-color: #e8e8e8;
}

.hp-blog-detail .page-hero-image {
    width: 100%;
    height: auto;            /* let height follow aspect ratio */
    max-height: 558px;       /* optional: cap height if needed */
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Mobile: kolona njëra mbi tjetrën; lartësia e fotos veç e kufizuar */
@media (max-width: 767.98px) {
    .hp-blog-detail .page-hero-split--with-media .page-hero-main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        height: auto;
        max-height: none;
    }

    .hp-blog-detail .page-hero-split--with-media .page-hero-left-panel {
        order: 1;
        min-height: auto;
    }

    .hp-blog-detail .page-hero-split--with-media .page-hero-right-panel {
        order: 2;
        height: clamp(200px, 52vw, min(360px, 55vh));
        min-height: 200px;
    }

    .hp-blog-detail .page-hero-split--with-media .page-hero-image {
        min-height: 0;
        height: 100%;
    }
}

/* Content column below hero (bazë: mobile / tablet) */
.hp-blog-detail__below-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/*
 * Laptop (~768px–1439px): si container-i kryesor i faqes (max-width 1440px, 15px anash).
 * PC i madh (≥1440px): më shumë padding horizontal, përmbajtja mbetet e kufizuar.
 */
@media (min-width: 768px) and (max-width: 1439.98px) {
    /* Parandalon scrollbar horizontal nga breakout 100vw */
    article.hp-blog-detail {
        overflow-x: hidden;
    }

    /*
     * Hero: gjerësi e plotë e viewport-it (titull + foto); lartësi ≥ një ekran
     * → përshkrimi duket vetëm pas scroll.
     */
    .hp-blog-detail .page-hero-wrapper {
        width: 100vw;          /* span full viewport width */
        margin-left: calc(-50vw + 50%); /* cancel parent centering */
        margin-right: calc(-50vw + 50%);
        max-width: 100vw;      /* prevent shrinking */
    }

    .hp-blog-detail .page-hero-split--with-media .page-hero-main {
        flex: 1 1 auto;
        align-self: stretch;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        max-height: none;
        grid-template-rows: minmax(0, 1fr);
    }

    .hp-blog-detail .page-hero-split--text-only .page-hero-main {
        flex: 1 1 auto;
        align-self: stretch;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        grid-template-rows: minmax(0, 1fr);
    }

    .hp-blog-detail .page-hero-title {
        font-size: 65px;
        line-height: 1.08;
    }

    article.hp-blog-detail > .container-main {
        max-width: 1320px;
        margin: 0 auto;
        padding: 0 2rem; /* adjust as needed */
    }
    .container-main {
        min-height: auto; /* or a smaller value */
    }
    article.hp-blog-detail .hp-blog-detail__below-hero {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 1440px) {
    article.hp-blog-detail > .container-main {
        max-width: 1320px;
        margin: 0 auto;
        padding: 0 2rem; /* adjust as needed */
    }
    .container-main {
        min-height: auto; /* or a smaller value */
    }

    article.hp-blog-detail .hp-blog-detail__below-hero {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 3rem;
    }
}

.hp-blog-detail__main {
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: clamp(1.25rem, 3vw, 1.75rem) 0 3rem;
    padding: 0;
    display: flow-root;
}

.hp-blog-detail__intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1.5rem;
}

.hp-blog-detail__body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    display: flow-root;
    font-size: 1rem;
    line-height: 1.65;
    color: #2a2a2a;
}

/*
 * Përmbajtje e ngjitur nga faqe të tjera (copy/paste) sjell inline width/font.
 * Override që teksti të përdorë gjerësinë e plotë të kolonës, jo ~850px fiks.
 */
.hp-blog-detail__body :where(p, h1, h2, h3, h4, h5, h6, div, section, article, ul, ol, blockquote) {
    max-width: 100% !important;
    width: auto !important;
}

.hp-blog-detail__body img {
    max-width: 100%;
    height: auto;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Pa margin-collapse në krye të kolonës së tekstit */
.hp-blog-detail__body > :first-child {
    margin-top: 0;
}

/*
 * Titulli kryesor i përmbajtjes (si Geroba): i njëjti stil për h1 / h2 / h3.
 */
article.hp-blog-detail .hp-blog-detail__body > h1:first-child,
article.hp-blog-detail .hp-blog-detail__body > h2:first-child,
article.hp-blog-detail .hp-blog-detail__body > h3:first-child,
article.hp-blog-detail .hp-blog-detail__body > p:first-child + h1,
article.hp-blog-detail .hp-blog-detail__body > p:first-child + h2,
article.hp-blog-detail .hp-blog-detail__body > p:first-child + h3,
article.hp-blog-detail .hp-blog-detail__body > div:first-child > h1:first-child,
article.hp-blog-detail .hp-blog-detail__body > div:first-child > h2:first-child,
article.hp-blog-detail .hp-blog-detail__body > div:first-child > h3:first-child,
article.hp-blog-detail .hp-blog-detail__body > section:first-child > h1:first-child,
article.hp-blog-detail .hp-blog-detail__body > section:first-child > h2:first-child,
article.hp-blog-detail .hp-blog-detail__body > section:first-child > h3:first-child,
article.hp-blog-detail .hp-blog-detail__body > article:first-child > h1:first-child,
article.hp-blog-detail .hp-blog-detail__body > article:first-child > h2:first-child,
article.hp-blog-detail .hp-blog-detail__body > article:first-child > h3:first-child {
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 1rem;
}

article.hp-blog-detail .hp-blog-detail__body > p:first-child + h1,
article.hp-blog-detail .hp-blog-detail__body > p:first-child + h2,
article.hp-blog-detail .hp-blog-detail__body > p:first-child + h3 {
    margin-top: 0;
}

/* Nënseksione: margin; madhësitë më poshtë (më pak specifike se titulli kryesor) */
.hp-blog-detail__body h2,
.hp-blog-detail__body h3,
.hp-blog-detail__body h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* h2 / h3 / h4 të zakonshëm — nuk e mbysin titullin kryesor (më sipër ka spec. më të lartë) */
article.hp-blog-detail .hp-blog-detail__body h2 {
    font-size: 1.2rem;
}

article.hp-blog-detail .hp-blog-detail__body h3,
article.hp-blog-detail .hp-blog-detail__body h4 {
    font-size: 1.05rem;
}

.hp-blog-detail__body p {
    margin-bottom: 1rem;
}

.hp-blog-detail__body p:last-child {
    margin-bottom: 0;
}

.hp-blog-detail__body em,
.hp-blog-detail__body i {
    font-style: italic;
}

.hp-blog-detail__body strong,
.hp-blog-detail__body b {
    font-weight: 700;
}

.hp-blog-detail__body ul,
.hp-blog-detail__body ol {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.hp-blog-detail__body li {
    margin-bottom: 0.4rem;
}

.hp-blog-detail__body li:last-child {
    margin-bottom: 0;
}

/* Galeri në description: 3 foto në një rresht (përdor <div class="hp-blog-detail__gallery">…</div>) */
.hp-blog-detail__body .hp-blog-detail__gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.5rem, 2vw, 1rem);
    margin: 1.25rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hp-blog-detail__body .hp-blog-detail__gallery img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    padding-right: 0;
}

@media (max-width: 767.98px) {
    .hp-blog-detail__body .hp-blog-detail__gallery {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hp-blog-detail__body .hp-blog-detail__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hp-blog-detail__related {
    margin-top: 2.5rem;
    padding-top: 0;
    border-top: none;
}

.hp-blog-detail__related-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 40px;
    color: #222;
}

.hp-blog-detail__related-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
}

@media (max-width: 991.98px) {
    .hp-blog-detail__related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .hp-blog-detail__related-grid {
        grid-template-columns: 1fr;
    }
}

.hp-blog-detail__related-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.hp-blog-detail__related-link:hover .hp-blog-detail__related-item-title {
    text-decoration: underline;
}

.hp-blog-detail__related-thumb {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 120px;
    -ms-flex: 0 0 120px;
    flex: 0 0 120px;
    max-width: 120px;
    height: 120px;
    overflow: hidden;
}

.hp-blog-detail__related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-blog-detail__related-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.hp-blog-detail__related-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.hp-blog-detail__related-item-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.35;
    color: #111;
}

.hp-blog-detail__related-date {
    font-size: 0.875rem;
    color: var(--hp-blog-related-muted);
}

@media print {
    .page-hero-wrapper {
        width: 100%;
        max-width: none;
    }
}
