/* Custom CSS for DENGARINFO.COM Details Page */

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    max-width: 100%;
    overflow-y: auto;
}

/* Navigation hover effects */
#navigation li:hover > a {
    background: #be0914 !important;
    color: #fff !important;
}

/* Footer hover effects */
.footer-social a:hover {
    background: #fff !important;
    color: #be0914 !important;
    transform: translateY(-3px);
}

.footer-tittle div a:hover {
    background: #be0914 !important;
    color: #fff !important;
}

.footer-menu ul li a:hover {
    color: #be0914 !important;
}

/* Comment Form Styling */
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #be0914 !important;
    box-shadow: 0 0 0 0.2rem rgba(252,1,9,0.15) !important;
}

.comment-form button:hover {
    background: #c20410 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(252,1,9,0.3) !important;
}

/* Comment Reply Button Hover */
.single-comment button:hover {
    background: #be0914 !important;
    color: #fff !important;
    transform: translateX(3px);
}

/* Dropdown menu styling */
#lainnya-dropdown {
    display: none !important;
    flex-direction: column !important;
}

#lainnya-dropdown li {
    display: block !important;
    width: 100% !important;
}

#lainnya-dropdown li a {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}

/* Mobile Menu Hover Effects */
#mobile-menu-sidebar nav ul li a:hover {
    background: #f8f9fa;
    color: #be0914 !important;
    padding-left: 25px !important;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile Category Menu Styles */
.mobile-category-menu {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.mobile-category-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.mobile-category-menu a:active {
    background: rgba(255,255,255,0.2) !important;
}

/* Responsive menu */
@media (max-width: 1200px) {
    #navigation li a {
        padding: 15px 12px !important;
        font-size: 13px !important;
    }
    
    .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-top: 30px;
    }
}

@media (max-width: 992px) {
    #navigation li a {
        padding: 15px 10px !important;
        font-size: 12px !important;
    }
    
    .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    #navigation li a {
        padding: 12px 8px !important;
        font-size: 10px !important;
    }
    
    .footer-menu {
        text-align: left !important;
        margin-top: 20px;
    }
    
    .footer-menu ul {
        justify-content: flex-start !important;
    }
    
    .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-top: 20px;
    }
    
    .form-group label {
        font-size: 14px !important;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px !important;
        padding: 10px !important;
    }
}

@media (max-width: 576px) {
    .header-mid .col-xl-3,
    .header-mid .col-lg-3,
    .header-mid .col-md-3,
    .header-mid .col-xl-6,
    .header-mid .col-lg-6,
    .header-mid .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .logo img {
        max-height: 50px !important;
    }
    
    .search-container {
        margin-top: 15px;
        width: 100% !important;
    }
    
    .search-container div {
        flex-direction: column !important;
        gap: 8px;
    }
    
    .search-container input,
    .search-container button {
        width: 100% !important;
        border-radius: 25px !important;
    }
    
    .header-social-icons {
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 10px;
    }
    
    .header-social-icons a {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 12px !important;
    }
    
    #navigation {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    #navigation li {
        flex: 1 1 45% !important;
        min-width: 120px;
        margin: 3px !important;
    }
    
    #navigation li a {
        padding: 10px 6px !important;
        font-size: 9px !important;
        white-space: normal !important;
    }
    
    .col-lg-8,
    .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 13px !important;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
    
    .col-sm-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px;
    }
    
    .footer-bottom-area .row {
        flex-direction: column;
    }
    
    .footer-bottom-area .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px;
        text-align: center !important;
    }
    
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .header-social-icons a {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 11px !important;
    }
    
    #navigation li a {
        padding: 8px 4px !important;
        font-size: 8px !important;
    }
    
    .section-header h3 {
        font-size: 16px !important;
        padding: 8px 15px !important;
    }
    
    .form-group label {
        font-size: 12px !important;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 12px !important;
    }
    
    .footer-tittle h4 {
        font-size: 16px !important;
    }
    
    .footer-social {
        justify-content: center !important;
    }
    
    .footer-social a {
        width: 35px !important;
        height: 35px !important;
        line-height: 35px !important;
    }
}

/* Mobile Details Page Improvements */
@media (max-width: 767px) {
    /* Fix body overflow untuk mobile */
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Fix container padding dan overflow untuk mobile */
    .about-area {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    .about-area .container {
        padding: 8px 15px 20px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Pastikan row tidak menyebabkan overflow */
    .about-area .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Sembunyikan sidebar di mobile */
    .about-area .col-lg-4 {
        display: none !important;
    }
    
    /* Buat col-lg-8 menjadi full width di mobile */
    .about-area .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Fix article content overflow */
    .about-right {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        padding: 20px 15px !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    /* Fix semua elemen dalam article-content agar tidak keluar */
    .article-content-text,
    .article-content-text p,
    .article-content-text div,
    .article-content-text span,
    .article-content-text * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }
    
    /* Fix images agar tidak keluar */
    .article-content-text img,
    .about-img img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Fix tables agar tidak keluar */
    .article-content-text table {
        max-width: 100% !important;
        width: 100% !important;
        table-layout: auto !important;
        overflow-x: auto !important;
        display: block !important;
    }
    
    /* Fix long URLs dan text */
    .article-content-text a,
    .article-content-text p,
    .article-content-text div {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
    }
    
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Featured Images Carousel Styling */
.featured-images-slider {
    margin-bottom: 20px;
}

#featuredImagesCarousel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#featuredImagesCarousel .carousel-inner {
    max-height: 600px;
}

#featuredImagesCarousel .carousel-item img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
}

#featuredImagesCarousel .carousel-control-prev,
#featuredImagesCarousel .carousel-control-next {
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
}

#featuredImagesCarousel .carousel-control-prev {
    left: 15px;
}

#featuredImagesCarousel .carousel-control-next {
    right: 15px;
}

#featuredImagesCarousel .carousel-indicators {
    margin-bottom: 15px;
}

#featuredImagesCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}

#featuredImagesCarousel .carousel-indicators button.active {
    background-color: #be0914;
    border-color: #be0914;
}

/* Mobile carousel adjustments */
@media (max-width: 767px) {
    #featuredImagesCarousel .carousel-inner {
        max-height: 400px;
    }
    
    #featuredImagesCarousel .carousel-item img {
        max-height: 400px;
    }
    
    #featuredImagesCarousel .carousel-control-prev,
    #featuredImagesCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #featuredImagesCarousel .carousel-control-prev-icon,
    #featuredImagesCarousel .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
    
    .about-img img {
        border-radius: 8px !important;
        margin-bottom: 15px !important;
    }
    
    .section-tittle h1 {
        font-size: 20px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    
    .about-prea {
        font-size: 16px !important;
        line-height: 1.8 !important;
    }
    
    .article-content-text,
    .article-content-text p,
    .article-content-text div,
    .article-content-text span {
        font-size: 18px !important;
        line-height: 1.9 !important;
        color: #222222 !important;
        /* Tidak mengatur font-family agar inline style dari Word tetap digunakan */
        /* CSS selector ini memiliki specificity lebih tinggi dari p { font-family: Poppins } */
        /* Tapi tidak mengoverride inline style karena inline style memiliki prioritas tertinggi */
    }
    
    /* Pastikan CSS global p { font-family: Poppins } tidak mengoverride inline style dari Word */
    /* Selector .article-content-text p memiliki specificity lebih tinggi dari p */
    /* Tapi kita tidak mengatur font-family agar inline style dari Word tetap digunakan */
    
    /* List styling untuk mobile */
    .article-content-text ul,
    .article-content-text ol {
        margin: 15px 0 !important;
        padding-left: 25px !important;
        display: block !important;
    }
    
    .article-content-text ul {
        list-style-type: disc !important;
    }
    
    .article-content-text ol {
        list-style-type: decimal !important;
    }
    
    .article-content-text li {
        display: list-item !important;
        margin: 8px 0 !important;
        padding-left: 5px !important;
        line-height: 1.7 !important;
        font-size: 17px !important;
        color: #222222 !important;
    }
    
    .social-share {
        margin-top: 30px !important;
    }
    
    .social-share h3 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .social-share ul {
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .social-share li a {
        padding: 8px !important;
        font-size: 14px !important;
    }
    
    .related-articles h3 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .related-card {
        margin-bottom: 20px !important;
    }
    
    .related-card img {
        height: 150px !important;
    }
    
    .related-card h4 {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }
    
    .comments-area h3 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .comment-form h4 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    
    .comment-form button {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
}

/* Show/Hide Mobile and Desktop Headers */
@media (max-width: 767px) {
    .mobile-header {
        display: block !important;
    }
    
    body {
        padding-top: 80px !important; /* Space for fixed mobile header */
    }
    
    .header-mid,
    .header-bottom {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-header {
        display: none !important;
    }
}
