/*-----------------------------------------------------------------------------------
    Responsive Utility Classes for JDIH Website
    Version: 1.0
    Description: Helper classes for responsive design
-----------------------------------------------------------------------------------*/

/* ===================================
    Responsive Text Sizes
====================================== */
/* Extra Small devices */
.xs-font-size14 {
    font-size: 14px !important;
}

.xs-font-size16 {
    font-size: 16px !important;
}

.xs-font-size18 {
    font-size: 18px !important;
}

.xs-font-size20 {
    font-size: 20px !important;
}

/* ===================================
    Responsive Display Utilities
====================================== */
/* Show only on specific breakpoints */
.show-mobile {
    display: none !important;
}

.show-tablet {
    display: none !important;
}

.show-desktop {
    display: block !important;
}

@media screen and (max-width: 767px) {
    .show-mobile {
        display: block !important;
    }

    .show-desktop {
        display: none !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .show-tablet {
        display: block !important;
    }

    .hide-tablet {
        display: none !important;
    }
}

/* ===================================
    Responsive Spacing Utilities
====================================== */
@media screen and (max-width: 767px) {
    .mobile-margin-0 {
        margin: 0 !important;
    }

    .mobile-margin-10px-bottom {
        margin-bottom: 10px !important;
    }

    .mobile-margin-15px-bottom {
        margin-bottom: 15px !important;
    }

    .mobile-margin-20px-bottom {
        margin-bottom: 20px !important;
    }

    .mobile-margin-25px-bottom {
        margin-bottom: 25px !important;
    }

    .mobile-margin-30px-bottom {
        margin-bottom: 30px !important;
    }

    .mobile-margin-40px-bottom {
        margin-bottom: 40px !important;
    }

    .mobile-padding-0 {
        padding: 0 !important;
    }

    .mobile-padding-10px {
        padding: 10px !important;
    }

    .mobile-padding-15px {
        padding: 15px !important;
    }

    .mobile-padding-20px {
        padding: 20px !important;
    }

    .mobile-padding-10px-tb {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .mobile-padding-15px-tb {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }

    .mobile-padding-20px-tb {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .mobile-padding-15px-lr {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .mobile-padding-20px-all {
        padding: 20px !important;
    }

    .mobile-no-padding-lr {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mobile-no-margin-right {
        margin-right: 0 !important;
    }
}

@media screen and (max-width: 575px) {
    .xs-margin-10px-bottom {
        margin-bottom: 10px !important;
    }

    .xs-margin-15px-bottom {
        margin-bottom: 15px !important;
    }

    .xs-margin-20px-bottom {
        margin-bottom: 20px !important;
    }

    .xs-margin-30px-bottom {
        margin-bottom: 30px !important;
    }

    .xs-margin-40px-bottom {
        margin-bottom: 40px !important;
    }

    .xs-padding-10px-all {
        padding: 10px !important;
    }

    .xs-padding-15px-all {
        padding: 15px !important;
    }

    .xs-padding-20px-all {
        padding: 20px !important;
    }

    .xs-no-padding {
        padding: 0 !important;
    }
}

/* ===================================
    Responsive Width Utilities
====================================== */
@media screen and (max-width: 767px) {
    .mobile-width-100 {
        width: 100% !important;
    }

    .mobile-width-90 {
        width: 90% !important;
    }

    .mobile-width-80 {
        width: 80% !important;
    }
}

@media screen and (max-width: 575px) {
    .xs-width-100 {
        width: 100% !important;
    }

    .xs-width-95 {
        width: 95% !important;
    }

    .xs-width-90 {
        width: 90% !important;
    }
}

/* ===================================
    Responsive Text Alignment
====================================== */
@media screen and (max-width: 767px) {
    .mobile-text-center {
        text-align: center !important;
    }

    .mobile-text-left {
        text-align: left !important;
    }

    .mobile-text-right {
        text-align: right !important;
    }
}

@media screen and (max-width: 575px) {
    .xs-text-center {
        text-align: center !important;
    }

    .xs-text-left {
        text-align: left !important;
    }

    .xs-text-right {
        text-align: right !important;
    }
}

/* ===================================
    Responsive Flex Utilities
====================================== */
@media screen and (max-width: 767px) {
    .mobile-flex-column {
        flex-direction: column !important;
    }

    .mobile-flex-wrap {
        flex-wrap: wrap !important;
    }

    .mobile-justify-center {
        justify-content: center !important;
    }

    .mobile-align-center {
        align-items: center !important;
    }
}

/* ===================================
    Responsive Image Utilities
====================================== */
.img-responsive {
    max-width: 100%;
    height: auto;
}

@media screen and (max-width: 767px) {
    .mobile-img-100 {
        width: 100% !important;
        height: auto !important;
    }

    .mobile-img-80 {
        width: 80% !important;
        height: auto !important;
    }
}

/* ===================================
    Responsive Form Elements
====================================== */
@media screen and (max-width: 767px) {
    .form-row {
        flex-direction: column;
    }

    .form-row>[class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

    .form-row>[class*="col-"]:last-child {
        margin-bottom: 0;
    }

    .form-inline .form-control {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ===================================
    Responsive Table
====================================== */
@media screen and (max-width: 767px) {
    .table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive-mobile table {
        min-width: 600px;
    }
}

/* ===================================
    Responsive Cards/Boxes
====================================== */
@media screen and (max-width: 767px) {

    .card,
    .feature-inner,
    .bg-white.border {
        margin-bottom: 15px;
    }

    .card-deck {
        flex-direction: column;
    }

    .card-deck .card {
        margin-bottom: 15px;
        flex: 0 0 100%;
    }
}

/* ===================================
    Responsive Hero/Banner Section
====================================== */
@media screen and (max-width: 991px) {
    .screen-height {
        min-height: auto !important;
        height: auto !important;
        padding: 80px 0 !important;
    }
}

@media screen and (max-width: 767px) {
    .screen-height {
        padding: 60px 0 !important;
    }

    .line-banner .header-text {
        padding: 30px 15px;
    }
}

@media screen and (max-width: 575px) {
    .screen-height {
        padding: 40px 0 !important;
    }

    .line-banner .header-text {
        padding: 20px 10px;
    }
}

/* ===================================
    Responsive Charts
====================================== */
@media screen and (max-width: 767px) {
    #documentChart {
        height: 300px !important;
    }

    .bg-white.border.padding-40px-all {
        padding: 15px !important;
    }
}

@media screen and (max-width: 575px) {
    #documentChart {
        height: 250px !important;
    }
}

/* ===================================
    Responsive Grid Adjustments for Feature Boxes
====================================== */
@media screen and (max-width: 575px) {

    /* Make col-lg-2 (Dokumen Pembentukan PUU) display 2 per row on mobile */
    .feature-inner-row .col-lg-2,
    section .row .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Reduce padding for smaller cards */
    section .row .col-lg-2 .feature-inner {
        padding: 15px 10px;
    }

    section .row .col-lg-2 .feature-inner h5 {
        font-size: 12px !important;
    }
}

@media screen and (max-width: 400px) {

    /* Single column on very small screens */
    section .row .col-lg-2,
    section .row .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===================================
    Survey Modal Responsive
====================================== */
@media screen and (max-width: 768px) {
    .survey-modal-content {
        margin: 10% 15px;
        max-width: calc(100% - 30px);
    }

    .survey-modal-close {
        top: 5px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .survey-modal-content {
        margin: 5% 10px;
        max-width: calc(100% - 20px);
        border-radius: 8px;
    }
}

/* ===================================
    Responsive Scroll-to-Top Button
====================================== */
@media screen and (max-width: 767px) {
    .scroll-to-top {
        width: 38px !important;
        height: 38px !important;
        line-height: 38px !important;
        right: 10px !important;
        bottom: 10px !important;
        font-size: 16px;
    }
}

/* ===================================
    Responsive Logo
====================================== */
@media screen and (max-width: 991px) {
    .width-200px {
        max-width: 160px !important;
    }

    #logo {
        max-height: 45px !important;
    }
}

@media screen and (max-width: 767px) {

    .width-200px,
    .sm-width-180px {
        max-width: 140px !important;
    }

    #logo {
        max-height: 40px !important;
    }
}

@media screen and (max-width: 575px) {

    .width-200px,
    .sm-width-180px,
    .xs-width-150px {
        max-width: 120px !important;
    }

    #logo {
        max-height: 35px !important;
    }
}

/* ===================================
    Responsive Owl Carousel
====================================== */
@media screen and (max-width: 767px) {
    .owl-theme .owl-nav {
        margin-top: 20px;
    }

    .owl-nav .owl-prev,
    .owl-nav .owl-next {
        width: 35px;
        height: 35px;
    }

    .custom-dot {
        margin-top: 15px;
    }

    .custom-dot span {
        width: 10px;
        height: 10px;
        margin: 3px;
    }
}

/* ===================================
    Print Friendly Responsive
====================================== */
@media print {
    .container {
        max-width: 100% !important;
        width: 100% !important;
    }

    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-lg-3,
    .col-lg-4,
    .col-lg-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .feature-inner {
        page-break-inside: avoid;
    }
}