/* =========================================================
   1. TAMPILAN ICON SOSMED (TANPA UBAH POSISI)
   ========================================================= */

.social-icons-small {
    gap: 6px !important;
}

.social-icons-small .social-link-small,
.social-link-small {
    width: 34px !important;
    height: 34px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.social-link-small ion-icon[name*="facebook"] {
    color: #1877f2 !important;
    font-size: 16px !important;
}

.social-link-small ion-icon[name*="twitter"],
.social-link-small ion-icon[name*="logo-twitter"] {
    color: #000000 !important;
    font-size: 16px !important;
}

.social-link-small ion-icon[name*="instagram"] {
    color: #e4405f !important;
    font-size: 16px !important;
}

.social-link-small ion-icon[name*="youtube"] {
    color: #ff0000 !important;
    font-size: 16px !important;
}

.social-link-small:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3) !important;
}


/* =========================================================
   2. TIPOGRAFI UTAMA, KONTEN ARTIKEL & KETERBACAAN
   ========================================================= */

body {
    font-size: 15.5px;
    line-height: 1.7;
    color: #1f2937;
}

p,
.entry-content p,
.post-content p,
.halaman-content p,
.article-content p,
.konten-berita p,
.cms-berita-detail p,
.berita-detail p,
.halaman-detail p,
.artikel-konten p,
.post-body p,
main article p,
article p {
    font-size: 16px;
    line-height: 1.8;
    margin-top: 0;
    margin-bottom: 1.15rem;
}

h1, h2, h3, h4,
.title-custom,
.post-title {
    line-height: 1.35;
    color: #111827;
}

.cms-berita-detail h2,
.cms-berita-detail h3,
.halaman-detail h2,
.halaman-detail h3,
article h2,
article h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.7rem;
    line-height: 1.35;
    font-weight: 700;
    color: #111827;
}

.cms-berita-detail,
.berita-detail,
.halaman-detail,
.artikel-konten,
.post-body,
article {
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
    word-wrap: break-word;
}

.cms-berita-detail ul,
.cms-berita-detail ol,
.halaman-detail ul,
.halaman-detail ol,
.entry-content ul,
.entry-content ol,
article ul,
article ol {
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    line-height: 1.75;
}

.cms-berita-detail li,
.halaman-detail li,
article li {
    margin-bottom: 0.45rem;
}

table td,
table th {
    line-height: 1.5;
    vertical-align: middle;
}

.cms-berita-detail blockquote,
.halaman-detail blockquote,
article blockquote {
    margin: 1.25rem 0;
    padding: 0.85rem 1.1rem;
    border-left: 4px solid #2563eb;
    background-color: #f8fafc;
    color: #334155;
}

.cms-berita-detail img,
.halaman-detail img,
article img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.post-body a,
.article-content a,
.entry-content a,
.konten-berita a,
main article a {
    color: #14532d;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #eab308;
    text-underline-offset: 3px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.post-body a:hover,
.article-content a:hover,
.entry-content a:hover,
.konten-berita a:hover,
main article a:hover,
.post-body a:focus-visible,
.article-content a:focus-visible,
.entry-content a:focus-visible,
.konten-berita a:focus-visible,
main article a:focus-visible {
    color: #092b0e;
    background-color: #fef9c3;
    border-radius: 3px;
}


/* =========================================================
   3. BREADCRUMB & BRAND HEADER
   ========================================================= */

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

.navbar-brand {
    position: relative !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
    width: auto !important;
    max-width: none !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.navbar-brand img,
.navbar-brand .logo-icon {
    position: static !important;
    float: none !important;
    height: 44px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.navbar-brand .logo-text {
    display: block !important;
    margin: 0 !important;
    padding: 2px 0 2px 12px !important;
    border-left: 2px solid #cbd5e1 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-align: left !important;
}

small.tagline,
.navbar-brand + small.tagline,
.navbar-control small.tagline,
.navbar-header small.tagline,
#main-wrapper #header .tagline {
    position: relative !important;
    display: block !important;
    font-size: 10px !important;
    letter-spacing: 0.2px !important;
    margin-top: -15px !important;
    margin-bottom: 0 !important;
    margin-left: 68px !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
}


/* =========================================================
   4. NAV-KATEGORI (TEKS BERJALAN & CUACA/TANGGAL)
   ========================================================= */

#main-wrapper .nav-kategori .col-sm-9 marquee {
    font-size: 12px !important;
    line-height: 1.3 !important;
}

#main-wrapper .nav-kategori .col-sm-3 {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding-right: 12px !important;
}


/* =========================================================
   5. WIDGET SIDEBAR HOME & KARTU PENGHARGAAN
   ========================================================= */

[name="widget_sidebar_home"] .cms-custom-html,
[name="widget_sidebar_home"] .card,
[name="widget_sidebar_home"] .card-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

[name="widget_sidebar_home"] .card {
    overflow: hidden !important;
}

[name="widget_sidebar_home"] .card > div:first-child {
    padding: 12px 14px !important;
    line-height: 1.3 !important;
}

[name="widget_sidebar_home"] .card-body {
    padding: 12px 14px !important;
    background-color: #ffffff !important;
    color: #263b32 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

/* Wadah foto mengikuti rasio asli gambar */
[name="widget_sidebar_home"] .card-body .mb-3.rounded.overflow-hidden {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    overflow: hidden !important;
}

/* Gambar responsif penuh tanpa terpotong gepeng */
[name="widget_sidebar_home"] img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
}

[name="widget_sidebar_home"] * {
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Perapian widget sidebar responsif di layar HP */
    [name="widget_sidebar_home"] .card-body .mb-3.rounded.overflow-hidden {
        height: auto !important;
        max-height: none !important;
    }

    [name="widget_sidebar_home"] img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
    }

/* =========================================================
   6. POP-UP LOADING (#GPP-LOADING-POPUP)
   ========================================================= */

#gpp-loading-popup {
    box-sizing: border-box !important;
    z-index: 999999 !important;
}

#gpp-loading-popup img {
    max-width: 100% !important;
    max-height: 75vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}


/* =========================================================
   7. PADANG PANYANG AI — CHAT WIDGET
   ========================================================= */

#ppai-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999990;
    border: 0;
    border-radius: 50px;
    padding: 13px 19px;
    background: linear-gradient(135deg, #075b43, #087b58);
    color: #fff;
    box-shadow: 0 8px 28px #003c2b55;
    font: 700 14px Arial, sans-serif;
    cursor: pointer;
}

#ppai-launcher:hover {
    transform: translateY(-2px);
}

#ppai-panel {
    position: fixed;
    right: 22px;
    bottom: 86px;
    z-index: 999991;
    width: min(370px, calc(100vw - 28px));
    height: min(550px, calc(100vh - 115px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 19px;
    background: #f7f8f4;
    box-shadow: 0 12px 45px #001d1640;
    border: 1px solid #d9e5dc;
    font-family: Arial, sans-serif;
}

#ppai-panel.ppai-open {
    display: flex;
}

#ppai-header {
    background: linear-gradient(120deg, #064c38, #087b58);
    color: white;
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 11px;
}

#ppai-logo {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 50%;
    background: #ffffff20;
    display: grid;
    place-items: center;
    font-size: 23px;
}

#ppai-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .3px;
}

#ppai-subtitle {
    font-size: 11px;
    color: #d9f2e5;
    margin-top: 4px;
}

#ppai-close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: white;
    font-size: 25px;
    cursor: pointer;
}

#ppai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.ppai-msg {
    max-width: 88%;
    padding: 11px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ppai-bot {
    align-self: flex-start;
    background: white;
    color: #263b32;
    border: 1px solid #e5ebe5;
    border-bottom-left-radius: 4px;
}

.ppai-user {
    align-self: flex-end;
    background: #dcefe3;
    color: #174a35;
    border-bottom-right-radius: 4px;
}

#ppai-status {
    padding: 0 14px 8px;
    color: #718078;
    font-size: 11px;
    min-height: 15px;
}

#ppai-human {
    display: none;
    margin: 0 12px 9px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    background: #087b58;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

#ppai-form {
    display: flex;
    gap: 7px;
    padding: 11px;
    background: white;
    border-top: 1px solid #e4eae4;
}

#ppai-input {
    min-width: 0;
    flex: 1;
    border: 1px solid #d9e2da;
    border-radius: 22px;
    padding: 11px 14px;
    outline: none;
    font-size: 13px;
}

#ppai-input:focus {
    border-color: #087b58;
}

#ppai-send {
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 50%;
    background: #087b58;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#ppai-send:disabled {
    opacity: .5;
    cursor: wait;
}

#ppai-footer {
    text-align: center;
    padding: 7px;
    color: #7c8b81;
    font-size: 10px;
    background: white;
}


/* =========================================================
   8. RESPONSIVE MOBILE (MAX-WIDTH: 768PX & 480PX)
   ========================================================= */

@media (max-width: 768px) {
    .cms-berita-detail,
    .berita-detail,
    .halaman-detail,
    .artikel-konten,
    .post-body,
    article,
    .cms-berita-detail p,
    .halaman-detail p,
    article p {
        font-size: 15px;
        line-height: 1.75;
    }

    /* Teks berjalan di kiri & blok cuaca/tanggal tetap rapi di kanan */
    #main-wrapper .nav-kategori .col-sm-9 {
        position: relative !important;
        left: 0 !important;
        margin-left: 0 !important;
        margin-right: 12px !important;
        padding-left: 4px !important;
        padding-right: 8px !important;
        width: 46% !important;
        max-width: 46% !important;
        flex: 0 0 46% !important;
        overflow: hidden !important;
        z-index: 1 !important;
    }

    #main-wrapper .nav-kategori .col-sm-9 .simply-scroll,
    #main-wrapper .nav-kategori .col-sm-9 .simply-scroll-container,
    #main-wrapper .nav-kategori .col-sm-9 .simply-scroll-clip,
    #main-wrapper .nav-kategori .col-sm-9 cms\:render,
    #main-wrapper .nav-kategori .col-sm-9 marquee {
        position: relative !important;
        left: 0 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        font-size: 10.5px !important;
        line-height: 1.25 !important;
    }

    #main-wrapper .nav-kategori .col-sm-3 {
        position: relative !important;
        z-index: 2 !important;
        margin-left: auto !important;
        width: auto !important;
        max-width: 50% !important;
        flex: 0 0 auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding-left: 6px !important;
        padding-right: 8px !important;
    }

    #main-wrapper .nav-kategori .col-sm-3 .weather-icon,
    #main-wrapper .nav-kategori .col-sm-3 .weather-desc {
        font-size: 10px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* Perapian widget sidebar di layar HP */
    [name="widget_sidebar_home"] .card-body .mb-3.rounded.overflow-hidden {
        max-height: 165px !important;
    }

    [name="widget_sidebar_home"] img {
        max-height: 160px !important;
    }
}

@media (max-width: 480px) {
    #ppai-launcher {
        right: 14px;
        bottom: 14px;
    }

    #ppai-panel {
        right: 10px;
        bottom: 75px;
        width: calc(100vw - 20px);
        height: min(570px, calc(100vh - 95px));
    }
}

/* =========================================================
   WARNA TEKS CAPTION SLIDESHOW AGAR TETAP PUTIH
   ========================================================= */

#slideshow .slideshow-home .slide-info,
#slideshow .slideshow-home .slide-info *,
#slideshow-home .slide-info,
#slideshow-home .slide-info * {
    color: #ffffff !important;
}

#slideshow .slideshow-home .slide-info a,
#slideshow-home .slide-info a {
    color: #ffffff !important;
    text-decoration: none !important;
}