/*
 * Targeted image framing fixes (loaded site-wide from Views/Shared/HomeLayout.cshtml).
 * Only images that looked broken on desktop (1440px) or mobile (390px) are touched;
 * every other image keeps its original, intentional crop. Image files are not modified.
 */

/* Face was cut off (only neck/hands visible) in its card crop: keep the face in view. */
img[src*="/assets/img/institut/pigment/sonnenschutz.webp"]{object-position:55% 5% !important}
/* Contact / consultation boxes: address, opening hours and phone numbers centred (mobile and desktop). */
.lx-consult-card{
    text-align: center;
    align-items: center;
}
.lx-consult-card .lx-btn,
.lx-consult-card hr{
    align-self: stretch;
}
.lx-consult-card .lx-consult-phone{
    display: inline-flex;
    justify-content: center;
}
.lx-local-grid address{
    text-align: center;
}
/* Phone numbers never break in the middle of the number. */
main a[href^="tel:"]{
    white-space: nowrap;
}
/* Contact page action buttons ("Route planen" / "Termin anfragen"): same size, single line, no balloon shadow. */
div:has(> #branch-maps-link){
    gap: 10px !important;
    align-items: stretch;
}
div:has(> #branch-maps-link) > a.button{
    min-height: 48px;
    height: 48px;
    padding: 0 18px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px !important;
    line-height: 1 !important;
    white-space: nowrap;
    box-shadow: none !important;
    transform: none !important;
}
div:has(> #branch-maps-link) > #branch-maps-link{
    border: 1px solid var(--line, #E8DED2) !important;
}
@media (max-width: 520px){
    div:has(> #branch-maps-link){ flex-direction: column; }
    div:has(> #branch-maps-link) > a.button{ flex: 0 0 auto !important; width: 100%; }
}
/* Mobile CTA buttons: less side padding so the label fits on one line instead of a 2-line "balloon" pill. */
@media (max-width: 520px){
    main .lx-btn,
    main .lx-button{
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 14.5px !important;
        letter-spacing: 0 !important;
        line-height: 1.25 !important;
    }
    main .lx-btn,
    main .lx-button{
        text-align: center;
        justify-content: center;
    }
    main .lx-actions .lx-btn,
    main .lx-local-grid .lx-btn{
        width: 100%;
    }
    main .lx-split-pill > a{
        white-space: nowrap;
        font-size: 13.5px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        gap: 6px !important;
    }
    main .lx-split-pill > a svg,
    main .lx-split-pill > a .lx-pill-icon{
        width: 18px !important;
        height: 18px !important;
        flex: 0 0 auto;
    }
}
/* Contact page phone row: on phones list the two numbers below each other instead of "A | B" wrapping mid-number. */
@media (max-width: 520px){
    p:has(> #branch-phone-link) > span{ display: none; }
    p:has(> #branch-phone-link) > a{ display: block; }
}

/* Team portraits on the about pages (Safar Abilov, Mert Can Asici): always shown complete, never cropped. */
.lx-partner-card img{
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: clamp(340px, 42vw, 520px);
    aspect-ratio: auto !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
}

/* Language dropdown: the Tailwind utility classes in _LanguageDropdown.cshtml are not compiled on this site,
   so the menu rendered 47px wide with no item padding ("DE✓" glued to the next code). Give it real spacing. */
.vl-lang-menu{
    min-width: 92px;
    padding: 6px !important;
    border: 1px solid var(--border, #E8DED2) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 28px rgba(42, 18, 28, 0.12);
}
.vl-lang-menu > a{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    padding: 6px 12px !important;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
}
.vl-lang-menu > a + a{
    margin-top: 2px;
}
.vl-lang-menu > a:hover{
    background: #FAF6F0;
}

/* Hero info card under the photo ("Über uns · AS Skin & Medical Aesthetics · Münsterwall …"):
   lx-landing.css only styles it from 992px up, so on phones/tablets the title and address ran together
   as bare text ("Über unsAS Skin …"). Same look as the desktop card, placed under the image and centred. */
@media (max-width: 991.98px){
    .lx-hero:has(.lx-hero-visual) .lx-hero-float{
        position: static;
        display: block;
        margin-top: 12px;
        padding: 14px 18px;
        background: rgba(246, 241, 233, 0.92);
        border: 1px solid rgba(222, 211, 199, 0.85);
        border-radius: 16px;
        box-shadow: 0 16px 36px -28px rgba(36, 25, 26, 0.45);
        text-align: center;
    }
    .lx-hero:has(.lx-hero-visual) .lx-hero-float strong{
        display: block;
        font-family: var(--font-head);
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--primary-dark);
        line-height: 1.2;
    }
    .lx-hero:has(.lx-hero-visual) .lx-hero-float span{
        display: block;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 4px;
        line-height: 1.45;
    }
}

/* Contact page request form: 45px inline padding left only ~210px for the fields on phones. */
@media (max-width: 520px){
    div:has(> form#contact-consultation-form){
        padding: 26px 18px !important;
        border-radius: 20px !important;
    }
    div:has(> form#contact-consultation-form) h3{
        font-size: 26px !important;
    }
}

/* Mobile swipe rows (Ablauf steps, Google reviews): scroll-snap aligned the first card to the scrollport edge,
   so it sat flush against the screen edge while the row has a 16px / 1.5rem side gutter. Keep the gutter. */
@media (width <= 760px){
    .lxi .lx-step-grid{ scroll-padding-inline: 16px; }
    .lxi .lp-review-grid{ scroll-padding-inline: 1.5rem; }
}

/* Contact form submit on phones: ".button span{font-size:21px}" pushed the arrow of "Anfrage absenden →" onto a 2nd line. */
@media (max-width: 520px){
    div:has(> #contact-submit-btn){
        align-self: stretch;
        width: 100%;
    }
    #contact-submit-btn{
        width: 100%;
        padding: 15px 18px !important;
    }
    #contact-submit-btn span{
        font-size: 17px;
        white-space: nowrap;
    }
}

/* "Auf einen Blick" fact box (.lx-care-wrap) had no styles at all: bold sans heading and a loose list between
   serif headings and framed cards. Same card look and heading font as the surrounding .lx-card elements. */
.lx-care-wrap{
    background: var(--surface, #FBF8F3);
    border: 1px solid var(--line, #DED3C7);
    border-radius: 16px;
    padding: 22px 24px 8px;
}
.lx-care-wrap > h3{
    font-family: var(--font-head, 'Cormorant Garamond', Georgia, serif);
    font-weight: 500;
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 0 0 12px;
}

/* Home page technology table: on phones the 650px table scrolled sideways inside a 340px box and every
   row showed half-cut text ("Hautstruktur & N…"). Below 600px each row becomes a stacked block instead. */
@media (max-width: 600px){
    .method-table-wrap{ overflow: visible; }
    .method-table{ min-width: 0; }
    .method-table thead{ display: none; }
    .method-table,
    .method-table tbody,
    .method-table tr,
    .method-table th,
    .method-table td{
        display: block;
        width: 100%;
    }
    .method-table caption{ display: block; padding: 18px 20px 6px; }
    .method-table tbody tr{
        padding: 18px 20px;
        border-top: 1px solid #ece6dc;
    }
    .method-table tbody th,
    .method-table tbody td{
        padding: 0;
        border: 0;
    }
    .method-table tbody th{ font-size: 17px; }
    .method-table tbody td{ margin-top: 8px; font-size: 15px; }
}

/* Doctor photo in the "Ärztliche Qualität" section (.lx-section > .lx-arch): below 992px it became a
   full-bleed 100% block with rounded corners touching both screen edges, while the quote card right under it
   sits inside the 92% page-shell. Align the photo with the page-shell column. */
@media (max-width: 991px){
    .lx-section > .lx-arch{
        width: min(1360px, 92%);
        margin-inline: auto;
    }
}

/* "Weitere Themen" cards: titles inherited the 1.72 body line-height, so two-line titles
   ("Biostimulation & Polynukleotide") had a big gap between lines. Same box height for one-line titles. */
.lx-related-links a > strong{
    line-height: 1.2;
    margin-block: 6px;
}

/* Treatments catalogue (/de/behandlungen etc.): the global ".button span{font-size:21px}" overrode the inline
   12px of the filter buttons ("WhatsApp Beratung" huge, pagination labels huge), and one-line category names were
   left-aligned while two-line names were centred. Text follows its button; category names always left-aligned. */
main:has(#catalog-search-input) .button span{
    font-size: inherit;
    line-height: 1.3;
}
main:has(#catalog-search-input) a.button-small[href*="categoryId="] > span:first-child,
main:has(#catalog-search-input) a.button-small > span:first-child{
    text-align: left;
}

/* Contact pages: the driving-times sub-heading and the request-form title rendered in bold sans
   between serif headings. Use the site heading font like every other section title. */
#anfahrt-region h3,
div:has(> form#contact-consultation-form) h3{
    font-family: var(--font-head, 'Cormorant Garamond', Georgia, serif);
    font-weight: 500;
}
#anfahrt-region h3{ font-size: 1.6rem; line-height: 1.2; }

/* Hero rating/address box: on phones it wraps to 2-3 lines but kept a 999px pill radius, so it looked like an
   inflated oval glued to the photo below. Card radius and a small gap below on narrow screens. */
@media (max-width: 991px){
    .lx-trust-row{
        border-radius: 18px !important;
        margin-bottom: 14px;
    }
}

/* Home page section intros ("Alle Hautthemen entdecken", "Alle Beiträge lesen"): side by side on desktop,
   but stacked on phones the link sat 3px under the heading. */
@media (max-width: 767px){
    .section-intro > .text-link{
        display: inline-block;
        margin-top: 16px;
    }
}
