/* ==========================================================================
   WebSiteTheme — clean, modern light theme for medical care & cosmetology
   ========================================================================== */

:root {
    /* Light palette only */
    --color-bg: #ffffff;
    --color-surface: #f5faf9;
    --color-surface-2: #eaf4f3;
    --color-text: #1f2a37;
    --color-heading: #0f1b2d;
    --color-muted: #5b6776;
    --color-border: #e7edf1;

    /* Calm clinical teal + soft rose accent (spa/cosmetology) */
    --color-primary: #0fb5ad;
    --color-primary-hover: #0a948d;
    --color-primary-soft: #e6f7f5;
    --color-primary-contrast: #ffffff;
    --color-card: #ffffff;
    --color-accent: #e98aa6;

    --container-max: 1180px;
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 10px;

    /* shadow tint is editable (Admin → Design → Shadow color) */
    --shadow-color: #0f1b2d;
    /* colored button shadow: auto-follows the button (primary) color unless overridden */
    --color-btn-shadow: var(--color-primary);
    --shadow-sm: 0 1px 2px color-mix(in srgb, var(--shadow-color) 5%, transparent), 0 2px 6px color-mix(in srgb, var(--shadow-color) 6%, transparent);
    --shadow-md: 0 8px 24px color-mix(in srgb, var(--shadow-color) 9%, transparent);
    --shadow-lg: 0 18px 48px color-mix(in srgb, var(--shadow-color) 13%, transparent);

    --header-height: 72px;

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Poppins", var(--font-body);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Clip any full-bleed (100vw) spill so it never adds a horizontal scrollbar.
       `clip` (not `hidden`) keeps the sticky header + vertical scroll working. */
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe, embed, object, canvas { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 600;
    color: var(--color-heading);
    letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; }

.lead { font-size: 1.2rem; color: var(--color-muted); }
.text-center { text-align: center; }
.muted { color: var(--color-muted); }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: clamp(1.1rem, 4vw, 2rem);
}

/* ---------- Header contact info (inside header-top) ---------------------- */

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    text-align: left;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--color-muted);
}
.header-contact .hu { display: inline-flex; align-items: center; gap: .4rem; }
.header-contact .hu svg { width: 14px; height: 14px; color: var(--color-primary); flex: none; }
.header-contact a { color: var(--color-muted); }
.header-contact a:hover { color: var(--color-primary-hover); }
@media (max-width: 1024px) { .header-contact { display: none; } }

/* ---------- Header / Navigation ------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--color-border);
}

/* Two-row header: brand + language on top (aligned to the body width), wide menu below */
.site-header > .nav-inner { max-width: 1640px; }

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-heading);
}

.brand:hover { color: var(--color-primary); }

.brand::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    flex: none;
}

/* Custom uploaded logo (Admin → Settings → General): logo replaces the gradient mark,
   but the site-name text stays next to it. */
.brand--logo::before { display: none; }
.brand-logo { display: block; height: 44px; width: auto; flex: none; }

.header-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-card);
    color: var(--color-heading);
    cursor: pointer;
}

.nav-toggle svg { display: block; }

/* Orchard menu shape renders ul > li > a. */
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav li { margin: 0; position: relative; }

.site-nav a {
    display: block;
    padding: .55rem .85rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 500;
    font-size: .95rem;
    white-space: nowrap;
}

.site-nav a:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}

/* current page / section highlight (set by site.js) */
.site-nav a.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-weight: 700;
}
.site-nav li.is-active-trail > a { color: var(--color-primary-hover); font-weight: 700; }

/* ===== Desktop: full-width horizontal menu row ===== */
.nav-toggle { display: none; }

.site-nav {
    border-top: 1px solid var(--color-border);
}

/* Match the wide header-top container (1640) instead of the default 1180. */
.site-header .nav-inner { max-width: 1640px; }

/* Desktop: menu fills the row, search sits at the right. */
@media (min-width: 1025px) {
    .nav-inner {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    .nav-menu { flex: 1 1 auto; min-width: 0; }
    .site-search { flex: 0 0 auto; }
}

.nav-menu > nav > ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: 52px;
}

.nav-menu > nav > ul > li > a { font-weight: 600; }

.site-nav li:has(ul) > a::after {
    content: " \25BE";
    font-size: .8em;
    opacity: .7;
}

/* Sub-menus drop down on hover */
.site-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    flex-direction: column;
    min-width: 250px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: .4rem;
    z-index: 60;
}
@media (min-width: 1025px) {
    .site-nav li:hover > ul,
    .site-nav li:focus-within > ul { display: flex; }
}

/* ===== Mobile: collapse the menu row into a hamburger panel ===== */
/* language links inside the mobile menu (desktop uses the header dropdown) */
.nav-lang { display: none; }

@media (max-width: 1024px) {
    .nav-toggle {
        display: inline-flex;
    }

    /* hide the header language dropdown; show the language links inside the menu */
    .header-actions > .lang-switch { display: none; }
    .nav-lang {
        display: flex;
        gap: .5rem;
        align-items: center;
        padding: .85rem 0 .35rem;
        margin-top: .5rem;
        border-top: 1px solid var(--color-border);
    }
    .nav-lang a {
        padding: .4rem .9rem;
        border-radius: var(--radius-sm);
        font-family: var(--font-head);
        font-weight: 600;
        color: var(--color-muted);
        background: var(--color-primary-soft);
    }
    .nav-lang a.is-active { color: var(--color-primary-contrast); background: var(--color-primary); }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--header-height);
        background: var(--color-card);
        border-top: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        display: none;
    }
    .site-nav.is-open { display: block; z-index: 51; }

    /* dim the page behind the open mobile menu for readability */
    body.is-nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 27, 45, .45);
        z-index: 40;
    }
    /* keep the header itself undimmed (it's translucent, so make it solid while open) */
    body.is-nav-open .site-header {
        background: var(--color-card);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .nav-menu > nav > ul {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: .1rem;
        min-height: 0;
        padding-block: .75rem;
    }

    /* Sub-menus collapsed by default; tap the parent to expand (caret shows state) */
    .site-nav li:has(ul) > a::after { content: " \25BE"; opacity: .55; }
    .site-nav li.is-expanded > a::after { content: " \25B4"; }
    .site-nav ul ul {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 1rem;
        min-width: 0;
    }
    .site-nav li.is-expanded > ul { display: flex; }
}

/* ---------- Global site search ------------------------------------------- */

/* Search icon button in the header bar */
.search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: none;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-card);
    color: var(--color-heading);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.search-trigger:hover { color: var(--color-primary-hover); border-color: var(--color-primary); background: var(--color-primary-soft); }

/* Full-screen Spotlight-style search overlay */
.search-overlay[hidden] { display: none; }
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(1rem, 12vh, 9rem) 1rem 1rem;
}
.search-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    -webkit-backdrop-filter: blur(30px) saturate(130%);
    backdrop-filter: blur(30px) saturate(130%);
    animation: search-fade .15s ease;
}
.search-overlay-panel {
    position: relative;
    z-index: 1;
    width: min(640px, 94vw);
    animation: search-pop .18s ease;
}
@keyframes search-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes search-pop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.search-overlay-box {
    display: flex;
    align-items: center;
    gap: .7rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    padding: .85rem 1.1rem;
}
.search-overlay-icon { color: var(--color-muted); flex: none; }
.search-overlay-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-family: var(--font-head);
    font-size: 1.3rem;
    color: var(--color-heading);
}
.search-overlay-input::-webkit-search-cancel-button { display: none; }
.search-overlay-close {
    flex: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-muted);
    font-family: var(--font-head);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    padding: .2rem .5rem;
    cursor: pointer;
}
.search-overlay-close:hover { color: var(--color-primary-hover); border-color: var(--color-primary); }

.search-overlay-results {
    margin-top: .6rem;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    padding: .4rem;
}
.search-overlay-results:empty { display: none; }

.search-result {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .6rem .75rem;
    border-radius: 22px;
    color: inherit;
    text-decoration: none;
}
.search-result:hover,
.search-result.is-active { background: var(--color-primary-soft); text-decoration: none; }
.sr-top { display: flex; align-items: center; gap: .5rem; }
.sr-type {
    flex: none;
    font-family: var(--font-head);
    font-size: .66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--color-primary-hover);
    background: var(--color-primary-soft);
    padding: .1rem .4rem;
    border-radius: 6px;
}
.sr-title { font-weight: 600; color: var(--color-heading); font-size: .98rem; }
.sr-snippet { font-size: .82rem; color: var(--color-muted); line-height: 1.4; }
.search-overlay-results mark {
    background: transparent;
    color: var(--color-primary-hover);
    font-weight: 700;
    padding: 0;
}
.search-empty, .search-loading { padding: .8rem .85rem; color: var(--color-muted); font-size: .9rem; }

@media (max-width: 560px) {
    .search-overlay { padding-top: 1rem; }
    .search-overlay-input { font-size: 1.1rem; }
}

/* ---------- Buttons ------------------------------------------------------- */

.btn,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--color-btn-shadow) 28%, transparent);
}
.btn:hover {
    background: var(--color-primary-hover);
    color: var(--color-primary-contrast);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-hover);
    border-color: var(--color-border);
}
.btn-outline:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

/* full-width button (inserted via the editor "Insert button" tool) */
.btn-block { display: flex; width: 100%; }

/* keep editor-inserted buttons looking like buttons inside content bodies */
:is(.prose, .page-content, .news-article, .doctor-cv, .dept-intro) a.btn,
:is(.prose, .page-content, .news-article, .doctor-cv, .dept-intro) a.btn-outline { text-decoration: none; }
:is(.prose, .page-content, .news-article, .doctor-cv, .dept-intro) a.btn { color: var(--color-primary-contrast); }
:is(.prose, .page-content, .news-article, .doctor-cv, .dept-intro) a.btn-outline { color: var(--color-primary-hover); }

.nav-cta {
    padding: .55rem 1.15rem;
    font-size: .92rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--color-btn-shadow) 28%, transparent);
}
.nav-cta:hover { transform: translateY(-1px); }

/* On small screens shorten to just an icon-less compact label so it still fits */
@media (max-width: 520px) {
    .nav-cta { padding: .5rem .8rem; font-size: .82rem; }
}

/* Language switcher (dropdown) */
.lang-switch {
    position: relative;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    margin-right: .25rem;
}
.lang-switch > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .55rem;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    user-select: none;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::marker { content: ""; }
.lang-switch > summary:hover { color: var(--color-primary-hover); background: var(--color-primary-soft); }
.lang-caret { transition: transform .15s ease; }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
    position: absolute;
    top: calc(100% + .25rem);
    right: 0;
    z-index: 60;
    min-width: 4.5rem;
    margin: 0;
    padding: .25rem;
    list-style: none;
    background: var(--color-card);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.lang-menu li { margin: 0; }
.lang-menu a {
    display: block;
    padding: .35rem .6rem;
    border-radius: 6px;
    color: var(--color-muted);
}
.lang-menu a:hover { text-decoration: none; color: var(--color-primary-hover); background: var(--color-primary-soft); }
.lang-menu a.is-active { color: var(--color-primary-hover); background: var(--color-primary-soft); }

/* ---------- Main content -------------------------------------------------- */

.site-main {
    flex: 1 0 auto;
    padding-top: clamp(.875rem, 2vw, 1.625rem);
    padding-bottom: clamp(1.75rem, 4vw, 3.25rem);
}

.site-main > * + * { margin-top: 1.25rem; }

.site-main ul,
.site-main ol { padding-left: 1.25rem; }

.site-main blockquote {
    margin: 1.5rem 0;
    padding: .75rem 1.5rem;
    border-left: 4px solid var(--color-primary);
    color: var(--color-muted);
    background: var(--color-surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 3vw, 2.8rem) clamp(2.5rem, 4vw, 4.5rem);
    background:
        radial-gradient(120% 120% at 100% 0%, var(--color-primary-soft) 0%, transparent 55%),
        linear-gradient(160deg, var(--color-card) 0%, var(--color-surface) 100%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 52ch; margin-bottom: 1.75rem; overflow-wrap: break-word; }
/* on small screens let the title use full width so JS can shrink a too-long word to fit */
@media (max-width: 600px) { .hero h1 { max-width: none; } }

/* hero card disabled: hide the whole hero (card + title + icon) */
.hero--bare { display: none; }

/* keep title/text above the decorative icon */
.hero > h1,
.hero > .lead,
.hero > .eyebrow { position: relative; z-index: 1; }

/* per-page representative icon on the right (opacity set inline per page) */
.hero-icon {
    position: absolute;
    right: clamp(1rem, 4vw, 3rem);
    top: 50%;
    transform: translateY(-50%);
    height: clamp(90px, 15vw, 168px);
    width: auto;
    max-width: 40%;
    object-fit: contain;
    z-index: 0;
    pointer-events: none;
}
@media (max-width: 560px) { .hero-icon { height: 64px; right: .75rem; } }

/* price-list hero: the service-search box lives inside the hero card.
   (scoped under .hero--search so it beats the later, generic .price-search rules) */
.hero--search h1 { margin-bottom: 0; }
.hero--search .hero-search {
    position: relative;     /* sit above the decorative hero icon */
    z-index: 1;
    margin: 1.4rem 0 0;     /* override .price-search auto-centering */
    max-width: 520px;
    width: 100%;
}
.hero--search .hero-search input { box-shadow: var(--shadow-sm); }
@media (max-width: 560px) {
    .hero--search .hero-search { margin-top: 1.1rem; max-width: none; }
    /* keep the decorative icon from crowding the input on small screens */
    .hero--search .hero-icon { opacity: 0 !important; }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-primary-hover);
    background: var(--color-primary-soft);
    padding: .35rem .85rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}

/* ---------- Sections & grids ---------------------------------------------- */

/* sections: no top padding, full bottom */
.section {
    padding-top: 0;
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head {
    max-width: 60ch;
    margin: 0 auto 2rem;
    text-align: center;
}

.grid { display: grid; gap: 1.5rem; }

@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card h3 { margin-bottom: .35rem; }
.card p { margin-bottom: 0; color: var(--color-muted); }

.card .icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Soft band to break up the page */
.band {
    background: var(--color-surface-2);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 3rem);
}

/* Hero with a background image (developer template variant) */
.hero--image {
    background-size: cover;
    background-position: center;
    color: var(--color-primary-contrast);
    border: none;
}
.hero--image h1,
.hero--image .eyebrow { color: var(--color-primary-contrast); }
.hero--image .eyebrow { background: rgba(255, 255, 255, .18); }
.hero--image .lead { color: rgba(255, 255, 255, .92); }

/* Constrained, readable body text for authored content */
.prose { max-width: none; }
.prose > * + * { margin-top: 1rem; }
.prose img { border-radius: var(--radius); margin-block: 1rem; }

/* Service cards rendered as links */
a.service-card {
    display: block;
    color: inherit;
    text-decoration: none;
}
a.service-card:hover { text-decoration: none; }
a.service-card h3 { color: var(--color-heading); }
a.service-card p { color: var(--color-muted); }

/* ---------- Contact form widget ------------------------------------------ */

.contact-section { background: var(--color-surface); }
.contact-card {
    max-width: 820px;
    margin: 30px auto 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    box-shadow: var(--shadow-sm);
}
.contact-card h2 { text-align: center; margin-bottom: .25rem; }
.contact-card .lead { text-align: center; }
.contact-form { margin-top: 1.5rem; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .cf-grid { grid-template-columns: repeat(3, 1fr); } }
.cf-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; font-weight: 500; font-size: .95rem; }
.cf-field span { color: var(--color-heading); }
.cf-field input,
.cf-field textarea {
    font: inherit;
    padding: .7rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-card);
    color: var(--color-text);
    width: 100%;
}
.cf-field input:focus,
.cf-field textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.cf-field textarea { resize: vertical; }
.cf-recaptcha { margin-bottom: 1rem; display: flex; justify-content: center; }
/* reCAPTCHA v3: hide Google's floating badge. Permitted as long as the attribution
   text (.recaptcha-tos, rendered under the forms) is shown instead. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-tos { margin: .6rem 0 0; font-size: .72rem; line-height: 1.4; color: var(--color-muted); text-align: center; }
.recaptcha-tos a { color: inherit; text-decoration: underline; }
.cf-actions { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.cf-actions .btn { min-width: 220px; }
.cf-msg { margin: 0; font-weight: 500; }
.cf-ok { color: var(--color-primary-hover); }
.cf-err { color: #b42318; }

/* ---------- Home: partners & awards -------------------------------------- */

.partners-section .section-intro,
.awards-section .section-intro {
    margin: -.25rem 0 1.5rem;
    color: var(--color-muted);
}

/* Auto-sliding tracks (marquee). Cloned set + translateX(-50%) gives a seamless loop. */
[data-partners], [data-awards] { overflow: hidden; }

.partners-track, .awards-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 1.25rem;
}
.partners-track.is-marquee, .awards-track.is-marquee {
    animation: we-marquee linear infinite;
}
.partners-track.is-marquee:hover, .awards-track.is-marquee:hover {
    animation-play-state: paused;
}
@keyframes we-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .partners-track.is-marquee, .awards-track.is-marquee { animation: none; }
    [data-partners], [data-awards] { overflow-x: auto; }
}

.partner-card {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 12px);
    padding: 1rem;
    transition: box-shadow .2s ease, transform .2s ease;
}
.partner-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    margin-bottom: .75rem;
}
.partner-logo img { max-width: 100%; max-height: 90px; object-fit: contain; }

.partner-info { display: flex; flex-direction: column; gap: .15rem; margin-top: auto; }
.partner-name { font-weight: 600; color: var(--color-heading, var(--color-text)); }
.partner-cat { font-size: .82rem; color: var(--color-muted); line-height: 1.35; }

.award-card {
    flex: 0 0 340px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 12px);
    padding: 1rem;
}
.award-img { flex: none; width: 72px; display: flex; justify-content: center; }
.award-img img { max-width: 72px; max-height: 120px; object-fit: contain; }
.award-desc { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--color-text); }

@media (max-width: 560px) {
    .partner-logo { height: 70px; }
    .partner-card { flex: 0 0 70vw; }
    .award-card { flex: 0 0 80vw; flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- Back to top --------------------------------------------------- */

.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: .92;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.back-to-top:hover { opacity: 1; transform: translateY(-2px); background: var(--color-primary-hover); }
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .back-to-top { bottom: 1rem; right: 1rem; width: 42px; height: 42px; } }

/* ---------- Footer -------------------------------------------------------- */

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    padding-block: 2rem;
    color: var(--color-muted);
    font-size: .95rem;
}

.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-primary); }

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Page body: readable text, full-width grids -------------------- */

/* Constrain only flowing text to a readable measure; let grids use full width. */
.page-content > :where(p, h2, h3, h4, ul, ol, blockquote, table, figure, iframe, img) {
    max-width: none;
}
.page-content > * + * { margin-top: 1rem; }
.page-content img { border-radius: var(--radius); }
.page-content > .team-grid,
.page-content > .news-grid { max-width: none; }
.page-content > h2 { margin-top: .5rem; }

/* full-width body (e.g. Cursuri pages) — no readable-column cap */
.page-content--wide > :where(p, h2, h3, h4, ul, ol, blockquote, table, figure, iframe, img) { max-width: none; }

/* ---------- Overflow containment (permanent) -----------------------------
   No content inside a body area may ever exceed the container width — images,
   tables, embeds, wide wrappers and long unbreakable strings are all clamped.
   Content-scoped so it never touches full-bleed sections (carousel, marquees). */
:is(.page-content, .page-content--wide, .prose, .news-article, .doctor-cv, .dept-intro, .contact-card) {
    overflow-wrap: break-word;
}
:is(.page-content, .page-content--wide, .prose, .news-article, .doctor-cv, .dept-intro, .contact-card) * {
    max-width: 100%;
}
:is(.page-content, .page-content--wide, .prose, .news-article, .doctor-cv, .dept-intro) table {
    table-layout: fixed;
    width: 100%;
}

/* contact page map */
.contact-map {
    width: 100%;
    height: 440px;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: block;
}

/* ---------- Department intro (description + common images) ---------------- */

.dept-intro { margin-bottom: 2.5rem; }
.dept-intro :where(p, h2, h3, h4, ul, ol, blockquote) { max-width: none; }
.dept-intro > * + * { margin-top: 1rem; }
.page-content > .dept-intro { max-width: none; }

/* Department intro images collected into a uniform responsive gallery */
.dept-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .85rem;
    margin-top: 1.5rem;
}
.dept-gallery img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 0;
    cursor: zoom-in;
    transition: transform .15s ease, box-shadow .15s ease;
}
.dept-gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- About page (despre-companie) --------------------------------- */

.about-message {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 760px) {
    .about-message { grid-template-columns: 260px 1fr; align-items: start; }
}
.about-portrait {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}
.about-text > :where(p, h2) { max-width: none; }
.about-text > * + * { margin-top: 1rem; }
.about-sign-img { max-height: 56px; width: auto; margin: 0 0 .25rem; box-shadow: none; }
.about-sign { color: var(--color-muted); line-height: 1.5; }

.values-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    margin: 1.25rem 0 2.5rem;
}
@media (min-width: 600px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-sm);
}
.value-card h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--color-primary-hover); }
.value-card p { margin: 0; font-size: .95rem; color: var(--color-text); }

.timeline { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.timeline td { padding: .65rem .9rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.timeline td p { margin: 0 0 .4rem; }
.timeline td p:last-child { margin-bottom: 0; }
.timeline tr td:first-child {
    width: 96px;
    font-weight: 700;
    color: var(--color-primary-hover);
    font-family: var(--font-head);
    white-space: nowrap;
}

/* ---------- News grid ----------------------------------------------------- */

.news-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 600px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.news-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--color-surface-2); }
.news-card .news-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .4rem; }
.news-card .news-date { font-size: .85rem; color: var(--color-muted); font-weight: 600; }
.news-card h3 { font-size: 1.1rem; margin: 0; color: var(--color-heading); }
.news-card p { margin: 0; color: var(--color-muted); font-size: .95rem; }

/* Home news strip (horizontal, lazy-loaded; ~3 visible) */
.news-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.news-strip-head h2 { margin: 0; }
.news-strip {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
.news-strip::-webkit-scrollbar { height: 8px; }
.news-strip::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }
.news-strip-card {
    flex: 0 0 clamp(260px, calc((100% - 3rem) / 3), 400px);
    scroll-snap-align: start;
}
.news-strip-loading { color: var(--color-muted); padding: 2rem 0; flex: none; align-self: center; }

/* Home "Departamente" section: departments-menu rendered as a card grid */
.departments-section .menu {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .departments-section .menu { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .departments-section .menu { grid-template-columns: repeat(3, 1fr); } }
.departments-section .menu > li {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.departments-section .menu > li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.departments-section .menu > li > a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.18rem;
    color: var(--color-heading);
    display: block;
    margin-bottom: .85rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--color-border);
}
.departments-section .menu > li > a:hover { color: var(--color-primary); }
.departments-section .menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.departments-section .menu ul a { color: var(--color-muted); font-size: .96rem; }
.departments-section .menu ul a::before { content: "\203A"; color: var(--color-primary); margin-right: .45rem; font-weight: 700; }
.departments-section .menu ul a:hover { color: var(--color-primary-hover); }

.news-article { max-width: none; }
.news-article .news-date { color: var(--color-muted); font-weight: 600; margin-bottom: 1rem; }
.news-article-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }

/* ---------- Home carousel ------------------------------------------------- */

.carousel {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background: var(--color-surface-2);
}
.carousel-track { display: flex; transition: transform .55s ease; }
.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    height: clamp(300px, 44vw, 580px);
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(15, 27, 45, .65) 0%, rgba(15, 27, 45, .2) 55%, transparent 100%);
    color: var(--color-primary-contrast);
}
.carousel-caption .container { width: 100%; }
.carousel-caption h2 { color: var(--color-primary-contrast); font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem); max-width: 20ch; margin-bottom: .5rem; }
.carousel-caption p { color: rgba(255, 255, 255, .92); font-size: clamp(1rem, .9rem + .5vw, 1.25rem); max-width: 48ch; margin-bottom: 1.25rem; }
.carousel-cta { background: var(--color-card); color: var(--color-primary-hover); }
.carousel-cta:hover { background: var(--color-primary); color: var(--color-primary-contrast); }
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border: none; border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    color: var(--color-heading);
    cursor: pointer;
    display: grid; place-items: center;
    box-shadow: var(--shadow-md);
}
.carousel-nav svg { width: 24px; height: 24px; display: block; }
.carousel-nav:hover { background: var(--color-card); }
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }
.carousel-dots { position: absolute; bottom: 1rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.carousel-dots button.is-active { background: var(--color-card); transform: scale(1.15); }
@media (max-width: 600px) {
    .carousel-caption { background: linear-gradient(0deg, rgba(15, 27, 45, .8), rgba(15, 27, 45, .25)); align-items: flex-end; padding-bottom: 2.5rem; }
    /* hide arrows on mobile — swipe to change slides */
    .carousel-nav { display: none; }
}

/* ---------- Employee / doctor grid (3 / 2 / 1 responsive) ----------------- */

.team-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;            /* 1 column on small screens */
}
@media (min-width: 600px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }  /* 2 */
@media (min-width: 920px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }  /* 3 (capped) */

.team-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.team-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top;            /* portraits: keep the head/top visible */
    background: var(--color-surface-2);
}
.team-card h3 {
    margin: 1rem 1.25rem .25rem;
    font-size: 1.15rem;
    color: var(--color-heading);
}
.team-card p {
    margin: 0 1.25rem 1.25rem;
    color: var(--color-muted);
    font-size: .95rem;
}

/* ---------- Doctor profile ------------------------------------------------ */

.doctor-back { display: inline-block; margin-bottom: 1rem; font-weight: 600; }
.doctor-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    align-items: center;
    margin-bottom: 2rem;
}
.doctor-photo {
    width: 240px;
    height: 240px;
    object-fit: cover;
    object-position: top;            /* portraits: keep the head/top visible */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex: none;
}
.doctor-headtext { flex: 1 1 280px; }
.doctor-headtext h1 { margin-bottom: .35rem; }
.doctor-position {
    font-size: 1.15rem;
    color: var(--color-primary-hover);
    font-weight: 600;
    margin-bottom: 1.1rem;
}
.doctor-cta { margin-top: .25rem; }
.doctor-cv { max-width: none; }
.doctor-cv p { margin-bottom: .85rem; }

/* ---------- Gallery ------------------------------------------------------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: zoom-in;
}
.gallery-grid img:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-lg);
}
.gallery-grid p { margin: 0; display: contents; }
.gallery-item { margin: 0; }
.gallery-item.is-hidden { display: none; }

/* ---------- Price list + department filter -------------------------------- */

/* sticky, centered filter + search bar (top offset set by JS to the header height) */
.price-controls {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--color-bg);
    padding-block: .85rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--color-border);
}

.price-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* price list search box */
.price-search {
    position: relative;
    margin: 0 auto;
    max-width: 460px;
}
.price-search svg {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-muted);
    pointer-events: none;
}
.price-search input {
    width: 100%;
    padding: .7rem 1rem .7rem 2.6rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font: inherit;
    background: var(--color-card);
}
.price-search input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.price-chip {
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.price-chip:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.price-chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-primary-contrast);
}

.price-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-card);
    box-shadow: var(--shadow-sm);
}
.price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.price-row:last-child { border-bottom: 0; }
.price-row:nth-child(even) { background: var(--color-surface); }
.price-row.is-hidden { display: none; }
.price-name { font-weight: 500; }
.price-val {
    flex: none;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-primary-hover);
    white-space: nowrap;
}
.price-empty { text-align: center; color: var(--color-muted); padding: 1.5rem; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(15, 27, 45, .85);
    cursor: zoom-out;
}
.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* ---------- Careers: job cards ------------------------------------------- */

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}
.job-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius, 14px);
    padding: 1.5rem;
    overflow: hidden; /* clip the colored title band to the rounded corners */
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .08));
}
.job-card .job-title {
    /* colored header band: break out of the card padding and fill the top edge */
    margin: -1.5rem -1.5rem 1rem;
    padding: 1rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-size: 1.15rem;
    line-height: 1.25;
    /* uniform band height across all cards (fits up to ~2 lines), title centered */
    min-height: 5rem;
    display: flex;
    align-items: center;
}
.job-card .job-subtitle {
    margin: 0 0 .75rem;
    font-weight: 600;
    color: var(--color-muted);
}
.job-card .job-desc {
    font-size: .92rem;
    color: var(--color-text, #374151);
}
.job-card .job-desc p { margin: 0 0 .6rem; }
.job-card .job-desc :last-child { margin-bottom: 0; }
.job-card .job-actions {
    margin-top: auto;
    padding-top: 1.25rem;
}
.job-card .job-actions .btn { width: 100%; }

/* ---------- Apply-for-a-job modal --------------------------------------- */

/* Lock scrolling behind the modal. The page scrolls on <html> (because of overflow-x:clip),
   so we must lock html too — body alone is not enough. */
html.is-modal-open,
body.is-modal-open { overflow: hidden; }
/* Hide the "scroll to top" button while the modal is open (it would float over the card). */
body.is-modal-open .back-to-top { display: none !important; }

.apply-modal[hidden] { display: none; }
.apply-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;                 /* above the back-to-top button */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;  /* don't chain scroll to the page behind */
}
.apply-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.apply-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    margin: auto;
    background: var(--color-card);
    border-radius: var(--radius, 14px);
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, .25));
}
.apply-x {
    position: absolute;
    top: .5rem;
    right: .65rem;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--color-muted);
    cursor: pointer;
}
.apply-x:hover { color: var(--color-primary-hover, var(--color-primary)); }
.apply-heading { margin: 0 0 .25rem; font-size: 1.3rem; }
.apply-jobline {
    margin: 0 0 1rem;
    font-weight: 600;
    color: var(--color-primary-hover, var(--color-primary));
}
.apply-cardtext { margin: 0 0 1rem; color: var(--color-muted); font-size: .92rem; }
.apply-note {
    margin: -.25rem 0 .25rem;
    font-size: .82rem;
    color: var(--color-muted);
}
.apply-recaptcha { margin: .25rem 0 .5rem; }

/* styled, localized file picker (native button text is browser-locale only, so we hide it) */
.apply-file-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .5rem;
    border: 1px dashed var(--color-border, #cbd5e1);
    border-radius: var(--radius-sm, 8px);
    background: var(--color-primary-soft, #f8fafc);
}
.apply-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.apply-file-btn {
    flex: none;
    padding: .45rem .9rem;
    border-radius: var(--radius-sm, 8px);
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s ease;
}
.apply-file-btn:hover { background: var(--color-primary-hover, var(--color-primary)); }
.apply-file-name { font-size: .88rem; color: var(--color-muted); word-break: break-all; }

/* success view (replaces the form after a successful send) */
.apply-successview { text-align: center; padding: 1.5rem .5rem .5rem; }
.apply-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7f7ed;
    color: #15803d;
    font-size: 2rem;
    line-height: 1;
}
.apply-success-text { font-size: 1.05rem; margin: 0 0 1.25rem; }

/* mobile: apply modal is full-screen */
@media (max-width: 640px) {
    .apply-modal { padding: 0; }
    .apply-dialog {
        max-width: none;
        width: 100%;
        min-height: 100%;
        margin: 0;
        border-radius: 0;
    }
}

/* ---------- Validation / framework messages ------------------------------ */

.validation-summary-errors,
.field-validation-error { color: #b42318; }

/* ---------- Pachete (medical examination packages) ---------------------- */

.pachete-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}
.pachet-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.pachet-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.pachet-img { display: block; }
.pachet-img img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-surface-2);
}
.pachet-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.1rem 1.25rem 1.25rem;
}
.pachet-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--color-heading);
}
.pachet-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.pachet-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary-hover);
    white-space: nowrap;
}
/* the "buy" pill is a placeholder (no action yet) */
.pachet-buy { cursor: pointer; }
.pachet-card .pachet-buy { pointer-events: none; }   /* whole card navigates; pill is decorative */

/* ---- package detail page ---- */
.pachet-detail .pachet-back { display: inline-block; margin-bottom: 1.25rem; font-weight: 600; }
.pachet-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}
@media (min-width: 820px) { .pachet-detail-grid { grid-template-columns: minmax(0, 420px) 1fr; align-items: start; } }
.pachet-detail-media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}
.pachet-detail-title {
    margin: 0 0 .75rem;
    font-size: 1.9rem;
    line-height: 1.2;
    color: var(--color-heading);
}
.pachet-detail-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary-hover);
    margin-bottom: 1rem;
}
.pachet-detail-body { color: var(--color-text); }
.pachet-detail-body ul { margin: .5rem 0 1rem 1.1rem; }
.pachet-detail-body li { margin: .2rem 0; }
.pachet-detail-body p { margin: 0 0 .8rem; }
.pachet-detail-actions { margin-top: 1.5rem; }
.pachet-detail-actions .btn { min-width: 220px; }

/* ---------- Editor-inserted cards (we-card) + inline FontAwesome icons ------ */
.prose .we-card, .page-content .we-card, .dept-intro .we-card, .we-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-sm);
    margin: 1.25rem 0;
}
.we-card > :first-child { margin-top: 0; }
.we-card > :last-child { margin-bottom: 0; }
.we-card h3, .we-card h4 { color: var(--color-heading); }
.we-card--primary { background: var(--color-primary-soft); border-color: transparent; }
.we-card--primary h3, .we-card--primary h4 { color: var(--color-primary-hover); }
.we-card--soft { background: var(--color-surface-2); border-color: transparent; }
.we-card--accent { border-left: 4px solid var(--color-primary); }
.we-card-ic {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-size: 1.35rem;
    margin-bottom: .85rem;
    flex: none;
}
/* icon card: icon + title on one row */
.we-card-head { display: flex; align-items: center; gap: .9rem; }
.we-card-head h3 { margin: 0; }
.we-card--icon .we-card-ic { margin-bottom: 0; }
/* optional shadow / border toggles (win over the contextual .page-content/.prose base rule) */
.we-card.we-card--noshadow { box-shadow: none !important; }
.we-card.we-card--noborder { border: none !important; }
/* a card's row of links / buttons / phone numbers */
.we-card-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; align-items: center; margin-top: 1rem; }
.we-card-links a:not(.btn):not(.btn-outline) { font-weight: 600; }
/* a row/grid of cards when several are inserted side by side */
.we-card-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.25rem 0; }
.we-card-row .we-card { margin: 0; }
.we-card-row--2 { grid-template-columns: repeat(2, 1fr); }
.we-card-row--3 { grid-template-columns: repeat(3, 1fr); }
.we-card-row--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .we-card-row--3, .we-card-row--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .we-card-row--2, .we-card-row--3, .we-card-row--4 { grid-template-columns: 1fr; } }
/* inline icons in body copy sit nicely next to text */
.prose i[class*="fa-"], .page-content i[class*="fa-"], .dept-intro i[class*="fa-"] { font-style: normal; }
