/*
Theme Name:   SBS Construct
Theme URI:    https://sbslimited.uk/
Author:       Site Building Services Limited
Author URI:   https://sbslimited.uk/
Description:  Construction, infrastructure and project-management theme for SBS Limited. Bootstrap 5, self-hosted fonts and vendor libraries, custom post types for services, projects, testimonials and hero slides, ACF-driven page content and Contact Form 7 integration.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  sbs
Tags:         construction, business, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks

The presentational CSS lives in assets/css/main.css. This file carries the theme
header (required by WordPress) plus the small set of rules needed to style
WordPress-generated markup that the static theme never had to deal with:
the admin bar, editor alignment classes, comments and Contact Form 7 output.
*/

/* -------------------- WordPress core alignment classes ------------------- */
.alignleft   { float: left; margin: .4rem 1.75rem 1.25rem 0; }
.alignright  { float: right; margin: .4rem 0 1.25rem 1.75rem; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; }
.alignwide   { max-width: 1140px; margin-left: auto; margin-right: auto; }
.alignfull   { max-width: 100%; }
.wp-caption  { max-width: 100%; }
.wp-caption-text,
.wp-element-caption {
  font-size: .85rem;
  color: var(--muted);
  padding-top: .5rem;
  margin-bottom: 0;
}
.sticky .entry-title::after { content: " \2605"; color: var(--amber); }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--white); border-radius: var(--r-sm);
  box-shadow: var(--shadow-md); clip: auto !important; clip-path: none;
  color: var(--blue-600); display: block; font-size: 1rem;
  height: auto; left: 8px; line-height: normal; padding: 14px 20px;
  text-decoration: none; top: 8px; width: auto; z-index: 100000;
}

/* The admin bar must not sit on top of the fixed site header. */
body.admin-bar .site-header.is-stuck { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header.is-stuck { top: 46px; }
}

/* ==========================================================================
   Theme integration
   Rules for markup that exists only in the WordPress build: the project card
   is now a real link to a case study with a separate lightbox control, the
   project fact table replaced a list of dummy anchors, and the footer and
   blog need styling the static pages never had.
   ========================================================================== */

/* --------------------------- Project cards ------------------------------ */
/* The card is an <article> wrapping a link, so the link has to fill it. */
.project-card .project-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}
.project-card .project-link img { position: absolute; inset: 0; }
.project-card .p-zoom { cursor: zoom-in; border: 0; }
.project-card .p-zoom:hover,
.project-card .p-zoom:focus-visible { background: var(--white); color: var(--blue-600); opacity: 1; }
/* Keep the zoom control reachable by keyboard even before hover reveals it. */
.project-card .p-zoom:focus-visible { opacity: 1; transform: none; outline: 2px solid var(--white); outline-offset: 2px; }

/* ------------------------- Project fact table --------------------------- */
/* The case-study sidebar lists facts, not links, so it reuses .side-nav's
   frame with non-interactive rows. */
.side-facts .fact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.2rem;
  font-size: .93rem;
  border-bottom: 1px solid var(--line);
}
.side-facts .fact-row:last-child { border-bottom: 0; }
.side-facts .fact-row span { color: var(--muted); }
.side-facts .fact-row strong { font-weight: 700; text-align: right; }

/* Anchor-based filter buttons, used once the archive is paginated. */
a.filter-btn { text-decoration: none; }

/* ---------------------------- Footer menus ------------------------------ */
/* wp_nav_menu renders its own <ul>, so the list resets main.css applied to
   the hand-written markup have to be repeated here. */
.site-footer .footer-links,
.site-footer .legal-links { list-style: none; padding-left: 0; margin-bottom: 0; }
.site-footer .legal-links li { display: inline-block; }
.site-footer .footer-widget h5 { margin-bottom: 1.1rem; }
.site-footer .footer-widget ul { list-style: none; padding-left: 0; }
.site-footer .footer-widget a { color: rgba(255, 255, 255, .72); }
.site-footer .footer-widget a:hover { color: var(--amber); }
.brand-logo { max-height: 56px; width: auto; }

/* --------------------------- Blog and search ---------------------------- */
.post-meta { font-size: .82rem; color: var(--muted); }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--blue-600); }
.post-tags a {
  display: inline-block;
  margin: 0 .35rem .35rem 0;
  padding: .3rem .7rem;
  font-size: .78rem;
  background: var(--soft);
  border-radius: var(--r-sm);
  color: var(--body);
}
.post-tags a:hover { background: var(--blue-050); color: var(--blue-600); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin: 2.4rem 0 1rem; }
.entry-content h3 { margin: 2rem 0 .85rem; }
.entry-content ul,
.entry-content ol { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.entry-content li { margin-bottom: .4rem; }
.entry-content blockquote {
  margin: 1.75rem 0;
  padding: 1.1rem 1.5rem;
  border-left: 3px solid var(--blue-600);
  background: var(--soft);
  font-size: 1.05rem;
}
.entry-content img { height: auto; border-radius: var(--r-md); }
.entry-content table { width: 100%; margin-bottom: 1.5rem; }
.entry-content th,
.entry-content td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content pre {
  padding: 1.1rem 1.3rem;
  background: var(--navy-900);
  color: #E6ECF8;
  border-radius: var(--r-md);
  overflow-x: auto;
}

/* --------------------------- Pagination --------------------------------- */
.sbs-pagination .page-link {
  color: var(--ink);
  border-color: var(--line);
  padding: .6rem .95rem;
  font-weight: 600;
}
.sbs-pagination .page-link:hover { background: var(--blue-050); color: var(--blue-600); border-color: var(--blue-600); }
.sbs-pagination .page-item.active .page-link,
.sbs-pagination .page-link.current {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

/* ---------------------------- Widgets ----------------------------------- */
.side-widget {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 1.5rem;
}
.side-widget .widget-title { margin-bottom: 1rem; font-size: 1.1rem; }
.side-widget ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.side-widget li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.side-widget li:last-child { border-bottom: 0; }

/* ---------------------- Testimonial photo avatars ----------------------- */
.t-avatar-img { border-radius: 50%; object-fit: cover; }

/* --------------------------- Comments ----------------------------------- */
.comment-list { list-style: none; padding-left: 0; }
.comment-list .children { list-style: none; padding-left: 1.75rem; }
.comment-body {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.comment-author img { border-radius: 50%; margin-right: .6rem; vertical-align: middle; }
.comment-metadata { font-size: .8rem; color: var(--muted); }
