.site-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.site-col {
    padding: 0 20px 30px;
    box-sizing: border-box;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.3333%;
}

h2 {
    font-size: 42px;
    line-height: 1.25;
}

h4 {
    font-size: 24px;
}

.section-heading+.section-content-wrapper {
    margin-top: 56px;
}

.wp-block-post-group a {
    text-decoration: none;
}

/** CSS Starts here */

p {
    line-height: 1.5;
}

/* Header Styles */

.main-title {
    font-weight: 700;
    font-size: 36px;
    color: #954e26;
    line-height: 45px;
    letter-spacing: -0.72px;
    margin: 0;
}

/* Subtitle Styles */

.subtitle p {
    font-weight: 400;
    font-size: 18px;
    color: #000000;
    line-height: 28px;
    margin: 0;
}

/* Gallery Grid */

/* Slider Container */
.slider-container {
    position: relative;
    transition: transform 0.2s ease-out;
    background: #fff;
    height: 100%;
    transition: transform 0.2s ease-out;
    border-radius: 10px;
    overflow: hidden;
}

.slider-container:hover {
    transform: translateY(-2px);
}

.slider-container a {
    text-decoration: none;

    &:hover,
    &:focus {
        color: var(--wp--preset--color--link-color);
    }
}

/* Image Container - Enhanced */
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 418 / 290;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    cursor: grab;
    user-select: none;
    /* Add isolation to create new stacking context */
    isolation: isolate;
    /* Ensure container has its own layer */
    transform: translateZ(0);
}

.image-container:active {
    cursor: grabbing;
}

/* Before and After Images - Enhanced */
.before-image,
.after-image {
    position: absolute;
    top: 0;
    height: 290px;
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    /* Ensure images are properly layered */
    z-index: 1;
}

.before-image {
    left: 0;
    width: 50%;
    background-position: left;
    border-radius: 10px 0 0 0;
    /* Ensure it's always positioned correctly */
    right: auto;
}

.after-image {
    /* Use left positioning instead of right for better control */
    left: 50%;
    width: 50%;
    border-radius: 0 10px 0 0;
    /* Remove right: 0 as it can conflict */
    right: auto;
}

/* White borders for before image */
.before-image::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    background-color: white;
    transition: opacity 0.2s ease;
}

.image-container.dragging .before-image::after {
    opacity: 0;
}

/* Hover Overlays - Enhanced */

.before-overlay {
    left: 0;
    width: 50%;
    border-radius: 10px 0 0 0;
    right: auto;
}

.after-overlay {
    left: 50%;
    width: 50%;
    border-radius: 0 10px 0 0;
    right: auto;
}

.image-container:hover .before-overlay,
.image-container:hover .after-overlay {
    opacity: 1;
}

/* Before/After Labels - Enhanced */
.before-label,
.after-label {
    position: absolute;
    top: 30px;
    background-color: rgba(14, 13, 13, 0.5);
    color: #fffcfc;
    font-family: 'Switzer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    padding: 2px 10px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
    /* Above overlays */
}

.before-label {
    left: 30px;
}

.after-label {
    right: 30px;
}

.image-container:hover .before-label,
.image-container:hover .after-label {
    opacity: 1;
    transform: translateY(0);
}

.image-container.dragging .before-label,
.image-container.dragging .after-label {
    opacity: 0;
    transform: translateY(-10px);
}

/* Vertical Divider Line - Enhanced */
.divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: white;
    transform: translateX(-50%);
    transition: background-color 0.2s ease;
    z-index: 3;
    /* Above overlays */
}

.image-container.dragging .divider-line {
    background-color: #FFC299;
}

/* Slider Control - Enhanced */
.slider-control {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    cursor: grab;
    transition: transform 0.2s ease;
    border-radius: 50%;
    z-index: 4;
    /* Highest z-index */
}

.slider-control:after,
.slider-control:before {
    content: '';
    width: 3px;
    height: 12px;
    position: absolute;
    left: 11px;
    top: 8px;
    z-index: 9;
    border-radius: 4px;
    background-color: var(--wp--preset--color--link-color);
}

.slider-control:after {
    left: 18px;
    border-radius: 4px;
}

.slider-control:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-control:active {
    transform: translate(-50%, -50%) scale(0.95);
    cursor: grabbing;
}

.slider-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.15));
    border-radius: 50%;
}

.image-container.dragging .slider-icon g {
    filter: none !important;
}

g {
    filter: none !important;
}

.image-container.dragging .slider-icon path {
    fill: #FFC299;
}

/* Drag Instruction - Enhanced */
.drag-instruction {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(14, 13, 13, 0.5);
    color: #fffcfc;
    font-family: 'Switzer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    padding: 2px 10px;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
    /* Above overlays */
}

.gallery-item:first-child .drag-instruction {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.image-container:hover .drag-instruction {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
}

.wp-block-entry-content {
    padding: var(--wp--custom--spacing--extra-small) !important;
}

/* Info Card */
.info-card {
    transition: all 0.2s ease;
}

.slider-container:hover {
    box-shadow: 0px 5px 100px -10px rgba(142, 132, 133, 0.25);
}

.treatment-title {
    font-family: 'Switzer', sans-serif;
    font-weight: 500;
    font-size: 25px;
    color: black;
    line-height: 35px;
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
    transition: color 0.2s ease;
}

.treatment-title:hover {
    color: #bf5e1d;
}

.treatment-description {
    font-family: 'Switzer', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: black;
    line-height: 1.6;
    margin: 0;
}

.view-gallery-button {
    text-align: center;
}

.gallery-btn {
    background-color: transparent;
    border-radius: 32px;
    border-color: var(--wp--preset--color--title);
    border-width: 1px;
    border-style: solid;
    color: var(--wp--preset--color--title);
    font-size: var(--wp--preset--font-size--body-default);
    font-weight: 500;
    line-height: 1.56;
    margin-top: 0.8rem;
    padding-top: clamp(12px, 2.5vw, 16px);
    padding-right: clamp(21px, 2.5vw, 35px);
    padding-bottom: clamp(12px, 2.5vw, 16px);
    padding-left: clamp(21px, 2.5vw, 35px);
    text-align: center;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--switzer);
    transition: all 0.4s;
    text-decoration: none;
    display: inline-block;
}

.gallery-btn:hover {
    background-color: var(--wp--preset--color--link-color);
    border-color: var(--wp--preset--color--link-color);
    color: var(--wp--preset--color--light) !important;
}

@media (max-width: 1024px) {
    .col-3 {
        width: 50%;
    }

    .site-section {
        padding: 91px 0 61px;
    }

    h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .site-section {
        padding: 70px 0 50px;
    }

    h2 {
        font-size: 28px;
    }

    .site-wrapper {
        padding: 0 50px;
    }

    .site-header .site-logo {
        width: 200px;
    }

    .site-col {
        padding: 20px;
    }

    .col-4 {
        width: 100%;
    }

    .section-heading+.section-content-wrapper {
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    .col-3 {
        width: 100%;
    }

    .site-section {
        padding: 56px 0 36px;
    }

    h4 {
        font-size: 22px;
    }

    .site-wrapper {
        padding: 0 25px;
    }
}