/* ==========================================================================
   Kama Times News redesign
   Change the colours below to restyle the whole bar / header / cards.
   ========================================================================== */
:root {
    --kt-purple: #5200a5;
    --kt-purple-dark: #3f0080;
    --kt-orange: #ef9456;
    --kt-orange-dark: #d97d3d;
    --kt-slate: #3d4f65;
    --kt-page-bg: #ebeef3;
    --kt-text: #2f3640;
    --kt-muted: #7a808a;
    --kt-line: #e6e9ee;
    --kt-radius: 4px;
    --kt-menu-bg: #ffffff;
    --kt-menu-text: #0f2a5e;
}

/* --------------------------------------------------------------------------
   0. Sticky: trending bar and primary menu stay fixed while scrolling
   -------------------------------------------------------------------------- */
:root { --kt-bar-h: 54px; --kt-admin-h: 0px; }
body.admin-bar { --kt-admin-h: 32px; }

/* "hidden" would stop sticky positioning working; "clip" avoids sideways scroll without that side effect */
html, body { overflow-x: clip; }

/* The trending bar and the primary menu live in one fixed block, so they always stay together */
.kt-sticky-head {
    position: fixed;
    top: var(--kt-admin-h);
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
/* Reserves the space the fixed block would otherwise leave empty (height is set by JavaScript) */
#kt-sticky-spacer { height: 130px; }
body #masthead.site-header { position: relative; top: auto; z-index: auto; box-shadow: none; }

@media (max-width: 782px) {
    body.admin-bar { --kt-admin-h: 46px; }
}
@media (max-width: 600px) {
    :root { --kt-bar-h: 46px; }
    /* The WordPress admin bar scrolls away on small screens */
    body.admin-bar { --kt-admin-h: 0px; }
}

/* --------------------------------------------------------------------------
   1. Trending bar (above the primary menu)
   -------------------------------------------------------------------------- */
.kt-trending-bar {
    background: var(--kt-purple);
    color: #fff;
    position: relative;
    z-index: 30;
}

.kt-trending-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 54px;
}

.kt-trending-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Hamburger */
.kt-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 0 6px;
    background: transparent;
    border: 0;
    cursor: pointer;
    flex: 0 0 auto;
}
.kt-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: opacity .2s ease;
}
.kt-hamburger:hover span,
.kt-hamburger:focus-visible span { opacity: .7; }
.kt-hamburger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Ticker */
.kt-trending-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
.kt-trending-label {
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}
.kt-trending-list {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 54px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}
.kt-trending-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.kt-trending-item.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
.kt-trending-item a {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}
.kt-trending-item a:hover,
.kt-trending-item a:focus-visible { color: #fff; text-decoration: underline; }
/* Web design credit in the ticker: orange so it stands out, wraps to two lines on phones */
.kt-trending-credit a {
    color: var(--kt-orange);
    font-weight: 700;
}
.kt-trending-credit a:hover,
.kt-trending-credit a:focus-visible { color: #fff; }
@media (max-width: 600px) {
    .kt-trending-credit a {
        white-space: normal;
        font-size: 12.5px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
.kt-trending-empty { font-size: 14px; color: rgba(255, 255, 255, .7); }

.kt-trending-controls { display: flex; gap: 4px; flex: 0 0 auto; }
.kt-trending-controls button {
    width: 26px;
    height: 26px;
    padding: 0;
    line-height: 24px;
    font-size: 20px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 0;
    border-radius: var(--kt-radius);
    cursor: pointer;
}
.kt-trending-controls button:hover { background: rgba(255, 255, 255, .28); }

/* Right side: social + search */
.kt-trending-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.kt-social { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kt-social li { margin: 0; }
.kt-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-radius: var(--kt-radius);
    transition: background .2s ease;
}
.kt-social a:hover,
.kt-social a:focus-visible { background: rgba(255, 255, 255, .3); }

.kt-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 150px;
    height: 36px;
    background: rgba(255, 255, 255, .14);
    border-radius: var(--kt-radius);
}
.kt-search-field {
    width: 100%;
    height: 100%;
    padding: 0 38px 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: var(--kt-radius);
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.kt-search-field::placeholder { color: rgba(255, 255, 255, .85); opacity: 1; }
.kt-search-field::-webkit-search-cancel-button { display: none; }
.kt-search-field:focus { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: -2px; }
.kt-search-submit {
    position: absolute;
    right: 0;
    top: 0;
    width: 38px;
    height: 100%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   2. Primary header (logo + menu on orange)
   -------------------------------------------------------------------------- */
body .site-header,
body .site-header .site-header-desktop,
body .site-header .header-wrapper {
    background: var(--kt-orange);
}
body .site-header { border: 0; box-shadow: none; }
body .site-header .header-wrapper { min-height: 80px; }

body .site-header .site-title a,
body .site-header .site-description,
body .site-header .primary-menu > li > a,
body .site-header .primary-menu > li > a:visited {
    color: #fff;
}
body .site-header .primary-menu > li > a {
    font-weight: 600;
    opacity: .9;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: opacity .2s ease;
}
body .site-header .primary-menu > li > a:hover,
body .site-header .primary-menu > li > a:focus-visible,
body .site-header .primary-menu > li.current-menu-item > a,
body .site-header .primary-menu > li.current-menu-ancestor > a,
body .site-header .primary-menu > li.current_page_item > a {
    color: #fff;
    opacity: 1;
}
body .site-header .primary-menu > li.current-menu-item > a::after,
body .site-header .primary-menu > li.current-menu-ancestor > a::after,
body .site-header .primary-menu > li.current_page_item > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}
body .site-header .primary-menu .sub-menu { background: #fff; border-radius: var(--kt-radius); box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
body .site-header .primary-menu .sub-menu a { color: var(--kt-text); }
body .site-header .primary-menu .sub-menu a:hover { color: var(--kt-purple); }

/* --------------------------------------------------------------------------
   Header v2: clean menu bar so the logo displays professionally
   (colours come from Appearance > Customise > Kama Times Colours)
   -------------------------------------------------------------------------- */
body .site-header,
body .site-header .site-header-desktop,
body .site-header .site-header-responsive,
body .site-header .header-wrapper {
    background: var(--kt-menu-bg);
}
body .site-header { border-bottom: 3px solid var(--kt-menu-text); padding-top: 0; padding-bottom: 0; }
body .site-header .site-header-desktop { padding: 0; }
body .site-header .header-wrapper { min-height: 0; padding-top: 6px; padding-bottom: 6px; align-items: center; }

body .site-header .site-title a,
body .site-header .site-description,
body .site-header .primary-menu > li > a,
body .site-header .primary-menu > li > a:visited {
    color: var(--kt-menu-text);
    opacity: 1;
}
body .site-header .primary-menu > li > a {
    font-size: clamp(13px, 1.25vw, 16px);
    font-weight: 700;
    letter-spacing: .01em;
}
body .site-header .primary-menu > li > a:hover,
body .site-header .primary-menu > li > a:focus-visible,
body .site-header .primary-menu > li.current-menu-item > a,
body .site-header .primary-menu > li.current-menu-ancestor > a,
body .site-header .primary-menu > li.current_page_item > a {
    color: var(--kt-orange-dark);
}
body .site-header .primary-menu > li.current-menu-item > a::after,
body .site-header .primary-menu > li.current-menu-ancestor > a::after,
body .site-header .primary-menu > li.current_page_item > a::after {
    background: var(--kt-orange);
}
body .site-header .primary-menu .sub-menu { border-top: 3px solid var(--kt-orange); }

/* Active and hover states: dark blue text, no coloured pill, thin underline */
body .site-header .primary-menu > li > a:hover,
body .site-header .primary-menu > li > a:focus-visible,
body .site-header .primary-menu > li.current-menu-item > a,
body .site-header .primary-menu > li.current-menu-ancestor > a,
body .site-header .primary-menu > li.current_page_item > a {
    color: var(--kt-menu-text);
    background: transparent;
}
body .site-header .primary-menu > li > a:hover { opacity: .75; }
body .site-header .primary-menu > li.current-menu-item > a::after,
body .site-header .primary-menu > li.current-menu-ancestor > a::after,
body .site-header .primary-menu > li.current_page_item > a::after {
    background: var(--kt-menu-text);
}

body .site-header .toggle,
body .site-header .toggle svg,
body .site-header .wpi-menu-icon span { color: var(--kt-menu-text); }
body .site-header .wpi-menu-icon span { background-color: var(--kt-menu-text); }

/* Logo: no border, no box, aligned and kept in proportion */
body .site-header .site-branding { display: flex; align-items: center; margin: 0; }
body .site-header .site-logo,
body .site-header .custom-logo-link {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
body .site-header .site-logo img,
body .site-header .custom-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 60px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    object-fit: contain;
}
body .site-header .site-header-responsive .site-logo img,
body .site-header .site-header-responsive .custom-logo { max-height: 48px; }

/* Turn off the theme's own scroll effect (it swapped the menu for a black logo-only bar) */
body .site-header .site-header-responsive.sticky-header-active {
    position: static !important;
    animation: none !important;
    padding: 0 !important;
    background: var(--kt-menu-bg) !important;
}

/* Full menu on desktop and large tablets; compact bar plus quick menu strip on smaller screens */
@media (min-width: 992px) {
    body .site-header .site-header-responsive { display: none !important; }
    body .site-header .site-header-desktop.hide-on-tablet { display: block !important; }
}

/* The hamburger and search now live in the trending bar */
body .site-header-desktop .offcanvas-toggle,
body .site-header-desktop .desktop-search-toggle { display: none; }

/* Mobile header controls on orange */
body .site-header .toggle,
body .site-header .toggle svg { color: #fff; }

/* --------------------------------------------------------------------------
   3. Category / archive / search pages
   -------------------------------------------------------------------------- */
body.archive,
body.search,
body.blog,
body.archive .site,
body.search .site,
body.blog .site { background: var(--kt-page-bg); }

body.archive .archive-header,
body.search .archive-header,
body.archive .page-header,
body.search .page-header { text-align: left; background: transparent; padding-left: 0; padding-right: 0; }

body.archive .page-title,
body.search .page-title {
    margin: 0 0 22px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--kt-text);
}

/* The white card with the orange top line */
body.archive .article-groups,
body.search .article-groups,
body.blog .article-groups {
    display: block;
    background: #fff;
    border-top: 5px solid var(--kt-orange);
    border-radius: var(--kt-radius);
    box-shadow: 0 1px 3px rgba(20, 30, 50, .08);
    padding: 20px;
}

body.archive .article-groups .wpi-post,
body.search .article-groups .wpi-post,
body.blog .article-groups .wpi-post {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    margin: 0;
    padding: 0 0 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
}
body.archive .article-groups .wpi-post + .wpi-post,
body.search .article-groups .wpi-post + .wpi-post,
body.blog .article-groups .wpi-post + .wpi-post {
    padding-top: 24px;
    border-top: 1px solid var(--kt-line);
}
body.archive .article-groups .wpi-post:last-child,
body.search .article-groups .wpi-post:last-child,
body.blog .article-groups .wpi-post:last-child { padding-bottom: 4px; }

.article-groups .wpi-post .entry-image {
    flex: 0 0 46%;
    max-width: 46%;
    margin: 0;
    overflow: hidden;
    border-radius: 2px;
}
.article-groups .wpi-post .entry-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
    object-fit: cover;
}

.article-groups .wpi-post .entry-details {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.article-groups .wpi-post .entry-title,
.article-groups .wpi-post .entry-title a {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kt-purple);
    text-decoration: none;
}
.article-groups .wpi-post .entry-title a:hover { color: var(--kt-purple-dark); text-decoration: underline; }

.article-groups .wpi-post .entry-meta-wrapper,
.article-groups .wpi-post .entry-meta-wrapper a { font-size: 12px; color: var(--kt-muted); }
.article-groups .wpi-post .entry-meta-wrapper { margin-bottom: 18px; }

.article-groups .wpi-post .entry-content,
.article-groups .wpi-post .entry-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--kt-muted);
}
.article-groups .wpi-post .entry-footer { margin-top: 10px; }

/* Pagination */
body.archive .pagination .page-numbers,
body.search .pagination .page-numbers { border-radius: var(--kt-radius); }
body.archive .pagination .page-numbers.current,
body.search .pagination .page-numbers.current { background: var(--kt-orange); border-color: var(--kt-orange); color: #fff; }

/* --------------------------------------------------------------------------
   4. Sidebar widgets as cards
   -------------------------------------------------------------------------- */
.regular-widget-area .widget {
    margin: 0 0 24px;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: var(--kt-radius);
    box-shadow: 0 1px 3px rgba(20, 30, 50, .08);
    overflow: hidden;
}
.regular-widget-area .widget h1,
.regular-widget-area .widget h2,
.regular-widget-area .widget h3,
.regular-widget-area .widget .widget-title,
.regular-widget-area .widget .wp-block-heading {
    margin: 0;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--kt-slate);
}
.regular-widget-area .widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.regular-widget-area .widget li {
    margin: 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--kt-line);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}
.regular-widget-area .widget li:last-child { border-bottom: 0; }
.regular-widget-area .widget li a { color: var(--kt-text); text-decoration: none; }
.regular-widget-area .widget li a:hover { color: var(--kt-purple); }

.regular-widget-area .widget .wp-block-search,
.regular-widget-area .widget .search-form { margin: 0; padding: 6px 8px; }
.regular-widget-area .widget .wp-block-search__label { display: none; }
.regular-widget-area .widget .wp-block-search__input,
.regular-widget-area .widget .search-field {
    border: 0;
    box-shadow: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: transparent;
}
.regular-widget-area .widget .wp-block-search__button,
.regular-widget-area .widget .search-submit {
    background: var(--kt-orange);
    color: #fff;
    border: 0;
    border-radius: var(--kt-radius);
}

/* --------------------------------------------------------------------------
   5. Responsive
   -------------------------------------------------------------------------- */
/* Footer: logo, headline, statement, contact / links / social, copyright */
body .site-footer {
    margin: 0;
    padding: 0;
    background: var(--kt-purple);
}
.kt-footer {
    background-color: var(--kt-purple);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-top: 4px solid var(--kt-orange);
    color: #fff;
    padding: 56px 20px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.kt-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
}
.kt-footer-brand {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.kt-footer-logo {
    display: inline-block;
    background: #fff;
    border-radius: 10px;
    padding: 8px 16px;
    margin-bottom: 22px;
    line-height: 0;
}
.kt-footer-logo-img {
    display: block;
    height: 56px;
    width: auto;
    max-width: 100%;
}
.kt-footer-logo-text {
    display: block;
    line-height: 1.2;
    font-size: 22px;
    font-weight: 800;
    color: var(--kt-purple);
}
.kt-footer .kt-footer-headline {
    margin: 0 0 14px;
    font-size: clamp(24px, 3.2vw, 36px);
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: #fff;
}
.kt-footer-tagline {
    margin: 0;
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .88);
}
.kt-footer-mid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 28px;
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    text-align: center;
}
.kt-footer-contact p,
.kt-footer-email { margin: 0 0 10px; }
.kt-footer-phone {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .01em;
}
.kt-footer-address,
.kt-footer-email,
.kt-footer-email a {
    font-size: 16px;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}
.kt-footer-email a:hover,
.kt-footer-email a:focus-visible { color: var(--kt-orange); }
.is-placeholder { opacity: .45; }
.kt-footer-menu {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 12px 32px;
    text-align: left;
}
.kt-footer-menu li {
    margin: 0;
    padding: 0;
}
.kt-footer-menu li::before { display: none; }
.kt-footer-menu a {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
}
.kt-footer-menu a:hover,
.kt-footer-menu a:focus-visible {
    color: var(--kt-orange);
    text-decoration: underline;
}
.kt-footer-connect .kt-social-footer {
    justify-content: center;
    margin: 0 0 14px;
}
.kt-social-footer { gap: 10px; }
.kt-social-footer a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}
.kt-social-footer a:hover,
.kt-social-footer a:focus-visible { background: var(--kt-orange); }
.kt-footer-bottom {
    margin-top: 28px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
    text-align: center;
}
.kt-footer-copy {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
}
.kt-footer-credit {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .92);
}
.kt-footer-credit a {
    color: var(--kt-orange);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.kt-footer-credit a:hover,
.kt-footer-credit a:focus-visible {
    color: #fff;
    text-decoration: underline;
}
@media (max-width: 768px) {
    .kt-footer { padding-top: 40px; }
    .kt-footer-mid { grid-template-columns: 1fr; gap: 26px; margin-top: 32px; }
}
@media (max-width: 480px) {
    .kt-footer-menu {
        grid-auto-flow: row;
        grid-template-rows: none;
        grid-template-columns: repeat(2, auto);
        gap: 12px 24px;
    }
}

@media (max-width: 900px) {
    .kt-trending-controls { display: none; }
    .kt-search { width: 120px; }
}

@media (max-width: 768px) {
    body.archive .article-groups .wpi-post,
    body.search .article-groups .wpi-post,
    body.blog .article-groups .wpi-post { flex-direction: column; gap: 14px; }
    .article-groups .wpi-post .entry-image { flex: none; max-width: 100%; width: 100%; }
    body.archive .page-title,
    body.search .page-title { font-size: 24px; }
}

@media (max-width: 600px) {
    .kt-trending-inner { padding: 0 14px; min-height: 46px; gap: 12px; }
    .kt-trending-list { height: 46px; }
    .kt-trending-right { display: none; }
    .kt-trending-label,
    .kt-trending-item a { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .kt-trending-item { transition: none; transform: none; }
}
