/* Shared structure for every firm site. Templates layer their look on top;
   colours and fonts come from the firm's theme via CSS variables set in SiteLayout. */

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

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .6em; }
h1:focus { outline: none; }   /* Blazor focuses the h1 after navigation for screen readers */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

.btn {
    display: inline-block; padding: .8em 1.6em; border-radius: 6px; border: 0; white-space: nowrap;
    font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.08); }

/* Header + nav */
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { max-height: 52px; width: auto; }
.brand-name { font: 700 1.25rem var(--font-heading); }

.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .5em .75em; text-decoration: none; color: inherit; border-radius: 6px; white-space: nowrap; }
.site-nav a.active { color: var(--primary); font-weight: 600; }
.brand-name { max-width: 340px; }
.nav-toggle, .nav-toggle-label { display: none; }

/* Collapse to a menu button before items start squeezing (long firm names + 6–8 pages). */
@media (max-width: 1100px) {
    .site-header .container { flex-wrap: wrap; }
    .nav-toggle-label { display: block; cursor: pointer; padding: 12px; }
    .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
        display: block; width: 24px; height: 2px; background: currentColor; position: relative;
    }
    .nav-toggle-label span::before { content: ""; position: absolute; top: -7px; }
    .nav-toggle-label span::after { content: ""; position: absolute; top: 7px; }
    .site-nav { order: 3; width: 100%; display: flex; flex-direction: column; align-items: flex-end; }
    .site-nav ul { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; }
    .nav-toggle:checked ~ ul { display: flex; }
    .site-header .header-cta { display: none; }
}

/* Blocks */
.block { padding: 72px 0; }
.section-intro { max-width: 680px; margin: -.2em 0 2em; opacity: .85; }

.block-hero { position: relative; overflow: hidden; padding: 120px 0; }
.block-hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.block-hero .container { position: relative; z-index: 1; }
.block-hero .lead { font-size: 1.2rem; max-width: 640px; margin: 0 0 2em; }
/* A photo behind the hero: darken it and use white text, whatever the template's own hero colours. */
.block-hero.has-image { color: #fff; }
.block-hero.has-image::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .5); }
.block.block-hero.has-image h1 { color: #fff; }
.block.block-hero.has-image .btn-accent { background: var(--accent); color: #fff; border: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { background: #fff; border-radius: 10px; padding: 28px; }
.card p:last-child { margin-bottom: 0; }

.team-card { text-align: center; }
.team-card img, .team-card .avatar { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 16px; object-fit: cover; }
.team-card .avatar { display: grid; place-items: center; background: var(--primary); color: #fff; font: 700 2.5rem var(--font-heading); }
.team-card .role { margin: 0; font-weight: 600; }
.team-card .qual { margin: 0; opacity: .7; }

.stats-row { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 24px; text-align: center; }
.stat strong { display: block; font: 700 2.5rem var(--font-heading); color: var(--primary); }

blockquote.card { margin: 0; }
blockquote footer { margin-top: 1em; font-weight: 600; }

.blog-card img { border-radius: 6px; margin-bottom: 12px; aspect-ratio: 16/9; object-fit: cover; }
.blog-card time { font-size: .85rem; opacity: .7; }
.blog-card h3 a { color: inherit; text-decoration: none; }

.prose { max-width: 760px; }
.prose .meta { opacity: .75; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-details .map { width: 100%; height: 260px; border: 0; border-radius: 10px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.enquiry-form { display: flex; flex-direction: column; gap: 14px; }
.enquiry-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.enquiry-form input, .enquiry-form textarea {
    font: inherit; font-weight: 400; padding: .7em .8em; border: 1px solid #cbd2d9; border-radius: 6px;
}
.enquiry-form .hp { position: absolute; left: -9999px; }
.form-success { border-left: 4px solid var(--accent); }

.site-footer { padding: 48px 0 24px; }
.site-footer a { color: inherit; }

/* Optional label above a section heading */
.section-tag { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .5em; }

/* Icons (Bootstrap Icons) */
.card-icon, .stat-icon { display: block; font-size: 1.75rem; line-height: 1; color: var(--primary); margin-bottom: 12px; }
.card ul { padding-left: 1.1em; margin: .5em 0 0; }
.card-link { display: inline-flex; gap: 6px; margin-top: 14px; font-weight: 600; text-decoration: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }

/* Sliders: slides stack in one grid cell and cross-fade; without JS the first slide shows. */
.slider { position: relative; display: grid; }
.slider > .slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; margin: 0; }
.slider > .slide.is-active { opacity: 1; visibility: visible; }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%;
    border: 0; background: rgb(255 255 255 / .18); color: #fff; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center;
}
.slider-arrow:hover { background: var(--accent); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 30px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgb(255 255 255 / .5); cursor: pointer; }
.slider-dots button.is-active { background: var(--accent); }
@media (max-width: 760px) { .slider-arrow { display: none; } }

.block-slider { padding: 0; background: var(--primary); color: #fff; }
.block-slider .slide { position: relative; display: flex; align-items: center; min-height: 540px; padding: 96px 0; overflow: hidden; }
.block-slider .slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.block-slider .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgb(0 0 0 / .65), rgb(0 0 0 / .25)); }
.block-slider .slide-bg + .container, .block-slider .container { position: relative; z-index: 1; }
.block-slider .slide-content { max-width: 680px; }
.block-slider .eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-bottom: 1em; }
.block-slider .slide-title { font-size: clamp(2rem, 5vw, 3.2rem); color: #fff; }
.block-slider .hl { color: var(--accent); }
.block-slider .lead { font-size: 1.1rem; margin: 0 0 2em; opacity: .9; }

.gallery > .slide img { width: 100%; height: 420px; object-fit: cover; border-radius: 10px; }
.gallery figcaption { text-align: center; padding-top: 8px; font-size: .9rem; opacity: .75; }
.gallery .slider-dots { bottom: 16px; }
.gallery:has(figcaption) .slider-dots { bottom: 48px; }

/* Page banner */
.block-pageheader { position: relative; overflow: hidden; background: var(--primary); color: #fff; padding: 80px 0 64px; }
.block-pageheader .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.block-pageheader::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.block-pageheader .container { position: relative; z-index: 1; }
.block-pageheader h1 { color: #fff; }
.block-pageheader .lead { margin: 0; opacity: .9; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 12px; font-size: .9rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .7; }
.breadcrumb a { color: var(--accent); text-decoration: none; }

/* Image + text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.no-media { grid-template-columns: 1fr; max-width: 820px; }
.split.image-right .split-media { order: 2; }
.split-media { position: relative; }
.split-media img { width: 100%; border-radius: 10px; }
.split-badge {
    position: absolute; right: -16px; bottom: -24px; background: #fff; color: var(--text); padding: 16px 24px; border-radius: 10px;
    text-align: center; box-shadow: 0 10px 30px rgb(0 0 0 / .12); border-bottom: 4px solid var(--accent);
}
.split-badge strong { display: block; font: 700 2rem/1.1 var(--font-heading); color: var(--primary); }
.split-badge span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.split-body .btn-row { margin-top: 1.5em; }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; gap: 48px; }
    .split.image-right .split-media { order: 0; }
    .split-badge { right: 12px; }
}

/* Icon features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.feature { text-align: center; padding: 16px 8px; }
.feature.card { padding: 32px 24px; }
.feature-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--primary); color: #fff; font-size: 1.75rem; }
.feature h3 { font-size: 1.05rem; }
.feature p { margin: 0; opacity: .8; font-size: .95rem; }

/* Accordion */
.accordion { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.accordion details { background: #fff; border-radius: 10px; border: 1px solid rgb(0 0 0 / .08); }
.accordion summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 22px; font: 600 1.05rem var(--font-heading); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; }
.accordion details[open] summary::after { content: "−"; }
.accordion .num { color: var(--accent); font-weight: 700; }
.accordion-body { padding: 0 22px 20px; }
.accordion-body > :last-child { margin-bottom: 0; }

/* Call to action */
.cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: var(--primary); color: #fff; border-radius: 12px; padding: 48px; }
.cta-box h2 { color: #fff; margin-bottom: .3em; }
.cta-box p { margin: 0; opacity: .85; }
@media (max-width: 760px) { .cta-box { padding: 36px 24px; } }

/* Team highlights, stats icons, contact extras */
.team-points { text-align: left; padding-left: 1.1em; margin: 16px 0 0; }
.team-points li { margin-bottom: 6px; }
.stat .stat-icon { margin: 0 auto 8px; color: var(--accent); }
.contact-item { display: flex; gap: 12px; margin-bottom: 1.2em; }
.contact-item .contact-icon { color: var(--primary); font-size: 1.1rem; line-height: 1.6; }
.contact-item p { margin: 0; }
.contact-item .address { white-space: pre-line; }
.hours-card { margin-bottom: 1.2em; }
.hours-card h3 { font-size: 1.05rem; }
.hours-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgb(0 0 0 / .08); }
.hours-row:last-child { border-bottom: 0; }
