/**
 * ================================================
 * RESPONSIVE MOBILE - KHUSUS UNTUK TEMPLATE NEMESIS
 * Compatible dengan style.css asli
 * Tidak mengganggu tampilan desktop
 * ================================================
 */

/* ========== TOGGLE MENU (HAMBURGER) ========== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1060;
    width: 45px;
    height: 45px;
    background: #ff005b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #e6004c;
    transform: scale(1.05);
}

.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    cursor: pointer;
}

.mobile-overlay.active {
    display: block;
}

/* Sidebar Mobile */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background: #1a1a2e;
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.mobile-sidebar.open {
    left: 0;
}

/* Header Sidebar */
.mobile-sidebar-header {
    padding: 20px;
    background: #ff005b;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-sidebar-header .mobile-logo img {
    max-width: 150px;
    margin-bottom: 10px;
}

.mobile-sidebar-header h4 {
    color: white;
    font-size: 16px;
    margin: 0;
}

/* Navigasi Sidebar */
.mobile-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-sidebar-nav li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.mobile-sidebar-nav li a:hover {
    background: #ff005b;
    padding-left: 30px;
}

/* Dropdown di sidebar */
.mobile-sidebar-nav li.has-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sidebar-nav li.has-dropdown > a .dropdown-icon {
    transition: transform 0.3s ease;
}

.mobile-sidebar-nav li.has-dropdown.open > a .dropdown-icon {
    transform: rotate(180deg);
}

.mobile-sidebar-nav .dropdown-menu-mobile {
    display: none;
    background: rgba(0,0,0,0.3);
    padding-left: 20px;
}

.mobile-sidebar-nav .dropdown-menu-mobile.show {
    display: block;
}

.mobile-sidebar-nav .dropdown-menu-mobile li a {
    padding-left: 40px;
    font-size: 13px;
}

/* Social Icons di Sidebar */
.mobile-sidebar-social {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-sidebar-social .social-icons-mobile .nav {
    justify-content: center;
}

.mobile-sidebar-social .social-icons-mobile .nav-link {
    padding: 0.5rem 0.7rem;
    color: white;
}

.mobile-sidebar-social .social-icons-mobile .nav-link:hover {
    color: #ff005b;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (max-width: 992px) */
@media screen and (max-width: 992px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .slider-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .post-title {
        font-size: 18px !important;
    }
}

/* Mobile (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Toggle Menu */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Sembunyikan navbar default di mobile */
    .navbar-collapse {
        display: none !important;
    }
    
    /* Header adjustment */
    .navbar-brand {
        margin: 0 auto !important;
        text-align: center;
    }
    
    .navbar-brand img {
        max-height: 45px;
        max-width: 150px;
    }
    
    .navbar {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    /* Headline (top bar) */
    .fbt-headline .row {
        flex-direction: column;
        text-align: center;
    }
    
    .fbt-headline .nav {
        justify-content: center !important;
    }
    
    .fbt-headline .left-headline-content,
    .fbt-headline .right-headline-content {
        width: 100%;
    }
    
    /* Slider */
    .slider-container .row {
        flex-direction: column;
    }
    
    .slider-container .col-lg-6 {
        width: 100%;
        padding: 0;
        margin-bottom: 15px;
    }
    
    .fbt-mag-slider .post-item.large .fbt-post-thumbnail,
    .fbt-mag-slider .post-item.medium .fbt-post-thumbnail {
        height: 280px !important;
    }
    
    .fbt-mag-slider .post-item.small_thumb .fbt-post-thumbnail {
        height: 160px !important;
    }
    
    .grid-padding-left,
    .grid-padding-right {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    /* Block 1 - Berita Utama */
    .fbt-block-1 .fbt-large .row {
        flex-direction: column;
    }
    
    .fbt-block-1 .fbt-large .col-xl-6 {
        width: 100%;
    }
    
    .fbt-block-1 .fbt-large .fbt-post-thumbnail {
        height: 200px;
    }
    
    .fbt-block-1 .fbt-small .row .col-md-4 {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .fbt-block-1 .fbt-small .fbt-post-thumbnail {
        height: 180px;
    }
    
    /* Block 2 */
    .fbt-block-2 .row {
        flex-direction: column;
    }
    
    .fbt-block-2 .col-lg-6 {
        width: 100%;
    }
    
    .fbt-block-2 .large .fbt-post-thumbnail {
        height: 250px !important;
    }
    
    .fbt_list_posts .fbt-item-thumbnail {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* List Berita (index) */
    .fbt_magazine-blog-post {
        margin-bottom: 30px;
    }
    
    .fbt_magazine-blog-post .row {
        flex-direction: column;
    }
    
    .fbt_magazine-blog-post .col-xl-6 {
        width: 100%;
    }
    
    .fbt_magazine-blog-post .fbt-post-caption {
        margin-top: 15px !important;
    }
    
    .fbt_magazine-blog-post .fbt-post-thumbnail {
        height: 200px;
    }
    
    /* Sidebar */
    .fbt-main-sidebar {
        margin-top: 30px;
    }
    
    .fbt-main-sidebar__content {
        padding-left: 0 !important;
    }
    
    /* Gallery */
    .fbt-gallery .row .col-lg-3,
    .fbt-gallery .row .col-md-6 {
        width: 50%;
        margin-bottom: 20px !important;
    }
    
    .fbt-gallery .fbt-gallery-1 .fbt-post-thumbnail {
        height: 200px;
    }
    
    /* Video Gallery */
    .fbt-video-gallery .row {
        flex-direction: column;
    }
    
    .fbt-video-gallery .col-lg-8,
    .fbt-video-gallery .col-lg-4 {
        width: 100%;
    }
    
    .fbt-video-gallery .post-content.pl-lg-3 {
        padding-left: 0 !important;
        margin-top: 20px;
    }
    
    .fbt-video-gallery .fbt-main-gallery .large .fbt-post-thumbnail {
        height: 220px !important;
    }
    
    /* Footer */
    .footer-dark .col-lg-4,
    .footer-dark .col-lg-6 {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .footer-menu .socialList ul {
        justify-content: center !important;
    }
    
    /* Newsletter */
    .subscriber-form:before {
        display: none;
    }
    
    .fbt-newsletter-area .title {
        font-size: 28px !important;
        text-align: center;
    }
    
    .fbt-email-form {
        flex-direction: column;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .fbt-email-form input[type="email"] {
        width: 100% !important;
        padding: 15px 20px;
    }
    
    .subscriber-form input[type="submit"] {
        position: relative;
        width: 100%;
        right: 0;
        top: 0;
        border-radius: 0;
    }
    
    /* Post Detail */
    .post-body.post-content {
        padding: 0 10px;
    }
    
    .post-body.post-content img {
        max-width: 100%;
        height: auto;
    }
    
    .post-meta span {
        font-size: 11px;
    }
    
    /* Komentar */
    .blog-post-comments .comment {
        padding: 15px;
    }
    
    .media.comment {
        flex-direction: column;
    }
    
    .media.comment .mr-4 {
        margin-bottom: 10px;
        text-align: center;
    }
    
    .comment-list--form .row .col-md-4,
    .comment-list--form .row .col-md-6 {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Form */
    .form-group .col-sm-3,
    .form-group .col-sm-9,
    .form-group .col-sm-5,
    .form-group .col-sm-8 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .offset-3 {
        margin-left: 0;
    }
    
    .offset-sm-3 {
        margin-left: 0;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    /* Download Table */
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Alert */
    .alert {
        font-size: 13px;
        padding: 10px;
    }
    
    /* Button */
    .btn {
        margin-bottom: 5px;
    }
    
    /* Widget */
    .fbt_list_posts .post-title {
        font-size: 14px !important;
    }
}

/* Mobile Kecil (max-width: 576px) */
@media screen and (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    h1.post-title {
        font-size: 22px !important;
        line-height: 28px !important;
    }
    
    h3.post-title {
        font-size: 16px !important;
    }
    
    .post-excerpt {
        font-size: 13px;
    }
    
    /* Gallery mobile */
    .fbt-gallery .row .col-lg-3,
    .fbt-gallery .row .col-md-6 {
        width: 100%;
    }
    
    /* Video random */
    .fbt-rel-post-wrapper .row .col-xl-4 {
        width: 100%;
        margin-bottom: 20px;
    }
    
    #related-posts .fbt-post-thumbnail {
        height: 180px;
    }
    
    /* Sidebar mobile */
    .mobile-sidebar {
        width: 85%;
    }
    
    /* Video player */
    .fbt-video-gallery .fbt-main-gallery .large .fbt-post-thumbnail {
        height: 200px !important;
    }
    
    /* Error page */
    .errorWrap .display-4 {
        font-size: 3rem;
    }
    
    .errorWrap.p-5 {
        padding: 1.5rem !important;
    }
}

/* Landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .fbt-mag-slider .post-item.large .fbt-post-thumbnail,
    .fbt-mag-slider .post-item.medium .fbt-post-thumbnail {
        height: 220px !important;
    }
    
    .mobile-sidebar {
        width: 280px;
    }
}

/* Utility Classes untuk Mobile */
.hide-on-mobile {
    display: block;
}

.show-on-mobile {
    display: none;
}

@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
    
    .mobile-fullwidth {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-padding {
        padding: 10px !important;
    }
}