/* Homepage cards (NHS Blocks "Grouped Items"): three across on desktop, one across on mobile */
.wp-block-nhsblocks-rowgroup .nhsuk-panel-group { column-gap: 32px; }
.wp-block-nhsblocks-rowgroup .nhsuk-panel-group > .nhsuk-card { flex: 0 0 calc((100% - 64px) / 3); max-width: calc((100% - 64px) / 3); margin-bottom: 32px; }
.wp-block-nhsblocks-rowgroup .nhsuk-panel-group > .nhsuk-card:only-child { flex-basis: 100%; max-width: 100%; }
@media (max-width: 48.0525em) {
  .wp-block-nhsblocks-rowgroup .nhsuk-panel-group > .nhsuk-card { flex-basis: 100%; max-width: 100%; margin-bottom: 16px; }
}
/* Homepage: hide the "Home" title visually but keep it for screen readers */
.home .entry-header { margin: 0; padding: 0; }
.home .entry-header .entry-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Homepage hero: building photo behind the cards, edge to edge */
body.home { overflow-x: hidden; }
.home .bmc-hero.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 40px 16px 8px; min-height: 0; }
.home .bmc-hero .wp-block-cover__inner-container { max-width: 960px; width: 100%; margin: 0 auto; }
/* Accreditation logos row */
.bmc-logos, .bmc-logos > .wp-block-group__inner-container { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 32px; }
.bmc-logos { margin: 24px 0 32px; }
.bmc-logos figure.wp-block-image { margin: 0; }
.bmc-logos img { max-height: 110px; width: auto; height: auto; }
/* PATCHS logo beside "Contact us online" */
.bmc-patchs { margin: 16px 0 32px; }
.home .cqc-widget { margin-top: 24px; }

/* Full-width NHS App banner on the homepage */
.home .entry-content > figure.wp-block-image.size-full img { width: 100% !important; height: auto !important; }
/* Logo: keep it a sensible size in the white header */
.nhsuk-header .custom-logo { max-height: 80px; width: auto; }

/* Practice name beside the logo, as on the old site */
.nhsuk-header .custom-logo-link { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; }
.nhsuk-header .custom-logo-link::after { content: "Barlow Medical Centre"; white-space: nowrap; font-size: 24px; font-weight: 600; line-height: 1.2; color: #212b32; }
@media (max-width: 40.0525em) { .nhsuk-header .custom-logo { max-height: 56px; } .nhsuk-header .custom-logo-link::after { font-size: 19px; } }
/* Homepage: hero photo starts straight under the menu */
.home .nhsuk-main-wrapper { padding-top: 0; }
.home .entry-content { margin-top: 0; }
.nhsuk-header__logo { max-width: none; width: auto; }
/* CQC rating banner at the top of the homepage */
.bmc-cqc-banner { margin: 0 0 32px; }
.bmc-cqc-banner img { width: 100% !important; height: auto !important; display: block; border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,0.12); }
.bmc-cqc-banner a, .home .entry-content > figure.wp-block-image.size-full a { display: block; }
/* Hero photo at full size: one image, scaled to fill, not tiled */
.home .bmc-hero .wp-block-cover__image-background.is-repeated { background-size: cover !important; background-repeat: no-repeat !important; }
/* Full-width white bands under the hero: accreditation logos, then PATCHS */
.home .bmc-band { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: #fff; box-sizing: border-box; }
.home .bmc-hero { margin-bottom: 0 !important; }
.home .bmc-logos-band { margin-top: 0; margin-bottom: 16px; padding: 36px 16px; }
.home .bmc-logos-band > .wp-block-group__inner-container { max-width: 1100px; margin: 0 auto; }
.home .bmc-logos-band .bmc-logos { margin: 0 auto; max-width: 1100px; gap: 24px 40px; }
.home .bmc-logos-band .bmc-logos img { max-height: 110px; }
.home .bmc-logos-band .bmc-logos, .home .bmc-logos-band .bmc-logos > .wp-block-group__inner-container { gap: 24px 32px; }
.home .bmc-patchs-band { margin-top: 0; margin-bottom: 40px; padding: 40px 16px; }
.home .bmc-patchs-band > .wp-block-group__inner-container, .home .bmc-patchs-band .bmc-patchs { max-width: 960px; margin-left: auto; margin-right: auto; }
.home .bmc-patchs-band .bmc-patchs { margin-top: 0; margin-bottom: 0; }
@media (max-width: 48.0525em) { .home .bmc-logos-band .bmc-logos { gap: 16px 24px; } .home .bmc-logos-band .bmc-logos img { max-height: 80px; } .home .bmc-patchs-band { padding: 28px 16px; } }
.home .entry-content > .wp-block-html:last-child, .home .entry-content > .cqc-widget:last-child { margin-top: 40px; }
/* Local and NHS services: blue boxes in two columns, as on the old site */
.entry-content ul.bmc-service-links { list-style: none !important; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 4px 32px; }
.entry-content ul.bmc-service-links li { margin: 0 !important; padding: 0; list-style: none; }
.entry-content ul.bmc-service-links li::before, .entry-content ul.bmc-service-links li::marker { content: none; }
.entry-content ul.bmc-service-links li a, .entry-content ul.bmc-service-links li a:visited { display: flex; justify-content: space-between; align-items: center; min-height: 52px; box-sizing: border-box; padding: 12px 18px 12px 24px; background: #005eb8; color: #fff; text-decoration: none; font-size: 19px; line-height: 1.4; }
.entry-content ul.bmc-service-links li a::after { content: ''; flex: 0 0 auto; width: 9px; height: 9px; margin-left: 16px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.entry-content ul.bmc-service-links li a:hover { background: #003d78; color: #fff; text-decoration: underline; }
.entry-content ul.bmc-service-links li a:focus { background: #ffeb3b; color: #212b32; outline: none; box-shadow: inset 0 -4px 0 #212b32; text-decoration: none; }
@media (max-width: 48.0525em) { .entry-content ul.bmc-service-links { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; } }
/* NHS-style action links: green arrow before the text */
.entry-content .bmc-action-link { margin: 8px 0 32px; }
.entry-content .bmc-action-link a, .entry-content .bmc-action-link a:visited { display: inline-flex; align-items: center; font-weight: 600; font-size: 22px; line-height: 1.3; color: #005eb8; text-decoration: none; }
.entry-content .bmc-action-link a::before { content: ''; flex: 0 0 36px; width: 36px; height: 36px; margin-right: 8px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20fill%3D'%23007f3b'%20d%3D'M12%202a10%2010%200%200%200-9.95%209h11.64L9.74%207.05a1%201%200%200%201%201.41-1.41l5.66%205.65a1%201%200%200%201%200%201.42l-5.66%205.65a1%201%200%200%201-1.41%200%201%201%200%200%201%200-1.41L13.69%2013H2.05A10%2010%200%201%200%2012%202z'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.entry-content .bmc-action-link a:hover { color: #003d78; text-decoration: underline; }
.entry-content .bmc-action-link a:focus { background: #ffeb3b; color: #212b32; outline: none; box-shadow: 0 4px 0 #212b32; }
@media (max-width: 40.0525em) { .entry-content .bmc-action-link a { font-size: 19px; } .entry-content .bmc-action-link a::before { flex-basis: 32px; width: 32px; height: 32px; } }
/* Facebook section: white band with the Facebook logo beside the heading */
.home .bmc-fb-band { margin-top: 40px; margin-bottom: 0; padding: 40px 16px 24px; }
.home .bmc-fb-band > .wp-block-group__inner-container { max-width: 960px; margin: 0 auto; }
.home .bmc-fb-band > *:not(.wp-block-group__inner-container) { max-width: 960px; margin-left: auto; margin-right: auto; }
.bmc-fb-heading { display: flex; align-items: center; gap: 12px; }
.bmc-fb-heading::before { content: ''; flex: 0 0 48px; width: 48px; height: 48px; background: url("https://barlowmed.nhs.uk/wp-content/uploads/2026/11/FB-logo-150x150-1.jpg") center / contain no-repeat; }
/* Header: practice name with "NHS GP Surgery in Manchester" in blue beneath, beside the logo */
.nhsuk-header .custom-logo-link { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 16px; row-gap: 2px; align-items: center; }
.nhsuk-header .custom-logo-link img { grid-column: 1; grid-row: 1 / span 2; width: 80px; height: auto; max-width: none; }
@media (max-width: 40.0525em) { .nhsuk-header .custom-logo-link img { width: 56px; } }
.nhsuk-header .custom-logo-link::after { grid-column: 2; grid-row: 1; align-self: end; }
.nhsuk-header .custom-logo-link::before { content: "NHS GP Surgery in Manchester"; grid-column: 2; grid-row: 2; align-self: start; white-space: nowrap; font-size: 16px; font-weight: 600; line-height: 1.3; color: #005eb8; }
@media (max-width: 40.0525em) { .nhsuk-header .custom-logo-link::before { font-size: 14px; } }
/* Hide the theme pagination on the homepage (news has its own page) */
.home .entry-content > .nhsuk-pagination { display: none; }