/*
  Theme Name:    GP Classic - GeneratePress Child
  Theme URI:     https://generatepress.com
  Description:   Default GeneratePress child theme
  Author:        Tom Usborne
  Template:      generatepress
  Version:       3.2
*/

/* ---------------------------------------------------------
   1. GLOBAL & UTILITIES
   --------------------------------------------------------- */

.shadow {
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.08);
}

/* Limit Text Lines (Webkit Box) */
.limit, .limit-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}
.limit_three { -webkit-line-clamp: 3; }
.limit_two, .limit-title { -webkit-line-clamp: 2; }

/* Hidden Elements */
.nq_number, 
.owl-carousel .owl-stage::after,
.search h1.page-title:after, 
.author .page-header .page-title:after,
.site-footer ul.wp-block-navigation__container,
.wp-block-post-terms__separator,
.search-form .search-submit,
a.prev, a.next, a.prev span, a.next span {
    display: none !important;
}

/* ---------------------------------------------------------
   2. HEADER & NAVIGATION
   --------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid #f1f1f1;
}

.top_nav {
    position: absolute;
    right: 0;
}

.inside-navigation.grid-container {
    justify-content: center;
}

/* Header Buttons */
.toggle_button, .search_button {
    position: absolute;
}
.top_toggle { margin-top: 6px; position: absolute; right: 0; z-index: 991; }
.toggle_button { left: 0; }
.search_button { right: 0; }
a.search-icon { color: var(--tax-color); }

.main-navigation .menu-toggle {
    padding-right: 0;
    padding-left: 0;
    font-size: 23px;
}

/* --- FIX: Hapus Tulisan Menu di Mobile --- */
.main-navigation .menu-toggle .mobile-menu,
.menu-toggle .gp-icon + span {
    display: none !important;
}
/* ------------------------------------------ */

/* Sub Menu Styling */
.main-navigation ul.sub-menu {
    background: #fff;
    border-radius: 8px;
    padding: 8px 5px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 6px solid var(--accent);
}

.sub-menu.toggled-on {
    box-shadow: none !important;
    border: 0 solid #f1f1f1 !important;
    border-radius: 0;
    margin-left: 30px;
    width: 100% !important;
    padding: 0 !important;
}

.sub-menu.toggled-on li a {
    position: relative;
    padding-left: 25px !important;
}

.sub-menu.toggled-on li a::before {
    content: " ";
    position: absolute;
    width: 5px;
    height: 5px;
    left: 12px;
    top: 16px;
    background: var(--accent);
    border-radius: 50%;
}

/* ---------------------------------------------------------
   3. LAYOUT & GRID SYSTEMS
   --------------------------------------------------------- */
#page { background: #fff; }
.site-content { padding: 25px 25px 35px; }
.site-content .content-area { padding-right: 40px; }
.container.grid-container { width: auto; padding-left: 0; padding-right: 0; }

/* Grid Definitions */
.grid, .grid-small, .grid-list, .small-grid {
    display: grid;
}

.grid {
    grid-template-columns: 200px 1fr;
    grid-gap: 25px;
}

.featured-column .grid { grid-template-columns: 1fr; }

.grid-small, .grid-list {
    grid-template-columns: 70px 1fr;
    grid-gap: 10px;
}

.small-grid {
    grid-template-columns: 80px 1fr;
    grid-gap: 20px;
}

.grid-list { min-height: 70px; }

/* Archive Layout */
.featured-column .arc_box { display: block !important; }
.featured-column .arc_left,
.featured-column .arc_right,
.generate-columns.tablet-grid-50.featured-column,
.generate-columns.grid-50 { 
    width: 100% !important; 
}
.featured-column .acr_img { height: 330px; }

/* Masonry Load More */
.masonry-load-more {
    display: flex;
    justify-content: center;
    margin: 10px 0 25px;
}
.masonry-load-more a { border-radius: 8px; }

/* Custom List Counter */
.list_custom {
    list-style: none;
    counter-reset: my-awesome-counter;
}
.list_custom .gb-query-loop-item {
    counter-increment: my-awesome-counter;
    position: relative;
}
.list_custom .gb-query-loop-item::before {
    content: "#" counter(my-awesome-counter) "";
    position: absolute;
    top: 4px; left: 20px;
    font-size: 26px; font-weight: bold;
    color: var(--accent);
}
.list_custom .generate-columns.grid-50 {
    width: 100% !important;
    margin: 0;
}
.list_custom p.gb-headline-text { min-height: 50px; }

/* ---------------------------------------------------------
   4. CONTENT & TYPOGRAPHY
   --------------------------------------------------------- */
/* Headings & Titles */
.page-header, header.entry-header { margin-bottom: 30px; }

h1.entry-title, h1.widget-title, h1.page-title, h2.widget-title { 
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f1f1;
    position: relative;
}

h1.entry-title:after, h1.widget-title:after, h1.page-title:after, h2.widget-title:after {
    content: " ";
    position: absolute;
    width: 30%;
    left: 0; bottom: -1px;
    height: 1px;
    background: var(--accent);
}

.search h1.page-title {
    display: block;
    padding-bottom: 15px;
}
.search h1.page-title span {
    display: block;
    font-size: 16px;
    line-height: 22px;
    font-weight: bold;
    color: var(--accent);
}

/* Breadcrumb */
.rank-math-breadcrumb p { margin-bottom: 0; }
.breadcrumb { line-height: 18px; }

/* Single Post Content Styling */
.dynamic-entry-content ul, .dynamic-entry-content ol { margin: 0 0 1.5em 2em; }
.dynamic-entry-content ul li { list-style: circle; }

blockquote {
    border-left: 5px solid var(--accent);
    padding: 20px;
    font-size: 18px;
    font-style: italic;
    margin: 0 0 1.5em;
    position: relative;
    line-height: 24px;
}
blockquote p { margin-bottom: 5px; }
.wp-block-pullquote { padding: 0; }
.wp-block-pullquote cite { font-size: 14px; font-weight: bold; }

pre {
    background: #eee;
    font-family: "Courier 10 Pitch", Courier, monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.6em;
    padding: 1.6em;
    max-width: 100%;
    overflow: auto;
}

/* Also Read Box */
.also-read {
    background: #f1f1f1;
    padding: 15px 15px 15px 20px;
    border-left: 5px solid var(--accent);
    margin: 20px 0;
}
.also-read h2 { margin-bottom: 8px; }
.also-read p { margin: 0 0 10px; font-size: 14px; line-height: 18px; }

/* Images & Tables */
.wp-block-table { margin-bottom: 25px; }
.wp-block-table table { margin-bottom: 0; }
.wp-block-table .wp-element-caption,
.gb-block-image figcaption, 
.wp-block-image figcaption {
    font-size: 13px;
    text-align: center;
    margin: 10px 0 0;
    line-height: 19px;
}
.wp-block-image { margin-bottom: 25px; }
.wp-block-image img { border-radius: 5px; }

/* Categories & Tags */
.post-categories, .taxonomy-post_tag, .term_list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.post-categories { padding: 0; margin-left: 0; margin-bottom: 5px; }
.post-categories span, .post-categories span a {
    font-size: 12px;
    line-height: 20px;
    border-radius: 50px;
    color: var(--tax-color);
    display: inline-block;
    transition: all .3s ease-in-out;
}

.post-categories span a {
    padding: 4px 12px;
    color: var(--accent) !important;
    font-weight: bold;
    position: relative;
}

.post-categories span a:before {
    content: " ";
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    background: var(--accent);
    opacity: 0.15;
    border-radius: 50px;
}

.taxonomy-post_tag a {
    color: #fff;
    background: var(--accent);
    padding: 2px 13px;
    font-size: 14px;
    line-height: 20px;
    border-radius: 50px;
    transition: background-color .3s ease-in-out;
}
.taxonomy-post_tag a:hover { background: var(--contrast-2); }
.taxonomy-post_tag a:before { content: "#"; }

.term_list { gap: 8px; }
.term_list a {
    padding-bottom: 3px;
    border-bottom: 1.5px solid var(--contrast-2);
}

/* More Link */
.more-link { position: absolute; top: 0; right: 0; }
.more-link:before {
    content: " ";
    height: 30px; width: 30px;
    background: #fff;
    position: absolute; 
    right: 0; 
}
.more-link a {
    padding: 0 15px !important;
    border-radius: 50px;
    font-size: 12px !important;
    background: #fff !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    line-height: 13px;
    display: flex !important;
    align-items: center;
}

/* ---------------------------------------------------------
   5. COMPONENTS (Carousel, Pagination, Sidebar)
   --------------------------------------------------------- */
/* Owl Carousel - Optimized */
.owl-carousel { visibility: hidden; }
.owl-carousel.owl-loaded { visibility: visible; }
.owl-stage { display: flex; }
.stories_slider .owl-stage-outer { overflow: visible; }
img.slide { width: inherit !important; }

/* Owl Dots */
.owl-dots {
    text-align: center;
    margin: 10px auto 20px;
    position: static;
    bottom: 20px; right: 20px;
}
.stories_slider .owl-dots { margin-top: 0; }
.latest_post .owl-dots { position: absolute; margin: 0; top: auto; bottom: 20px; }

.owl-dots button, .owl-dot {
    width: 14px; height: 8px;
    opacity: 0.3;
    border-radius: 100px;
    margin: 0 2px;
    background: var(--base-3) !important;
}
.owl-dots button.active, .owl-dot.active {
    opacity: 0.75; width: 30px;
}

/* Owl Nav */
.owl-nav button {
    position: absolute;
    top: 38%;
    width: 35px; height: 35px;
    opacity: 1;
    transition: all .2s ease-in-out;
    background-repeat: no-repeat;
    background-position: center center !important;
}
.owl-nav button:hover { opacity: 1; }
.owl-nav button span { display: none; }
.owl-nav button.owl-prev {
    left: -20px;
    background-image: url(images/arrow-left.svg) !important;
}
.owl-nav button.owl-next {
    right: -20px;
    background-image: url(images/arrow-right.svg) !important;
}

/* Sidebar & Popular Posts */
.inside-right-sidebar { position: sticky; top: 20px; }
.popular_item a {
    color: var(--contrast);
    font-weight: 500;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
    display: block;
    border-bottom: 1px solid var(--tax-bg);
}
.popular_item a:hover { color: var(--contrast-2); }
.popular_item:last-child a { border-bottom: none; }

/* Pagination */
.paging-navigation {
    margin: 0;
    border-top: 1px solid #f1f1f1;
    background: none !important;
    text-align: center;
    font-size: 14px;
    padding: 25px 0 !important;
}
.paging-navigation span, .paging-navigation a {
    border: 1px solid #ccc;
    padding: 5px 10px !important;
    color: #333 !important;
    border-radius: 4px;
}
.paging-navigation span.current {
    background: var(--contrast-2);
    color: #fff !important;
    border: 1px solid var(--contrast-2);
    font-weight: normal !important;
}

/* Auto Page Break */
.neon-auto-page-break-pagination { font-size: 14px; }
.neon-auto-page-break-pagination .pagination { display: flex; gap: 5px; }
.neon-auto-page-break-pagination span.post-page-numbers.current,
.neon-auto-page-break-pagination a.post-page-numbers {
    background: var(--accent);
    width: 23px; height: 23px;
    display: flex;
    color: #fff;
    border: 1px solid var(--accent);
    align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 13px;
}
.neon-auto-page-break-pagination span.post-page-numbers.current {
    background: none;
    color: var(--accent);
}
.neon-show-all-page-content a { text-decoration: underline !important; }

/* ---------------------------------------------------------
   6. FORMS
   --------------------------------------------------------- */
/* Inputs */
input[type=email], input[type=number], input[type=password], 
input[type=search], input[type=tel], input[type=text], 
input[type=url], select, textarea {
    border: 1px solid #f1f1f1 !important;
    border-radius: 5px !important;
    padding: 10px 15px !important;
    margin: 0 0 10px !important;
    width: 100%;
}

/* Search Modal */
.search-modal-form { background: transparent !important; }
.gp-modal__container input.search-field { margin: 0 !important; border: none !important; }
.search-modal-fields { border-radius: 8px; overflow: hidden; background: #fff; }

/* Newsletter */
.newsletter { display: flex; flex-direction: column; }
.newsletter input { border: 2px solid var(--accent) !important; }
.newsletter input[type="submit"] {
    width: 100px;
    padding: 10px !important;
    border: none !important;
    border-radius: 8px;
}

/* ---------------------------------------------------------
   7. FOOTER & PAGES
   --------------------------------------------------------- */
/* Social Links */
.wp-block-social-links { margin: 0 !important; }
.wp-block-social-links li a { font-size: 18px; }

/* Footer Nav */
.site-footer ul.wp-block-navigation__container {
    margin: 10px 0 0; 
    column-gap: 15px;
    row-gap: 0;
}
.site-footer ul.wp-block-navigation__container li a { font-size: 14px; }
.site-footer ul.wp-block-navigation__container li:hover a { color: var(--accent); }

/* Pages */
body.error404 .inside-article { margin: 40px auto; text-align: center; }
body.page-template .site-content,
body.page-template .site-content .content-area { padding: 0; }

/* Author Page */
.author .page-header {
    padding: 20px;
    font-size: 15px;
    line-height: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.08);
}
.author .page-header .avatar { margin-right: 20px; border-radius: 50%; }
body.author h1.page-title { margin-bottom: 10px; }


/* ---------------------------------------------------------
   8. RESPONSIVE / MOBILE (Media Queries)
   --------------------------------------------------------- */
@media only screen and (max-width: 768px) {
    .gb-button.slideout-toggle span.gb-button-text { display: none; }
    
    .toggle_button, .search_button { top: 33px; }
    .toggle_button { left: 20px; }
    .search_button { right: 20px; }
    .top_toggle { right: 20px; }
    
    .inside-right-sidebar { position: static; padding: 0; border: none; }
    .featured-column { margin-bottom: 25px; }
    
    .site-content { padding: 20px; }
    .site-content .content-area { padding-right: 0; }
    .is-right-sidebar { margin-top: 40px; }
    
    /* Mobile Grid */
    .grid {
        grid-template-columns: 125px 1fr;
        grid-gap: 15px;
    }
    .featured-column .grid { margin-bottom: 0; }
    
    /* Mobile Carousel */
    .owl-carousel .owl-stage-outer { overflow: visible; }
    .owl-nav button { top: 30%; }
    .owl-nav button.owl-prev { left: -16px; }
    .owl-nav button.owl-next { right: -16px; }
    
    .center_nav .owl-dots {
        margin: 0 auto;
        right: 0; left: 0;
    }
    
    .gp-search-modal .gp-modal__overlay {
        padding-left: 30px !important;
        padding-right: 30px !important;
        background: rgba(0, 0, 0, 0.65) !important;
    }
    
    .post-abs, .post-abs-r {
        position: absolute;
        top: 20px; left: 20px;
    }
    .post-abs-r { right: 20px; left: auto; }
}

@media only screen and (max-width: 767px) {
    body { background: #fff !important; }
    .featured-column .acr_img { height: 200px; }
    
    .grid-small { grid-template-columns: 80px 1fr; }
    .small-grid {
        grid-template-columns: 1fr;
        grid-gap: 10px;
    }
    
    /* Category Desc Arrow */
    .cat_grid_desc { position: relative; }
    .cat_grid_desc:before {
        content: " ";
        position: absolute;
        top: -10px; left: 30px;
        border-left: solid 10px transparent;
        border-right: solid 10px transparent;
        border-bottom: solid 10px #f1f1f1;
        height: 0; width: 0;
    }
    
    .main-navigation .menu-bar-item > a {
        padding-left: 10px;
        padding-right: 10px;
        margin-right: 10px;
    }
}