/* HPTamir public-site responsive corrections
   Additive overrides only: existing Razor markup, routes and data flow remain intact. */

html,
body {
    max-width: 100%;
    min-width: 0;
}

body {
    overflow-x: hidden;
}

main,
main > *,
footer,
footer > * {
    min-width: 0;
}

img,
video,
iframe {
    max-width: 100%;
}

/* The mobile navigation is used below Bootstrap's large breakpoint. */
@media (max-width: 991.98px) {
    header .mobile-nav {
        display: flex;
        width: 100%;
        min-height: 64px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 14px !important;
        box-sizing: border-box;
    }

    header .mobile-nav > a:last-child {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
        margin-right: auto;
    }

    header .mobile-nav .header-logo {
        display: block;
        width: auto;
        max-width: min(58vw, 210px);
        height: auto !important;
        max-height: 52px;
        object-fit: contain;
        float: none !important;
    }

    header .mobile-nav .menu-toggler {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        min-height: 42px;
        margin: 0;
    }

    header .menu-mobile {
        max-width: 100vw;
    }

    .top-header {
        display: none;
    }
}

/* Homepage hero / top slider */
.home-topnews,
.home-topnews #home-topnews {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.home-topnews #home-topnews .swiper-slide {
    position: relative;
    height: clamp(250px, 48vw, 620px);
    overflow: hidden;
}

.home-topnews #home-topnews .swiper-slide > a,
.home-topnews #home-topnews .swiper-slide > a img {
    display: block;
    width: 100%;
    height: 100%;
}

.home-topnews #home-topnews .swiper-slide > a img {
    object-fit: cover;
    object-position: center;
}

.home-topnews .elementor-column-wrap {
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: clamp(18px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.home-topnews .elementor-column-wrap h1,
.home-topnews .elementor-column-wrap h2 {
    max-width: 100%;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.home-topnews .elementor-column-wrap p {
    max-width: 100%;
    line-height: 1.7;
}

/* Home feature tiles */
.product-container,
.product-container > .row {
    min-width: 0;
}

.product-wrapper {
    max-width: 100%;
}

.product-wrapper .front-content,
.product-wrapper .back-content,
.product-wrapper .front-content a {
    min-width: 0;
    max-width: 100%;
}

.product-wrapper .front-content img {
    display: block;
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    margin-inline: auto;
}

.product-wrapper .front-content h4,
.product-wrapper .front-content h5,
.product-wrapper .hidden-content {
    overflow-wrap: anywhere;
    line-height: 1.6;
}

/* Product sliders */
.swiper-box-1,
.swiper-box-1 > div,
.swiper-box-1 .swiper,
.swiper-box-1 .swiper-wrapper {
    min-width: 0;
    max-width: 100%;
}

.swiper-box-1 .swiper-slide {
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    padding: 4px;
}

.swiper-box-1 .img-thumb {
    width: 100%;
    min-height: 0;
    height: clamp(145px, 24vw, 250px);
    box-sizing: border-box;
}

.swiper-box-1 .img-thumb img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
}

.swiper-box-1 .b-titr,
.swiper-box-1 .b-titr h4 {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Service block */
.specialized-sections,
.specialized-sections .specialized-sections-stuff,
.specialized-sections .specialized-sections-titr {
    min-width: 0;
    max-width: 100%;
}

.specialized-sections .specialized-sections-titr h3,
.specialized-sections .specialized-sections-titr a {
    overflow-wrap: anywhere;
    line-height: 1.8;
}

/* Customers carousel */
.dentists,
.dentists #DentistsSlide {
    min-width: 0;
    max-width: 100%;
}

.dentists .swiper-button-next,
.dentists .swiper-button-prev {
    z-index: 5;
}

.dentists .dentists-news-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.dentists .dentists-news-titr,
.dentists .dentists-news-lead {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

/* Articles and request form */
.article .article-news-image,
.article .article-news-image img {
    max-width: 100%;
}

.article .article-news-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.appointment .appointment-form-stuff > [class*="col-"] {
    min-width: 0;
}

.appointment .appointment-form-stuff .form-control,
.appointment .appointment-form-stuff .input-group {
    min-width: 0;
    max-width: 100%;
}

.appointment .appointment-form-stuff button {
    width: auto;
    min-width: 120px;
    max-width: 100%;
}

.appointment .appointment-form-stuff .input-group-prepend {
    max-width: 55%;
    overflow: hidden;
}

.appointment .appointment-form-stuff .input-group-prepend img {
    max-width: 100%;
    height: auto;
}

/* Footer columns and contact details */
footer .row > [class*="col-"] {
    min-width: 0;
}

footer .footer-text,
footer .footer-distance-numbers,
footer .footer-number-list a,
footer a {
    overflow-wrap: anywhere;
}

footer .footer-number-list {
    padding-right: 0;
}

footer .tarnama-logo img {
    max-width: 100%;
    height: auto;
}

/* Tablet and phone layout */
@media (max-width: 991.98px) {
    .container,
    .container-fluid {
        max-width: 100%;
    }

    .product-container {
        margin-bottom: 36px;
    }

    .product-container h2 {
        margin: 28px 0;
        font-size: clamp(1.15rem, 4vw, 1.6rem);
        line-height: 1.6;
    }

    .home-topnews #home-topnews .swiper-slide {
        height: clamp(235px, 58vw, 430px);
    }

    .home-topnews .elementor-column-wrap {
        padding: 18px 22px;
    }

    .home-topnews .elementor-column-wrap h1,
    .home-topnews .elementor-column-wrap h2 {
        font-size: clamp(1rem, 3.2vw, 1.6rem) !important;
        margin-bottom: 8px;
    }

    .home-topnews .elementor-column-wrap p {
        font-size: clamp(0.72rem, 2vw, 0.95rem) !important;
        margin-bottom: 4px;
    }

    .home-topnews .content-container {
        display: none;
    }

    .specialized-sections .specialized-sections-stuff {
        padding: 22px 16px;
    }

    .specialized-sections .specialized-sections-titr {
        margin-left: 0 !important;
    }

    .dentists .swiper-button-next {
        right: 0 !important;
    }

    .dentists .swiper-button-prev {
        left: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .home-topnews #home-topnews .swiper-slide {
        height: clamp(220px, 68vw, 330px);
    }

    .home-topnews .elementor-column-wrap {
        padding: 14px 18px;
        justify-content: center;
    }

    .home-topnews .elementor-column-wrap h1,
    .home-topnews .elementor-column-wrap h2 {
        font-size: clamp(0.95rem, 4vw, 1.25rem) !important;
        line-height: 1.5;
    }

    .home-topnews .elementor-column-wrap p {
        font-size: clamp(0.68rem, 2.8vw, 0.82rem) !important;
        line-height: 1.5;
    }

    .home-topnews .swiper-button-next,
    .home-topnews .swiper-button-prev {
        display: none;
    }

    .product-container {
        padding-inline: 8px;
    }

    .product-container > .row {
        margin-inline: -4px;
    }

    .product-container > .row > [class*="col-"] {
        padding-inline: 4px;
    }

    .product-wrapper {
        height: 190px;
        margin: 6px 0 !important;
    }

    .product-wrapper .front-content {
        padding: 10px !important;
    }

    .product-wrapper .front-content h4,
    .product-wrapper .front-content h5 {
        font-size: 0.78rem !important;
        line-height: 1.55;
        margin-bottom: 0;
    }

    .product-wrapper .hidden-content {
        padding: 9px !important;
        font-size: 0.72rem;
        line-height: 1.55;
    }

    .swiper-box-1 .img-thumb {
        height: clamp(130px, 42vw, 190px);
        padding: 5px;
    }

    .swiper-box-1 .b-titr,
    .swiper-box-1 .b-titr h4 {
        font-size: 0.78rem;
        line-height: 1.65;
        min-height: 0;
    }

    .specialized-sections .specialized-sections-stuff {
        align-items: stretch !important;
    }

    .specialized-sections .specialized-sections-stuff .article-view-title h2 {
        font-size: 1.2rem;
    }

    .specialized-sections .specialized-sections-titr h3 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .dentists .dentists-news-image {
        padding: 10px !important;
    }

    .dentists .dentists-news-titr h3,
    .dentists .dentists-news-titr a {
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .dentists .dentists-news-lead h5 {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .article .row > [class*="col-"] {
        padding-inline: 0 !important;
        margin-bottom: 18px;
    }

    .article .article-news-titr a {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .article .article-news-lead h5 {
        font-size: 0.8rem;
        line-height: 1.8;
    }

    .appointment {
        padding-bottom: 18px;
    }

    .appointment .container {
        padding-inline: 14px;
    }

    .appointment .appointment-view-title {
        font-size: 1.1rem;
    }

    .appointment .appointment-form-stuff > [class*="col-"] {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    .appointment .appointment-form-stuff label {
        padding: 12px;
    }

    .appointment .appointment-form-stuff input,
    .appointment .appointment-form-stuff select {
        min-height: 48px;
        max-height: none;
        font-size: 0.9rem;
    }

    .appointment .appointment-form-stuff button {
        width: 100% !important;
        min-height: 46px;
    }

    footer .footer-number-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
    }

    footer .footer-number-list li {
        min-width: 0;
    }

    .consultation-modal-wrapper .modal-dialog {
        width: auto;
        max-width: none;
        margin: 12px;
    }

    .consultation-modal-wrapper .modal-content,
    .consultation-modal-wrapper .modal-body,
    .consultation-modal-wrapper .modal-body .container-fluid {
        min-width: 0;
        max-width: 100%;
    }

    .consultation-modal-wrapper .modal-body .input-group {
        flex-wrap: nowrap;
        min-width: 0;
    }

    .consultation-modal-wrapper .modal-body .input-group .form-control {
        min-width: 0;
    }

    .scrollup {
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 380px) {
    header .mobile-nav {
        gap: 7px;
        padding-inline: 9px !important;
    }

    header .mobile-nav .header-logo {
        max-width: 54vw;
        max-height: 46px;
    }

    .home-topnews #home-topnews .swiper-slide {
        height: 220px;
    }

    .home-topnews .elementor-column-wrap {
        padding: 10px 12px;
    }

    .product-wrapper {
        height: 178px;
    }

    .product-wrapper .front-content h4,
    .product-wrapper .front-content h5 {
        font-size: 0.72rem !important;
    }
}
