/* Janta Piles Clinic Instagram section — teal/mint theme */
.jpc-instagram-section {
    position: relative;
    overflow: hidden;
    padding: clamp(58px, 7vw, 96px) 0;
    background: radial-gradient(circle at 0 0, rgba(0, 108, 99, .08), transparent 30%), linear-gradient(180deg, #f5fcfb, #fff)
}


.jpc-instagram-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px
}

.jpc-instagram-heading-copy {
    max-width: 720px
}

.jpc-instagram-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: #006c63;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase
}

.jpc-instagram-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00a28e;
    box-shadow: 0 0 0 5px rgba(0, 162, 142, .12)
}

.jpc-instagram-heading h2 {
    margin: 0 0 12px;
    color: #073f43;
    font-size: clamp(29px, 3.5vw, 44px);
    line-height: 1.14;
    letter-spacing: -.035em;
    font-weight: 800
}

.jpc-instagram-heading-copy>p {
    max-width: 660px;
    margin: 0;
    color: #607778;
    font-size: 16px;
    line-height: 1.75
}

.jpc-instagram-follow {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #c9e4df;
    border-radius: 12px;
    background: #fff;
    color: #006c63;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 64, 61, .06);
    transition: transform .2s, background .2s
}

.jpc-instagram-follow:hover {
    transform: translateY(-2px);
    background: #e9f8f4;
    color: #004f49
}

.jpc-instagram-follow svg,
.jpc-instagram-open svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8
}

.jpc-instagram-grid {
    display: block;
    margin: 0 -11px
}

.jpc-instagram-grid .slick-slide {
    padding: 0 11px;
    height: inherit
}

.jpc-instagram-grid .slick-track {
    display: flex
}

.jpc-instagram-grid .slick-slide>div {
    height: 100%
}

.jpc-instagram-grid .jpc-instagram-card {
    height: 100%
}

.jpc-instagram-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dcecea;
    border-radius: 18px;
    background: #fff;
    /*box-shadow: 0 12px 34px rgba(0, 64, 61, .07);*/
    transition: transform .25s, box-shadow .25s
}

.jpc-instagram-card:hover {
    transform: translateY(-5px);
    /*box-shadow: 0 18px 42px rgba(0, 64, 61, .12)*/
}

.jpc-instagram-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9/12;
    background: #073f43
}

.jpc-instagram-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #073f43
}

.jpc-instagram-open {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 12px;
    background: rgba(7, 63, 67, .78);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(8px)
}

.jpc-instagram-open:hover {
    background: #006c63;
    color: #fff
}

.jpc-instagram-card-content {
    padding: 16px;
}

.jpc-instagram-card-content h3 {
    margin: 0 0 8px;
    color: #073f43;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4
}

.jpc-instagram-card-description {
    color: #607778;
    font-size: 13px;
    line-height: 1.65
}

.jpc-instagram-card-description p {
    margin: 0 0 8px
}

.jpc-instagram-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    /*margin-top: 14px;*/
    color: #006c63;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none
}

.jpc-instagram-card-link:hover {
    color: #004f49;
    text-decoration: underline
}

@media(max-width:1050px) {
    .jpc-instagram-media {
        aspect-ratio: 9/11
    }
}

@media(max-width:640px) {
    .jpc-instagram-section {
        padding: 52px 0
    }
    .jpc-instagram-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 26px
    }

    .jpc-instagram-heading-copy>p {
        font-size: 14px
    }

    .jpc-instagram-follow {
        width: 100%
    }

    .jpc-instagram-grid {
        margin: 0 -6px
    }

    .jpc-instagram-grid .slick-slide {
        padding: 0 6px
    }

    .jpc-instagram-card {
        border-radius: 13px
    }

    .jpc-instagram-media {
        aspect-ratio: 9/13
    }

    .jpc-instagram-open {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        border-radius: 9px
    }

    .jpc-instagram-card-content {
        padding: 12px 11px 14px
    }

    .jpc-instagram-card-content h3 {
        font-size: 14px
    }

    .jpc-instagram-card-description {
        font-size: 12px;
        line-height: 1.55
    }

    .jpc-instagram-card-link {
        margin-top: 10px;
        font-size: 12px
    }
}

/* Instagram Slick carousel — single source of truth */
.jpc-instagram-slider-wrap {
    position: relative;
    /*padding-bottom: 54px;*/
}

.jpc-instagram-grid {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.jpc-instagram-grid.slick-slider {
    position: relative;
}

.jpc-instagram-grid .slick-list {
    overflow: hidden;
    margin: 0 -11px;
    padding: 4px 0 12px;
}

.jpc-instagram-grid .slick-track {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.jpc-instagram-grid .slick-slide {
    float: none;
    display: flex;
    height: auto;
    box-sizing: border-box;
    padding: 0px;
}

.jpc-instagram-grid .slick-slide > div {
    display: flex;
    width: 100%;
    height: 100%;
}

.jpc-instagram-grid .jpc-instagram-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.jpc-instagram-grid .jpc-instagram-media {
    flex: 0 0 auto;
}

/* Keep the video fitted to its portrait media frame */
.jpc-instagram-grid .jpc-instagram-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controls overlay: arrows at the sides, dots centered underneath */
.jpc-instagram-slider-controls {
    position: absolute;
    inset: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    display: block;
    pointer-events: none;
}

.jpc-instagram-slider-controls > .jpc-instagram-prev,
.jpc-instagram-slider-controls > .jpc-instagram-next {
    position: absolute;
    top: 42%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #dcecea;
    border-radius: 50%;
    background: #fff;
    color: #006c63;
    box-shadow: 0 8px 24px rgba(0, 64, 61, .10);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(-50%);
    transition: background .2s, color .2s, opacity .2s;
}

.jpc-instagram-slider-controls > .jpc-instagram-prev {
    left: -24px;
}

.jpc-instagram-slider-controls > .jpc-instagram-next {
    right: -24px;
}

.jpc-instagram-slider-controls > button:hover:not(.slick-disabled) {
    background: #006c63;
    color: #fff;
}

.jpc-instagram-slider-controls > button.slick-disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Slick appends its dot list into this container */
.jpc-instagram-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -43px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    pointer-events: auto;
}

.jpc-instagram-dots .slick-dots {
    position: static;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jpc-instagram-dots .slick-dots li {
    display: block;
    width: 10px;
    height: 10px;
    margin: 0;
    padding: 0;
}

.jpc-instagram-dots .slick-dots li button {
    position: relative;
    display: block;
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.jpc-instagram-dots .slick-dots li button:before {
    content: "";
    position: absolute;
    inset: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9e1dd;
    opacity: 1;
}

.jpc-instagram-dots .slick-dots li.slick-active {
    width: 30px;
}

.jpc-instagram-dots .slick-dots li.slick-active button {
    width: 30px;
}

.jpc-instagram-dots .slick-dots li.slick-active button:before {
    width: 30px;
    border-radius: 20px;
    background: #006c63;
}


@media (max-width: 767px) {
    /*.jpc-instagram-slider-wrap {*/
    /*    padding-bottom: 48px;*/
    /*}*/

    .jpc-instagram-grid .slick-list {
        margin: 0 -6px;
    }
    .jpc-instagram-slider-controls > .jpc-instagram-prev,
    .jpc-instagram-slider-controls > .jpc-instagram-next {
        width: 38px;
        height: 38px;
    }

    .jpc-instagram-slider-controls > .jpc-instagram-prev {
        left: 3px;
    }

    .jpc-instagram-slider-controls > .jpc-instagram-next {
        right: 3px;
    }

    .jpc-instagram-dots {
        bottom: -38px;
    }
}
