.app {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.badge {
    display: inline-block;
    background-color: var(--white);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.title {
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 64rem;
    margin: 0 auto;
    line-height: 1.7;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.tab-container {
    background-color: var(--wp--preset--color--table-heading-color);
    border-radius: 32px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s;
    white-space: nowrap;
    color: var(--wp--preset--color--title) !important;
    font-family: var(--wp--preset--font-family--switzer);
}

.tab-button.active:hover,
.tab-button.active {
    background-color: var(--wp--preset--color--background);
}

.tab-button:hover {
    background-color: var(--wp--preset--color--soft-peach);
}

/* Content Sections */
.content {
    margin-bottom: 4rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 48rem;
    margin: 0 auto;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Styles */


.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    font-size: 15px;
    line-height: 1.6;
}

/* Image Container */
.image-container {
    width: 100%;
    height: 290px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.space-card:hover .image-container img,
.treatment-card:hover .image-container img {
    transform: scale(1.05);
}

.space-card:hover .image-container::after,
.treatment-card:hover .image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

/* Before/After Slider */
.before-after-slider {
    margin-bottom: 1rem;
}


.before-image,
.after-image {
    position: absolute;
    inset: 0;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.after-image {
    /* clip-path: inset(0 50% 0 0); */
    transition: clip-path 0.3s ease;
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    transition: left 0.3s ease;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    background-color: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::after {
    content: '';
    width: 1rem;
    height: 1rem;
    background-color: var(--white);
    border: 2px solid #d1d5db;
    border-radius: 50%;
}

.instruction-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.slider-container:hover .instruction-overlay {
    opacity: 1;
}

/* Modal Styles */
.gallery-container-modal .modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gallery-container-modal .modal.active {
    display: flex;
}

.gallery-container-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(15px);
    background-color: rgba(236, 236, 236, 0.8);
}

.gallery-container-modal .modal-content {
    position: relative;
    background-color: var(--wp--preset--color--background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 0px 80px 10px #0000001F;
    max-width: 1202px;
    width: 100%;
    margin: 0 1.5rem;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.4s;
    transform: scale(0.8);
    transition-delay: 1s;
    padding: 0;
    gap: 0;
    max-height: 80vh;
}

.gallery-container-modal .active .modal-content {
    opacity: 1;
    transform: scale(1);
}

.gallery-container-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--table-heading-color);
}

.gallery-container-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background-color: var(--wp--preset--color--light-gray);
    color: var(--wp--preset--color--foreground);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-container-modal .modal-close svg {
    stroke: var(--wp--preset--color--foreground);
}

.gallery-container-modal .modal-close:hover {
    background-color: var(--wp--preset--color--button-color);
}

.gallery-container-modal .modal-close:hover svg {
    stroke: var(--wp--preset--color--background);
}

.gallery-container-modal .modal-image {
    width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    height: auto;
}

.gallery-container-modal .modal-info {
    background-color: var(--wp--preset--color--background);
    padding: 2rem;
    width: auto;
}

.gallery-container-modal .modal-title {
    font-size: var(--wp--preset--font-size--post-title);
    color: var(--wp--preset--color--button-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    margin: 0 0 14px;
}

.gallery-container-modal .modal-description {
    color: var(--wp--preset--color--secondary-text);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-container-modal .modal-info {
        padding: 1.5rem;
    }
}

@media (max-width: 567px) {

    .gallery-container-modal .tab-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .gallery-container-modal .tab-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .image-container,
    .slider-container {
        height: 250px;
    }

}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.tab-button:focus,
.modal-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.space-card:focus,
.treatment-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Print styles */
@media print {
    .gallery-container-modal .modal {
        display: none !important;
    }

    .tab-navigation {
        display: none;
    }

    .gallery-container-modal .tab-content {
        display: block !important;
    }
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-container-modal .modal-info {
        padding: 2rem 3rem;
    }

    .tab-content .section-header {
        margin-top: 35px;
    }
}

@media (min-width: 1366px) {


    .tab-content .section-header {
        margin-top: 42px;
    }
}

/** gallery CSS ends here */


.wp-block-section {
    position: relative;
    padding-bottom: var(--wp--custom--spacing--section-block-top);
    padding-top: var(--wp--custom--spacing--section-block-top);

}

.site-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.site-col {

    padding: 0 20px 30px;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.3333%;
}

.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-family: 'Merriweather', serif;
    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 */
.gallery-container .treatment-card,
.gallery-container .space-card,
.gallery-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;
    width: 100%;
    gap: 0;

    &:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 100px -10px rgba(142, 132, 133, 0.25);
    }

}




/* Image Container */
.gallery-container .image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 418 / 290;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    cursor: grab;
    user-select: none;
}


.image-container:active {
    cursor: grabbing;
}


/* Before and After Images */
.before-image,
.after-image {
    position: absolute;
    top: 0;
    height: 290px;
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
}


.before-image {
    left: 0;
    width: 50%;
    background-position: left;
    border-radius: 10px 0 0 0;
}


.after-image {
    right: 0 !important;
    width: 50%;
    border-radius: 0 10px 0 0;
    left: auto !important;
}


/* 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 */

.before-overlay {
    left: 0;
    width: 50%;
    border-radius: 10px 0 0 0;
}


.after-overlay {
    right: 0;
    width: 50%;
    border-radius: 0 10px 0 0;
}


.image-container:hover .before-overlay,
.image-container:hover .after-overlay {
    opacity: 1;
}


/* Before/After Labels */
.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;
}


.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 */
.divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: white;
    transform: translateX(-50%);
    transition: background-color 0.2s ease;
}


.image-container.dragging .divider-line {
    background-color: #FFC299;
}


/* Slider Control */
.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%;
}

.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 */
.drag-instruction {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    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: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}


.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;
    width: 100%;
}


.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);
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s;
}


.gallery-btn:hover {
    background-color: var(--wp--preset--color--button-color);
    border-color: var(--wp--preset--color--button-color);
    color: var(--wp--preset--color--light) !important;
}




.wp-block-group.alignwide.wp-block-group-heading.has-global-padding {
    max-width: 1040px;
}


@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;
    }
}