/* ============================================================
   HUGONG BLOG STYLES
   Listing (/blog) + Single post (/blog/{slug})
   ============================================================ */

/* ---------- BLOG HERO ---------- */
.blog-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
}
.blog-hero__title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -0.5px;
}
.blog-hero__subtitle {
    font-size: 17px;
    color: #d0d0d0;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---------- BLOG LISTING GRID ---------- */
.blog-listing {
    padding: 60px 0;
    background: #fafafa;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.blog-card__image-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}
.blog-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__image-wrap img {
    transform: scale(1.05);
}
.blog-card__body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card__meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}
.blog-card__dot { margin: 0 6px; }
.blog-card__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}
.blog-card__title a {
    color: #1a1a1a;
    text-decoration: none;
}
.blog-card__title a:hover { color: #f6cc00; }
.blog-card__excerpt {
    font-size: 14.5px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
}
.blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-top: auto;
}
.blog-card__read-more:hover { color: #f6cc00; }

/* ---------- PAGINACIJA ---------- */
.blog-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.blog-pagination__prev,
.blog-pagination__next {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.blog-pagination__prev:hover,
.blog-pagination__next:hover {
    background: #f6cc00;
    color: #1a1a1a;
}
.blog-pagination__info {
    color: #666;
    font-size: 14px;
}

/* ---------- BLOG EMPTY STATE ---------- */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
}
.blog-empty h2 { font-size: 24px; margin-bottom: 12px; }

/* ============================================================
   SINGLE POST STYLES
   ============================================================ */

.blog-article {
    background: #fff;
    padding: 50px 0 70px;
}
.blog-article .container {
    max-width: 820px;
}

/* ---------- ARTICLE HEADER ---------- */
.blog-article__header {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: #777;
    margin-bottom: 18px;
}
.blog-article__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.blog-article__meta svg { color: #999; }
.blog-article__updated {
    background: #fffbe6;
    color: #8a6d00;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.blog-article__title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}
.blog-article__excerpt {
    font-size: 19px;
    color: #555;
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

/* ---------- HERO IMAGE ---------- */
.blog-article__hero {
    margin: 0 0 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.blog-article__hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- ARTICLE CONTENT (typography) ---------- */
.blog-article__content {
    font-size: 17px;
    line-height: 1.75;
    color: #2a2a2a;
}
.blog-article__content > p,
.blog-article__content > ul,
.blog-article__content > ol,
.blog-article__content > blockquote {
    margin: 0 0 22px;
}
.blog-article__content h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    margin: 50px 0 18px;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}
.blog-article__content h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 36px 0 14px;
    color: #1a1a1a;
}
.blog-article__content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 10px;
    color: #1a1a1a;
}
.blog-article__content a {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: #f6cc00;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.blog-article__content a:hover {
    background: #fff5b3;
}
.blog-article__content strong { font-weight: 700; color: #1a1a1a; }
.blog-article__content ul,
.blog-article__content ol {
    padding-left: 26px;
}
.blog-article__content li {
    margin-bottom: 8px;
}

/* ---------- TL;DR / SAŽETAK BOX ---------- */
.blog-tldr {
    background: #fffbe6;
    border-left: 4px solid #f6cc00;
    padding: 20px 24px;
    margin: 0 0 32px;
    border-radius: 6px;
}
.blog-tldr h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px;
    color: #8a6d00;
}
.blog-tldr p { margin: 0; font-size: 15.5px; }

/* ---------- TABLE OF CONTENTS ---------- */
.blog-toc {
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 0 0 36px;
}
.blog-toc h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px !important;
    color: #555;
}
.blog-toc ol {
    margin: 0;
    padding-left: 22px;
    font-size: 15px;
}
.blog-toc li { margin-bottom: 6px; }
.blog-toc a {
    color: #1a1a1a !important;
    text-decoration: none !important;
}
.blog-toc a:hover { color: #f6cc00 !important; }

/* ---------- CALLOUT / INFO BOX ---------- */
.blog-callout {
    background: #f0f7ff;
    border-left: 4px solid #2b78d4;
    padding: 18px 22px;
    margin: 24px 0;
    border-radius: 6px;
    font-size: 15.5px;
}
.blog-callout--warning {
    background: #fff4e5;
    border-left-color: #e09100;
}
.blog-callout--tip {
    background: #f0faf2;
    border-left-color: #2da44e;
}
.blog-callout strong { display: block; margin-bottom: 4px; }

/* ---------- COMPARISON TABLE ---------- */
.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.blog-table th,
.blog-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.blog-table th {
    background: #1a1a1a;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.blog-table tr:nth-child(even) td { background: #fafafa; }

/* ---------- INLINE PRODUCT RECOMMENDATION ---------- */
.blog-inline-product {
    display: flex;
    gap: 18px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: all 0.2s ease;
}
.blog-inline-product:hover {
    border-color: #f6cc00;
    background: #fffbe6;
}
.blog-inline-product__image {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.blog-inline-product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.blog-inline-product__body { flex: 1; }
.blog-inline-product__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 4px;
    display: block;
}
.blog-inline-product__name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
}
.blog-inline-product__desc {
    font-size: 14px;
    color: #555;
    margin: 0 0 8px;
}
.blog-inline-product__cta {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 13.5px;
}

/* ============================================================
   PREPORUČENI PROIZVODI (na dnu članka)
   ============================================================ */
.blog-related-products {
    margin: 60px 0 40px;
    padding: 40px 0 0;
    border-top: 2px solid #eee;
}
.blog-related-products__title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
}
.blog-related-products__subtitle {
    color: #666;
    margin: 0 0 28px;
    font-size: 15px;
}
.blog-related-products__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.blog-product-card {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: all 0.2s ease;
}
.blog-product-card:hover {
    border-color: #f6cc00;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.blog-product-card__image {
    flex-shrink: 0;
    width: 140px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.blog-product-card__image img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}
.blog-product-card__body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-product-card__note {
    background: #1a1a1a;
    color: #f6cc00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 6px;
    width: fit-content;
    font-weight: 700;
}
.blog-product-card__name {
    font-size: 15.5px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}
.blog-product-card__price {
    margin-bottom: 10px;
}
.blog-product-card__price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-right: 6px;
}
.blog-product-card__price-new {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 16px;
}
.blog-product-card__cta {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 600;
    margin-top: auto;
}

/* ---------- FAQ ---------- */
.blog-faq {
    margin: 50px 0 40px;
    padding: 40px 0 0;
    border-top: 2px solid #eee;
}
.blog-faq__title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 24px;
}
.blog-faq__item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}
.blog-faq__question {
    cursor: pointer;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 16px;
    list-style: none;
    position: relative;
    padding-right: 50px;
    color: #1a1a1a;
}
.blog-faq__question::-webkit-details-marker { display: none; }
.blog-faq__question::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 400;
    color: #f6cc00;
    transition: transform 0.2s;
}
.blog-faq__item[open] .blog-faq__question::after {
    content: '−';
}
.blog-faq__answer {
    padding: 0 22px 18px;
    color: #444;
    line-height: 1.7;
    font-size: 15.5px;
}
.blog-faq__answer p { margin: 0 0 10px; }
.blog-faq__answer p:last-child { margin-bottom: 0; }

/* ---------- AUTHOR BOX ---------- */
.blog-author-box {
    display: flex;
    gap: 22px;
    background: #fafafa;
    border-radius: 8px;
    padding: 26px;
    margin: 50px 0 0;
    align-items: flex-start;
}
.blog-author-box__avatar {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.blog-author-box__avatar img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.blog-author-box__content h3 {
    font-size: 17px;
    margin: 0 0 8px;
    color: #1a1a1a;
}
.blog-author-box__content p {
    margin: 0 0 8px;
    font-size: 14.5px;
    color: #555;
    line-height: 1.65;
}
.blog-author-box__content a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #f6cc00;
}

/* ---------- RELATED POSTS ---------- */
.blog-related-posts {
    margin: 50px 0 0;
    padding: 40px 0 0;
    border-top: 2px solid #eee;
}
.blog-related-posts__title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 24px;
}
.blog-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.blog-related-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: all 0.2s ease;
}
.blog-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border-color: #f6cc00;
}
.blog-related-card__image {
    aspect-ratio: 16 / 9;
    background: #eee;
    overflow: hidden;
}
.blog-related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-related-card__body {
    padding: 14px 16px 18px;
}
.blog-related-card__body h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.35;
}
.blog-related-card__cta {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 13px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-related-products__grid { grid-template-columns: 1fr; }
    .blog-related-posts__grid { grid-template-columns: repeat(2, 1fr); }
    .blog-article__title { font-size: 32px; }
    .blog-hero__title { font-size: 34px; }
}

/* ============================================================
   CATEGORY → BLOG WIDGET (internal linking sa category.php)
   Kompaktan redizajn: list-style sa malim sličicama, ne grid kartice.
   ============================================================ */
.category-blog-widget {
    background: #ffffff;
    padding: 48px 0 56px;
    border-top: 1px solid #eaeaea;
}
.category-blog-widget__header {
    text-align: center;
    margin-bottom: 28px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.category-blog-widget__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a1a1a;
    line-height: 1.3;
}
.category-blog-widget__subtitle {
    color: #777;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Lista umesto grida — kompaktno, čisto */
.category-blog-widget__grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
}

.category-blog-widget__card {
    display: flex !important;
    align-items: center;
    gap: 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: all 0.18s ease;
}
.category-blog-widget__card:hover {
    background: #fffbe6;
    border-color: #f6cc00;
    transform: translateX(3px);
}

.category-blog-widget__image {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 6px;
}
.category-blog-widget__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-blog-widget__body {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-blog-widget__badge {
    background: transparent;
    color: #b8860b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 0;
    margin: 0;
    display: inline-block;
    text-transform: uppercase;
}

.category-blog-widget__heading {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Excerpt sakrijemo — naslov + reading time je dovoljno za list mode */
.category-blog-widget__excerpt {
    display: none;
}

.category-blog-widget__cta {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    margin: 0;
}

.category-blog-widget__more {
    text-align: center;
    margin-top: 28px;
}
.category-blog-widget__more a {
    display: inline-block;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 22px;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    transition: all 0.18s ease;
}
.category-blog-widget__more a:hover {
    background: #f6cc00;
    border-color: #f6cc00;
}

@media (max-width: 600px) {
    .category-blog-widget { padding: 36px 0 40px; }
    .category-blog-widget__title { font-size: 19px; }
    .category-blog-widget__subtitle { font-size: 13px; }
    .category-blog-widget__card { padding: 10px 12px; gap: 12px; }
    .category-blog-widget__image { flex: 0 0 64px; width: 64px; height: 48px; }
    .category-blog-widget__heading { font-size: 14px; }
}

@media (max-width: 600px) {
    .blog-hero { padding: 40px 0 32px; }
    .blog-hero__title { font-size: 26px; }
    .blog-hero__subtitle { font-size: 15px; }
    .blog-listing { padding: 40px 0; }
    .blog-grid { grid-template-columns: 1fr; gap: 22px; }
    .blog-article { padding: 30px 0 50px; }
    .blog-article__title { font-size: 26px; }
    .blog-article__excerpt { font-size: 16px; }
    .blog-article__content { font-size: 16px; }
    .blog-article__content h2 { font-size: 22px; margin: 36px 0 14px; }
    .blog-article__content h3 { font-size: 18px; }
    .blog-article__meta { gap: 10px; font-size: 12.5px; }
    .blog-inline-product { flex-direction: column; text-align: left; }
    .blog-inline-product__image { width: 100%; height: 160px; }
    .blog-related-posts__grid { grid-template-columns: 1fr; }
    .blog-product-card { flex-direction: column; }
    .blog-product-card__image { width: 100%; padding: 18px; }
    .blog-author-box { flex-direction: column; align-items: center; text-align: center; }
    .blog-table { font-size: 13.5px; }
    .blog-table th, .blog-table td { padding: 8px 10px; }
}
