/*********** CUSTOM CSS ***************/

/* Search pagination: remove hover underline */
.pagination a,
.pagination .page-link,
.tx-indexedsearch-browsebox .pagination a,
.tx-indexedsearch-browsebox .pagination .page-link {
    text-decoration: none !important;
}
.pagination a:hover,
.pagination a:focus,
.pagination .page-link:hover,
.pagination .page-link:focus,
.tx-indexedsearch-browsebox .pagination a:hover,
.tx-indexedsearch-browsebox .pagination a:focus,
.tx-indexedsearch-browsebox .pagination .page-link:hover,
.tx-indexedsearch-browsebox .pagination .page-link:focus {
    text-decoration: none !important;
}

/* File links: stop clipping filenames / previews (overflow:hidden in theme CMS CSS) */
.ce-uploads,
.ce-uploads li,
.ce-uploads div {
    overflow: visible;
}
.ce-uploads li {
    display: flex;
    align-items: flex-start;
    clear: both;
}
.ce-uploads img {
    float: none;
    flex-shrink: 0;
    max-width: 150px;
    height: auto;
}

footer.footer--custom.bg-color-secondary .text-color-primary,
footer.footer--custom.bg-color-tertiary .text-color-primary,
footer.footer--custom.bg-color-quaternary .text-color-primary {
    color: #fff !important;
}

.footer--classic.footer-top-border nav#sub-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-bottom: 0;
}

.footer--classic.footer-top-border nav#sub-menu ul * {
    margin: 0;
}

.footer--classic.footer-top-border .container-fluid.py-2 .flex-lg-row * {
    margin: 0;
}

@media (max-width: 992px) {
    .header_slider-main.owl-carousel .owl-stage-outer .owl-item {
        padding-top: 70px;
    }
}

/* Header slider: keep first-slide text visible if appear-animation never fires
   (CarouselLight only triggers animate on changed.owl.carousel, not on init). */
.header_slider-main.owl-carousel-light .owl-item.active .appear-animation {
    opacity: 1;
}
.header_slider-main.owl-carousel-light .owl-item.active .appear-animation.invisible {
    opacity: 0;
}

/* Bottom contact strip: keep feature icons + social labels on one line */
.contact-info-teaser .feature-box.feature-box-style-2 {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.contact-info-teaser .feature-box.feature-box-style-2 .feature-box-icon {
    float: none;
    flex-shrink: 0;
    margin: 0;
}
.contact-info-teaser .feature-box.feature-box-style-2 .feature-box-info {
    float: none;
    flex: 1;
    min-width: 0;
}
.contact-info-teaser .social-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.contact-info-teaser .social-list-item > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    line-height: 1.2;
    white-space: nowrap;
}
.contact-info-teaser .social-list-item [class*="fa-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1em;
    flex-shrink: 0;
}

/* Portfolio full-width / grid: images fill cell; hover title not clipped */
.portfolio-item .thumb-info-wrapper > img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}
.portfolio-item .thumb-info.thumb-info-centered-info .thumb-info-title {
    left: 6%;
    width: 88%;
    max-height: 80%;
    padding: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    overflow: hidden;
}
.portfolio-item .thumb-info.thumb-info-centered-info .thumb-info-type {
    float: none;
    display: inline-block;
    margin: 0 0.15rem;
}

/* Infinite Scroll (layout 40): hide Load More — scroll loads more, same as demo */
.frame-layout-40 .blog-pagination {
    display: none !important;
}

/* Medical Patients Reviews: quote mark must not overlap text
   (theme pads only blockquote p; content uses blockquote > div) */
.testimonial.testimonial-with-quotes blockquote {
    position: relative;
    padding-left: 40px;
    padding-right: 40px;
}
.testimonial.testimonial-with-quotes blockquote > div,
.testimonial.testimonial-with-quotes blockquote > p {
    padding-left: 0;
    padding-right: 0;
}

/* Safari: flex author row collapses thumbnail (max-width img) so name overlaps avatar */
.testimonial .testimonial-author {
    display: flex;
    align-items: center;
}
.testimonial .testimonial-author .testimonial-author-thumbnail {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}
.testimonial .testimonial-author .testimonial-author-thumbnail img,
.testimonial .testimonial-author > img {
    display: block;
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    max-width: 25px;
    object-fit: cover;
}
.testimonial.testimonial-style-2 .testimonial-author .testimonial-author-thumbnail img,
.testimonial.testimonial-style-2 .testimonial-author > img {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
}
.testimonial.testimonial-style-3 .testimonial-author .testimonial-author-thumbnail img,
.testimonial.testimonial-style-4 .testimonial-author .testimonial-author-thumbnail img,
.testimonial.testimonial-style-5 .testimonial-author .testimonial-author-thumbnail img {
    width: 55px;
    height: 55px;
    max-width: 55px;
}
.testimonial .testimonial-author > p {
    flex: 1 1 auto;
    min-width: 0;
}

/* Testimonials carousel: avoid clipping avatar/quote on real mobile (stagePadding 100) */
@media (max-width: 767px) {
    .owl-carousel.stage-margin .owl-stage-outer,
    .owl-carousel.stage-margin.stage-margin-sm .owl-stage-outer,
    .owl-carousel.stage-margin.stage-margin-md .owl-stage-outer,
    .owl-carousel.stage-margin.stage-margin-lg .owl-stage-outer {
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
    .testimonial.testimonial-style-2 .testimonial-author img {
        max-width: 80px;
        height: auto;
    }
    .testimonial blockquote,
    .testimonial.testimonial-style-2 blockquote {
        overflow: visible;
    }
}

/* Media play button: match live sizing on small screens; stop adjacent overlays */
@media (max-width: 767px) {
    .media-iframe .media-playbtn.play-button-lg {
        width: 60px;
        height: 60px;
    }
    .media-iframe .media-playbtn .fa-play,
    .media-iframe .media-playbtn .fas.fa-play {
        font-size: 1rem;
    }
    .owl-carousel .owl-video-play-icon {
        width: 50px;
        height: 50px;
        margin-left: -25px;
        margin-top: -25px;
        z-index: 2;
    }
    .owl-carousel .owl-item:not(.active) .owl-video-play-icon {
        visibility: hidden;
        pointer-events: none;
    }
}

