/* KALE Article Design v1.1.2 */

body.kale-article-active {
    --kale-red: #e30613;
    --kale-black: #101114;
    --kale-text: #292b31;
    --kale-muted: #737780;
    --kale-line: #eceef1;
    --kale-soft: #f7f7f8;
}

/* Standard Divi single-post cleanup. Scoped only to active KALE posts. */
body.kale-article-fullwidth #main-content .container:before {
    display: none !important;
}
body.kale-article-fullwidth #left-area {
    width: 100% !important;
    padding-right: 0 !important;
    float: none !important;
}
body.kale-article-fullwidth #sidebar {
    display: none !important;
}

/* When KALE generates its own article header, suppress common Divi/WordPress duplicates. */
body.kale-article-header-on .et_post_meta_wrapper,
body.kale-article-header-on .post-meta,
body.kale-article-header-on .entry-title,
body.kale-article-header-on .et_pb_post_title,
body.kale-article-header-on .wp-block-post-title,
body.kale-article-header-on .post-thumbnail,
body.kale-article-header-on .entry-featured-image-url {
    display: none !important;
}

.kale-article-shell,
.kale-article-shell * {
    box-sizing: border-box;
}

.kale-article-shell {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(28px, 4vw, 58px) 0 76px;
}

.kale-article-hero {
    width: 100%;
    max-width: none;
    margin: 0 0 34px;
}

.kale-article-category {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(227, 6, 19, .08);
    color: var(--kale-red) !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.kale-article-title {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--kale-black) !important;
    font-size: clamp(34px, 5vw, 58px) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em;
    font-weight: 800 !important;
}

.kale-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    color: var(--kale-muted);
    font-size: 14px;
    line-height: 1.5;
}

.kale-article-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b4b7be;
}

.kale-article-featured {
    margin-top: 28px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--kale-soft);
    box-shadow: 0 18px 50px rgba(17, 18, 20, .08);
}

.kale-article-featured img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 !important;
}

.kale-article-content {
    width: 100%;
    margin: 0;
    color: var(--kale-text);
    font-size: 18px;
    line-height: 1.82;
}

/* Make a simple Divi Text module behave like clean article content. */
.kale-article-content .et_pb_section,
.kale-article-content .et_pb_row,
.kale-article-content .et_pb_column,
.kale-article-content .et_pb_module,
.kale-article-content .et_pb_text_inner {
    max-width: 100%;
}

.kale-article-content .et_pb_section {
    background: transparent !important;
}

.kale-article-content .et_pb_row {
    width: 100% !important;
}

.kale-article-content p {
    margin: 0 0 1.25em;
    padding: 0;
    color: var(--kale-text);
    font-size: inherit;
    line-height: inherit;
}

.kale-article-content > p:first-child,
.kale-article-content .et_pb_text_inner > p:first-child {
    font-size: 20px;
    line-height: 1.75;
    color: #373941;
}

.kale-article-content h2,
.kale-article-content h3,
.kale-article-content h4 {
    color: var(--kale-black) !important;
    font-weight: 800 !important;
    letter-spacing: -.02em;
}

.kale-article-content h2 {
    margin: 2.15em 0 .72em !important;
    padding: 0 !important;
    font-size: clamp(28px, 3vw, 36px) !important;
    line-height: 1.18 !important;
}

body.kale-article-number-h2 .kale-article-content {
    counter-reset: kale-h2-counter;
}

body.kale-article-number-h2 .kale-article-content h2:not(.kale-h2-has-number) {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
}

body.kale-article-number-h2 .kale-article-content h2:not(.kale-h2-has-number)::before {
    counter-increment: kale-h2-counter;
    content: counter(kale-h2-counter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-top: -2px;
    border-radius: 12px;
    background: var(--kale-red);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
}

.kale-article-content h3 {
    margin: 1.8em 0 .55em !important;
    padding: 0 !important;
    font-size: clamp(22px, 2.4vw, 27px) !important;
    line-height: 1.25 !important;
}

.kale-article-content h4 {
    margin: 1.55em 0 .5em !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
}

.kale-article-content a {
    color: var(--kale-red);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.kale-article-content a:hover {
    text-decoration-thickness: 2px;
}

.kale-article-content strong {
    color: #18191d;
    font-weight: 750;
}

body.kale-article-style-lists .kale-article-content ul,
body.kale-article-style-lists .kale-article-content ol {
    margin: 1.1em 0 1.45em 1.2em;
    padding-left: 1.2em;
}

body.kale-article-style-lists .kale-article-content li {
    margin: .48em 0;
    padding-left: .2em;
}

body.kale-article-style-lists .kale-article-content li::marker {
    color: var(--kale-red);
    font-weight: 800;
}

.kale-article-content blockquote {
    margin: 1.8em 0;
    padding: 20px 22px 20px 24px;
    border: 0;
    border-left: 5px solid var(--kale-red);
    border-radius: 0 14px 14px 0;
    background: #fff4f5;
    color: #2b2d32;
    font-size: 17px;
    line-height: 1.7;
}

.kale-article-content blockquote p:last-child {
    margin-bottom: 0;
}

body.kale-article-rounded-images .kale-article-content img:not(.emoji) {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.kale-article-content figure {
    margin: 1.9em 0;
}

.kale-article-content figcaption {
    margin-top: 8px;
    color: var(--kale-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.kale-article-content hr {
    height: 1px;
    margin: 2.2em 0;
    border: 0;
    background: var(--kale-line);
}

body.kale-article-style-tables .kale-article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.8em 0;
    overflow-x: auto;
    border-collapse: collapse;
    border: 1px solid var(--kale-line);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    -webkit-overflow-scrolling: touch;
}

body.kale-article-style-tables .kale-article-content th,
body.kale-article-style-tables .kale-article-content td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--kale-line);
    text-align: left;
    vertical-align: top;
    white-space: normal;
}

body.kale-article-style-tables .kale-article-content th {
    background: #f7f7f8;
    color: var(--kale-black);
    font-weight: 800;
}

/* Prevent Divi's default bottom spacing from making a simple one-text-module article look loose. */
.kale-article-content .et_pb_text:last-child,
.kale-article-content .et_pb_module:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 767px) {
    .kale-article-shell {
        width: min(100% - 32px, 1400px);
        padding: 28px 0 54px;
    }

    .kale-article-hero {
        margin-bottom: 26px;
    }

    .kale-article-title {
        font-size: clamp(31px, 10vw, 42px) !important;
        line-height: 1.1 !important;
    }

    .kale-article-featured {
        margin-top: 22px;
        border-radius: 16px;
    }

    .kale-article-content {
        font-size: 17px;
        line-height: 1.75;
    }

    .kale-article-content > p:first-child,
    .kale-article-content .et_pb_text_inner > p:first-child {
        font-size: 18px;
    }

    body.kale-article-number-h2 .kale-article-content h2:not(.kale-h2-has-number) {
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 11px;
    }

    body.kale-article-number-h2 .kale-article-content h2:not(.kale-h2-has-number)::before {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 16px;
    }
}


/* v1.1.0 — 1400px article layout + related sidebar + bottom slider slot */
.kale-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.kale-article-layout.kale-has-sidebar {
    grid-template-columns: minmax(0, 980px) minmax(280px, 340px);
    justify-content: space-between;
}

.kale-article-main {
    min-width: 0;
}

.kale-article-layout.kale-no-sidebar .kale-article-main {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.kale-article-sidebar {
    min-width: 0;
    position: sticky;
    top: 118px;
}

.kale-related-box {
    overflow: hidden;
    border: 1px solid #eceef1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17,18,20,.05);
}

.kale-related-heading {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #eceef1;
    color: var(--kale-black);
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
}

.kale-related-list {
    padding: 4px 16px 8px;
}

.kale-related-card {
    display: grid;
    grid-template-columns: 96px minmax(0,1fr);
    gap: 13px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f2;
    color: inherit !important;
    text-decoration: none !important;
}

.kale-related-card:last-child {
    border-bottom: 0;
}

.kale-related-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background: #f3f4f5;
}

.kale-related-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.kale-related-card:hover .kale-related-thumb img {
    transform: scale(1.045);
}

.kale-related-thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#f5f5f6,#eceef1);
}

.kale-related-copy {
    min-width: 0;
}

.kale-related-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: #141519;
    font-size: 15px;
    line-height: 1.32;
    font-weight: 750;
}

.kale-related-date {
    display: block;
    margin-top: 7px;
    color: #858992;
    font-size: 12px;
    line-height: 1.3;
}

.kale-related-card:hover .kale-related-title {
    color: var(--kale-red);
}

.kale-article-bottom-slider {
    width: 100%;
    margin-top: 62px;
    padding-top: 28px;
    border-top: 1px solid #e9eaed;
}

.kale-bottom-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.kale-bottom-slider-head h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--kale-black) !important;
    font-size: clamp(26px, 2.6vw, 34px) !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    letter-spacing: -.025em;
}

@media (max-width: 1100px) {
    .kale-article-layout.kale-has-sidebar {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 28px;
    }
    .kale-related-card {
        grid-template-columns: 82px minmax(0,1fr);
    }
}

@media (max-width: 900px) {
    .kale-article-layout.kale-has-sidebar {
        grid-template-columns: 1fr;
    }
    .kale-article-sidebar {
        position: static;
        top: auto;
    }
    .kale-related-box {
        margin-top: 8px;
    }
    .kale-related-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 0 18px;
    }
}

@media (max-width: 600px) {
    .kale-related-list {
        grid-template-columns: 1fr;
    }
    .kale-related-card {
        grid-template-columns: 92px minmax(0,1fr);
    }
    .kale-article-bottom-slider {
        margin-top: 44px;
        padding-top: 22px;
    }
}

/* v1.1.2 — glavna kolona do 1200px + sticky povezani članci */
body.kale-article-fullwidth #main-content > .container {
    width: min(1560px, calc(100% - 48px)) !important;
    max-width: 1560px !important;
}

.kale-article-shell {
    width: min(1560px, calc(100% - 48px));
}

.kale-article-layout.kale-has-sidebar {
    grid-template-columns: minmax(0, 1200px) minmax(280px, 320px);
    gap: 36px;
    justify-content: center;
}

.kale-article-main {
    width: 100%;
    max-width: 1200px;
}

.kale-article-sidebar {
    position: sticky;
    top: 118px;
    align-self: start;
}

@media (max-width: 1360px) {
    body.kale-article-fullwidth #main-content > .container,
    .kale-article-shell {
        width: min(100% - 40px, 1560px) !important;
    }

    .kale-article-layout.kale-has-sidebar {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 28px;
    }
}

@media (max-width: 900px) {
    body.kale-article-fullwidth #main-content > .container,
    .kale-article-shell {
        width: min(100% - 32px, 1200px) !important;
    }

    .kale-article-sidebar {
        position: static;
        top: auto;
    }
}

/* v1.1.3 — čitljiviji tekst članka */
.kale-article-content,
.kale-article-content .et_pb_text,
.kale-article-content .et_pb_text_inner {
    font-size: 18px !important;
    line-height: 1.78 !important;
}

.kale-article-content p,
.kale-article-content li {
    font-size: 18px !important;
    line-height: 1.78 !important;
}

.kale-article-content > p:first-child,
.kale-article-content .et_pb_text_inner > p:first-child {
    font-size: 18px !important;
    line-height: 1.78 !important;
}

@media (max-width: 900px) {
    .kale-article-content,
    .kale-article-content .et_pb_text,
    .kale-article-content .et_pb_text_inner,
    .kale-article-content p,
    .kale-article-content li,
    .kale-article-content > p:first-child,
    .kale-article-content .et_pb_text_inner > p:first-child {
        font-size: 17px !important;
        line-height: 1.72 !important;
    }
}
