/* --- Blog Page Styles --- */

html {
    scroll-behavior: smooth;
}

.blog-page-wrapper {
    /* No padding here so the quote can span full width */
    min-height: 50vh;
}

/* --- Header Section --- */
.blog-header {
    text-align: center;
    padding: 4rem 2rem 0;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.blog-header h1 {
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.blog-header h2 {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    line-height: 1.6;
}

/* --- Featured Articles Section --- */
.blog-featured {
    margin-bottom: 4rem;
}

/* --- Featured Carousel --- */
.blog-featured-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-featured-carousel {
    position: relative;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.blog-featured-slide {
    position: absolute;
    width: 65%;
    max-width: 800px;
    height: 100%;
    background: var(--clr-beige);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--clr-beige);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    overflow: hidden;
    transform: translateX(0) scale(0.8) translateZ(-50px);
}

@media (min-width: 768px) {
    .blog-featured-slide {
        flex-direction: row;
    }
}

.blog-featured-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 3;
    transform: translateX(0) scale(1) translateZ(0);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.blog-featured-slide.prev {
    opacity: 0.6;
    visibility: visible;
    z-index: 1;
    transform: translateX(-40%) scale(0.85) translateZ(-100px);
    cursor: pointer;
}

.blog-featured-slide.next {
    opacity: 0.6;
    visibility: visible;
    z-index: 1;
    transform: translateX(40%) scale(0.85) translateZ(-100px);
    cursor: pointer;
}

.blog-featured-slide.prev:hover,
.blog-featured-slide.next:hover {
    opacity: 0.8;
}

.slide-img-col {
    width: 100%;
    height: 260px;
    position: relative;
}

@media (min-width: 768px) {
    .slide-img-col {
        width: 55%;
        height: 100%;
    }
}

.slide-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content-col {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: var(--clr-beige);
}

@media (min-width: 768px) {
    .slide-content-col {
        width: 45%;
        padding: 2rem 2.5rem;
    }
}

.slide-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slide-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.slide-title a:hover {
    color: var(--clr-green);
}

.slide-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-featured-read-more {
    margin-top: auto;
    align-self: flex-start;
}

.blog-btn-icon {
    margin-left: 8px;
}

/* Dots — override common.css absolute positioning for blog carousel only */
.blog-featured-carousel-wrapper .slider-dots {
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 4rem;
    z-index: auto;
}

/* Blog carousel dots on white background — scoped override */
.blog-featured-carousel-wrapper .slider-dot {
    background-color: #ddd;
}

.blog-featured-carousel-wrapper .slider-dot:hover {
    background-color: #bbb;
}

.blog-featured-carousel-wrapper .slider-dot.active {
    background-color: var(--clr-green);
    width: 32px;
}

/* Responsive adjustments for carousel */
@media (max-width: 1024px) {
    .blog-featured-slide.prev {
        transform: translateX(-30%) scale(0.85) translateZ(-100px);
    }

    .blog-featured-slide.next {
        transform: translateX(30%) scale(0.85) translateZ(-100px);
    }
}

@media (max-width: 767px) {
    .blog-featured-carousel {
        height: 620px;
    }

    .blog-featured-slide {
        width: 85%;
    }

    .blog-featured-slide.prev {
        transform: translateX(-15%) scale(0.9) translateZ(-100px);
    }

    .blog-featured-slide.next {
        transform: translateX(15%) scale(0.9) translateZ(-100px);
    }

    .slide-content-col {
        flex: 1;
        padding: 1.5rem;
    }

    .slide-title {
        font-size: 1.25rem;
    }

    .slide-excerpt {
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

/* ===================================================
   Blog Category Page Header (No beige background)
   =================================================== */

.blog-category-header {
    padding: 4rem 1rem 2rem 1rem;
    text-align: center;
    background-color: #fff;
}

.blog-category-header .blog-category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.blog-category-header .blog-category-desc {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* ===================================================
   Blog Categories Beige Section
   (copies of homepage styles, since style.css isn't loaded on blog)
   =================================================== */

.blog-categories-section {
    padding: 5rem 1rem;
    background-color: var(--clr-beige);
    text-align: center;
    margin-bottom: 0;
}

.blog-categories-section .blog-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-categories-section .blog-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.blog-categories-section .blog-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.blog-categories-section .blog-brand-text {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

/* About Story (quote with wavy divider) inside blog */
.blog-categories-section .blog-about-story {
    margin-top: 4rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.blog-categories-section .blog-about-story::before {
    content: '';
    display: block;
    width: 124px;
    height: 14px;
    margin: 0 auto 1rem;
    background-image: url("data:image/svg+xml,%3Csvg width='124' height='14' viewBox='0 0 124 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 2 2 C 12 2, 12 12, 22 12 S 32 2, 42 2 S 52 12, 62 12 S 72 2, 82 2 S 92 12, 102 12 S 112 2, 122 2' stroke='%2373b7ab' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.blog-categories-section .blog-story-quote {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--clr-green);
    font-style: italic;
    line-height: 1.6;
}

.blog-main-articles {
    margin-bottom: 5rem;
}

.blog-grid-layout-start {
    align-items: flex-start;
}

/* --- Full Quote Section --- */
.blog-quote-section {
    background-color: var(--clr-beige);
    padding: 5rem 2rem;
    margin: 0 0 4rem 0;
    border-radius: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
}

@media (max-width: 768px) {
    .blog-quote-section {
        margin: 0 0 4rem 0;
    }
}

.blog-quote-section::before {
    content: '';
    display: block;
    width: 124px;
    height: 14px;
    margin: 0 auto 1rem;
    background-image: url("data:image/svg+xml,%3Csvg width='124' height='14' viewBox='0 0 124 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 2 2 C 12 2, 12 12, 22 12 S 32 2, 42 2 S 52 12, 62 12 S 72 2, 82 2 S 92 12, 102 12 S 112 2, 122 2' stroke='%2373b7ab' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.blog-quote-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--clr-green);
    font-style: italic;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Main 2-Column Section --- */
.blog-main {
    margin-bottom: 4rem;
    padding: 0 2rem;
}

.blog-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    /* Ensure the grid doesn't stretch items to equal height, which breaks position: sticky */
    align-items: start;
}

@media (max-width: 992px) {
    .blog-grid-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .blog-articles-column {
        order: 2;
        width: 100%;
    }

    .blog-sidebar-column {
        width: 100%;
    }

    .blog-post-detail .blog-sidebar-column {
        display: contents;
        /* Zásadní: umožní sticky prvku využít výšku celého layoutu */
    }

    .blog-sidebar-column .blog-nav-scroll-btn {
        display: none !important;
    }

    /* --- Výpis článků (main) --- */
    #blog-nav-main {
        position: static !important;
        max-height: none !important;
        order: 1;
        /* Bude vždy nahoře před články, ale nescrolluje */
    }

    #blog-nav-main .blog-nav-scroll-wrapper {
        max-height: none !important;
        overflow: visible !important;
    }

    /* --- Obsah článku (TOC) na mobilu --- */
    #blog-nav-toc {
        order: 1;
        position: sticky !important;
        top: 70px !important;
        /* Kousek pod fixní hlavičkou */
        z-index: 100;
        width: 100%;
        padding: 0.8rem 1rem !important;
        /* Děláme z toho jen úzkou lištu */
        margin-bottom: 0;
        transition: border-radius 0.2s, box-shadow 0.2s, padding 0.2s;
    }

    #blog-nav-toc.is-stuck {
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid #e0ddd5;
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }

    #blog-nav-toc .blog-pagination {
        margin-top: 0 !important;
    }

    #blog-nav-toc h3 {
        display: none !important;
        /* Kompletně schovat nadpis */
    }

    #blog-nav-toc .blog-nav-scroll-wrapper {
        display: none !important;
        /* Kompletně schovat všechny odkazy na nadpisy */
    }

    /* Oříznutí nadpisů pro jistotu, kdyby se náhodou ukázaly (nepoužité) */
    #blog-nav-toc .toc-link {
        display: none !important;
    }
}

/* --- Common Article Card Component --- */
.blog-article-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 3rem;
    border: 2px solid var(--clr-beige);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.blog-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.blog-article-card-img-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    overflow: hidden;
    display: block;
}

.blog-featured .blog-article-card-img-wrap {
    aspect-ratio: 1/1;
    height: auto;
}

.blog-article-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-article-card:hover img {
    transform: scale(1.03);
}

.blog-article-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
}

.blog-article-card-content {
    padding: 1.5rem;
    background: var(--clr-beige);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-featured .blog-article-card-content {
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.blog-featured .blog-article-title {
    margin-bottom: 2rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-featured .blog-btn-read-more {
    margin-top: auto;
    align-self: center;
}

.blog-article-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.blog-article-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-featured .blog-article-title {
    font-size: 1.2rem;
}

.blog-article-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-article-title a:hover {
    color: var(--clr-green);
}

.blog-article-excerpt {
    margin-bottom: 2rem;
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1.05rem;
    flex-grow: 1;
    /* Pushes button to bottom */
}

/* --- Sticky Sidebar Navigation --- */
.blog-sidebar-column {
    /* Height 100% allows the sticky child to travel the full height of the column */
    height: 100%;
}

.blog-sticky-nav {
    position: sticky;
    top: 120px;
    background: var(--clr-beige);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: none;
    display: flex;
    flex-direction: column;
}

.blog-sticky-nav h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Custom Scrolling Sidebar --- */
.blog-nav-scroll-wrapper {
    max-height: 45vh;
    /* Fits approx 5-6 items nicely */
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    position: relative;
    padding: 0.5rem 0;
}

.blog-nav-scroll-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.blog-nav-scroll-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s, background 0.2s;
    border-radius: 8px;
}

.blog-nav-scroll-btn:hover {
    color: var(--clr-green);
    background: rgba(0, 0, 0, 0.03);
}

.blog-nav-scroll-btn svg {
    width: 20px;
    height: 20px;
}

.blog-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-nav-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    padding-bottom: 0.2rem;
    border-bottom: none;
    transition: transform 0.2s, color 0.2s;
}

.blog-nav-item.active {
    font-weight: 500;
    transform: translateX(5px);
    color: var(--clr-green);
}

.blog-nav-item:hover {
    transform: translateX(5px);
    color: var(--clr-green);
}

.blog-nav-image-wrapper {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #fff;
    margin-right: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.75rem;
}

.blog-nav-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-nav-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-nav-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
}

/* Empty State */
.blog-empty-state {
    text-align: center;
    padding: 4rem;
    color: #777;
    font-size: 1.2rem;
}

/* --- Mobile Bottom Sidebar --- */
.blog-sidebar-mobile-bottom {
    display: none;
}

@media (max-width: 992px) {
    .blog-sidebar-mobile-bottom {
        display: block;
        order: 3;
    }
}

/* --- Mobile Empty Text Truncation --- */
@media (max-width: 500px) {
    .hide-text-mobile {
        display: none !important;
    }
}

/* --- Plain List Article (Bottom Section) --- */
.blog-list-article {
    display: flex;
    flex-direction: column;
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--clr-beige);
}

.blog-list-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.blog-list-article-img-wrap {
    display: block;
    width: 100%;
    height: 350px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
}

.blog-list-article-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-list-article-img-wrap:hover img {
    transform: scale(1.03);
}

.blog-list-article-placeholder {
    width: 100%;
    height: 350px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
    margin-bottom: 2rem;
    border-radius: 16px;
}

.blog-list-article-content {
    display: flex;
    flex-direction: column;
}

.blog-list-article-date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.blog-list-article-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-list-article-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-list-article-title a:hover {
    color: var(--clr-green);
}

.blog-list-article-excerpt {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-btn-read-more {
    align-self: flex-start;
    margin-top: 1rem;
}

/* --- Error / Not Found --- */
.blog-not-found {
    text-align: center;
    padding: 6rem 2rem;
    min-height: 40vh;
}

.blog-not-found h1 {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.blog-not-found p {
    color: #666;
    margin-bottom: 2rem;
}

/* --- Post Detail and Editor.js Styles (Moved from blog.php) --- */

.blog-post-detail {
    padding: 2rem;
}

.back-link {
    margin-bottom: 2rem;
    display: inline-block;
}

.blog-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

.blog-detail-title {
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post-abstract {
    margin: 0 auto 3rem auto;
    padding: 1.5rem 2rem;
    background: transparent;
    border: 2px solid var(--clr-green);
    color: var(--clr-green);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.6;
    border-radius: 12px;
}

.blog-detail-date {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.blog-detail-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.editorjs-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.editorjs-content p {
    margin-bottom: 1.5em;
}

/* Odkazy v textu */
.editorjs-content a:not([data-fancybox]):not(:has(img)),
.editorjs-article-wrapper a:not([data-fancybox]):not(:has(img)) {
    color: var(--clr-green);
    text-decoration: none;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 rgba(115, 183, 171, 0.4);
    padding: 0 2px;
    transition: box-shadow 0.2s ease-in-out;
}

.editorjs-content a:not([data-fancybox]):not(:has(img)):hover,
.editorjs-article-wrapper a:not([data-fancybox]):not(:has(img)):hover {
    box-shadow: inset 0 -2px 0 var(--clr-green);
}

.editorjs-important-paragraph {
    position: relative;
    padding: 1rem 1rem 1rem 2rem;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--clr-beige);
    border-radius: 12px;
}

.editorjs-important-paragraph::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 5px;
    width: 5px;
    background: var(--clr-green);
    border-radius: 5px;
}

.editorjs-content h2,
.editorjs-content h3,
.editorjs-content h4 {
    color: var(--text-dark);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Lists base styling */
.editorjs-article-wrapper ul,
.editorjs-article-wrapper ol,
.editorjs-content ul,
.editorjs-content ol {
    margin: 0 0 1.5rem 0;
    padding: 0;
    list-style: none !important;
}

.editorjs-article-wrapper ol {
    counter-reset: custom-counter;
}

.editorjs-article-wrapper ul li,
.editorjs-article-wrapper ol li,
.editorjs-content li,
.editorjs-article-wrapper li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.editorjs-article-wrapper ul li::before,
.editorjs-article-wrapper ol li::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    text-align: center;
    color: var(--clr-green);
    display: inline-block;
}

/* UL marker */
.editorjs-article-wrapper ul:not(.editorjs-checklist) li::before {
    content: "•";
    font-size: 1.8em;
    line-height: 1;
    top: 0px;
    left: 3px;
    width: 1.5rem;
    text-align: left;
}

/* OL marker */
.editorjs-article-wrapper ol li {
    counter-increment: custom-counter;
}

.editorjs-article-wrapper ol li::before {
    content: counter(custom-counter) ".";
    font-weight: bold;
    text-align: center;
    width: 1.3rem;
    /* Tighter width to push the number closer to the text */
    padding-right: 0.2rem;
    line-height: 1.6;
}

/* Checklist specific */
.editorjs-article-wrapper ul.editorjs-checklist li.unchecked::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: left 6px;
    /* Align to the exact left edge */
    height: 100%;
    min-height: 24px;
    width: 1.5rem;
}

.editorjs-article-wrapper ul.editorjs-checklist li.checked::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2373b7ab' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: left 6px;
    height: 100%;
    min-height: 24px;
    width: 1.5rem;
}

.editorjs-content blockquote {
    border-left: 4px solid var(--clr-green);
    padding-left: 1em;
    margin: 1.5em 0;
    color: #555;
    font-style: italic;
}

.editorjs-content .cdx-quote {
    margin: 1.5em 0;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.editorjs-content cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: var(--text-light);
    font-style: normal;
    font-weight: bold;
}

.editorjs-content figure {
    margin: 2em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.editorjs-content img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.editorjs-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.ce-columns {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2em 0;
}

@media (min-width: 768px) {
    .ce-columns {
        flex-direction: row;
    }

    .ce-column {
        flex: 1;
        min-width: 0;
    }
}

.text-center {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.text-right {
    text-align: right;
    justify-content: flex-end;
    align-items: flex-end;
}

.text-left {
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
}

/* --- Pagination --- */
.blog-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.blog-pagination-btn {
    padding: 5px 10px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-pagination-btn svg {
    width: 14px;
    height: 14px;
}

.blog-pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent !important;
}

.blog-pagination-info {
    font-weight: 500;
    color: var(--clr-green);
}

/* --- Lightbox pro Blog --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 101;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 101;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* --- Blog Categories Grid --- */
.blog-categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.blog-category-card {
    background-color: transparent;
    perspective: 1000px;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
    width: 260px;
    height: 250px;
    flex: 0 0 auto;
    border-radius: 20px;
}

.blog-category-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.blog-category-card:hover .blog-category-card-inner,
.blog-category-card-inner.flipped {
    transform: rotateY(180deg);
}

.blog-category-card-front,
.blog-category-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.blog-category-card-front {
    background-color: #ffffff;
    border: 2px solid transparent;
}

.blog-category-icon-wrapper {
    width: 100px;
    height: 100px;
    background-color: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.blog-category-icon-wrapper img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.blog-category-card .blog-category-card-title {
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--text-dark);
    margin: 0;
}

.blog-category-card-back {
    background-color: #ffffff;
    border: 2px solid var(--clr-green);
    transform: rotateY(180deg);
    overflow: hidden;
}

.blog-category-card-back-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-category-card-back-content p {
    margin-bottom: 0.5rem;
}

.blog-category-card-back-content p:last-child {
    margin-bottom: 0;
}

.blog-category-card-back-content ul,
.blog-category-card-back-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

@media (max-width: 900px) {
    .blog-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .blog-categories-grid {
        grid-template-columns: 1fr;
    }
}