/*
 * FUNJI Ultimate Blog - Custom Styles
 * Semua styles di-scope ke body.funji-template
 * supaya tidak mempengaruhi halaman lain (homepage, dll)
 */

/* Import Google Fonts - hanya load di halaman FUNJI */
/* Di-handle via wp_enqueue_style di functions.php */

/* ================================================
   ROOT VARIABLES (scoped ke template FUNJI)
   ================================================ */
body.funji-template {
    --funji-bg-page: #F2F5FA;
    --funji-bg-white: #FFFFFF;
    --funji-accent-green: #00A344;
    --funji-accent-light-green: #E8F9EF;
    --funji-text-dark: #333333;
    --funji-text-darker: #343434;
    --funji-neutral: #f5f5f5;
    --funji-divider-dark: #333333;

    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--funji-bg-page) !important;
}

/* Sembunyikan header & footer Neve di halaman FUNJI */
body.funji-template header.header,
body.funji-template .hfg_header,
body.funji-template #nv-sticky-wrapper,
body.funji-template .nv-breadcrumbs-wrapper,
body.funji-template footer.site-footer,
body.funji-template #footer-widgets,
body.funji-template .site-footer {
    display: none !important;
}

/* Reset padding/margin body area */
body.funji-template .neve-main,
body.funji-template #content {
    background-color: var(--funji-bg-page);
    padding: 0 !important;
    margin: 0 !important;
}

/* ================================================
   MAIN CONTAINER
   ================================================ */
body.funji-template .funji-main-wrapper {
    background-color: var(--funji-bg-page);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    margin-top: 30px;
    padding-bottom: 70px; /* ruang untuk sticky button */
}

body.funji-template .funji-content-container {
    position: relative;
    background-color: var(--funji-bg-white);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 510px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 768px) {
    body.funji-template .funji-content-container {
        max-width: 688px;
    }
}

/* ================================================
   CONTENT COLUMN (padding & gap)
   ================================================ */
body.funji-template .funji-content-column {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 35px 35px 35px 35px;
}

@media (min-width: 768px) {
    body.funji-template .funji-content-column {
        gap: 32px;
        padding: 32px 50px 32px 50px;
    }
}

@media (min-width: 1024px) {
    body.funji-template .funji-content-column {
        padding: 32px 128px 32px 128px;
    }
}

/* ================================================
   TEXT AREA
   ================================================ */
body.funji-template .funji-text-area {
    width: 100%;
    color: var(--funji-text-dark);
    line-height: 1.6;
}

body.funji-template .funji-text-area h1,
body.funji-template .funji-text-area h2,
body.funji-template .funji-text-area h3,
body.funji-template .funji-text-area h4 {
    color: var(--funji-text-darker);
    margin: 0 0 0.5em 0;
}

body.funji-template .funji-text-area p {
    margin: 0 0 0.5em 0;
}

body.funji-template .funji-text-area p:empty {
    margin: 0;
    line-height: 1;
}

body.funji-template .funji-text-area ul,
body.funji-template .funji-text-area ol {
    margin: 0 0 0.5em 1.5em;
    padding: 0;
}

body.funji-template .funji-text-area li {
    margin-bottom: 0.4em;
    line-height: 1.6;
}

body.funji-template .funji-text-area a {
    color: var(--funji-accent-green);
    text-decoration: none;
}

body.funji-template .funji-text-area s {
    text-decoration: line-through;
}

body.funji-template .ql-align-center {
    text-align: center;
}

/* ================================================
   BONUS BOX (background #E8F9EF)
   ================================================ */
body.funji-template .funji-bonus-box {
    background-color: #E8F9EF;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* ================================================
   QUOTE BOX (background #FFF9EC)
   ================================================ */
body.funji-template .funji-quote-box {
    background-color: #FFF9EC;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* ================================================
   IMAGES
   ================================================ */
body.funji-template .funji-img-wrapper {
    width: 100%;
}

body.funji-template .funji-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

body.funji-template .funji-img-wrapper.object-contain img {
    object-fit: contain;
}

body.funji-template .funji-img-wrapper.object-cover img {
    object-fit: cover;
}

/* Testimoni 3: dark bg wrapper */
body.funji-template .funji-img-dark-bg {
    background-color: #343434;
    padding: 5px;
}

/* ================================================
   DIVIDER
   ================================================ */
body.funji-template .funji-divider {
    width: 100%;
    height: 3px;
    background-color: var(--funji-divider-dark);
    border: none;
    margin: 0;
    flex-shrink: 0;
}

/* ================================================
   CTA BUTTON (inline, di dalam content)
   ================================================ */
body.funji-template .funji-cta-button-wrapper {
    width: 100%;
}

body.funji-template .funji-cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    background-color: #00A344;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500;
    text-decoration: none !important;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

body.funji-template .funji-cta-button:hover {
    opacity: 0.9;
    color: #ffffff !important;
}

/* ================================================
   FAQ SECTION
   ================================================ */
body.funji-template .funji-faq-wrapper {
    width: 100%;
}

body.funji-template .funji-faq-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

body.funji-template .funji-faq-header-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 22px;
    color: #000;
    white-space: nowrap;
    margin: 0;
}

body.funji-template .funji-faq-header-line {
    margin-left: 10px;
    height: 2px;
    flex: 1;
    background-color: #d0d0d0;
}

body.funji-template .funji-faq-item {
    border: 1px solid #000000;
    margin-bottom: 8px;
    overflow: hidden;
}

body.funji-template .funji-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    color: #ffffff;
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

body.funji-template .funji-faq-question .faq-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

body.funji-template .funji-faq-question.is-open .faq-arrow {
    transform: rotate(180deg);
}

body.funji-template .funji-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fff;
}

body.funji-template .funji-faq-answer.is-open {
    max-height: 500px;
    border-top: 1px solid #000000;
}

body.funji-template .funji-faq-answer-inner {
    padding: 12px 15px;
}

body.funji-template .funji-faq-answer-inner p {
    margin: 0 0 0.4em 0;
    color: var(--funji-text-dark);
    line-height: 1.6;
}

/* ================================================
   STICKY BOTTOM BUTTON
   ================================================ */
body.funji-template .funji-sticky-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #00c853, #43a047);
    color: #ffffff !important;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    z-index: 9999;
}

body.funji-template .funji-sticky-btn:hover {
    background: linear-gradient(90deg, #43a047, #00c853);
    opacity: 0.9;
}

body.funji-template .funji-sticky-btn:active {
    opacity: 0.8;
}

body.funji-template .funji-sticky-btn span {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.9;
    margin-left: 10px;
}

/* ================================================
   FOOTER
   ================================================ */
body.funji-template .funji-footer-text {
    text-align: center;
    color: #bbbbbb;
    font-size: 12px;
    line-height: 1.6;
}

body.funji-template .funji-footer-text p {
    margin: 0 0 0.3em 0;
}

/* ================================================
   PRINT
   ================================================ */
@media print {
    body.funji-template {
        background-color: #fff !important;
    }

    body.funji-template .funji-sticky-btn {
        display: none;
    }

    body.funji-template .funji-content-container {
        box-shadow: none;
        max-width: 100%;
    }
}
