.profil-page {
    --profil-page-bg: var(--md-surface, #f4f7fa);
    --profil-surface: #ffffff;
    --profil-surface-soft: var(--md-surface-container-low, #f8fafc);
    --profil-border: var(--md-surface-variant, #d8e3ef);
    --profil-text: var(--md-on-surface, #172b43);
    --profil-muted: var(--md-on-surface-variant, #64748b);
    --profil-accent: var(--md-primary, #1c64f2);
    --profil-accent-hover: var(--md-on-primary-container, #1e40af);
    --profil-accent-soft: var(--md-surface-container, #eff6ff);
    --profil-accent-border: var(--md-primary-container, #bfdbfe);
    --profil-shadow: var(--md-shadow-ambient, 0 3px 12px rgba(22, 71, 127, 0.04));
    min-height: auto;
    padding: 104px 20px 16px;
    color: var(--profil-text);
    background: var(--profil-page-bg);
}

body[data-theme="rain"] .profil-page {
    --profil-accent: var(--rain-primary, var(--md-primary, #1c64f2));
    --profil-accent-hover: var(--rain-primary-dark, #164fc4);
    --profil-accent-soft: var(--rain-primary-soft, #eaf1ff);
    --profil-accent-border: color-mix(in srgb, var(--profil-accent) 28%, transparent);
    --profil-border: var(--rain-border, var(--md-surface-variant, #d8e3ef));
    --profil-text: var(--rain-text, #172b43);
    --profil-muted: var(--rain-muted, #64748b);
}

body[data-theme="zavier"] .profil-page {
    --profil-page-bg: var(--zavier-bg, #f3f7f8);
    --profil-surface: var(--zavier-surface, #fffefa);
    --profil-surface-soft: var(--zavier-surface-soft, #f6f9f9);
    --profil-border: var(--zavier-border, #d7e3e6);
    --profil-text: var(--zavier-text, #14213d);
    --profil-muted: var(--zavier-muted, #64758a);
    --profil-accent: var(--zavier-primary, #1959c7);
    --profil-accent-hover: var(--zavier-primary-hover, #12469f);
    --profil-accent-soft: var(--zavier-primary-soft, #eaf1ff);
    --profil-accent-border: color-mix(in srgb, var(--profil-accent) 26%, transparent);
    --profil-shadow: var(--zavier-shadow, 0 4px 12px rgba(0, 0, 0, 0.05));
}

html[data-color-mode="dark"] body:not(.wcag-high-contrast) .profil-page {
    --profil-page-bg: var(--dm-canvas, #0b1120);
    --profil-surface: var(--dm-surface, #111827);
    --profil-surface-soft: var(--dm-surface-alt, #1e293b);
    --profil-border: var(--dm-border, #334155);
    --profil-text: var(--dm-text-strong, #f1f5f9);
    --profil-muted: var(--dm-muted, #94a3b8);
    --profil-accent: var(--dm-accent, #60a5fa);
    --profil-accent-hover: var(--dm-accent-hover, #93c5fd);
    --profil-accent-solid: var(--dm-accent-solid, #2563eb);
    --profil-accent-solid-hover: var(--dm-accent-solid-hover, #3b82f6);
    --profil-accent-soft: var(--dm-accent-soft, rgba(59, 130, 246, 0.16));
    --profil-accent-border: rgba(96, 165, 250, 0.35);
    --profil-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.profil-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profil-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    border-radius: 18px;
}

.profil-page-back,
.profil-page-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profil-page-back {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--profil-accent-hover, var(--profil-accent));
    background: var(--profil-accent-soft);
    border: 1px solid var(--profil-accent-border);
    border-radius: 12px;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.profil-page-back:hover,
.profil-page-back:focus {
    color: var(--md-on-primary, #ffffff);
    background: var(--profil-accent-solid, var(--profil-accent));
    border-color: var(--profil-accent-solid, var(--profil-accent));
}

.profil-page-heading-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    color: var(--profil-accent);
    background: var(--profil-accent-soft);
    border-radius: 13px;
}

.profil-page-header svg {
    width: 21px;
    height: 21px;
}

.profil-page-header h1 {
    margin: 0;
    color: var(--profil-text);
    font-size: clamp(1.3rem, 2.3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
}

.profil-page-header p {
    margin: 3px 0 0;
    color: var(--profil-muted);
    font-size: 0.86rem;
}

body[data-theme="zavier"] .profil-page-header {
    position: relative;
    padding-left: 1.15rem !important;
    border: 1px solid var(--profil-border) !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}

body[data-theme="zavier"] .profil-page-header::before {
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--zavier-accent, var(--profil-accent));
    content: "";
}

.profil-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    gap: 1.75rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    box-shadow: var(--profil-shadow);
    align-items: center;
}

.profil-hero-media {
    aspect-ratio: 16 / 10;
    max-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--profil-surface-soft);
    border: 1px solid var(--profil-border);
}

.profil-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profil-hero-media img.is-fallback {
    object-fit: contain;
    padding: 1.25rem;
    background: var(--profil-surface-soft);
}

.profil-eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.profil-eyebrow,
.profil-npp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.profil-eyebrow {
    background: var(--profil-accent-soft);
    color: var(--profil-accent);
    border: 1px solid var(--profil-accent-border);
}

.profil-npp-badge {
    background: var(--profil-surface-soft);
    color: var(--profil-text);
    border: 1px solid var(--profil-border);
}

.profil-eyebrow svg,
.profil-npp-badge svg {
    width: 15px;
    height: 15px;
}

.profil-hero-body h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.5rem, 2.5vw, 2.15rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--profil-text);
}

.profil-description {
    color: var(--profil-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.profil-wysiwyg > :first-child {
    margin-top: 0;
}

.profil-wysiwyg > :last-child {
    margin-bottom: 0;
}

.profil-wysiwyg p {
    margin: 0 0 0.75rem;
}

.profil-wysiwyg h1,
.profil-wysiwyg h2,
.profil-wysiwyg h3,
.profil-wysiwyg h4 {
    color: var(--profil-text);
    font-weight: 700;
    margin: 1rem 0 0.45rem;
    line-height: 1.3;
}

.profil-wysiwyg h2 {
    font-size: 1.2rem;
}

.profil-wysiwyg h3 {
    font-size: 1.08rem;
}

.profil-wysiwyg h4 {
    font-size: 0.98rem;
}

.profil-wysiwyg ul,
.profil-wysiwyg ol {
    margin: 0 0 0.85rem;
    padding-left: 1.25rem;
}

.profil-wysiwyg li {
    margin-bottom: 0.25rem;
}

.profil-wysiwyg blockquote {
    margin: 0.85rem 0;
    padding: 0.65rem 1rem;
    border-left: 3px solid var(--profil-accent);
    background: var(--profil-surface-soft);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--profil-text);
}

.profil-wysiwyg a {
    color: var(--profil-accent);
    text-decoration: underline;
}

.profil-wysiwyg table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.85rem 0;
    font-size: 0.9rem;
}

.profil-wysiwyg th,
.profil-wysiwyg td {
    border: 1px solid var(--profil-border);
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.profil-wysiwyg th {
    background: var(--profil-surface-soft);
    color: var(--profil-text);
    font-weight: 700;
}

.profil-muted {
    color: var(--profil-muted);
    margin: 0;
}

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

.profil-btn-primary,
.profil-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profil-btn-primary {
    background: var(--profil-accent-solid, var(--profil-accent));
    color: var(--md-on-primary, #ffffff);
}

.profil-btn-primary:hover {
    background: var(--profil-accent-solid-hover, var(--profil-accent-hover, var(--profil-accent)));
    color: var(--md-on-primary, #ffffff);
    transform: translateY(-1px);
}

.profil-btn-secondary {
    background: var(--profil-surface-soft);
    color: var(--profil-text);
    border: 1px solid var(--profil-border);
}

.profil-btn-secondary:hover {
    color: var(--profil-accent);
    border-color: var(--profil-accent-border);
}

.profil-btn-primary svg,
.profil-btn-secondary svg {
    width: 16px;
    height: 16px;
}

.profil-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.profil-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    box-shadow: var(--profil-shadow);
}

.profil-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--profil-accent-soft);
    color: var(--profil-accent);
    flex-shrink: 0;
}

.profil-stat-icon svg {
    width: 24px;
    height: 24px;
}

.profil-stat-copy small {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--profil-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profil-stat-copy strong {
    display: block;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: var(--profil-text);
    line-height: 1.2;
}

.profil-stat-copy strong.is-text-long {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    line-height: 1.3;
    word-break: break-word;
}

.profil-stat-copy span {
    display: block;
    font-size: 0.82rem;
    color: var(--profil-muted);
}

.profil-section {
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    box-shadow: var(--profil-shadow);
}

.profil-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.profil-section-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--profil-text);
}

.profil-section-header p {
    margin: 0;
    color: var(--profil-muted);
    font-size: 0.94rem;
}

.profil-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--profil-accent-soft);
    border: 1px solid var(--profil-accent-border);
    color: var(--profil-accent);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profil-section-toggle:hover,
.profil-section-toggle:focus-visible {
    background: var(--profil-accent-solid, var(--profil-accent));
    border-color: var(--profil-accent-solid, var(--profil-accent));
    color: var(--md-on-primary, #ffffff);
}

.profil-section-toggle svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.profil-section-toggle.is-expanded svg {
    transform: rotate(180deg);
}

.profil-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.profil-service-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    border-radius: 1.05rem;
    background: var(--profil-surface-soft);
    border: 1px solid var(--profil-border);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body[data-theme="zavier"] .profil-service-card {
    border-radius: 12px 4px 12px 12px;
}

.profil-service-card:hover {
    transform: translateY(-3px);
    border-color: var(--profil-accent-border);
    box-shadow: var(--profil-shadow);
}

.profil-service-card > :not(.profil-card-watermark) {
    position: relative;
    z-index: 1;
}

.profil-card-watermark {
    position: absolute;
    right: -10px;
    bottom: -12px;
    width: 88px;
    height: 88px;
    color: var(--profil-accent);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    transform: rotate(-10deg);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.profil-card-watermark svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.profil-service-card:hover .profil-card-watermark,
.profil-librarian-card:hover .profil-card-watermark {
    opacity: 0.14;
    transform: rotate(-4deg) scale(1.06);
}

@media (min-width: 769px) {
    .profil-services-grid:not(.is-expanded) .profil-service-card.is-extra-service {
        display: none;
    }
}

.profil-service-media {
    position: relative;
    height: 164px;
    overflow: hidden;
    background: var(--profil-surface);
    border-bottom: 1px solid var(--profil-border);
    flex-shrink: 0;
}

.profil-service-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--profil-text) 24%, transparent) 100%);
    pointer-events: none;
}

.profil-service-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.32s ease;
}

.profil-service-card:hover .profil-service-media img {
    transform: scale(1.04);
}

.profil-service-media-badge {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--profil-surface) 90%, transparent);
    border: 1px solid var(--profil-border);
    color: var(--profil-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--profil-shadow);
}

.profil-service-media-badge svg {
    width: 17px;
    height: 17px;
}

.profil-service-body {
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex-grow: 1;
}

.profil-service-card--has-media .profil-service-body {
    padding: 1rem 1.15rem 1.15rem;
}

.profil-service-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.profil-service-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: var(--profil-accent-soft);
    border: 1px solid var(--profil-accent-border);
    color: var(--profil-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profil-service-icon svg {
    width: 19px;
    height: 19px;
}

.profil-service-head h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--profil-text);
}

.profil-service-desc {
    margin: 0;
    color: var(--profil-muted);
    font-size: 0.89rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profil-service-meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--profil-border);
}

.profil-meta-pill {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--profil-text);
}

.profil-meta-pill > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profil-meta-pill svg {
    width: 15px;
    height: 15px;
    color: var(--profil-accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.profil-librarians-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.profil-librarian-card {
    position: relative;
    border-radius: 1.15rem;
    background: var(--profil-surface-soft);
    border: 1px solid var(--profil-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.profil-librarian-card:hover {
    transform: translateY(-3px);
    border-color: var(--profil-accent-border);
    box-shadow: var(--profil-shadow);
}

body[data-theme="zavier"] .profil-librarian-card {
    border-radius: 12px 4px 12px 12px;
}

.profil-librarian-card--has-wa .profil-card-watermark {
    bottom: 54px;
    right: -8px;
}

.profil-librarian-cover {
    position: relative;
    z-index: 1;
    height: 62px;
    background: linear-gradient(135deg, var(--profil-accent-soft) 0%, color-mix(in srgb, var(--profil-accent) 16%, transparent) 100%);
    border-bottom: 1px solid var(--profil-border);
}

.profil-librarian-body {
    position: relative;
    z-index: 1;
    padding: 0 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.profil-librarian-avatar-wrap {
    width: 86px;
    height: 86px;
    margin-top: -43px;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    padding: 3px;
    background: var(--profil-surface);
    border: 2px solid var(--profil-accent-border);
    box-shadow: var(--profil-shadow);
    overflow: hidden;
    flex-shrink: 0;
}

.profil-librarian-photo {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    background: var(--profil-surface-soft);
}

.profil-librarian-name {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--profil-text);
    text-wrap: balance;
}

.profil-librarian-role {
    margin: 0 0 0.55rem;
    font-size: 0.86rem;
    color: var(--profil-accent);
    font-weight: 600;
    text-wrap: balance;
}

.profil-librarian-unit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.42rem 0.68rem;
    border-radius: 0.68rem;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    font-size: 0.77rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--profil-muted);
    text-align: center;
    text-wrap: balance;
    overflow-wrap: break-word;
}

.profil-librarian-unit svg {
    width: 13px;
    height: 13px;
    color: var(--profil-accent);
    display: inline-block;
    vertical-align: -2px;
    margin-right: 0.25rem;
}

.profil-librarian-footer {
    width: 100%;
    margin-top: auto;
    padding-top: 1rem;
}

.profil-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.8rem;
    background: var(--profil-accent-solid, var(--profil-accent));
    color: var(--md-on-primary, #ffffff);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.profil-wa-btn:hover,
.profil-wa-btn:focus {
    background: var(--profil-accent-solid-hover, var(--profil-accent-hover, var(--profil-accent)));
    color: var(--md-on-primary, #ffffff);
    text-decoration: none;
    transform: translateY(-1px);
}

.profil-wa-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.profil-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    gap: 1.25rem;
    align-items: stretch;
}

.profil-contact-card,
.profil-map-card {
    padding: 1.15rem;
    border-radius: 1rem;
    background: var(--profil-surface-soft);
    border: 1px solid var(--profil-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.profil-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.profil-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.profil-contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.75rem;
    background: var(--profil-accent-soft);
    color: var(--profil-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profil-contact-icon svg {
    width: 18px;
    height: 18px;
}

.profil-contact-list small {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--profil-muted);
}

.profil-contact-list strong,
.profil-contact-list a {
    display: block;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--profil-text);
    text-decoration: none;
    word-break: break-word;
}

.profil-contact-list a:hover {
    color: var(--profil-accent);
}

.profil-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--profil-border);
}

.profil-social-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: var(--profil-surface);
    border: 1px solid var(--profil-border);
    color: var(--profil-text);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.profil-social-chip:hover {
    color: var(--profil-accent);
    border-color: var(--profil-accent-border);
}

.profil-social-chip svg {
    width: 15px;
    height: 15px;
}

.profil-map-frame-wrap {
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--profil-border);
    min-height: 290px;
    flex-grow: 1;
}

.profil-map-frame-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 290px;
    border: 0;
    display: block;
}

.profil-location-section {
    scroll-margin-top: 84px;
}

.profil-map-footer {
    display: flex;
    justify-content: flex-end;
}

.profil-empty {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 1rem;
    background: var(--profil-surface-soft);
    border: 1px dashed var(--profil-border);
    color: var(--profil-muted);
}

.profil-empty span {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    margin: 0 auto 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--profil-accent-soft);
    color: var(--profil-accent);
}

.profil-empty h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--profil-text);
}

.profil-empty p {
    margin: 0;
    font-size: 0.88rem;
}

.profil-empty--map {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
}

@media (max-width: 991.98px) {
    .profil-hero,
    .profil-location-grid {
        grid-template-columns: 1fr;
    }

    .profil-stats,
    .profil-services-grid,
    .profil-librarians-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .profil-page {
        padding: 76px 12px 12px;
    }

    .profil-page-header {
        gap: 10px;
        padding: 13px;
        border-radius: 16px;
    }

    .profil-page-heading-icon {
        display: none;
    }

    .profil-page-header p {
        font-size: 0.74rem;
    }

    .profil-hero,
    .profil-section {
        padding: 1.1rem;
        border-radius: 16px;
    }

    .profil-eyebrow {
        display: none;
    }

    .profil-hero-actions {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .profil-hero-actions > a {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.6rem 0.5rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .profil-hero-actions > a svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .profil-hero-actions > a span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profil-hero-actions > a:only-child {
        flex: 0 1 auto;
        padding: 0.62rem 1.1rem;
        font-size: 0.85rem;
    }

    .profil-section-toggle {
        display: none;
    }

    .profil-stats {
        grid-template-columns: 1fr;
    }

    .profil-services-grid,
    .profil-librarians-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.85rem;
        margin: 0 -0.2rem;
        padding: 2px 0.2rem 6px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0.2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .profil-services-grid::-webkit-scrollbar,
    .profil-librarians-grid::-webkit-scrollbar {
        display: none;
    }

    .profil-service-card {
        flex: 0 0 82%;
        width: 82%;
        max-width: 310px;
        min-width: 0;
        height: auto;
        align-self: stretch;
        box-sizing: border-box;
        scroll-snap-align: start;
    }

    .profil-librarian-card {
        flex: 0 0 80%;
        width: 80%;
        max-width: 280px;
        min-width: 0;
        height: auto;
        align-self: stretch;
        box-sizing: border-box;
        scroll-snap-align: start;
    }

    .profil-librarian-body {
        padding: 0 0.9rem 1.05rem;
    }

    .profil-librarian-unit {
        padding: 0.4rem 0.55rem;
        font-size: 0.74rem;
        line-height: 1.38;
    }

    .profil-service-card:only-child,
    .profil-librarian-card:only-child {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .profil-map-footer {
        justify-content: stretch;
    }

    .profil-map-footer .profil-btn-secondary,
    .profil-empty--map .profil-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Match active OPAC theme container width and spacing across Finexy, Rain, and Zavier */
body[data-theme="finexy"] .profil-shell,
body[data-theme="rain"] .profil-shell {
    width: 100%;
    max-width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

@media (max-width: 768px) {
    body[data-theme="finexy"] .profil-shell,
    body[data-theme="rain"] .profil-shell {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}

body[data-theme="zavier"] .midnight-content > .profil-page {
    min-height: auto;
    padding: 2rem 2rem 1rem !important;
    background: transparent !important;
}

body[data-theme="zavier"] .midnight-content .profil-shell {
    width: 100%;
    max-width: 1380px;
}

@media (max-width: 991.98px) {
    body[data-theme="zavier"] .midnight-content > .profil-page {
        padding: 1.1rem 12px 1.25rem !important;
    }
}
