/* Gallery Menu Styles */
img {
  max-width: 100%;
}
#ma-gallery-menu, .ma-gallery-menu-block > ul {margin: 0 0 100px 0; font-size: 16px;}
.post-thumb img {
  max-width: 100%;
}
.ma-gallery-menu-accordion .cat-item-all, .ma-gallery-menu-accordion .cat-item {
  font-size: 16px;
  line-height: 40px !important;
  padding: 0px !important;
  margin: 0 !important;
}

.ma-gallery-menu-accordion .cat-item-all a, .ma-gallery-menu-accordion .cat-item a {padding: 0 2px 0 30px !important; margin:0 !important;}

.ma-gallery-menu-accordion .accordion-btn {font-size: 1.2em !important; line-height: 34px !important}

#ma-gallery-menu, #ma-gallery-menu .children, .ma-gallery-menu-block > ul, .ma-gallery-menu-block > ul .children {list-style: none;}

/* Sub-procedure indentation. The rule above strips the list marker, so the indent
   is the only cue left that a sub-procedure belongs to the procedure above it —
   it must not be left to the theme. Plain List mode had no indent rule at all and
   inherited whatever the active theme gave a nested ul (Astra happens to supply
   margin-left: 24px; a theme that zeroes it renders sub-procedures flush against
   their parents). Accordion mode had one, but scoped to two body classes, so the
   indent vanished wherever the menu block sat on an ordinary page. Indent via
   padding-left, since margins are zeroed here, so nesting compounds: 20px at
   level two, 40px at level three. */
.ma-gallery-menu-accordion .children {margin: 0 !important;}
.ma-gallery-menu-list .children {margin-left: 0 !important;}
.ma-gallery-menu-accordion .children, .ma-gallery-menu-list .children {padding-left: 20px !important;}

/*
******************************************
*   Archive Styles
******************************************
*/
.post-type-archive-ma-gallery .ma-gallery-post .image-set .before-image img,
.post-type-archive-ma-gallery .ma-gallery-post .image-set .after-image img,
.ma-gallery-template-default .image-set .before-image img,
.ma-gallery-template-default .image-set .after-image img,
.tax-gallery-procedures .ma-gallery-post .image-set .before-image img,
.tax-gallery-procedures .ma-gallery-post .image-set .after-image img,
.gallery-module .ma-gallery-post .image-set .before-image img,
.gallery-module .ma-gallery-post .image-set .after-image img,
.post-type-ma-gallery .image-set .before-image img, .post-type-ma-gallery .image-set .after-image img,
.before-and-after-image-link .image-set > img {
    width: 100%;
    object-fit: cover;
}

.post-type-archive-ma-gallery .ma-gallery-post .image-set .before-image,
.post-type-archive-ma-gallery .ma-gallery-post .image-set .after-image,
.tax-gallery-procedures .ma-gallery-post .image-set .before-image,
.tax-gallery-procedures .ma-gallery-post .image-set .after-image,
.before-and-after-image-link .image-set > img {
  padding: 0 !important;
}

.two-x-three-aspect-ratio,
picture.two-x-three-aspect-ratio img {
    aspect-ratio: 2 / 3;
    max-width: 100%;
    height: auto;
}

.one-x-one-aspect-ratio,
picture.one-x-one-aspect-ratio img {
    aspect-ratio: 1 / 1;
    max-width: 100%;
    height: auto;
}

.three-x-two-aspect-ratio,
picture.three-x-two-aspect-ratio img {
    aspect-ratio: 3 / 2;
    max-width: 100%;
    height: auto;
}
.post-type-archive-ma-gallery .blog-layout-1,
.tax-gallery-procedures .blog-layout-1 {
    border-bottom: none !important;
    padding-bottom: none !important;
}

.post-type-archive-ma-gallery .the-excerpt,
.tax-gallery-procedures .the-excerpt {
    margin-bottom: 10px;
}
.post-type-archive-ma-gallery .ma-gallery-excerpt,
.tax-gallery-procedures .ma-gallery-excerpt {
  margin-top: 10px;
}
.post-type-archive-ma-gallery .view-case-link button,
.tax-gallery-procedures .view-case-link button,
.gallery-module .view-case-link button {
    margin-top: 10px;
}

.post-type-archive-ma-gallery .case-id,
.tax-gallery-procedures .case-id,
.gallery-module .case-id {
    margin-bottom: 0px;
}

.post-type-archive-ma-gallery .entry-header .entry-title,
.tax-gallery-procedures .entry-header .entry-title,
.gallery-module .entry-header .entry-title {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-type-archive-ma-gallery .ma-gallery-entry-header,
.tax-gallery-procedures .ma-gallery-entry-header,
.gallery-module .ma-gallery-entry-header {
    margin-bottom: 40px;
}

.post-type-archive-ma-gallery .image-set,
.tax-gallery-procedures .image-set,
.gallery-module .image-set {
    position: relative;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.post-type-archive-ma-gallery .overlay,
.tax-gallery-procedures .overlay,
.gallery-module .overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-type-archive-ma-gallery .hover-text,
.tax-gallery-procedures .hover-text,
.tax-gallery-procedures .hover-text {
    font-size: 30px;
    line-height: 30px;
    text-align: center;
}

.post-type-archive-ma-gallery .hover-cta,
.gallery-module .hover-cta {
    font-size: 20px;
    font-weight: normal;
}

.post-type-archive-ma-gallery .before-and-after-image-link .overlay,
.tax-gallery-procedures .before-and-after-image-link .overlay,
.gallery-module .before-and-after-image-link .overlay {
    width:100%;
    height:100%;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.1s linear;
    position: absolute;
    top: 0px;
    left: 0px;
}

.post-type-archive-ma-gallery .ma-gallery-post .read-more,
.tax-gallery-procedures .ma-gallery-post .read-more,
.gallery-module .ma-gallery-post .read-more {
    display:none;
}



/* After Only */
.post-type-archive-ma-gallery .after-only .before-image,
.tax-gallery-procedures .after-only .before-image,
.gallery-module .after-only .before-image {
    display: none;
}
.post-type-archive-ma-gallery .after-only .image-set,
.tax-gallery-procedures .after-only .image-set,
.gallery-module .after-only .image-set {
    width: 100%;
}

/* Pull the carousel arrows in tighter when using 2 or 3 column layout */
.post-type-archive-ma-gallery .ast-grid-2 button.slick-prev,
.post-type-archive-ma-gallery .ast-grid-3 button.slick-prev,
.tax-gallery-procedures .ast-grid-2 button.slick-prev,
.tax-gallery-procedures .ast-grid-3 button.slick-prev,
.gallery-module .ast-grid-2 button.slick-prev,
.gallery-module .ast-grid-3 button.slick-prev {
    left: -20px;
}
.post-type-archive-ma-gallery .ast-grid-2 button.slick-next,
.post-type-archive-ma-gallery .ast-grid-3 button.slick-next,
.tax-gallery-procedures .ast-grid-2 button.slick-next,
.tax-gallery-procedures .ast-grid-3 button.slick-next,
.gallery-module .ast-grid-2 button.slick-next,
.gallery-module .ast-grid-3 button.slick-next {
    right: -15px;
}


.gallery-module .blog-layout-1 {
    border-bottom: none !important;
}


/*
******************************************
*   BA Slider Styles
******************************************
*/

.single-ma-gallery .slick-slide{
  height: fit-content !important;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

.post-type-archive-ma-gallery .twentytwenty-container img,
.tax-gallery-procedures .twentytwenty-container img  {
    width: 100% !important;
}

.baslider .twentytwenty-before-label:before { content: "before";}
.baslider .twentytwenty-after-label:before { content: "after";}

.baslider .twentytwenty-handle {
    border-color: #ffffff;
    border-width: 5px;
    border-radius: 100px;
    -webkit-box-shadow: 0px 0px 5px #fcfcfc;
    -moz-box-shadow: 0px 0px 5px #fcfcfc;
    box-shadow: 0px 0px 5px #fcfcfc;
    height: 40px;
    width: 40px;
    margin-left:-25px;
    margin-top:-20px;
}

.baslider .twentytwenty-handle:before{
    margin-bottom: 22.5px;
    box-shadow: 0 0 0 #ffffff;
}
.baslider .twentytwenty-handle:after{
    margin-top: 22.5px;
    box-shadow: 0 0 0 #ffffff;
}
.baslider .twentytwenty-handle:before,
.baslider .twentytwenty-handle:after {
    background: #ffffff;
    width: 5px;
    margin-left: -2.5px;
}

.baslider .twentytwenty-overlay:hover {background: rgba(0,0,0,0.5);}

.baslider .twentytwenty-handle .twentytwenty-left-arrow {border-right: 6px solid #ffffff;}
.baslider .twentytwenty-handle .twentytwenty-right-arrow {border-left: 6px solid #ffffff;}

.baslider .twentytwenty-before-label,
.baslider .twentytwenty-after-label {
    -webkit-box-align:center;
    -ms-flex-align:center;
    -ms-grid-row-align:center;
    align-items:center;
}

/* Typography style */
.baslider .twentytwenty-before-label:before,
.baslider .twentytwenty-after-label:before {
    font-family: arial;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 1px;
    text-transform: none;
}

.baslider .twentytwenty-before-label:before,
.baslider .twentytwenty-after-label:before {
    color: #ffffff;
    max-width: calc( 100% / 2 - 30px );
    width: auto;
    padding: 10px;
}

/* Typography responsive layout starts here */
@media ( max-width: 992px ) {
    .baslider .twentytwenty-before-label:before,
    .baslider .twentytwenty-after-label:before {
        font-size: 12px;
        line-height: 12px;
    }
}

@media ( max-width: 768px ) {
    .baslider .twentytwenty-before-label:before,
    .baslider .twentytwenty-after-label:before {
        font-size: 12px;
        line-height: 12px;
    }
}
/* Typography responsive layout Ends here */


/* loading animation */
.baslider-loading {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid grey;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
  margin: 100px auto;
}

.baslider-loading img {
    display: none;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}






/*
******************************************
*   Single Styles
******************************************
*/
.single-ma-gallery .entry-meta, .single-ma-gallery .post-navigation {
    display:none;
}

@media only screen and (min-width: 925px) {
    .ma-gallery-template-default .case-id{
        margin-top: -10px;
    }
}

.ma-gallery-template-default hr {
    background-color: #eee !important;
}

.ma-gallery-template-default .image-set {text-align: center; overflow: hidden;}
.ma-gallery-template-default .image-set p {margin-bottom: 0px !important;}

.ma-gallery-template-default .view-angle {
    text-transform: capitalize;
  width:100%;
  margin-bottom: 10px;
  display: block;
}

/* .video-wrapper 16:9 aspect ratio — see ma-blocks-frontend.css (site-wide) */

/* Other Patients */
.other_patients {
  margin-top: 20px;
}
.other_patients h3 {padding: 20px 0;}
.other_patients_thumbs .other_patients_before_pic,
.other_patients_thumbs .other_patients_after_pic,
.other_patients_thumbs .other_patients_before_pic img,
.other_patients_thumbs .other_patients_after_pic img {
    object-fit: cover; padding:0 2px;
}

.other_patients_thumbs h4 {padding-bottom:20px;}
.other_patients_thumbs:hover .other_patients_before_pic, .other_patients_thumbs:hover .other_patients_after_pic { opacity:.8; }

.single .before-and-after-carousel {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 20px 25px 20px 30px;
}
.other_patients_thumbs h4 {
  margin-top: 12px;
}
@media (min-width:1025px) {
  .single .before-and-after-carousel {
    margin-right:30px;
  }
}





/*--------------------------------------------------------------
# Bootstrap Grid
# Just-In-Case to cover for Astra theme evolution
--------------------------------------------------------------*/
/*!
 * Bootstrap v4.0.0-alpha.2 (https://getbootstrap.com)
 */
/*@media (min-width: 544px) {
  .ma-container {max-width: 100%;}
}

@media (min-width: 768px) {
  .ma-container {max-width: 100%;}
}

@media (min-width: 992px) {
  .ma-container {max-width: 100%;}
}

@media (min-width: 1200px) {
  .ma-container {max-width: 100%;}
}
.ma-container-fluid, .ma-container {margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px;}
.ma-container-fluid::after, .ma-container::after {content: ""; display: table; clear: both;}
.ma-row {margin-left: -20px; margin-right: -20px;}
.ma-row::after {content: ""; display: table; clear: both;}
.ma-col-xs-1, .ma-col-xs-2, .ma-col-xs-3, .ma-col-xs-4, .ma-col-xs-5, .ma-col-xs-6, .ma-col-xs-7, .ma-col-xs-8, .ma-col-xs-9, .ma-col-xs-10, .ma-col-xs-11, .ma-col-xs-12, .ma-col-sm-1, .ma-col-sm-2, .ma-col-sm-3, .ma-col-sm-4, .ma-col-sm-5, .ma-col-sm-6, .ma-col-sm-7, .ma-col-sm-8, .ma-col-sm-9, .ma-col-sm-10, .ma-col-sm-11, .ma-col-sm-12, .ma-col-md-1, .ma-col-md-2, .ma-col-md-3, .ma-col-md-4, .ma-col-md-5, .ma-col-md-6, .ma-col-md-7, .ma-col-md-8, .ma-col-md-9, .ma-col-md-10, .ma-col-md-11, .ma-col-md-12, .ma-col-lg-1, .ma-col-lg-2, .ma-col-lg-3, .ma-col-lg-4, .ma-col-lg-5
.ma-col-xs-3 {width: 25%;}
.ma-col-xs-4 {width: 33.3333333333%;}
.ma-col-xs-5 {width: 41.6666666667%;}
.ma-col-xs-6 {width: 50%;}
.ma-col-xs-7 {width: 58.3333333333%;}
.ma-col-xs-8 {width: 66.6666666667%;}
.ma-col-xs-9 {width: 75%;}
.ma-col-xs-10 {width: 83.3333333333%;}
.ma-col-xs-11 {width: 91.6666666667%;}
.ma-col-xs-12 {width: 100%;}

@media (min-width: 544px) {
  .ma-col-sm-1, .ma-col-sm-2, .ma-col-sm-3, .ma-col-sm-4, .ma-col-sm-5, .ma-col-sm-6, .ma-col-sm-7, .ma-col-sm-8, .ma-col-sm-9, .ma-col-sm-10, .ma-col-sm-11, .ma-col-sm-12 {float: left;}
  .ma-col-sm-1 {width: 8.3333333333%;}
  .ma-col-sm-2 {width: 16.6666666667%;}
  .ma-col-sm-3 {width: 25%;}
  .ma-col-sm-4 {width: 33.3333333333%;}
  .ma-col-sm-5 {width: 41.6666666667%;}
  .ma-col-sm-6 {width: 50%;}
  .ma-col-sm-7 {width: 58.3333333333%;}
  .ma-col-sm-8 {width: 66.6666666667%;}
  .ma-col-sm-9 {width: 75%;}
  .ma-col-sm-10 {width: 83.3333333333%;}
  .ma-col-sm-11 {width: 91.6666666667%;}
  .ma-col-sm-12 {width: 100%;}
}

@media (min-width: 768px) {
  .ma-col-md-1, .ma-col-md-2, .ma-col-md-3, .ma-col-md-4, .ma-col-md-5, .ma-col-md-6, .ma-col-md-7, .ma-col-md-8, .ma-col-md-9, .ma-col-md-10, .ma-col-md-11, .ma-col-md-12 {float: left;}
  .ma-col-md-1 {width: 8.3333333333%;}
  .ma-col-md-2 {width: 16.6666666667%;}
  .ma-col-md-3 {width: 25%;}
  .ma-col-md-4 {width: 33.3333333333%;}
  .ma-col-md-5 {width: 41.6666666667%;}
  .ma-col-md-6 {width: 50%;}
  .ma-col-md-7 {width: 58.3333333333%;}
  .ma-col-md-8 {width: 66.6666666667%;}
  .ma-col-md-9 {width: 75%;}
  .ma-col-md-10 {width: 83.3333333333%;}
  .ma-col-md-11 {width: 91.6666666667%;}
  .ma-col-md-12 {width: 100%;}
}

@media (min-width: 992px) {
  .ma-col-lg-1, .ma-col-lg-2, .ma-col-lg-3, .ma-col-lg-4, .ma-col-lg-5, .ma-col-lg-6, .ma-col-lg-7, .ma-col-lg-8, .ma-col-lg-9, .ma-col-lg-10, .ma-col-lg-11, .ma-col-lg-12 {float: left;}
  .ma-col-lg-1 {width: 8.3333333333%;}
  .ma-col-lg-2 {width: 16.6666666667%;}
  .ma-col-lg-3 {width: 25%;}
  .ma-col-lg-4 {width: 33.3333333333%;}
  .ma-col-lg-5 {width: 41.6666666667%;}
  .ma-col-lg-6 {width: 50%;}
  .ma-col-lg-7 {width: 58.3333333333%;}
  .ma-col-lg-8 {width: 66.6666666667%;}
  .ma-col-lg-9 {width: 75%;}
  .ma-col-lg-10 {width: 83.3333333333%;}
  .ma-col-lg-11 {width: 91.6666666667%;}
  .ma-col-lg-12 {width: 100%;}
}

@media (min-width: 1200px) {
  .ma-col-xl-1, .ma-col-xl-2, .ma-col-xl-3, .ma-col-xl-4, .ma-col-xl-5, .ma-col-xl-6, .ma-col-xl-7, .ma-col-xl-8, .ma-col-xl-9, .ma-col-xl-10, .ma-col-xl-11, .ma-col-xl-12 {float: left;}
  .ma-col-xl-1 {width: 8.3333333333%;}
  .ma-col-xl-2 {width: 16.6666666667%;}
  .ma-col-xl-3 {width: 25%;}
  .ma-col-xl-4 {width: 33.3333333333%;}
  .ma-col-xl-5 {width: 41.6666666667%;}
  .ma-col-xl-6 {width: 50%;}
  .ma-col-xl-7 {width: 58.3333333333%;}
  .ma-col-xl-8 {width: 66.6666666667%;}
  .ma-col-xl-9 {width: 75%;}
  .ma-col-xl-10 {width: 83.3333333333%;}
  .ma-col-xl-11 {width: 91.6666666667%;}
  .ma-col-xl-12 {width: 100%;}
}

.ma-col-xs-5ths,
.ma-col-sm-5ths,
.ma-col-md-5ths,
.ma-col-lg-5ths {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

.ma-col-xs-5ths {
    width: 20%;
    float: left;
}

@media (min-width: 768px) {
    .ma-col-sm-5ths {
        width: 20%;
        float: left;
    }
}

@media (min-width: 992px) {
    .ma-col-md-5ths {
        width: 20%;
        float: left;
    }
}

@media (min-width: 1200px) {
    .ma-col-lg-5ths {
        width: 20%;
        float: left;
    }
}*/

/* Before and After Carousel */
.before-and-after-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0;
}
.before-and-after-carousel:not(.slick-initialized) {
  min-height: 400px; /* before/after images are taller — tune on a real gallery page */
}
.before-and-after-carousel:not(.slick-initialized) > *:not(:first-child) {
  display: none;
}
/* Ensure before/after images sit 50/50 side-by-side in carousel slides (does not depend on ma-grid .ma-d-flex) */
.entry-before-and-after.before-and-after-carousel .image-set .ma-d-flex,
.ma-gallery-shortcode-carousel.before-and-after-carousel .image-set .ma-d-flex {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}
.entry-before-and-after.before-and-after-carousel .image-set .ma-d-flex .post-thumb,
.ma-gallery-shortcode-carousel.before-and-after-carousel .image-set .ma-d-flex .post-thumb {
  flex: 0 0 50%;
  min-width: 0;
}
.single-ma-gallery-wrapper , .archive-ma-gallery-wrapper {
  margin-top: 50px;
}
.slick-prev > svg, .slick-next > svg {
  height: 20px;
  width: 20px;
}
.slick-prev, .slick-next {
  border-radius: 50%;
  text-align: center;
  z-index: 1;
  opacity: 0.3;
}
.slick-prev {
  left: 3px !important;
}
.slick-next {
  right: 3px !important;
}
.slick-slider:hover .slick-prev, .slick-slider:hover .slick-next {
  opacity: 1;
}
@media (min-width:768px) {
  .entry-before-and-after.before-and-after-carousel .image-set .ba-img-wrapper,
  .other_patients_list .other_patients_thumbs .ba-img-wrapper {
    background: #f0f0f0;
  }
}

.other_patients_list .other_patients_thumbs .ba-img-wrapper {
  padding: 0 !important;
}

/* Mobile Menu */
.ma-gallery-mobile-menu {
  position: relative;
}
a.ma-gallery-mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    padding: 0;
    right: 1.5rem;
    top: 20px;
}
a.ma-gallery-mobile-menu-toggle span {
  width: 16px;
  height: 2px;
  background: #333b54;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
  display: block;
}
a.ma-gallery-mobile-menu-toggle > span:first-child, a.ma-gallery-mobile-menu-toggle > span:last-child  {
  transform: rotate(0);
}
a.ma-gallery-mobile-menu-toggle > span:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
}
a.ma-gallery-mobile-menu-toggle.open > span:first-child {
  transform: rotate(45deg);
}
a.ma-gallery-mobile-menu-toggle.open > span:last-child {
  transform: rotate(-45deg);
}
a.ma-gallery-mobile-menu-toggle.open > span:nth-child(2) {
  opacity: 0;
}
.ma-gallery-mobile-menu-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #f1f1f1;
  border-radius: 4px;
  margin-bottom: 20px;
}
.ma-gallery-mobile-menu-header p {
  padding: 0;
  margin: 0;
}
.ma-gallery-mobile-menu-header > *:last-child {
  margin-left: auto;
}
.ma-gallery-mobile-menu-header h2 {
  margin: 0;
  font-size: inherit;
  font-weight: bold;
}
.ma-gallery-mobile-menu:not(.d-for-desktop) .ma-gallery-mobile-menu-inner {
  background: #f1f1f1;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-30px);
  transition: all 0.3s ease-in-out;
  position: absolute;
  width: 100%;
  z-index: 99;
  padding: 20px;
  top: 100%;
}
.ma-gallery-mobile-menu.d-for-desktop a.ma-gallery-mobile-menu-toggle {
  display: none;
}
.ma-gallery-mobile-menu.open .ma-gallery-mobile-menu-inner {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ma-gallery-mobile-menu-inner p {
  display: none;
}
.ma-gallery-mobile-menu ul#ma-gallery-menu {
  margin: 0;
  padding: 0;
}
.ma-gallery-mobile-menu.always-active {
  display: block;
}

.ma-gallery-mobile-menu.d-for-desktop {
  display: block;
}
.ma-gallery-mobile-menu.d-for-tablet, .ma-gallery-mobile-menu.d-for-mobile {
  display: none;
}

@media (max-width: 991px) {
  .ma-gallery-mobile-menu.d-for-desktop {
    display: none;
  }
  .ma-gallery-mobile-menu.d-for-tablet {
    display: block;
  }
}

.image-set .ma-d-flex .post-thumb {
  width: 50%;
}

/* Before / After labels */
.ba-label {
  display: block;
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Frontend Styles */
.ma-gallery-navigations {
  padding: 15px;
  margin-top: 20px;
}
.before-and-after-images > .set {
  margin-bottom: 24px;
}
body.single-ma-gallery nav.navigation.post-navigation {
  display: none;
}
.ma-archive-wrapper {
  margin-top: 0;
}
.ma-archive-wrapper .ma-post-format-ma-gallery h2.entry-title {
  margin-top: 0;
}
.ma-archive-wrapper article {
  margin-bottom: 15px;
}
.ma-archive-wrapper article .ma-post-format-ma-gallery {
  padding: 15px;
  border-radius: 4px;
}

/* Gallery archive: equal-height cards so .post-content matches article height */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row,
.tax-gallery-procedures .ma-gallery-results .ma-row,
.ma-archive-wrapper .ma-row,
.gallery-module .ma-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post,
.ma-archive-wrapper .ma-row > article.ma-gallery-post,
.gallery-module .ma-row > article.ma-gallery-post {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  margin-bottom: 20px;
  float: none;
}

/* Article inner wrapper (e.g. .ast-article-inner): fill article so height passes down */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post > *,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post > *,
.ma-archive-wrapper .ma-row > article.ma-gallery-post > *,
.gallery-module .ma-row > article.ma-gallery-post > * {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* .post-content fills wrapper so it is the same height as the article */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post .post-content,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post .post-content,
.ma-archive-wrapper .ma-row > article.ma-gallery-post .post-content,
.gallery-module .ma-row > article.ma-gallery-post .post-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Carousel (Slick) container: don't grow, allow shrink, contain overflow */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post .entry-before-and-after,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post .entry-before-and-after,
.ma-archive-wrapper .ma-row > article.ma-gallery-post .entry-before-and-after,
.gallery-module .ma-row > article.ma-gallery-post .entry-before-and-after {
  flex-grow: 0;
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

/* .entry-content grows to fill remaining space below the image set.
   flex-basis: auto (not 0) ensures the button content contributes to the
   article's minimum height so it never overflows the card in carousel mode. */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post .entry-content,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post .entry-content,
.ma-archive-wrapper .ma-row > article.ma-gallery-post .entry-content,
.gallery-module .ma-row > article.ma-gallery-post .entry-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 0;
}

/* Push "View Case" button to the bottom of the card */
.post-type-archive-ma-gallery .ma-gallery-results .ma-row > article.ma-gallery-post .ma-btn-wrapper,
.tax-gallery-procedures .ma-gallery-results .ma-row > article.ma-gallery-post .ma-btn-wrapper,
.ma-archive-wrapper .ma-row > article.ma-gallery-post .ma-btn-wrapper,
.gallery-module .ma-row > article.ma-gallery-post .ma-btn-wrapper {
  margin-top: auto;
}

/* Faceted Menu Styles */
.ma-input-group {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
  width: 100%;
}
.ma-input-group input.form-control {
  position: relative;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 1%;
  margin-bottom: 0;
}
.ma-input-group .ma-input-group-append {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: absolute;
  right: 0;
  top: 0;
}
.ma-input-group .ma-input-group-append a.ma-input-group-btn {
  width: 40px;
  text-align: center;
  height: 40px;
  line-height: 40px;
  text-decoration: none;
  background: transparent;
  color: #111;
}
.ma-input-group input.form-control:focus {
  box-shadow: none;
  border: none;
}
img.ma-gallery-faceted-menu-loader {
  margin: 0 auto;
  display: block;
  padding: 10px;
  transform: scale(1.5);
}
.ma-gallery-faceted-menu-list span.select2.select2-container {
  width: 100% !important;
}
.ma-gallery-faceted-menu-list button.select2-selection__clear span {
  color: #111;
}
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single {
  background-color: #fff;
  border-color: var(--ast-border-color);
  border-radius: 4px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  color: var(--ast-form-input-text, #475569);
  height: 40px;
}
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single button.select2-selection__clear {
  padding: 0;
  margin-right: 14px;
  height: 40px;
  float: none;
  position: absolute;
  top: 0;
  right: 20px;
}
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 16px;
  padding: 0;
}
/* Hide the entire native arrow container to prevent any WooCommerce/theme duplicates */
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection__arrow {
  display: none !important;
}
/* Render a single clean arrow via pseudo-element on the selection wrapper */
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single {
  position: relative;
  padding-right: 36px;
}
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -3px;
  border-color: #888 transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Flip arrow when dropdown is open */
.ma-gallery-faceted-menu-list .select2-container--default.select2-container--open .select2-selection--single::after {
  border-color: transparent transparent #888 transparent;
  border-width: 0 4px 5px 4px;
  margin-top: -5px;
}
/* Ensure clear button is clickable and visible when WooCommerce styles interfere */
.ma-gallery-faceted-menu-list .select2-container--default .select2-selection--single .select2-selection__clear {
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  z-index: 1;
}
span.select2.select2-container.select2-container--default.select2-container--below {
  max-width: 100%;
}
.ma-gallery-faceted-menu-list, .ma-gallery-faceted-menu-search-wrapper {
  padding: 20px 10px;
  background: #fff;
  margin-top: 15px;
}
.ma-gallery-faceted-menu-search-wrapper {
  margin-top: 0;
}
.ma-gallery-faceted-menu-title {
  margin-bottom: 10px;
}

/* Before and After Thumbnail Carousel */
.before-and-after-thumbnail-carousel {
  margin-top: 20px;
}
.thumbnail-image-set-inner {
  display: flex;
  flex-wrap: wrap;
  padding: 2px;
  margin-right: 5px;
}
.thumbnail-image-set-inner > img {
  width: 50%;
  aspect-ratio: 12 / 7;
}
.combined-image-set .thumbnail-image-set-inner > img {
  width: 100%;
}
.before-and-after-thumbnail-carousel ul.slick-dots {
  margin: 10px 0 0 0;
}

/* Astra "Separate Container" padding overrides — gallery pages are image-heavy
   and need tighter spacing than Astra's default 2.5-3em article padding. */
.single-ma-gallery.ast-separate-container .ast-article-single {
  padding: 1em;
}
.post-type-archive-ma-gallery.ast-separate-container .ast-archive-description,
.tax-gallery-procedures.ast-separate-container .ast-archive-description {
  padding: 1em;
}
.post-type-archive-ma-gallery .ma-gallery-post .post-content {
  width: 100%;
}