/* ======================================================
   WILISPOST CUSTOM CSS — Harianhaluan-style Clean Layout
   ====================================================== */

/* ======================================================
   0. GLOBAL TYPOGRAPHY & FONT — Poppins like harianhaluan
   ====================================================== */
body,
.post-title a,
h1,
h2,
h3,
h4,
h5,
h6,
.widget-title,
.section-title,
.kagemi-editors-pick .ep-header,
.kagemi-editors-pick .ep-title,
.kagemi-headline h2 a,
.kagemi-thumb-item h6 a {
    font-family: "Poppins", "Roboto", sans-serif !important;
}

/* ======================================================
   1. TAG CLOUD & MISC
   ====================================================== */
.widget_tagcloud .tag-cloud-link {
    background: #ecedf1;
    border: 1px solid #ebebeb;
    border-radius: 30px;
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    line-height: 0;
    margin: 0 5px 10px 0;
    padding: 15px 20px;
    text-transform: capitalize;
    -moz-user-select: none;
}
footer .widget_tagcloud .tag-cloud-link {
    color: #555;
    background: #e0e0e0;
    border-color: #ccc;
}
.header-style-2 .search-button {
    right: 0;
}
.follow-us a.follow-us-linkedin {
    background: #007aff;
}
.follow-us a.follow-us-pinterest {
    background: #e22b26;
}

/* ======================================================
   2. HEADER — Light Gray Nav Bar (like harianhaluan)
   ====================================================== */
.header-bottom.header-sticky {
    --kagemi-blue: #f0f0f0;
    background: #f0f0f0 !important;
    border-bottom: 1px solid #ddd;
}
.header-bottom.header-sticky.sticky-bar.stick {
    background: #f0f0f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Dark text/icons on light gray nav bar */
.header-bottom .main-menu > li > a {
    color: #333 !important;
}
.header-bottom .main-menu > li > a:hover,
.header-bottom .main-menu > li.active > a {
    background: rgba(0, 0, 0, 0.07) !important;
    color: #000 !important;
}
.header-bottom .search-button .search-icon,
.header-bottom .search-button button,
.header-bottom .search-button a {
    color: #333 !important;
}
.kagemi-nav-side-right .kagemi-search-trigger {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333 !important;
}
.kagemi-nav-side-right .kagemi-search-trigger:hover {
    background: rgba(0, 0, 0, 0.12) !important;
}
.kagemi-nav-side-right .kagemi-search-trigger i {
    color: #333 !important;
}

/* Mobile hamburger bars dark on light bg */
@media (max-width: 991px) {
    .mobile_menu .slicknav_icon-bar {
        background: #333 !important;
    }

    /* Hide gray nav bar on mobile — toggle & search now in white header */
    .header-bottom.header-sticky {
        display: none !important;
    }

    /* === Mobile White Header === */
    .mobile-header-white {
        background: #fff;
        padding: 10px 0;
        border-bottom: 1px solid #e0e0e0;
    }
    .mobile-header-flex {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative;
    }

    /* Logo centered absolutely */
    .mobile-logo-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        line-height: 0;
    }

    /* Hamburger container */
    .mobile-menu-in-white {
        flex: 0 0 auto;
        z-index: 10;
    }
    /* Slicknav button styling in white header */
    .mobile-menu-in-white .slicknav_btn {
        background: transparent !important;
        padding: 6px !important;
        margin: 0 !important;
    }
    .mobile-menu-in-white .slicknav_icon-bar {
        background: #333 !important;
        width: 22px !important;
        height: 2px !important;
    }
    .mobile-menu-in-white .slicknav_menu {
        background: transparent !important;
        padding: 0 !important;
    }
    /* Slicknav dropdown panel: full width below header */
    .mobile-menu-in-white .slicknav_nav {
        background: #fff !important;
        border-top: 1px solid #eee;
        position: fixed;
        left: 0;
        right: 0;
        top: 60px;
        z-index: 9999;
        max-height: 70vh;
        overflow-y: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 10px 15px !important;
    }
    .mobile-menu-in-white .slicknav_nav a {
        color: #333 !important;
        font-size: 14px !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    .mobile-menu-in-white .slicknav_nav a:hover {
        color: #2563a0 !important;
        background: transparent !important;
    }

    /* Search button in white header */
    .mobile-search-btn {
        background: transparent !important;
        border: none !important;
        color: #333 !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 18px !important;
        flex: 0 0 auto;
        z-index: 10;
    }
    .mobile-search-btn i {
        color: #333 !important;
    }
}

/* Desktop header middle: ensure consistent border */
.header-middle-kagemi {
    border-bottom: 1px solid #e0e0e0 !important;
}

/* ======================================================
   3. MAIN CONTENT AREA — Clean background, tighter spacing
   ====================================================== */
/* Reduce excessive top padding (pt-40 → pt-15) */
main.position-relative.pt-40 {
    padding-top: 15px !important;
}

/* Ensure white backgrounds */
.background12,
main.position-relative {
    background: #fff !important;
}

/* Clean section backgrounds */
.background-white {
    background: #fff !important;
}

/* ======================================================
   4. FEATURED SLIDER (Headline)
   ====================================================== */
@media only screen and (min-width: 1080px) {
    .featured-slider-1-items .slick-list {
        min-height: 400px;
    }
}

.featured-slider-1 {
    border-radius: 8px !important;
    overflow: hidden;
}

/* Slider arrows cleaner */
.featured-slider-1 .arrow-cover .slick-btn {
    transition: all 0.3s !important;
}

/* ======================================================
   4b. POST CARD IMAGE OVERLAY — Dark gradient for readable text
   ====================================================== */
/* Add dark gradient to all post cards with image backgrounds */
.post-module-1 .thumb-overlay .img-hover-slide::after,
.loop-grid .thumb-overlay .img-hover-slide::after,
.loop-list .thumb-overlay .img-hover-slide::after,
.related-posts .thumb-overlay .img-hover-slide::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 75% !important;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    border-radius: inherit !important;
}

/* Make sure overlay text sits above the gradient */
.post-module-1 .thumb-overlay .post-content,
.loop-grid .thumb-overlay .post-content,
.post-module-1 .thumb-overlay .entry-meta,
.post-module-1 .thumb-overlay .post-title,
.thumb-overlay .post-cat,
.thumb-overlay .post-in,
.thumb-overlay .img-link {
    position: relative !important;
    z-index: 2 !important;
}

/* Ensure text on overlay cards is white and readable */
.post-module-1 .thumb-overlay .post-title a,
.loop-grid .thumb-overlay .post-title a {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}
.post-module-1 .thumb-overlay .entry-meta span,
.loop-grid .thumb-overlay .entry-meta span {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* ======================================================
   5. HIDE SOCIAL SHARE OVERLAYS ON POST CARDS
      (harianhaluan doesn't have these — cleaner look)
   ====================================================== */
.post-thumb .social-share {
    display: none !important;
}

/* Also hide share icons on grid post cards */
.loop-grid .social-share,
.loop-list .social-share,
.post-block-list .social-share {
    display: none !important;
}

/* ======================================================
   6. SECTION TITLES — Harianhaluan-style
   ====================================================== */
/* Clean section title style similar to harianhaluan */
.widget-header .widget-title,
.section-title,
h5.widget-title {
    font-family: "Poppins", sans-serif !important;
    letter-spacing: 0.3px !important;
}

/* ======================================================
   7. POST CARD STYLING — Cleaner like harianhaluan
   ====================================================== */
/* Cleaner post title links */
.post-title a {
    transition: color 0.2s !important;
}

/* Post meta: cleaner, subtle */
.entry-meta span {
    font-size: 12px !important;
}

/* Reduce excessive gap between post date and read time */
.entry-meta .post-on,
.entry-meta .time-reading {
    font-size: 12px !important;
    color: #999 !important;
}

/* Hide "views" counter on homepage cards (harianhaluan doesn't show) */
.loop-grid .entry-meta .hit-count,
.loop-list .entry-meta .hit-count {
    display: none !important;
}

/* ======================================================
   8. EDITORS PICK SECTION — Polish
   ====================================================== */
.kagemi-editors-pick {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Date text in editors pick */
.kagemi-editors-pick .ep-date {
    color: #999 !important;
    font-size: 12px !important;
}

/* ======================================================
   9. POST GRID SECTION — Consistent spacing
   ====================================================== */
.loop-grid .post-thumb {
    margin-bottom: 15px !important;
}

/* Grid card clean spacing */
.loop-grid .post-content {
    padding: 0 !important;
}

/* ======================================================
   10. SIDEBAR WIDGETS — Cleaner like harianhaluan
   ====================================================== */
/* Sidebar follow-us: clean rectangular buttons like kagemi default */
.widget-social-network .follow-us {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.widget-social-network .follow-us a {
    border-radius: 6px !important;
    width: calc(50% - 4px) !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 12px !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    color: #fff !important;
}
.widget-social-network .follow-us a .social-icon {
    display: inline-flex !important;
    align-items: center !important;
    width: 24px !important;
    flex-shrink: 0 !important;
    justify-content: center !important;
}
.widget-social-network .follow-us a .social-icon i.nth-2 {
    display: none !important;
}
.widget-social-network .follow-us a .social-name {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-left: 6px !important;
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.widget-social-network .follow-us a .social-count {
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-left: 4px !important;
    flex-shrink: 0 !important;
    opacity: 0.9;
}

/* Sidebar categories: cleaner */
.sidebar-widget .widget_categories ul li a {
    color: #333 !important;
    font-size: 14px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    display: block !important;
}

/* ======================================================
   11. FOOTER — Light Gray consistent with header (#f0f0f0)
   ====================================================== */
footer {
    background: #f0f0f0 !important;
}

.footer-area {
    background: #f0f0f0 !important;
}

/* Override kagemi.css dark colors to dark text on light bg */
.footer-area,
.footer-area *,
.footer-area a {
    color: #555 !important;
}

.footer-area a:hover {
    color: #2563a0 !important;
}

/* Footer widget titles: dark text with blue underline */
.footer-area .widget-title,
.footer-area h5.widget-title,
.footer-area h4,
.footer-area h5 {
    color: #222 !important;
    border-bottom-color: #2563a0 !important;
}

/* Footer logo: no invert filter on light bg */
.footer-logo {
    filter: none !important;
}

/* Footer about text */
.footer-area .text-muted {
    color: #777 !important;
}
.footer-area p strong {
    color: #333 !important;
}

/* Footer list-post */
.footer-area .list-post li {
    border-bottom-color: #ddd !important;
}
.footer-area .list-post .post-title a,
.footer-area .list-post .post-content h6 a {
    color: #333 !important;
}
.footer-area .list-post .post-title a:hover,
.footer-area .list-post .post-content h6 a:hover {
    color: #2563a0 !important;
}
.footer-area .list-post .entry-meta span {
    color: #999 !important;
}

/* Footer categories & quicklinks */
.footer-area .widget_categories ul li {
    border-bottom-color: #ddd !important;
}
.footer-area .widget_categories ul li a {
    color: #555 !important;
}
.footer-area .widget_categories ul li a:hover {
    color: #2563a0 !important;
}
.footer-area .widget_categories ul li a span {
    background: #e0e0e0 !important;
    color: #666 !important;
}

/* Footer quicklinks */
.footer-area .footer-quicklinks li {
    border-bottom: 1px solid #ddd !important;
}
.footer-area .footer-quicklinks li a {
    color: #555 !important;
}
.footer-area .footer-quicklinks li a:hover {
    color: #2563a0 !important;
}

/* Footer tags */
.footer-area .widget_tagcloud .tag-cloud-link {
    background: #e0e0e0 !important;
    border: 1px solid #ccc !important;
    color: #555 !important;
}
.footer-area .widget_tagcloud .tag-cloud-link:hover {
    background: #2563a0 !important;
    color: #fff !important;
    border-color: #2563a0 !important;
}

/* Footer newsletter */
.footer-area .widget_newsletter {
    background: #e8e8e8 !important;
}
.footer-area .widget_newsletter .newsletter p {
    color: #666 !important;
}
.footer-area .kagemi-newsletter-form input[type="email"] {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}
.footer-area .kagemi-newsletter-form input[type="email"]::placeholder {
    color: #999 !important;
}
.footer-area .kagemi-newsletter-form input[type="email"]:focus {
    border-color: #2563a0 !important;
}
.footer-area .kagemi-newsletter-form button[type="submit"] {
    background: #2563a0 !important;
    color: #fff !important;
}

/* Footer custom menu */
.footer-area .widget_categories div ul li {
    border-bottom: 1px solid #ddd !important;
}
.footer-area .widget_categories div ul li a {
    color: #555 !important;
}
.footer-area .widget_categories div ul li a:hover {
    color: #2563a0 !important;
}

/* Footer sidebar widget reset for light bg */
.footer-area .sidebar-widget {
    background: transparent !important;
}

/* Footer Bottom Area */
.footer-bottom-area {
    background: #e0e0e0 !important;
    border-top: 1px solid #ccc !important;
}
.footer-bottom-area,
.footer-bottom-area * {
    color: #666 !important;
}
.footer-bottom-area a:hover {
    color: #2563a0 !important;
}
.footer-bottom-area .footer-copy-right p {
    color: #666 !important;
}
.footer-border {
    border-top: none !important;
}

/* ======================================================
   12. SCROLL PROGRESS BAR — match theme
   ====================================================== */
.scroll-progress {
    background: #2563a0 !important;
}

/* ======================================================
   13. IMAGE CONSISTENCY FIX — Global
   ====================================================== */
.img-hover-slide {
    background-size: cover;
    background-position: center;
}

.post-module-1 .thumb-overlay .img-hover-slide {
    min-height: 350px;
}

.single-thumnail img {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.kagemi-headline .kagemi-slider-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.kagemi-headline .kagemi-thumb-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.entry-main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

img.lazy {
    background-color: #f0f0f0;
}

/* ======================================================
   14. MOBILE LAYOUT — Keep Desktop-like
   ====================================================== */
@media (max-width: 991px) {
    .header-mobile-top {
        display: block !important;
    }
    .kagemi-mobile-logo {
        display: none !important;
    }
    /* No extra padding needed - white header has its own */
}

@media (max-width: 767px) {
    .loop-list-1 article.row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    .loop-list-1 article.row > .col-md-6:first-child {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    .loop-list-1 article.row > .col-md-6:last-child {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    .loop-list-1 article.row .img-hover-slide {
        min-height: 180px;
    }

    .archive .loop-list-1 .first-post .img-hover-slide {
        min-height: 250px;
    }

    .related-posts article.row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    .related-posts article.row > .col-md-4 {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
    }
    .related-posts article.row > .col-md-8 {
        flex: 0 0 66.666% !important;
        max-width: 66.666% !important;
    }
    .related-posts .img-hover-slide {
        min-height: 130px;
    }

    .loop-list .post-thumb.mr-20 {
        margin-right: 20px !important;
    }
    .related-posts .post-thumb.mr-20 {
        margin-right: 20px !important;
    }

    .post-module-1 .thumb-overlay .img-hover-slide {
        min-height: 250px;
    }

    .featured-slider-2-items .post-thumb .thumb-overlay {
        min-height: 300px !important;
    }

    .post-content h4.post-title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .archive-header .border-color-1.mt-30 {
        margin: 15px 0 !important;
    }

    /* Mobile: editors pick 2 columns */
    .kagemi-editors-pick .ep-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Mobile: tighter section spacing */
    .pt-30 {
        padding-top: 15px !important;
    }
    .pb-30 {
        padding-bottom: 15px !important;
    }
}

/* ======================================================
   15. SMALL MOBILE (< 480px)
   ====================================================== */
@media (max-width: 479px) {
    .loop-list-1 article.row .img-hover-slide {
        min-height: 140px;
    }
    .related-posts .img-hover-slide {
        min-height: 100px;
    }
    .post-module-1 .thumb-overlay .img-hover-slide {
        min-height: 200px;
    }
    .featured-slider-2-items .post-thumb .thumb-overlay {
        min-height: 220px !important;
    }
    .archive .loop-list-1 .first-post .img-hover-slide {
        min-height: 200px;
    }

    /* Very small: editors pick single column */
    .kagemi-editors-pick .ep-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* ======================================================
   16. TABLET (768px - 991px)
   ====================================================== */
@media (min-width: 768px) and (max-width: 991px) {
    .img-hover-slide {
        min-height: 220px;
    }
    .related-posts .img-hover-slide {
        min-height: 160px;
    }
    .kagemi-editors-pick .ep-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
