.clena-branches-section {
    position: relative;
    z-index: 20;
    width: 100%;
    padding: 100px 20px;
    background: #ffffff;
    /* Clean white background */
    overflow: hidden;
}

.clena-branches-container {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 70px;
    align-items: center;
}

.clena-branches-content {
    max-width: 580px;
}

.clena-branches-label {
    display: inline-block;
    padding: 8px 18px;
    margin-bottom: 18px;
    background: rgba(0, 132, 255, 0.1);
    color: #0077d9;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.clena-branches-content h2 {
    margin: 0 0 18px;
    font-size: 44px;
    line-height: 1.08;
    color: var(--primary);
    font-weight: 800;
}

.clena-branches-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #5c6b7a;
}

.clena-map-card {
    position: relative;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible !important;
}

.clena-map-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 0 0 auto;
    overflow: visible !important;
}

.clena-map-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/sri-lanka-terrain.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    /* Radial gradient mask to fade the square/rectangular bounding edges of the image */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 90%);
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 90%);
    pointer-events: none;
    opacity: 0.82;
    /* Soften the map opacity to make it lighter */
}

/* Linear white gradient overlays to smoothly blend left and right edges into the white background */
.clena-map-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 6%, rgba(255, 255, 255, 0) 94%, #ffffff 100%),
        linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0) 6%);
    z-index: 2;
    pointer-events: none;
}

@keyframes clenaMapFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-7px);
    }
}

/* ── Inline SVG map ──────────────────────────────────── */
.clena-sri-lanka-map {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* All district paths — made transparent to show the beautiful terrain map background */
.clena-sri-lanka-map path {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;
    pointer-events: none;
    /* Let pointer events pass straight through */
}

/* Disabled hover styles since map is now pure terrain map image */
.clena-sri-lanka-map path:hover {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;
}

/* ── Arrow Pin ─────────────────────────────────────── */
.clena-branch-pin {
    position: absolute;
    display: flex;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -88%);
    /* Align pin tip exactly with coordinate */
    z-index: 10;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.clena-branch-pin:hover,
.clena-branch-pin:focus {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    transform: translate(-50%, -94%) scale(1.12);
    /* Lift slightly on hover */
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.clena-branch-pin.active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    transform: translate(-50%, -94%) scale(1.18);
    /* Pulsing/larger scale on active */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}


/* ── Location Pin Marker SVG ────────────────────────── */
.pin-marker {
    width: 28px;
    /* Slightly more compact size to match the mock map */
    height: 28px;
    flex-shrink: 0;
    display: block;
    overflow: visible;
}

.pin-marker-outline {
    fill: #e50914;
    /* Red outline and fill by default */
    stroke: #e50914;
    stroke-width: 1.5px;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

.pin-marker-dot {
    fill: #ffffff;
    /* Solid white inner circle */
    stroke: #ffffff;
    stroke-width: 1.5px;
    transition: fill 0.25s ease, stroke 0.25s ease, transform 0.25s ease;
    transform-origin: 12px 10px;
}

/* Hover / Active Pin paths */
.clena-branch-pin:hover .pin-marker-outline,
.clena-branch-pin:focus .pin-marker-outline,
.clena-branch-pin.active .pin-marker-outline {
    fill: #b3000c;
    /* Darker red on hover/active to show feedback */
    stroke: #b3000c;
}

.clena-branch-pin:hover .pin-marker-dot,
.clena-branch-pin:focus .pin-marker-dot,
.clena-branch-pin.active .pin-marker-dot {
    fill: #ffffff;
    /* Solid white dot stays white */
    stroke: #ffffff;
    transform: scale(1.1);
}

/* Label hover & active styling */
.clena-branch-pin:hover .pin-label,
.clena-branch-pin:focus .pin-label,
.clena-branch-pin.active .pin-label {
    color: #e50914;
    /* Text turns red to match active state */
}

/* ── City-name label ────────────────────────────────── */
/*
 * position:absolute keeps the label out of flex flow so the
 * button's width = only the 28px pin, staying centred on
 * its coordinate. Label floats cleanly left or right.
 */
.pin-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 0;
    background: transparent;
    color: #0b2545;
    /* Clean black/navy text */
    font-size: 11px;
    font-weight: 800;
    /* Bold uppercase text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 15;
    transition: color 0.22s ease;
    /* Soft white shadow glow to guarantee perfect readability on terrain */
    text-shadow:
        1px 1px 0 #ffffff,
        -1px 1px 0 #ffffff,
        1px -1px 0 #ffffff,
        -1px -1px 0 #ffffff,
        0px 0px 4px rgba(255, 255, 255, 0.8);
}

/* right-side labels */
.tooltip-right .pin-label {
    left: calc(100% + 8px);
}

/* left-side labels  (Negombo, Narahenpita) */
.tooltip-left .pin-label {
    right: calc(100% + 8px);
}

/* Adjust Colombo 05 label upward to avoid overlapping with Athurugiriya */
.pin-colombo-05 .pin-label {
    transform: translateY(calc(-50% - 4px));
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .clena-branches-section {
        padding: 80px 18px;
    }

    .clena-branches-container {
        grid-template-columns: 1fr;
        gap: 45px;
        text-align: center;
    }

    .clena-branches-content {
        max-width: 680px;
        margin: 0 auto;
    }

    .clena-map-wrapper {
        transform: rotateX(5deg) rotateY(-2.5deg) rotateZ(0.3deg);
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .clena-branches-section {
        padding: 65px 14px;
    }

    /* no 3D on small screens */
    .clena-map-card {
        animation: none;
    }

    .clena-map-wrapper {
        transform: none;
        filter: none;
    }

    .pin-marker {
        width: 24px;
        height: 24px;
    }

    .pin-label {
        font-size: 10px;
        padding: 4px 9px;
    }
}

/* ── About CTA Section ──────────────────────────────── */
.clena-about-cta-section {
    width: 100%;
    padding: 90px 20px;
    background-color: #0c2340;
    /* Deep brand royal/navy blue matching screenshot */
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.clena-about-cta-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.clena-about-cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.clena-about-cta-description {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 0 10px 0;
}

.clena-about-cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.clena-about-cta-btn {
    display: inline-block;
    padding: 16px 36px;
    background-color: #4fc3f7;
    /* Sky blue matching screenshot button */
    color: white;
    /* Dark navy text */
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(79, 195, 247, 0.25);
}

.clena-about-cta-btn:hover,
.clena-about-cta-btn:focus {
    background-color: #7ad1f9;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
    color: #0c2340;
}

.clena-about-cta-btn:active {
    transform: translateY(-1px) scale(1);
}

/* Responsive CTA */
@media (max-width: 768px) {
    .clena-about-cta-section {
        padding: 70px 20px;
    }

    .clena-about-cta-title {
        font-size: 32px;
    }

    .clena-about-cta-description {
        font-size: 14px;
    }

    .clena-about-cta-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* ── Branch Pin Hover Tooltip (Desktop/Tablet) ────────── */
@media (min-width: 481px) {
    .pin-details-tooltip {
        position: absolute;
        bottom: calc(100% + 12px);
        left: 50%;
        transform: translateX(-50%) translateY(8px) scale(0.95);
        background: #0b2545;
        /* Dark premium navy */
        color: #ffffff;
        padding: 12px 16px;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(11, 37, 69, 0.25);
        width: 220px;
        text-align: left;
        white-space: normal;
        opacity: 0;
        pointer-events: none;
        z-index: 100;
        transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Triangle arrow pointing down */
    .pin-details-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: #0b2545 transparent transparent transparent;
    }

    /* Show on hover / focus / active */
    .clena-branch-pin:hover .pin-details-tooltip,
    .clena-branch-pin:focus .pin-details-tooltip,
    .clena-branch-pin.active .pin-details-tooltip {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .tooltip-branch-name {
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 2px;
        display: block;
    }

    .tooltip-branch-address {
        font-size: 11px;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.8);
        display: block;
    }

    .tooltip-branch-phone {
        font-size: 11px;
        font-weight: 600;
        color: #4fc3f7;
        /* Sky blue accent */
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-top: 4px;
        transition: color 0.2s ease;
    }

    .tooltip-branch-phone:hover {
        color: #ffffff;
    }

    .tooltip-branch-phone svg {
        flex-shrink: 0;
    }

    .tooltip-branch-directions {
        font-size: 11px;
        font-weight: 700;
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.15);
        padding: 6px 12px;
        border-radius: 4px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
        transition: background 0.2s ease, transform 0.2s ease;
        width: 100%;
        box-sizing: border-box;
        font-family: 'Montserrat', sans-serif;
    }

    .tooltip-branch-directions:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-1px);
    }

    .tooltip-branch-directions svg {
        flex-shrink: 0;
    }

    /* Offsets for edge pins on desktop to prevent screen overflow */
    .tooltip-right .pin-details-tooltip {
        left: -20px;
        transform: translateY(8px) scale(0.95);
    }

    .tooltip-right .pin-details-tooltip::after {
        left: 30px;
    }

    .tooltip-right .clena-branch-pin:hover .pin-details-tooltip,
    .tooltip-right .clena-branch-pin:focus .pin-details-tooltip,
    .tooltip-right .clena-branch-pin.active .pin-details-tooltip {
        transform: translateY(0) scale(1);
    }

    .tooltip-left .pin-details-tooltip {
        right: -20px;
        left: auto;
        transform: translateY(8px) scale(0.95);
    }

    .tooltip-left .pin-details-tooltip::after {
        left: auto;
        right: 30px;
        transform: translateX(50%);
    }

    .tooltip-left .clena-branch-pin:hover .pin-details-tooltip,
    .tooltip-left .clena-branch-pin:focus .pin-details-tooltip,
    .tooltip-left .clena-branch-pin.active .pin-details-tooltip {
        transform: translateY(0) scale(1);
    }
}

/* Hide tooltips on mobile viewports */
@media (max-width: 480px) {
    .pin-details-tooltip {
        display: none !important;
    }
}

/* ── Mobile Details Card ────────────────────────────── */
.clena-mobile-branch-details {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 480px) {
    .clena-mobile-branch-details {
        display: block;
        margin: 24px auto 0 auto;
        background: #0b2545;
        color: #ffffff;
        padding: 18px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(11, 37, 69, 0.15);
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 100px;
        width: 100%;
        max-width: 320px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .clena-mobile-details-placeholder {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.6);
        font-style: italic;
        line-height: 1.4;
    }

    .clena-mobile-details-content {
        width: 100%;
        text-align: left;
    }

    .clena-mobile-branch-details.has-content {
        animation: detailsFadeIn 0.3s ease-out;
    }

    @keyframes detailsFadeIn {
        from {
            opacity: 0;
            transform: translateY(8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-branch-name {
        font-family: 'Montserrat', sans-serif;
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 6px 0;
        color: #ffffff;
    }

    .mobile-branch-address {
        font-size: 13px;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.85);
        margin: 0 0 10px 0;
    }

    .clena-mobile-details-actions {
        display: flex;
        gap: 12px;
        align-items: center;
        margin-top: 12px;
        width: 100%;
    }

    .mobile-branch-phone {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 10px 14px;
        border-radius: 6px;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        box-sizing: border-box;
        transition: background 0.2s ease;
    }

    .mobile-branch-phone:hover,
    .mobile-branch-phone:focus {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff !important;
    }

    .mobile-branch-directions {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: #0c2340 !important;
        background: #4fc3f7;
        padding: 10px 14px;
        border-radius: 6px;
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
        box-sizing: border-box;
        transition: background 0.2s ease, transform 0.2s ease;
        box-shadow: 0 4px 10px rgba(79, 195, 247, 0.2);
        font-family: 'Montserrat', sans-serif;
    }

    .mobile-branch-directions:hover,
    .mobile-branch-directions:focus {
        background: #7ad1f9;
        transform: translateY(-1px);
        color: #0c2340 !important;
    }
}

/* ── Interactive Branches Hint Banner ────────────────── */
.clena-branches-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 10px 18px;
    background: rgba(0, 173, 239, 0.05);
    /* Soft background blue-tint */
    border-radius: 8px;
    border-left: 3px solid var(--secondary, var(--secondary));
    color: var(--primary, var(--primary));
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.clena-branches-hint svg {
    color: var(--secondary, var(--secondary));
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .clena-branches-hint {
        margin-top: 20px;
        justify-content: center;
        width: 100%;
        max-width: 480px;
    }
}

/* ── Pulsing Hotspot Animation for Map Pins ─────────── */
.clena-branch-pin::before {
    content: '';
    position: absolute;
    top: 12px;
    /* Aligned with the pin dot */
    left: 14px;
    /* Centered in the 28px wide marker button */
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(229, 9, 20, 0.28);
    /* Red matching pin outline */
    border-radius: 50%;
    z-index: -1;
    animation: pinPulse 2.4s infinite cubic-bezier(0.25, 0, 0, 1);
    pointer-events: none;
}

@keyframes pinPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.95;
    }

    100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
    }
}