/*
Theme Name: Stanton Black
Theme URI: https://stantonblacksolicitors.com
Author: Stanton Black Solicitors
Description: Bespoke block theme for Stanton Black Solicitors – UK immigration law. SEO-led architecture with service hubs, location pages and guides. Pair with the "Stanton Black Site Builder" plugin to generate all pages, schema and firm details.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: stanton-black
*/

/* Most styling lives in theme.json. Small refinements below. */

.sb-topbar a { text-decoration: none; }
.sb-topbar a:hover { text-decoration: underline; }

.site-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(15,35,64,.08); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.sb-card { transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
.sb-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15,35,64,.10); }
.sb-card a { text-decoration: none; }

.sb-breadcrumbs { font-size: .875rem; color: var(--wp--preset--color--muted); }
.sb-breadcrumbs a { color: inherit; }
.sb-breadcrumbs span[aria-hidden] { margin: 0 .4em; }

.sb-faq details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 1rem 0; }
.sb-faq summary { cursor: pointer; font-weight: 600; font-family: var(--wp--preset--font-family--heading); font-size: 1.1rem; }
.sb-faq details p { margin-top: .75rem; }

.sb-steps { counter-reset: step; list-style: none; padding-left: 0; }
.sb-steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.25rem; }
.sb-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--wp--preset--color--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }

.sb-ticks { list-style: none; padding-left: 0; }
.sb-ticks li { padding-left: 1.75rem; position: relative; margin-bottom: .5rem; }
.sb-ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--wp--preset--color--accent); font-weight: 700; }

.sb-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.sb-related li a { display: block; padding: 1rem 1.25rem; border: 1px solid var(--wp--preset--color--line); border-radius: 6px; text-decoration: none; background: #fff; font-weight: 600; }
.sb-related li a:hover { border-color: var(--wp--preset--color--accent); }

.sb-sidebar { position: sticky; top: 120px; }

.sb-form label { display: block; font-weight: 600; margin: .9rem 0 .3rem; font-size: .95rem; }
.sb-form input[type=text], .sb-form input[type=email], .sb-form input[type=tel], .sb-form select, .sb-form textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--wp--preset--color--line); border-radius: 4px; font: inherit; background: #fff; box-sizing: border-box;
}
.sb-form textarea { min-height: 130px; }
.sb-form .sb-consent { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; font-size: .875rem; }
.sb-form button { margin-top: 1.2rem; background: var(--wp--preset--color--accent); color: #fff; border: 0; padding: .9rem 1.6rem; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 1rem; }
.sb-form button:hover { background: var(--wp--preset--color--primary); }
.sb-form .sb-hp { position: absolute; left: -9999px; }
.sb-notice { padding: 1rem 1.25rem; border-radius: 4px; margin-bottom: 1rem; }
.sb-notice.ok { background: #e8f3ec; border-left: 4px solid #2f7d4a; }
.sb-notice.err { background: #fbeaea; border-left: 4px solid #a33; }

.sb-regulatory { font-size: .8rem; line-height: 1.6; opacity: .85; }
.sb-regulatory a { color: inherit; }
.sb-sra-badge { max-width: 275px; }

.sb-review-note { font-size: .85rem; color: var(--wp--preset--color--muted); border-left: 3px solid var(--wp--preset--color--line); padding-left: .75rem; }

.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: .5rem 1rem; }

/* Header polish */
.site-header .wp-block-site-title { white-space: nowrap; }
.site-header .wp-block-navigation { gap: 1.1rem; }
.site-header .wp-block-navigation__container { flex-wrap: nowrap; }
.site-header .wp-block-navigation-item__label, .site-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 1100px) { .site-header .wp-block-navigation { font-size: .88rem; } }
@media (max-width: 781px) {
  .sb-topbar .wp-block-group > p:first-child { display: none; }
  .sb-topbar .wp-block-group { justify-content: center !important; }
  .site-header .wp-block-site-title { font-size: 1.2rem; }
  .site-header .wp-block-button__link { padding: .55rem .9rem; font-size: .8rem; }
}
@media (max-width: 520px) { .site-header .wp-block-buttons { display: none; } }

/* Practice-area grid */
.sb-practice-grid { display: grid; grid-template-columns: repeat(var(--sb-cols, 4), minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1024px) { .sb-practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sb-practice-grid { grid-template-columns: 1fr; } }
.sb-practice { display: flex; flex-direction: column; gap: .5rem; padding: 1.6rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; text-decoration: none !important; color: var(--wp--preset--color--contrast); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.sb-practice:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,35,64,.12); border-color: var(--wp--preset--color--accent); }
.sb-practice__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--accent-light); color: var(--wp--preset--color--accent); margin-bottom: .35rem; }
.sb-practice__title { font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; font-weight: 600; color: var(--wp--preset--color--primary); line-height: 1.25; }
.sb-practice__text { font-size: .92rem; color: var(--wp--preset--color--muted); line-height: 1.55; flex: 1; }
.sb-practice__more { font-size: .88rem; font-weight: 700; color: var(--wp--preset--color--accent); }

/* Home v2 */
.sb-hero { position: relative; overflow: hidden; }
.sb-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 85% 20%, rgba(168,131,74,.28), transparent 45%), linear-gradient(115deg, transparent 60%, rgba(255,255,255,.04) 60%); pointer-events: none; }
.sb-hero > * { position: relative; z-index: 1; }
.sb-stat { text-align: center; }
.sb-stat strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: 1.35rem; color: var(--wp--preset--color--primary); }
.sb-review { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; padding: 1.6rem; height: 100%; }
.sb-review .stars { color: var(--wp--preset--color--accent); letter-spacing: .15em; }
.sb-staff-link { opacity: .8; }

/* Dynamic blocks */
.sb-shadow { box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.sb-firm-field { margin: .25rem 0; }
.sb-firm-field.sb-size-large { font-size: 1.6rem; font-weight: 700; }
.sb-firm-details p { margin: 0 0 1rem; }
.sb-contact-bar { margin: 0; }
.sb-ssr-empty { padding: 1rem; border: 1px dashed #c9ced6; border-radius: 6px; color: #5b6573; font-size: .85rem; background: #fafbfc; }
.sb-plain-list { list-style: none; padding-left: 0; }
.sb-plain-list li { margin-bottom: .35rem; }

/* Header safety: keep the CTA button and logo intact even if the menu is long */
header.wp-block-template-part .wp-block-buttons,
header.wp-block-template-part .wp-block-button,
header.wp-block-template-part .wp-block-site-title,
header.wp-block-template-part .wp-block-site-logo { flex-shrink: 0; }
header.wp-block-template-part .wp-block-button__link,
header.wp-block-template-part .wp-block-site-title a { white-space: nowrap; }
header.wp-block-template-part .wp-block-navigation { min-width: 0; }

/* Editor only: note shown under automatic (firm-detail) blocks */
.sb-ssr-notice { margin-top: .5rem; padding: .45rem .7rem; font-size: 13px; line-height: 1.4; color: #1e1e1e; background: #fff8e5; border: 1px solid #f0d58a; border-radius: 4px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sb-ssr-notice a, .sb-ssr-notice__btn { color: #2271b1; text-decoration: underline; }
.sb-ssr-notice__btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
