@media (max-width: 950px) and (max-height: 450px) {
    html, body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    .business-section {
        height: auto !important;
        min-height: 100px !important;
        padding-bottom: 40px !important;
        overflow-y: auto !important;
    }
    .business-container {
        height: auto !important;
        min-height: 100px !important;
        overflow-y: auto !important;
    }
}

body {
    background-color: #1a1a1a;
    font-family: 'Gudea', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin:0;
}

h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 4rem;
    text-align: center;
    width: 100%;
    margin: 40px 0 50px 0;
    transition: margin 0.3s ease;
}

/* Mobile styles */
@media (max-width: 843px)  {
    html, body {
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden !important;
        height: auto;
        min-height: 100vh;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    * {
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100vw;
        max-width: 100vw;
    }
    
    h1 {
        font-size: 1.8rem;
        margin: 80px auto 20px auto;
        padding: 0 20px;
        z-index: 1;
        position: relative;
        display: block;
        text-align: center;
        width: fit-content;
        max-width: 90vw;
        box-sizing: border-box;
    }
}

.business-container {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    justify-content: center;
    max-width: 1200px;
    transition: all 0.3s ease;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

/* Mobile business container */
@media (max-width: 843px) {
    .business-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 80px;
        overflow: hidden;
        position: relative;
    }
    
    /* Center last item if odd number of items */
    .business-item.center-mobile {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: calc(50% - 7.5px);
        width: calc(50% - 7.5px);
    }
}

/* Desktop scaling for smaller screens */
@media (min-width: 844px) and (max-width: 1200px) {
    .business-container {
        transform: scale(0.8);
    }
}

@media (min-width: 844px) and (max-width: 1000px) {
    .business-container {
        transform: scale(0.7);
    }
}


.business-container.active {
    gap: 0;
}

.business-item {
    width: 200px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(221, 221, 221) 100%);
    position: relative;
    display: flex;
    border-radius: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-clip: padding-box;
    border: solid 3px transparent;
}

/* Ensure desktop aspect ratio doesn't affect mobile */
@media (min-width: 844px) {
    .business-item {
        aspect-ratio: 1 / 1;
    }
}

/* Mobile business item */

@media (min-width: 844px) {
    .business-info {
        display: none !important;
    }
}

/* Layout responsiveness */
@media (max-width: 843px) {
    .desktop-layout {
        display: block !important;
        height: auto !important;
        width: 100% !important;
    }
}

@media (min-width: 844px) {
    .desktop-layout {
        display: flex;
        flex-direction: column-reverse;
        width: 100vw;
        height: calc(100vh / 2);
        align-items: center;
    }
}

.business-item::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -3px; 
    border-radius: inherit; 
    background: linear-gradient(180deg, #FE0000 0%, #004DFF 100%);
}



.business-item.active {
    width: 69px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: white;
    background-clip: padding-box;
    border: solid 3px transparent;
}

.business-item.active::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -3px; 
    border-radius: inherit; 
    background: linear-gradient(0deg, #FE0000 0%, #004DFF 100%);
}
.business-item.selected {
    width: 80px;
    height: 80px; 
    border-radius: 50%;
    background: linear-gradient(0deg, #FE0000 0%, #004DFF 100%);
    background-clip: padding-box;
    overflow:hidden;
    border: solid 4px white;
}
.business-item.notselected {
    width: 65px;
    height: 65px;
    margin: 7px;
}

.business-item.active::after {
    display: none;
}

.business-item span {
    color: black;
    font-size: 1rem;
    text-align: center;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Mobile span styles */
@media (max-width: 843px) {
    .business-item span {
        font-size: 0.95rem;
        font-weight: 600;
        margin-top: 12px;
        text-align: center;
        line-height: 1.3;
        padding: 0 8px;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .business-item .icon {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }
    
    .business-item .icon i {
        font-size: 40px;
    }
    
    .business-item.expanded span {
        display: none;
    }
}

/* Hide desktop-only elements on mobile */
@media (max-width: 843px) {
    .info-panel,
    .media-selector {
        display: none !important;
    }
}

.info-panel {
    background: white;
    border-radius: 15px;
    width: 850px;
    min-width: 650px;
    position: relative;
    top: 2px;
    transition: all 0.3s ease;
    height: 0px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.13);
    display: flex;
    overflow: hidden;
}

.info-panel.active {
    height: 420px;
    opacity: 1;
}

/* Left side for image */
.info-panel-image {
    width: 50%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.info-panel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.info-panel-image:hover img {
    transform: scale(1.05);
}

.info-panel-image i {
    font-size: 30px;
    color: #9b9a9a;
}

/* Zoom hint overlay (desktop + mobile modal) */
.image-zoom-hint {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    pointer-events: none; /* let clicks pass through to image */
    opacity: 0.9;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.image-zoom-hint i { color: #fff; }
.info-panel-image:hover .image-zoom-hint, .business-modal-content .modal-icon:hover .image-zoom-hint {
    opacity: 1;
    transform: scale(1.08);
}
/* Show on mobile inside modal (was previously hidden) */
@media (max-width: 843px) {
    .business-modal-content .modal-icon { position: relative; }
    .business-modal-content .modal-icon .image-zoom-hint { display: flex; }

    
    .image-zoom-hint {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 28px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.22);
    }
    .image-zoom-hint i {
        font-size: 28px !important;
    }
}

/* Right side for content */
.info-content {
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
    width: 50%;
    display: flex;
    flex-direction: column;
}

.info-content.active {
    opacity: 1;
}

.info-content h2 {
    transform: translateX(-20px);
    transition: transform 0.3s ease;
    transition-delay: 0.2s;
}

.info-content p {
    transform: translateY(20px);
    transition: transform 0.3s ease;
    transition-delay: 0.3s;
    max-height: 180px;
    overflow-y: auto;
    margin: 12px 0;
    line-height: 1.6;
    flex: 1;
    padding-right: 8px;
}

.info-content p::-webkit-scrollbar {
    width: 8px;
}

.info-content p::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.info-content p::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.info-content p::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.info-content.active h2 {
    transform: translateX(0);
}

.info-content.active p {
    transform: translateY(0);
}

.icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    opacity: 1;
    z-index: 1;
}

.icon img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* === BAGIAN YANG DIGANTI DIMULAI DI SINI === */

/* Desktop Image Popup */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000; /* base, will be overridden below for mobile where modal uses huge z-index */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-popup.active {
    opacity: 1;
    visibility: visible;
}

.image-popup-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-popup-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: transparent;
    border-radius: 16px;
    padding: 56px 32px 32px 32px; /* top padding for internal close */
    box-shadow: 0 12px 48px rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.close-popup:hover {
    background: rgba(0,0,0,0.75);
    transform: scale(1.08);
}

.popup-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.popup-image-container img {
    display: block;
    max-width: min(88vw, 1100px);
    max-height: calc(88vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain !important;
    border-radius: 12px;
    box-shadow: 0 10px 42px rgba(0,0,0,0.55);
    user-select: none;
    -webkit-user-drag: none;
    z-index: 100 !important;
}

@media (max-width: 699px) {
    .image-popup-content { padding: 52px 20px 24px 20px; }
    .close-popup { width: 40px; height: 40px; font-size: 20px; top: 10px; right: 10px; }
    .popup-image-container img { max-width: 90vw; max-height: calc(90vh - 110px); }
}

/* === BAGIAN YANG DIGANTI BERAKHIR DI SINI === */


/* Your previous icon styles with white fill */
.media-selector{
    width: 200px;
    height: 140px;
    position: fixed;
    z-index: -1;
    background-size: contain;
    transition: all 0.1s ease;
}
.selected .icon i {
    color: #fff !important;
    transition: color 0.3s;
}

/* Small-height phones: force mobile layout and enable scrolling inside popouts */
@media (max-height: 500px) {
    /* Ensure modal behaves like overlay on short-height devices */
    .business-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.95) !important;
        z-index: 50 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        padding: 0;
        box-sizing: border-box;
    }
    .business-modal.active {
        opacity: 1;
        visibility: visible;
    }
    .business-modal-content {
        background: #fff;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        width: 100vw !important;
        height: 100vh !important;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: relative;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .business-modal-content .modal-icon {
        width: 100%;
        height: 40vh !important;
        min-height: 180px !important;
        max-height: 45vh !important;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, rgb(206, 0, 0) 0%, rgb(84, 86, 255) 100%);
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }

       .close-modal {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }
}

/* Ensure modal is always on top on standard mobile width */
@media (max-width: 843px) {
    .business-modal {
        z-index: 50 !important;
        position: fixed !important;
        inset: 0 !important;
        pointer-events: auto !important;
    }
    .business-modal.active { opacity: 1; visibility: visible; }
}

/* Ensure modal is always on top on small-height devices */
@media (max-height: 500px) {
    .business-modal {
        z-index: 50 !important;
        position: fixed !important;
        inset: 0 !important;
        pointer-events: auto !important;
    }
    .business-modal.active { opacity: 1; visibility: visible; }
}

@media (min-height: 800px){
    .info-content p{
        max-height: 250px !important;
    }
}

/* Force mobile layout when body has mobile-mode class (height <=500 or width <=843 via JS) even if width > 843 */
body.mobile-mode .desktop-layout {
    display: block !important;
    height: auto !important;
    width: 100% !important;
}
body.mobile-mode .business-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 80px !important;
    overflow: hidden !important;
    position: relative !important;
    transform: none !important; /* cancel desktop scaling */
}
body.mobile-mode .info-panel,
body.mobile-mode .media-selector {
    display: none !important;
}
body.mobile-mode .business-item {
    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
    aspect-ratio: unset !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%) !important;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background-clip: padding-box !important;
}
body.mobile-mode .business-item span {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin-top: 12px !important;
    text-align: center !important;
    line-height: 1.3 !important;
    padding: 0 8px !important;
}
body.mobile-mode .business-item .icon {
    width: 70px !important;
    height: 70px !important;
    margin-bottom: 12px !important;
}
body.mobile-mode .business-item .icon i {
    font-size: 40px !important;
}
body.mobile-mode .business-modal { /* ensure modal is above */
    z-index: 50 !important;
}


@media (max-width: 843px) {
    .business-item {
        width: 100% !important;
        height: 160px !important;
        min-height: 160px !important;
        aspect-ratio: unset !important;
        border-radius: 12px;
        background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(240, 240, 240) 100%) !important;
        border: 2px solid transparent !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        background-clip: padding-box;
    }
    
  
    
    /* Remove expanded styles - we'll use modal instead */
    .business-item.expanded {
        height: 160px;
        min-height: 160px;
        background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(240, 240, 240) 100%);
        border: 2px solid transparent;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Hide business-info - use modal instead */
    .business-info {
        display: none !important;
    }
    
    /* Business Modal - Full screen like milestone */
    .business-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        padding: 0;
        box-sizing: border-box;
    }
    
    .business-modal.active {
        opacity: 1;
        visibility: visible;
    }
    
    .business-modal-content {
        background: #fff;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: relative;
        overflow-y: auto;
    }
    
    .business-modal-content .modal-icon {
        width: 100%;
        height: 50vh;
        min-height: 300px;
        max-height: 60vh;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, rgb(206, 0, 0) 0%, rgb(84, 86, 255) 100%);
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }
    
    .business-modal-content .modal-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .business-modal-content .modal-icon i {
        font-size: 120px;
        color: #ffffff !important;
    }
    
    .business-modal-content h3 {
        color: #2346c7;
        font-size: 24px;
        font-weight: 700;
        margin: 20px 20px 12px 20px;
        text-align: left;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    .business-modal-content p {
        color: #333;
        font-size: 16px;
        line-height: 1.7;
        margin: 0 20px 20px 20px;
        flex: 1 1 auto;
        overflow-y: auto;
        padding-bottom: 40px;
    }
    
    .close-modal {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }
    
    .close-modal:hover {
        background: rgba(255, 255, 255, 1);
        color: #333;
    }
    
    /* Modal paragraph scrollbar styles */
    .business-modal-content p::-webkit-scrollbar {
        width: 6px;
    }
    .business-modal-content p::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    .business-modal-content p::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }
    .business-modal-content p::-webkit-scrollbar-thumb:hover {
        background: #aaa;
    }
}