/*
Theme Name: BPSS Clearance
Theme URI: https://www.bpssclearance.co.uk/blog/
Author: BPSS Clearance
Description: Lightweight BPSS Clearance blog theme matching the main website.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bpss-clearance
*/

:root {
  --bpss-brand: #712f9b;
  --bpss-brand-hover: #8d66a6;
  --bpss-heading: #151515;
  --bpss-body: #444854;
  --bpss-muted: #666a75;
  --bpss-soft: #f3f5f8;
  --bpss-accent: #ddbdf1;
  --bpss-border: #e4d8eb;
  --bpss-white: #fff;
  --bpss-content: 1160px;
  --bpss-gutter: 36px;
  --bpss-shell: calc(var(--bpss-content) + (var(--bpss-gutter) * 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: 100px;
  overflow-x: hidden;
  background: var(--bpss-white);
  color: var(--bpss-body);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bpss-brand); text-decoration: none; }
a:hover, a:focus { color: var(--bpss-heading); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button, .button, input[type="submit"], .wp-block-button__link {
  border: 1px solid var(--bpss-brand);
  border-radius: 30px;
  background: var(--bpss-brand);
  color: var(--bpss-white);
  cursor: pointer;
  font-weight: 600;
  padding: 10px 24px;
  transition: transform 225ms ease, background-color 225ms ease, box-shadow 225ms ease;
}
button:hover, .button:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
  background: var(--bpss-brand-hover);
  color: var(--bpss-white);
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(74, 31, 101, .18);
}
input[type="search"], input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%; border: 1px solid #d9dce2; border-radius: 4px; background: #f8fbfc; color: var(--bpss-heading); padding: 11px 13px;
}
:focus-visible { outline: 3px solid rgba(113, 47, 155, .28); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.bpss-container { width: 100%; max-width: var(--bpss-shell); margin-inline: auto; padding-inline: var(--bpss-gutter); }
.site-header { position: fixed; inset: 0 0 auto; z-index: 999; min-height: 100px; background: var(--bpss-white); box-shadow: 0 0 24px rgba(0,0,0,.09); }
.site-header__inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.site-brand { flex: 0 0 auto; color: var(--bpss-brand); font-family: "Raleway", sans-serif; font-size: 49px; line-height: .85; }
.site-brand:hover { color: var(--bpss-brand); }
.site-brand span { display: block; margin-top: 7px; color: #5e5c85; font-family: "Raleway", sans-serif; font-size: 16px; line-height: 1.2; }
.site-nav { display: flex; align-items: center; }
.site-nav ul { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 12px 22px; color: #23232b; font-size: 16px; font-weight: 500; }
.site-nav li.current-menu-item > a, .site-nav li.current_page_item > a, .site-nav a[aria-current="page"] { color: var(--bpss-brand); font-weight: 600; }
.site-nav a:hover { color: var(--bpss-brand); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border-radius: 4px; background: transparent; color: var(--bpss-heading); box-shadow: none; }
.menu-toggle:hover { background: var(--bpss-soft); color: var(--bpss-brand); transform: none; box-shadow: none; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; content: ""; }

.blog-masthead { padding: 72px 0 60px; background: var(--bpss-soft); }
.blog-masthead h1 { margin: 0 0 12px; color: var(--bpss-heading); font-size: 44px; line-height: 1.2; }
.blog-masthead p { max-width: 760px; margin: 0; color: #5e5c85; font-size: 18px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 52px; padding-block: 76px 88px; }
.blog-main { min-width: 0; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-card { display: flex; min-width: 0; height: auto; overflow: hidden; flex-direction: column; border: 1px solid var(--bpss-border); border-radius: 8px; background: var(--bpss-white); box-shadow: 0 10px 26px rgba(45, 29, 56, .08); transition: transform 300ms cubic-bezier(.22,1,.36,1), box-shadow 300ms ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 15px 34px rgba(45, 29, 56, .13); }
.post-card__image { display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; flex: 0 0 auto; background: var(--bpss-soft); }
.post-card__image img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: transform 500ms ease; }
.post-card:hover .post-card__image img { transform: scale(1.02); }
.post-card__body { position: relative; z-index: 1; display: flex; min-height: 0; padding: 25px 26px 28px; flex: 1 1 auto; flex-direction: column; background: var(--bpss-white); color: var(--bpss-body); opacity: 1; visibility: visible; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; color: var(--bpss-muted); font-size: 13px; }
.entry-meta a { color: var(--bpss-muted); }
.entry-meta a:hover { color: var(--bpss-brand); }
.entry-title { margin: 0 0 14px; color: var(--bpss-heading); font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.entry-title a { color: inherit; }
.entry-title a:hover { color: var(--bpss-brand); }
.entry-summary { display: block; color: var(--bpss-body); font-size: 16px; line-height: 1.7; opacity: 1; visibility: visible; }
.entry-summary p { margin: 0; }
.read-more { display: inline-flex; align-self: flex-start; margin-top: 18px; font-weight: 600; }
.read-more::after { content: "›"; margin-left: 7px; }

.blog-sidebar { min-width: 0; }
.widget { margin-bottom: 28px; padding: 26px; border: 1px solid var(--bpss-border); border-radius: 8px; background: var(--bpss-soft); }
.widget:empty { display: none; }
.widget-title { margin: 0 0 16px; color: var(--bpss-heading); font-size: 20px; line-height: 1.35; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px solid rgba(113,47,155,.12); }
.widget li:last-child { border-bottom: 0; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-submit { flex: 0 0 auto; border-radius: 4px; padding-inline: 16px; }

.single-wrap { max-width: 860px; margin-inline: auto; padding-block: 72px 88px; }
.single-header { margin-bottom: 38px; }
.single-header .entry-title { margin-bottom: 16px; font-size: 44px; line-height: 1.2; }
.post-thumbnail { margin: 0 0 40px; overflow: hidden; border-radius: 8px; }
.entry-content { color: var(--bpss-body); font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { clear: both; color: var(--bpss-heading); line-height: 1.3; }
.entry-content h2 { margin: 46px 0 18px; font-size: 32px; }
.entry-content h3 { margin: 36px 0 16px; font-size: 25px; }
.entry-content h4 { margin: 28px 0 14px; font-size: 20px; }
.entry-content p { margin: 0 0 24px; }
.entry-content ul, .entry-content ol { margin: 0 0 26px; padding-left: 26px; }
.entry-content li { margin-bottom: 9px; }
.entry-content blockquote { margin: 34px 0; padding: 22px 28px; border-left: 5px solid var(--bpss-brand); background: var(--bpss-soft); color: var(--bpss-heading); }
.entry-content figure { margin: 34px 0; }
.entry-content figcaption { color: var(--bpss-muted); font-size: 13px; text-align: center; }
.entry-content .alignwide { width: min(100vw - 72px, var(--bpss-content)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.post-taxonomy { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--bpss-border); color: var(--bpss-muted); }
.post-navigation { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--bpss-border); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.nav-next { text-align: right; }
.navigation.pagination { grid-column: 1 / -1; margin-top: 18px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--bpss-border); border-radius: 4px; color: var(--bpss-brand); }
.page-numbers.current, .page-numbers:hover { border-color: var(--bpss-brand); background: var(--bpss-brand); color: var(--bpss-white); }

.comments-area { margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--bpss-border); }
.comments-title, .comment-reply-title { color: var(--bpss-heading); font-size: 25px; }
.comment-list { padding: 0; list-style: none; }
.comment-body { margin-bottom: 22px; padding: 22px; border: 1px solid var(--bpss-border); border-radius: 6px; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--bpss-heading); font-weight: 500; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.comment-form-cookies-consent label { font-weight: 400; }

.empty-state { padding: 46px; border-radius: 8px; background: var(--bpss-soft); text-align: center; }
.empty-state h2 { color: var(--bpss-heading); }

.site-footer { padding: 80px 0 30px; background: var(--bpss-brand); color: var(--bpss-white); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.45fr 1.45fr; gap: 36px; }
.site-footer .site-brand { display: inline-block; color: var(--bpss-white); }
.site-footer .site-brand span { color: var(--bpss-white); }
.site-footer h2 { margin: 0 0 10px; color: var(--bpss-white); font-size: 19px; line-height: 1.4; }
.site-footer p, .site-footer li, .site-footer a { color: #eddcf8; font-size: 16px; line-height: 1.7; }
.site-footer a:hover { color: var(--bpss-white); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.site-footer__social a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--bpss-white); border-radius: 50%; color: var(--bpss-white); }
.site-footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid #7e41a5; text-align: center; color: #e6d2f4; font-size: 15px; }

/* Shared UK cookie preference UI; behaviour comes from the root site's consent script. */
.cookie-container.cc-banner { position: fixed; right: 24px; bottom: 24px; z-index: 999999; display: block; width: min(430px, calc(100vw - 48px)); padding: 24px; border: 1px solid rgba(113,47,155,.18); border-top: 4px solid var(--bpss-brand); border-radius: 8px; background: var(--bpss-white); box-shadow: 0 16px 44px rgba(36,23,44,.2); transition: opacity 250ms ease, transform 250ms ease, visibility 250ms; }
.cookie-container.cc-banner.hide, .cc-panel.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.cookie-container h5, .cc-panel h5 { margin: 0 0 10px; color: var(--bpss-heading); font-size: 20px; }
.cookie-container .cookie-text { float: none; width: auto; margin: 0; color: var(--bpss-body); font-size: 14px; line-height: 1.6; text-align: left; }
.cc-actions, .cc-panel-actions { display: flex; gap: 10px; margin-top: 18px; }
.cc-actions button, .cc-panel-actions button { padding: 9px 18px; }
.cc-manage, .cc-save, .cc-reject { background: var(--bpss-white); color: var(--bpss-brand); }
.cc-panel { position: fixed; inset: 0; z-index: 1000000; display: grid; place-items: center; padding: 24px; background: rgba(21,21,21,.48); }
.cc-panel-inner { width: min(620px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; padding: 32px; border-radius: 8px; background: var(--bpss-white); box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.cc-group { margin-top: 18px; padding: 18px; border: 1px solid var(--bpss-border); border-radius: 6px; }
.cc-group label { display: block; color: var(--bpss-heading); }
.cc-group span { display: block; margin-top: 6px; color: var(--bpss-muted); font-size: 14px; }
.cc-note { color: var(--bpss-muted); font-size: 14px; }

@media (max-width: 992px) {
  body { padding-top: 82px; }
  .bpss-container { padding-inline: 28px; }
  .site-header, .site-header__inner { min-height: 82px; }
  .site-brand { font-size: 38px; line-height: .9; }
  .site-brand span { font-size: 12px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 10px 28px 20px; background: var(--bpss-white); box-shadow: 0 14px 24px rgba(0,0,0,.08); }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: block; }
  .site-nav a { padding: 11px 0; }
  .blog-layout { grid-template-columns: 1fr; gap: 44px; }
  .blog-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
  .widget { margin: 0; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .bpss-container { padding-inline: 20px; }
  .site-brand { font-size: 28px; }
  .site-brand span { max-width: 230px; font-size: 10px; }
  .site-nav { padding-inline: 20px; }
  .blog-masthead { padding: 50px 0 44px; }
  .blog-masthead h1, .single-header .entry-title { font-size: 31px; overflow-wrap: anywhere; }
  .blog-masthead p { font-size: 16px; }
  .blog-layout, .single-wrap { padding-block: 50px 64px; }
  .post-grid, .blog-sidebar, .site-footer__grid { grid-template-columns: 1fr; }
  .post-card__body { padding: 22px; }
  .entry-title { font-size: 22px; }
  .entry-content { font-size: 16px; }
  .entry-content h2 { font-size: 26px; }
  .entry-content h3 { font-size: 22px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .site-footer { padding-top: 58px; }
  .cookie-container.cc-banner { right: 16px; bottom: 16px; width: calc(100vw - 32px); }
  .cc-panel { padding: 16px; }
  .cc-panel-inner { padding: 24px 20px; max-height: calc(100vh - 32px); }
  .cc-panel-actions { flex-direction: column; }
}

@media (max-width: 390px) {
  .cc-actions { flex-direction: column; }
  .cc-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
