/* =========================================================
   PAREKH GLOBAL - INDIA PRESENCE MAP
   ========================================================= */

.ipm-section {
    width: 100%;
    position: relative;
    /* Removed overflow: hidden so popups don't get clipped */
    background: #f8f6f2;
    padding: 50px 20px;
    box-sizing: border-box;
}


/* =========================================================
   MAP CONTAINER
   ========================================================= */

.ipm-map-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
}


/* =========================================================
   MAP
   ========================================================= */

.ipm-map {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}


/* =========================================================
   INDIA SVG
   ========================================================= */

.ipm-map svg {
    display: block;
    width: 100%;
    height: auto;
}


/* India state paths */

.ipm-map svg path {
    fill: #bd1e24 !important; /* Premium Red */
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.15));
}


/* State hover */

.ipm-map svg path:hover {
    fill: #a2171c !important; /* Darker Red on hover */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}


/* =========================================================
   MARKER LAYER
   ========================================================= */

.ipm-markers {
    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 20;
}


/* =========================================================
   STATE MARKER
   ONE PIN PER STATE
   ========================================================= */

.ipm-marker {
    position: absolute;

    width: 28px;
    height: 38px;

    margin: 0;
    padding: 0;

    border: 0;
    outline: none;

    background: transparent;

    transform: translate(-50%, -100%);

    cursor: pointer;

    pointer-events: auto;

    z-index: 30;

    transition: transform 0.2s ease;
}


/* Marker SVG */

.ipm-marker svg {
    display: block;

    width: 100%;
    height: 100%;

    overflow: visible;

    filter:
        drop-shadow(
            0 3px 5px rgba(0, 0, 0, 0.30)
        );
}


/* Pin shape */

/* Pin shape */
.ipm-pin-shape {
    fill: #cf2e2e;
    stroke: #ffffff;
    stroke-width: 2.5; 
    transition: fill 0.3s ease;
}

/* Add drop shadow directly to marker for better contrast */
.ipm-marker svg {
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4)) !important;
}

/* Explicit Color Classes for Pins */
.ipm-marker.ipm-service-office .ipm-pin-shape { fill: #075c4f !important; }
.ipm-marker.ipm-service-office::before { background: rgba(7, 92, 79, 0.35) !important; }
.ipm-marker.ipm-service-office:hover .ipm-pin-shape { fill: #054138 !important; }

.ipm-marker.ipm-service-cfs .ipm-pin-shape { fill: #cf2e2e !important; stroke: #ffffff !important; }
.ipm-marker.ipm-service-cfs::before { background: rgba(207, 46, 46, 0.4) !important; }
.ipm-marker.ipm-service-cfs:hover .ipm-pin-shape { fill: #a2171c !important; }

.ipm-marker.ipm-service-warehouse .ipm-pin-shape { fill: #009f7f !important; }
.ipm-marker.ipm-service-warehouse::before { background: rgba(0, 159, 127, 0.35) !important; }
.ipm-marker.ipm-service-warehouse:hover .ipm-pin-shape { fill: #007961 !important; }

.ipm-marker.ipm-service-cold .ipm-pin-shape { fill: #202c68 !important; }
.ipm-marker.ipm-service-cold::before { background: rgba(32, 44, 104, 0.35) !important; }
.ipm-marker.ipm-service-cold:hover .ipm-pin-shape { fill: #161e47 !important; }

.ipm-marker.ipm-service-logistics .ipm-pin-shape { fill: #8d201b !important; stroke: #ffffff !important; }
.ipm-marker.ipm-service-logistics::before { background: rgba(141, 32, 27, 0.35) !important; }
.ipm-marker.ipm-service-logistics:hover .ipm-pin-shape { fill: #6b1814 !important; }

.ipm-marker.ipm-service-transport .ipm-pin-shape { fill: #333333 !important; }
.ipm-marker.ipm-service-transport::before { background: rgba(51, 51, 51, 0.35) !important; }
.ipm-marker.ipm-service-transport:hover .ipm-pin-shape { fill: #1a1a1a !important; }


/* Pin center */

.ipm-pin-center {
    fill: #ffffff;
}


/* =========================================================
   PIN GLOW
   ========================================================= */

.ipm-marker::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 36%;

    width: 13px;
    height: 13px;

    transform:
        translate(-50%, -50%)
        scale(0.7);

    border-radius: 50%;

    background: rgba(169, 21, 29, 0.35); /* Fallback */

    z-index: -1;

    animation:
        ipmPinPulse 2.2s ease-out infinite;
}


@keyframes ipmPinPulse {

    0% {
        transform:
            translate(-50%, -50%)
            scale(0.7);

        opacity: 0.8;
    }

    70% {
        transform:
            translate(-50%, -50%)
            scale(2.4);

        opacity: 0;
    }

    100% {
        transform:
            translate(-50%, -50%)
            scale(0.7);

        opacity: 0;
    }
}


/* =========================================================
   PIN HOVER
   ========================================================= */

.ipm-marker:hover {
    transform:
        translate(-50%, -100%)
        scale(1.15);
}


.ipm-marker:hover .ipm-pin-shape {
    fill: #a52525; /* Fallback */
}


/* Keyboard focus */

.ipm-marker:focus-visible {
    outline:
        2px solid #a9151d;

    outline-offset: 4px;
}


/* =========================================================
   POPUP
   ========================================================= */

.ipm-tooltip {
    position: absolute;
    display: none;
    width: 320px;
    max-width: calc(100vw - 40px);
    padding: 0;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    
    /* Position to the right of the pin. 
       Pin is 28px wide (14px from center), so offset X by 22px.
       Pin is 38px tall, center of the top circle is ~24px up, so offset Y by -24px */
    transform: translate(22px, calc(-50% - 24px));
    transform-origin: center left;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Triangle pointing left to the pin */
.ipm-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
}


.ipm-tooltip.active {
    display: block;
    opacity: 1;
}


/* =========================================================
   POPUP HEADER
   ========================================================= */

.ipm-tooltip-header {
    position: relative;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
}


/* Small label */

.ipm-popup-state {
    margin: 0;

    padding: 0;

    color: #777777;

    font-size: 11px;

    font-weight: 500;

    line-height: 1.4;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}


/* State title */

.ipm-popup-title {
    margin:
        4px 40px 0 0;

    padding: 0;

    color: #1a1a1a;

    font-size: 22px;

    font-weight: 700;

    line-height: 1.25;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.ipm-tooltip-close {
    position: absolute;

    top: 11px;
    right: 11px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin: 0;
    padding: 0;

    border: 0;

    border-radius: 50%;

    background: #f5f5f5;

    color: #333333;

    font-size: 20px;

    line-height: 1;

    cursor: pointer;
}


.ipm-tooltip-close:hover {
    background: #eeeeee;

    color: #a9151d;
}


/* =========================================================
   POPUP BODY
   ========================================================= */

.ipm-tooltip-body {
    max-height: 400px;

    padding: 5px 0;

    overflow-y: auto;
}


/* =========================================================
   LOCATION
   ========================================================= */

.ipm-location-item {
    position: relative;

    padding:
        13px 20px;

    border-bottom:
        1px solid #f0f0f0;

    background: #ffffff;

    transition:
        background 0.2s ease;
}


.ipm-location-item:last-child {
    border-bottom: 0;
}


.ipm-location-item:hover {
    background: #fafafa;
}


/* City name */

.ipm-location-city {
    margin:
        0 0 7px;

    padding: 0;

    color: #202020;

    font-size: 15px;

    font-weight: 700;

    line-height: 1.3;
}


/* =========================================================
   SERVICE LIST
   ========================================================= */

.ipm-service-list {
    display: flex;

    flex-wrap: wrap;

    gap: 5px 8px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.ipm-service {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: #555555;

    font-size: 11px;

    line-height: 1.4;
}


/* Service dot */

.ipm-service::before {
    content: "";

    display: inline-block;

    width: 6px;
    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background: #cf2e2e;
}


/* =========================================================
   SERVICE COLORS
   ========================================================= */

.ipm-service-office::before {
    background: #008b72;
}


.ipm-service-cfs::before {
    background: #cf2e2e;
}


.ipm-service-warehouse::before {
    background: #00a889;
}


.ipm-service-cold::before {
    background: #202b6a;
}


.ipm-service-logistics::before {
    background: #a9151d;
}


.ipm-service-transport::before {
    background: #999999;
}


/* =========================================================
   LEGEND
   ========================================================= */

.ipm-legend {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    justify-content: center;

    gap:
        15px 24px;

    width: 100%;

    max-width: 1100px;

    margin:
        30px auto 0;
}


.ipm-legend-item {
    display: flex;

    align-items: center;

    gap: 7px;

    color: #333333;

    font-size: 13px;

    line-height: 1.4;

    white-space: nowrap;
}


/* Legend dot */

.ipm-dot {
    display: inline-block;

    width: 9px;
    height: 9px;

    flex: 0 0 9px;

    border-radius: 50%;
}


.ipm-dot-office {
    background: #008b72;
}


.ipm-dot-cfs {
    background: #cf2e2e;
}


.ipm-dot-warehouse {
    background: #00a889;
}


.ipm-dot-cold {
    background: #202b6a;
}


.ipm-dot-logistics {
    background: #a9151d;
}


.ipm-dot-transport {
    background: #999999;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .ipm-section {
        padding:
            40px 15px;
    }

    .ipm-map {
        max-width: 800px;
    }

    .ipm-tooltip {
        width: 310px;
    }

    .ipm-legend {
        gap:
            13px 18px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .ipm-section {
        padding:
            25px 10px;
    }


    .ipm-map-container {
        width: 100%;

        overflow-x: auto;

        overflow-y: visible;

        -webkit-overflow-scrolling: touch;
    }


    .ipm-map {
        width: 100%;

        min-width: 600px;

        max-width: none;
    }


    .ipm-map svg {
        width: 100%;

        min-width: 600px;

        height: auto;
    }


    .ipm-markers {
        min-width: 600px;
    }


    .ipm-marker {
        width: 24px;

        height: 33px;
    }


    /* Mobile popup - Professional Bottom Sheet */

    .ipm-tooltip {
        position: fixed !important;

        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100% !important;
        max-width: 100% !important;

        /* Max height for the sheet itself */
        max-height: 70vh !important;

        border-radius: 24px 24px 0 0 !important;
        
        /* Reset transform and use dimming backdrop */
        transform: none !important;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.1), 0 0 0 2000px rgba(0,0,0,0.4) !important;

        z-index: 999999;
        
        /* Mobile slide-up animation */
        animation: slideUpBottomSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }
    
    @keyframes slideUpBottomSheet {
        from { opacity: 0; transform: translateY(100%) !important; }
        to { opacity: 1; transform: translateY(0) !important; }
    }


    .ipm-tooltip-body {
        max-height: calc(70vh - 80px) !important;
        overflow-y: auto !important;
        padding-bottom: 30px !important; /* safe area for scrolling */
                display: grid;
        grid-template-columns: 1fr 1fr;
    }


    .ipm-legend {
        justify-content:
            flex-start;

        gap:
            11px 16px;

        padding:
            0 5px;
    }


    .ipm-legend-item {
        font-size: 12px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .ipm-map {
        min-width: 550px;
    }


    .ipm-map svg {
        min-width: 550px;
    }


    .ipm-markers {
        min-width: 550px;
    }


    .ipm-marker {
        width: 22px;

        height: 30px;
    }


    .ipm-tooltip-header {
        padding:
            15px 16px 13px;
    }


    .ipm-popup-title {
        font-size: 20px;
    }


    .ipm-location-item {
        padding:
            12px 16px;
    }


    .ipm-legend {
        gap:
            9px 13px;
    }
}

/* =========================================================
   INDIA MAP + RIGHT SUMMARY LAYOUT
   ========================================================= */

.ipm-map-layout {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 55px;

    position: relative;
}


/* =========================================================
   MAP AREA
   ========================================================= */

.ipm-map-area {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    justify-content: center;
}


.ipm-map-area .ipm-map {
    width: 100%;
    max-width: 1050px;
    position: relative;
}


/* Make SVG responsive */

.ipm-map-area .ipm-map svg {
    display: block;
    width: 100%;
    height: auto;
}


/* =========================================================
   RIGHT SUMMARY BOX
   ========================================================= */

.ipm-summary-box {
/*     flex: 0 0 260px;
    width: 260px; */
    flex: 0 0 300px;
    width: 300px;
    /* Sleek border and shadow instead of harsh solid border */
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    background: #ffffff;
    padding: 20px;
    box-sizing: border-box;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}


/* =========================================================
   SUMMARY ITEM
   ========================================================= */

.ipm-summary-item {
    position: relative;
    margin-bottom: 6px;
/*     padding: 10px 14px; */
padding: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    background-color: transparent;
}

.ipm-summary-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border-color: #f0f0f0;
}

.ipm-summary-box.has-active-filter .ipm-summary-item:not(.active-filter) {
    opacity: 0.35;
    transform: none;
    box-shadow: none;
    background-color: transparent;
    border-color: transparent;
}

.ipm-summary-box.has-active-filter .ipm-summary-item.active-filter {
    transform: translateX(4px);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid currentColor;
}


.ipm-summary-item:last-child {
    margin-bottom: 0;
}


.ipm-summary-item strong {
    font-weight: 600;
}


.ipm-summary-item span {
    font-weight: 600;
    margin-left: 3px;
    opacity: 0.8;
}


/* =========================================================
   NATIONAL OFFICES
   ========================================================= */

.ipm-summary-office {
    color: #075c4f;
}


/* =========================================================
   CFS
   ========================================================= */

.ipm-summary-cfs {
    color: #ed1c24;
}


/* =========================================================
   WAREHOUSE
   ========================================================= */

.ipm-summary-warehouse {
    color: #009f7f;
}


/* =========================================================
   COLD WAREHOUSE
   ========================================================= */

.ipm-summary-cold {
    color: #202c68;
}


/* =========================================================
   IN-PLANT LOGISTICS
   ========================================================= */

.ipm-summary-logistics {
    color: #8d201b;
}


/* =========================================================
   TRANSPORTATION
   ========================================================= */

.ipm-summary-transport {
    color: #999999;
}


/* =========================================================
   INTERNATIONAL OFFICES
   ========================================================= */

.ipm-summary-international {
    color: #075c4f;

    margin-top: 10px;
    border-top: 1px dashed #ddd;
    padding-top: 15px;
}

.ipm-summary-international small {
    display: none;

    margin-top: 8px;

    font-size: 13px;
    line-height: 1.4;

    font-weight: 500;

    color: #333333;
    animation: fadeIn 0.3s ease;
}

.ipm-summary-international.active small {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .ipm-map-layout {
        gap: 30px;
    }

    .ipm-summary-box {
        flex: 0 0 260px;
        width: 260px;

        padding: 20px 18px;
    }

    .ipm-summary-item {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .ipm-summary-international small {
        font-size: 10px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .ipm-map-layout {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 25px;

        width: 100%;
    }


    .ipm-map-area {
        width: 100%;
    }


    .ipm-summary-box {
        width: 100%;

        max-width: 360px;

        margin: 0 auto;

        padding: 22px 20px;
    }


    .ipm-summary-item {
        font-size: 15px;
 margin-bottom: 0px;
/*         margin-bottom: 15px; */
    }


    .ipm-summary-international small {
        font-size: 10px;
    }

}
section.ipm-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
}
@media (max-width: 767px) {
section.ipm-section {
    grid-template-columns: 1fr!important;
}
}

/* =========================================================
   INDIA PRESENCE MAP - MOBILE ONLY
   ========================================================= */

@media (max-width: 767px) {

	.ipm-tooltip::after{
   content:unset;
	}

    /* Prevent the whole section from creating horizontal scroll */
    .ipm-section {
        width: 100%;
        max-width: 100%;
        padding: 20px 10px 30px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    /* Main container */
    .ipm-map-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
    }

    /* Stack map and summary vertically */
    .ipm-map-layout {
        width: 100%;
        max-width: 100%;

        display: flex;
        flex-direction: column;

        align-items: center;
        justify-content: flex-start;

        gap: 25px;

        margin: 0;
        padding: 0;
    }

    /* Map wrapper */
    .ipm-map-area {
        width: 100%;
        max-width: 100%;

        flex: none;

        display: block;

        min-width: 0;

        overflow: visible;
    }

    /* Map itself */
    .ipm-map {
        position: relative;

        width: 100%;
        max-width: 100%;

        min-width: 0;
        height: auto;

        margin: 0 auto;
        padding: 0;

        overflow: visible;
    }

    /* SVG */
    .ipm-map svg {
        display: block;

        width: 100% !important;
        height: auto !important;

        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 auto;
    }

    /* State borders */
    .ipm-map svg path {
        stroke-width: 1px;
    }

    /* Marker layer */
    .ipm-markers {
        position: absolute;

        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        width: 100% !important;
        height: 100%;

        max-width: 100%;
        min-width: 0 !important;

        pointer-events: none;

        z-index: 20;
    }

    /* Location pins */
    .ipm-marker {
        width: 20px;
        height: 28px;

        transform: translate(-50%, -100%);

        z-index: 30;
    }

    .ipm-marker:hover {
        transform: translate(-50%, -100%);
    }

    /* Marker SVG */
    .ipm-marker svg {
        width: 100% !important;
        height: 100% !important;

        min-width: 0 !important;
        max-width: none !important;
    }

    /* =====================================================
       MOBILE TOOLTIP
       ===================================================== */

    .ipm-tooltip {
        position: fixed !important;

        left: 12px !important;
        right: 12px !important;

        top: auto !important;
        bottom: 12px !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;

        padding: 18px;

        z-index: 999999;

        box-sizing: border-box;
    }

    .ipm-tooltip-close {
        top: 7px;
        right: 7px;
    }

    .ipm-tooltip-state {
        font-size: 12px;
    }

    .ipm-tooltip-city {
        font-size: 18px;
    }

    .ipm-tooltip-type {
        font-size: 12px;
    }

    /* =====================================================
       RIGHT SUMMARY BOX
       ===================================================== */

    .ipm-summary-box {
        width: 100%;
        max-width: 380px;

        flex: none;

        margin: 0 auto;

        padding: 20px 18px;

        box-sizing: border-box;
    }

    .ipm-summary-item {
        font-size: 15px;
        line-height: 1.3;

/*         margin-bottom: 14px; */
    }

    .ipm-summary-item:last-child {
        margin-bottom: 0;
    }

    .ipm-summary-international small {
        display: block;

        font-size: 10px;
        line-height: 1.35;

        margin-top: 3px;
    }

    /* =====================================================
       BOTTOM LEGEND
       ===================================================== */

    .ipm-legend {
        width: 100%;
        max-width: 100%;

        display: flex;

        flex-wrap: wrap;

        justify-content: flex-start;
        align-items: center;

        gap: 10px 14px;

        margin: 20px 0 0;
        padding: 0 5px;

        box-sizing: border-box;
    }

    .ipm-legend-item {
        font-size: 10px;

        white-space: nowrap;

        display: flex;

        align-items: center;

        gap: 6px;
    }

    .ipm-dot {
        width: 7px;
        height: 7px;

        min-width: 7px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

    .ipm-section {
        padding: 15px 7px 25px;
    }

    .ipm-map {
        width: 100%;
        max-width: 100%;
    }

    .ipm-map svg {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .ipm-marker {
        width: 18px;
        height: 25px;
    }

    .ipm-summary-box {
        width: 100%;
        max-width: 100%;

        padding: 18px 15px;
    }

    .ipm-summary-item {
        font-size: 14px;
/*         margin-bottom: 13px; */
    }

    .ipm-summary-international small {
        font-size: 9px;
    }

    .ipm-legend {
        gap: 8px 11px;
    }

    .ipm-legend-item {
        font-size: 9px;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {

    .ipm-section {
        padding-left: 5px;
        padding-right: 5px;
    }

    .ipm-marker {
        width: 16px;
        height: 23px;
    }

    .ipm-summary-box {
        padding: 16px 13px;
    }

    .ipm-summary-item {
        font-size: 13px;
/*         margin-bottom: 12px; */
    }

    .ipm-summary-international small {
        font-size: 8px;
    }

    .ipm-legend-item {
        font-size: 8px;
    }
}