/* Shared department layout. Use only scoped department selectors. */

.archive-avdeling{padding-bottom:32px!important;}
.archive-avdeling .toppbilde{margin-bottom:32px!important}.archive-avdeling .toppbilde img{width:100%;height:clamp(180px,26vw,340px)!important;max-height:340px!important;object-fit:cover;border-radius:8px}.archive-avdeling h1{font-size:clamp(32px,4vw,48px);margin-bottom:16px}.archive-avdeling>.text{max-width:700px;margin-bottom:12px}.archive-avdeling .mb-dept-intro{margin-bottom:32px;line-height:1.6}.archive-avdeling .mb-dept-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:0!important}.archive-avdeling .items>.item{width:auto!important;max-width:none!important;padding:0!important;margin:0!important}.archive-avdeling .mb-dept-card{display:flex;flex-direction:column;height:100%;border:1px solid #dededb;border-radius:8px;overflow:hidden;background:#f4f7fb;color:#171717;text-decoration:none!important;transition:border-color .15s,box-shadow .15s}.archive-avdeling .mb-dept-card:hover{border-color:#777;box-shadow:0 4px 14px #00000012}.archive-avdeling .mb-dept-card:focus-visible{outline:3px solid #174e78;outline-offset:4px}.archive-avdeling .mb-dept-card img{display:block;width:100%;height:auto!important;aspect-ratio:16/9!important;object-fit:cover!important}.archive-avdeling .mb-dept-card-body{display:flex;flex-direction:column;flex:1;padding:24px;gap:14px}.archive-avdeling .mb-dept-card h2{font-size:22px;line-height:1.3;margin:0}.archive-avdeling .mb-dept-card p{font-size:14px;line-height:1.6;margin:0}.archive-avdeling .mb-dept-card-cta{display:flex;justify-content:space-between;gap:16px;margin-top:auto;padding-top:12px;font-size:13px;font-weight:600}.archive-avdeling .mb-dept-card-cta:after{content:'→';font-size:22px;line-height:1}.archive-avdeling .mb-dept-card:before,.archive-avdeling .mb-dept-card:after{content:none!important}@media(max-width:900px){.archive-avdeling .mb-dept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.archive-avdeling .mb-dept-grid{grid-template-columns:1fr;gap:20px}.archive-avdeling .mb-dept-card-body{padding:20px}}


body.single-avdeling .fullbredde-bilde img{width:100%;max-height:360px;object-fit:cover;border-radius:8px}
body.single-avdeling .single-avdeling{max-width:1100px;margin:36px auto 48px}
body.single-avdeling .single-avdeling h1{font-size:clamp(30px,4vw,48px);line-height:1.15;letter-spacing:-.03em}
body.single-avdeling .introduksjon{max-width:850px;line-height:1.75}
body.single-avdeling .contact{margin:24px 0}
body.single-avdeling .single-avdeling .wp-block-buttons{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;margin:20px 0}
body.single-avdeling .single-avdeling .wp-block-buttons>.wp-block-button{display:flex;position:static;float:none;margin:0;max-width:100%}
body.single-avdeling .single-avdeling .wp-block-button__link{display:inline-flex;align-items:center;justify-content:center;position:static;margin:0;line-height:1.4;white-space:normal;box-sizing:border-box;max-width:100%}
body.single-avdeling .mb-dept-nav{display:flex;flex-wrap:wrap;gap:10px;margin:28px 0}
body.single-avdeling .mb-dept-nav a{padding:12px 16px;border:1px solid #d9d9d6;border-radius:4px;color:#171717;text-decoration:none;background:#fff;font-weight:600;font-size:14px}
body.single-avdeling .mb-dept-nav a:hover{background:#f4f7fb}
body.single-avdeling a:focus-visible{outline:3px solid #171717;outline-offset:4px}
body.single-avdeling .grupper .gruppe{padding:28px;margin:0 0 28px;background:#f4f7fb;border:1px solid #e1e8ef;border-radius:8px;scroll-margin-top:110px}
body.single-avdeling .gruppe h2{margin:0 0 24px;font-size:26px}
body.single-avdeling .gruppe>.mb-dept-group-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px;margin:0}
body.single-avdeling .gruppe .apningstider,body.single-avdeling .gruppe .ansatte{width:100%;max-width:none;padding:0}
body.single-avdeling .gruppe .apningstider{line-height:1.6}
body.single-avdeling .gruppe .apningstider p{margin:6px 0}
body.single-avdeling .gruppe .apningstider .epost,body.single-avdeling .gruppe .apningstider .telefon{margin-top:18px;font-weight:600}
body.single-avdeling .ansatte>.mb-dept-staff-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
body.single-avdeling .ansatte .ansatt{display:flex;flex-direction:column;align-items:flex-start;width:100%;max-width:none;background:#fff;border:1px solid #e0e0dd;border-radius:6px;padding:20px;margin:0;gap:14px;min-width:0}
body.single-avdeling .ansatt img{width:100px;height:100px;object-fit:cover;border-radius:50%;margin:0}
body.single-avdeling .ansatt .info{min-width:0;width:100%;font-size:14px;line-height:1.65}
body.single-avdeling .ansatt p{margin:0 0 6px}body.single-avdeling .ansatt .navn{font-size:17px;font-weight:600}
body.single-avdeling .gruppe a{color:#171717;overflow-wrap:anywhere;text-underline-offset:3px}
body.single-avdeling .mb-dept-address{padding:18px 0;border-top:1px solid #e5e5e2;line-height:1.7}
@media(max-width:850px){body.single-avdeling .gruppe>.mb-dept-group-grid{grid-template-columns:1fr}body.single-avdeling .grupper .gruppe{padding:22px}}
@media(max-width:540px){body.single-avdeling .ansatte>.mb-dept-staff-grid{grid-template-columns:1fr}body.single-avdeling .ansatte .ansatt{flex-direction:row}body.single-avdeling .ansatt img{width:76px;height:76px}body.single-avdeling .single-avdeling h1{font-size:30px}}

/* Avdelinger: større portretter til høyre */
body.single-avdeling .grupper .ansatte .ansatt{display:grid !important;grid-template-columns:minmax(0,1fr) 34% !important;align-items:start !important;gap:16px !important;padding:18px !important}
body.single-avdeling .grupper .ansatte .ansatt>img{grid-column:2 !important;grid-row:1 !important;width:100% !important;height:auto !important;aspect-ratio:1 !important;object-fit:cover !important;border-radius:6px !important;margin:0 !important;max-width:none !important}
body.single-avdeling .grupper .ansatte .ansatt>.info{grid-column:1 !important;grid-row:1 !important;width:100% !important;padding:0 !important;margin:0 !important;min-width:0 !important}
body.single-avdeling .grupper .ansatte .ansatt .info p{margin:0 0 10px !important}
body.single-avdeling .grupper .ansatte .ansatt .info a{font-size:14px !important;line-height:1.6 !important}
@media(max-width:1100px) and (min-width:851px){body.single-avdeling .ansatte>.mb-dept-staff-grid{grid-template-columns:1fr !important}}
@media(max-width:650px){body.single-avdeling .ansatte>.mb-dept-staff-grid{grid-template-columns:1fr !important}}
@media(max-width:540px){body.single-avdeling .grupper .ansatte .ansatt{grid-template-columns:1fr !important}body.single-avdeling .grupper .ansatte .ansatt>img{grid-column:1 !important;grid-row:1 !important;width:140px !important;max-width:100% !important;height:140px !important}body.single-avdeling .grupper .ansatte .ansatt>.info{grid-column:1 !important;grid-row:2 !important}}

/* Avdelinger – avgrenset kolonneoppsett 18.09.2026 */
html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid{
display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:24px!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
}
html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid>.item{
grid-area:auto!important;float:none!important;flex:none!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;
}
html body.single-avdeling .grupper>.gruppe>.mb-dept-group-grid{
display:grid!important;grid-template-columns:260px minmax(0,1fr)!important;grid-auto-flow:row!important;align-items:start!important;gap:28px!important;width:100%!important;margin:0!important;
}
html body.single-avdeling .gruppe>.mb-dept-group-grid>.apningstider,
html body.single-avdeling .gruppe>.mb-dept-group-grid>.ansatte{
grid-area:auto!important;width:100%!important;max-width:none!important;min-width:0!important;float:none!important;flex:none!important;padding:0!important;margin:0!important;
}
html body.single-avdeling .gruppe .ansatte>.mb-dept-staff-grid{
display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:14px!important;width:100%!important;margin:0!important;
}
html body.single-avdeling .gruppe .ansatte>.mb-dept-staff-grid>.ansatt{
grid-area:auto!important;width:100%!important;max-width:none!important;min-width:0!important;float:none!important;flex:none!important;margin:0!important;
}
html body.single-avdeling .gruppe .ansatt>img{min-width:0!important;}
html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid::before,
html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid::after,
html body.single-avdeling .gruppe>.mb-dept-group-grid::before,
html body.single-avdeling .gruppe>.mb-dept-group-grid::after,
html body.single-avdeling .gruppe .ansatte>.mb-dept-staff-grid::before,
html body.single-avdeling .gruppe .ansatte>.mb-dept-staff-grid::after{content:none!important;display:none!important;}
@media(max-width:1100px){html body.single-avdeling .gruppe .ansatte>.mb-dept-staff-grid{grid-template-columns:1fr!important;}}
@media(max-width:900px){html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:850px){html body.single-avdeling .grupper>.gruppe>.mb-dept-group-grid{grid-template-columns:1fr!important;}}
@media(max-width:560px){html body.post-type-archive-avdeling .archive-avdeling>.mb-dept-grid{grid-template-columns:1fr!important;gap:20px!important;}}
/* Compact department overview with shared hours and collapsible billing. */
body.single-avdeling .mb-dept-lead{max-width:850px;font-size:18px;line-height:1.7;margin:20px 0 30px}
body.single-avdeling .mb-dept-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:28px 0}
body.single-avdeling .mb-dept-info-card{min-width:0;padding:24px;background:#f4f7fb;border:1px solid #e0e7ee;border-radius:6px}
body.single-avdeling .mb-dept-info-card h2{font-size:20px;margin:0 0 18px;line-height:1.3}
body.single-avdeling .mb-dept-info-card p{margin:0 0 14px;line-height:1.6}
body.single-avdeling .mb-dept-info-card a,body.single-avdeling .mb-dept-disclosure a{color:#171717;overflow-wrap:anywhere;text-underline-offset:4px}
body.single-avdeling .mb-dept-hours{border-top:1px solid #d8e0e9;padding:10px 0}
body.single-avdeling .mb-dept-hours summary,body.single-avdeling .mb-dept-disclosure summary{cursor:pointer;font-weight:600;line-height:1.5}
body.single-avdeling .mb-dept-hours dl{margin:12px 0 0;font-size:14px}
body.single-avdeling .mb-dept-hours dl>div{display:flex;justify-content:space-between;gap:12px;margin:6px 0;flex-wrap:wrap}
body.single-avdeling .mb-dept-hours dd{margin:0}
body.single-avdeling .mb-dept-disclosure{padding:18px 22px;margin:18px 0;border:1px solid #d8e0e9;border-radius:5px;background:#fff}
body.single-avdeling .mb-dept-invoice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:22px 0 0}
body.single-avdeling .mb-dept-invoice dt{font-weight:600;font-size:13px;margin-bottom:5px}
body.single-avdeling .mb-dept-invoice dd{margin:0;overflow-wrap:anywhere}
body.single-avdeling .mb-dept-about-link{font-size:14px;margin:18px 0}
body.single-avdeling .mb-dept-about-link a{color:#171717}
body.single-avdeling #avdeling-kontaktpersoner{scroll-margin-top:110px}
@media(max-width:900px){body.single-avdeling .mb-dept-overview-grid{grid-template-columns:1fr 1fr}body.single-avdeling .mb-dept-info-card:last-child{grid-column:1/-1}}
@media(max-width:600px){body.single-avdeling .mb-dept-overview-grid,body.single-avdeling .mb-dept-invoice{grid-template-columns:1fr}body.single-avdeling .mb-dept-info-card{padding:20px}}
body.single-avdeling .mb-dept-all-hours>summary{cursor:pointer;font-weight:600;text-decoration:underline;text-underline-offset:4px;line-height:1.5}body.single-avdeling .mb-dept-all-hours[open]>.mb-dept-hours:first-of-type{margin-top:16px}
html body.single-avdeling .grupper>.gruppe>.mb-dept-group-grid--no-staff{grid-template-columns:1fr!important}
html body.single-avdeling .mb-dept-group-grid--no-staff>.ansatte{display:none!important}
/* Match contact overview, staff sections and forms across every department. */
html body.single-avdeling .container.main-content,
html body.single-avdeling .container.mb-dept-sections{width:calc(100% - 48px)!important;max-width:1100px!important;margin-left:auto!important;margin-right:auto!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box}
html body.single-avdeling :is(.container.main-content,.container.mb-dept-sections)>.row{margin-left:0!important;margin-right:0!important}
html body.single-avdeling :is(.container.main-content,.container.mb-dept-sections)>.row>.col-12{padding-left:0!important;padding-right:0!important;min-width:0}
html body.single-avdeling .single-avdeling{width:100%;max-width:none}
@media(max-width:600px){html body.single-avdeling .container.main-content,html body.single-avdeling .container.mb-dept-sections{width:calc(100% - 32px)!important}}
/* Slutt avdelingsoppsett */
