/*
 * Put update-safe custom styles here.
 * This file is loaded by the KDAN Polite Overrides plugin.
 */

/**
 * KDAN Layout Width Tuning
 * -------------------------------------------------------------
 * Date: 2026-02-11
 * Purpose:
 * - Expand global layout width on desktop view.
 * - Reduce left/right whitespace for container blocks.
 * Scope:
 * - .container / .container-fluid
 */
.container,
.container-fluid {
    padding-left: 10px;
    padding-right: 10px;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        width: 1040px;
    }
}

@media (min-width: 1200px) {
    .container {
        width: 1260px;
    }
}

/* Keep typography aligned with the latest official snapshot on WP theme pages. */
#header,
#footer,
#brandBar {
    font-family: "__Encode_Sans_cabaa6", "__Encode_Sans_Fallback_cabaa6", sans-serif !important;
    line-height: normal;
}

/* Keep small parity patches for latest header tokens. */
#header #languageDropdown .sc-5bf7fac4-2 {
    width: 118px;
}

#header #languageDropdown .sc-5bf7fac4-3 {
    display: block;
}

/* Patch missing official token for Free Download item rows. */
#header #downloadDropdown .sc-309dad60-8 {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 48px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 4px;
}

#header #downloadDropdown .sc-309dad60-8:hover {
    background-color: #e1e1e1;
}

/* Snapshot misses nav row tokens after official update; restore parity. */
#header .sc-a6182cee-8 {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 12px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 4px;
}

#header .sc-a6182cee-8:hover {
    background-color: #e1e1e1;
}

#header .sc-6f028906-5 {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 12px;
    font-size: 14px;
    border-radius: 4px;
}

#header .sc-6f028906-5:hover {
    background-color: #e1e1e1;
}

#headerAccordionMenu .sc-2145f39b-8 {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 12px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 4px;
}

#headerAccordionMenu .sc-2145f39b-8:hover {
    background-color: #e1e1e1;
}

#headerAccordionMenu .sc-ad5b15ef-4 {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 20px;
    font-size: 14px;
    border-radius: 4px;
}

#headerAccordionMenu .sc-ad5b15ef-4:hover {
    background-color: #e1e1e1;
}

/* Snapshot gap patch: current local CSS misses these token rules. */
#footer .sc-73155290-3 {
    font-size: 14px;
    padding: 4px 0;
    color: #9e9e9e;
    display: block;
    width: 100%;
}

#footer .sc-db687fe2-4 {
    font-size: 14px;
    padding: 12px 18px;
    color: #9e9e9e;
    display: block;
    width: 100%;
}

#footer #socialMedia h3,
#footer #socialMedia p,
#footer #klaviyo h3,
#footer #klaviyo p {
    margin: 0;
}

#footer #socialMedia h3,
#footer #klaviyo h3 {
    line-height: normal;
}

#footer #copyRight {
    margin: 32px 0 0;
}

#footer #klaviyoForm input {
    color: #fff;
    background-color: #363636;
    border: 0;
    padding: 5px 15px;
}

@media (min-width: 1024px) {
    #footer #klaviyoForm input {
        width: 250px;
    }
}

#brandBar .sc-1a7450e6-2,
#brandBar .sc-e46f6075-2 {
    margin: 0;
}

#brandBar .sc-1a7450e6-3 img,
#brandBar .sc-e46f6075-3 img {
    height: 15px;
    max-width: none;
}

/* Featured post slider arrows: improve discoverability of horizontal navigation. */
.modern-slider {
    position: relative;
}

.modern-slider .kdan-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 28px !important;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modern-slider .kdan-slider-arrow:hover,
.modern-slider .kdan-slider-arrow:focus {
    background: rgba(0, 0, 0, 0.82);
}

.modern-slider .kdan-slider-arrow::before {
    content: none !important;
}

.modern-slider .kdan-slider-prev {
    left: 12px !important;
    right: auto !important;
}

.modern-slider .kdan-slider-next {
    right: 12px !important;
    left: auto !important;
}

@media (max-width: 767px) {
    .modern-slider .kdan-slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}

/* Home cards: keep featured slider + post list at stable heights. */
.home.blog .modern-slider .slider-items {
    min-height: 430px;
}

.home.blog .modern-slider .slide-wrap {
    min-height: 430px;
}

.home.blog .modern-slider .caption {
    min-height: 430px;
    display: flex;
    flex-direction: column;
}

.home.blog .modern-slider .caption h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home.blog .modern-slider .caption .post-excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.7em * 3);
}

.home.blog #primary .site-main > article {
    display: flex;
}

.home.blog #primary .site-main > article .post-wrap {
    width: 100%;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.home.blog #primary .site-main > article .post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home.blog #primary .site-main > article .post_title .post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.8em * 2);
}

.home.blog #primary .site-main > article .post-excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.7em * 3);
}

.home.blog #primary .site-main > article .post-meta {
    margin-top: auto;
}

@media (max-width: 991px) {
    .home.blog .modern-slider .slider-items,
    .home.blog .modern-slider .slide-wrap,
    .home.blog .modern-slider .caption,
    .home.blog #primary .site-main > article .post-wrap {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .home.blog .modern-slider .slider-height.img-cover {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #fff;
        min-height: 220px;
        height: 220px;
    }

    .home.blog .modern-slider .slider-items,
    .home.blog .modern-slider .slide-wrap,
    .home.blog .modern-slider .caption {
        min-height: 380px !important;
        height: 380px !important;
    }

    .home.blog .modern-slider .caption {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 14px;
        padding-bottom: 10px;
        overflow: hidden;
    }

    .home.blog .modern-slider .caption h2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 8px 0 10px;
        line-height: 1.22;
    }

    .home.blog .modern-slider .caption .entry-meta {
        margin: 0 0 8px;
    }

    .home.blog .modern-slider .caption .post-excerpt {
        margin-top: 0;
        flex: 1;
    }

    .home.blog .modern-slider .caption .post-excerpt p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .home.blog .modern-slider .caption .more-btn {
        margin-top: auto;
    }
}

/* Single post mobile readability: avoid oversized headings and broken tables. */
@media (max-width: 767px) {
    .single #primary .post-title.entry-title,
    .single #primary .post-excerpt h1,
    .single #primary .entry-content h1,
    .single #primary .content h1 {
        font-size: 2rem;
        line-height: 1.18;
        margin: 0 0 8px;
    }

    .single #primary .post-excerpt h2,
    .single #primary .entry-content h2,
    .single #primary .content h2 {
        font-size: 1.5rem;
        line-height: 1.24;
        margin: 0 0 7px;
    }

    .single #primary .post-excerpt h3,
    .single #primary .entry-content h3,
    .single #primary .content h3 {
        font-size: 1.25rem;
        line-height: 1.28;
        margin: 0 0 6px;
    }

    .single #primary .post-excerpt table,
    .single #primary .entry-content table,
    .single #primary .content table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
        border: 1px solid #dcdcdc;
        background: #fff;
        font-size: 14px;
    }

    .single #primary .post-excerpt th,
    .single #primary .post-excerpt td,
    .single #primary .entry-content th,
    .single #primary .entry-content td,
    .single #primary .content th,
    .single #primary .content td {
        padding: 8px 10px;
        border: 1px solid #dcdcdc;
        vertical-align: top;
    }

    .single #primary .post-excerpt th,
    .single #primary .entry-content th,
    .single #primary .content th {
        background: #f5f5f5;
        font-weight: 600;
    }
}

/* Article content typography tuning: reduce oversized H2/H3 on desktop + mobile. */
.single #primary .post-excerpt h2,
.single #primary .entry-content h2,
.single #primary .content h2,
.page #primary .post-excerpt h2,
.page #primary .entry-content h2,
.page #primary .content h2 {
    font-size: 1.72rem;
    line-height: 1.32;
    margin: 0 0 12px;
}

.single #primary .post-excerpt h3,
.single #primary .entry-content h3,
.single #primary .content h3,
.page #primary .post-excerpt h3,
.page #primary .entry-content h3,
.page #primary .content h3 {
    font-size: 1.34rem;
    line-height: 1.36;
    margin: 0 0 10px;
}

@media (max-width: 767px) {
    .single #primary .post-excerpt h2,
    .single #primary .entry-content h2,
    .single #primary .content h2,
    .page #primary .post-excerpt h2,
    .page #primary .entry-content h2,
    .page #primary .content h2 {
        font-size: 1.34rem;
        line-height: 1.28;
        margin: 0 0 9px;
    }

    .single #primary .post-excerpt h3,
    .single #primary .entry-content h3,
    .single #primary .content h3,
    .page #primary .post-excerpt h3,
    .page #primary .entry-content h3,
    .page #primary .content h3 {
        font-size: 1.14rem;
        line-height: 1.3;
        margin: 0 0 7px;
    }
}
