/**
 * [B] Baqueiro · WordPress integration.
 * Complements base.css and light.css (mockup v2.0) with icons, menus,
 * WordPress classes, block content and pagination.
 */

/* Icons inside components */

.icon-chip .bq-icon {
  width: 32px;
  height: 32px;
}

.services-group .bq-icon {
  width: 20px;
  height: 20px;
  color: var(--bq-navy-700);
}

/* Mega menu with a variable number of columns */

.services-panel-grid.cols-1 {
  grid-template-columns: 1fr;
}

.services-panel-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.services-panel-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .services-panel-grid[class*="cols-"] {
    grid-template-columns: 1fr;
  }
}

/* Sticky header below the admin bar */

.admin-bar .site-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

/* Accessibility helpers */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--bq-navy-700);
  display: block;
  height: auto;
  left: 8px;
  padding: 12px 16px;
  top: 8px;
  width: auto;
  z-index: 100000;
}

/*
 * Blog tools (search and topic). Without JavaScript a submit button is shown;
 * theme.js adds .is-enhanced, submits on topic change and keeps Enter for the search.
 */

.blog-tools {
  grid-template-columns: 2fr 1fr auto;
  align-items: start;
}

.blog-tools-submit {
  align-self: end;
  margin-bottom: 24px;
}

.blog-tools.is-enhanced {
  grid-template-columns: 2fr 1fr;
}

.blog-tools.is-enhanced .blog-tools-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
  padding: 0;
  border: 0;
}

@media (max-width: 767px) {
  .blog-tools,
  .blog-tools.is-enhanced {
    grid-template-columns: 1fr;
  }
}

.category-links a[aria-current] {
  background: var(--bq-navy-700);
  color: #fff;
}

.article-card .card-link {
  margin-top: auto;
}

/* Search form */

.search-form {
  max-width: 640px;
}

.search-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.search-form-row {
  display: flex;
  gap: 12px;
}

.search-form input[type="search"] {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--bq-neutral-300);
  border-radius: 6px;
  background: #fff;
  color: var(--bq-text);
}

/* Pagination */

.pagination {
  margin-top: 48px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--bq-border);
  border-radius: 6px;
  color: var(--bq-navy-700);
  text-decoration: none;
  font-weight: 600;
}

.pagination .page-numbers:hover {
  border-color: var(--bq-navy-400);
}

.pagination .page-numbers.current {
  background: var(--bq-navy-700);
  border-color: var(--bq-navy-700);
  color: #fff;
}

.pagination .page-numbers.dots {
  border: 0;
}

/* Hero without the hero-grid wrapper (listings, posts and default pages) */

.hero time {
  white-space: nowrap;
}

/* Block content inside .prose (posts and default pages) */

.prose > *:first-child {
  margin-top: 0;
}

.prose img {
  height: auto;
  border-radius: var(--bq-radius-md);
}

.prose figure {
  margin: 32px 0;
}

.prose figcaption,
.prose .wp-element-caption,
.wp-caption-text {
  font-size: .875rem;
  color: var(--bq-text-muted);
  margin-top: 8px;
}

.prose .wp-block-quote,
.prose .wp-block-pullquote {
  border-left: 3px solid var(--bq-gold-400);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
}

.prose .wp-block-pullquote {
  border-top: 0;
  border-bottom: 0;
  text-align: left;
}

.prose code {
  font-family: var(--bq-font-mono);
  font-size: .875em;
  background: var(--bq-neutral-50);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose .wp-block-table table {
  display: table;
}

.prose .wp-block-separator,
.prose hr {
  border: 0;
  border-top: 1px solid var(--bq-border);
  margin: 48px 0;
}

.prose .wp-block-button__link,
.prose .wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 6px;
  background: var(--bq-gold-400);
  color: var(--bq-navy-700);
  font: 600 1rem/1.4 var(--bq-font-body);
  text-decoration: none;
}

.prose .wp-block-button__link:hover,
.prose .wp-element-button:hover {
  background: var(--bq-gold-300);
}

.prose .wp-block-embed,
.prose iframe {
  max-width: 100%;
}

.post-tags {
  margin-top: 48px;
}

.post-tags a {
  text-decoration: none;
}

/* WordPress core classes */

.alignleft {
  float: left;
  margin: 8px 24px 16px 0;
}

.alignright {
  float: right;
  margin: 8px 0 16px 24px;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.alignwide,
.alignfull {
  max-width: 100%;
}

.wp-caption {
  max-width: 100%;
}

.gallery-caption,
.sticky,
.bypostauthor {
  display: revert;
}

.page-links {
  margin-top: 32px;
  font-weight: 600;
}

@media (max-width: 767px) {
  .alignleft,
  .alignright {
    float: none;
    margin: 24px 0;
  }

  .search-form-row {
    flex-direction: column;
  }
}

/* Manifesto: pull quotes between principles */

.manifesto-quote {
  margin: 0 0 48px;
  padding: 32px 0 32px 32px;
  border-left: 4px solid var(--bq-gold-400);
  background: var(--bq-navy-50);
  border-radius: 0 var(--bq-radius-md) var(--bq-radius-md) 0;
}

.manifesto-quote p {
  margin: 0;
  padding-right: 32px;
  font: 600 var(--bq-text-h3)/1.35 var(--bq-font-display);
  color: var(--bq-navy-700);
  letter-spacing: -0.01em;
}

@media (max-width: 767px) {
  .manifesto-quote {
    padding: 24px 0 24px 20px;
    margin-bottom: 32px;
  }

  .manifesto-quote p {
    padding-right: 20px;
  }
}

/* Language bar (above the header) */

.lang-bar {
  background: var(--bq-navy-900);
  border-bottom: 1px solid var(--bq-navy-800);
}

.lang-switch ul {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 8px;
  color: #fff;
  font: 600 .9375rem/1 var(--bq-font-body);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.lang-switch a:hover {
  background: var(--bq-navy-700);
  color: #fff;
}

.lang-switch a[aria-current] {
  background: var(--bq-navy-50);
  color: var(--bq-navy-900);
}

.lang-switch a:focus-visible {
  box-shadow: 0 0 0 2px var(--bq-navy-900), 0 0 0 4px var(--bq-gold-400);
}

.lang-flag {
  width: 21px;
  height: 14px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .25);
}

.lang-short {
  display: none;
}

@media (max-width: 600px) {
  .lang-switch ul {
    justify-content: center;
    gap: 4px;
  }

  .lang-switch a {
    gap: 6px;
    padding: 6px 10px;
  }

  .lang-name {
    display: none;
  }

  .lang-short {
    display: inline;
    font-family: var(--bq-font-mono);
    font-size: .8125rem;
  }
}

/* Contact form feedback ([B] Leads) */

.bdw-form-status {
  border-radius: 6px;
  padding: 16px;
  margin: 0 0 24px;
  font-size: 1rem;
}

.bdw-form-status--success {
  background: var(--bq-success-bg);
  color: var(--bq-success);
}

.bdw-form-status--error {
  background: var(--bq-error-bg);
  color: var(--bq-error);
}

.lang-note {
  font-size: .875rem;
  color: var(--bq-text-muted);
  margin-bottom: 24px;
}

/* Components used by the restored content */

.cards.cols-1 {
  grid-template-columns: 1fr;
  max-width: 820px;
}

.cards.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plain-card h3 {
  margin-bottom: 12px;
}

.plain-card h4 {
  font-size: 1rem;
  margin: 20px 0 8px;
  color: var(--bq-navy-700);
}

.plain-card p {
  font-size: 1rem;
}

.plain-card .check-list {
  margin: 16px 0 0;
}

.plain-card .check-list li {
  margin-bottom: 10px;
  font-size: .9375rem;
}

.plain-card .tags {
  margin-top: 12px;
}

.plain-card .card-link,
.plain-card .actions {
  margin-top: 16px;
}

.plain-card.featured {
  border: 2px solid var(--bq-gold-400);
}

.plain-card .price {
  font: 700 2rem/1.1 var(--bq-font-display);
  color: var(--bq-navy-700);
  margin: 8px 0 16px;
}

.plain-card .price-quote {
  font-size: 1.25rem;
}

.plain-card .price-note {
  margin: -8px 0 16px;
  font-size: .875rem;
  color: var(--bq-text-muted);
}

.plain-card.testimonial p:first-of-type {
  font-size: 1.0625rem;
  font-style: italic;
}

.plain-card.testimonial .small,
.plain-card.testimonial p:last-child {
  color: var(--bq-text-muted);
  font-style: normal;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 48px;
  max-width: 980px;
}

.steps .check-list {
  margin: 16px 0 0;
}

.steps .check-list li {
  font-size: .9375rem;
  margin-bottom: 8px;
}

.callout {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border-radius: var(--bq-radius-md);
  background: var(--bq-navy-700);
  color: #fff;
}

.callout h2 {
  color: #fff;
  font-size: var(--bq-text-h3);
  margin-bottom: 8px;
}

.callout p {
  color: var(--bq-navy-100);
  margin-bottom: 0;
}

.callout .actions {
  margin-top: 0;
  flex-shrink: 0;
}

.case-study {
  max-width: 860px;
  padding: 40px;
  background: #fff;
  border-radius: var(--bq-radius-md);
  border-left: 4px solid var(--bq-gold-400);
  box-shadow: var(--bq-shadow);
}

.case-study h3 {
  font-size: var(--bq-text-h3);
}

.case-study h3 + h3 {
  font-size: 1.1875rem;
  margin-top: 24px;
}

.section h3 {
  margin-top: 32px;
}

.section .section-head + h3,
.section .cards h3,
.section .work-grid h3,
.section .steps h3,
.section .faq-grid h3 {
  margin-top: 0;
}

.section-head + p,
.section-head ~ p {
  max-width: 760px;
}

.table-wrap {
  position: relative; /* Contains the absolutely positioned screen-reader texts of the cells. */
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--bq-border);
  border-radius: var(--bq-radius-md);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bq-border);
  text-align: left;
  vertical-align: top;
}

.table-wrap tr:first-child th,
.table-wrap tr:first-child td {
  background: var(--bq-navy-50);
  color: var(--bq-navy-700);
  font-weight: 600;
}

/* Group rows of a comparison table (<tr class="table-group"><th colspan="…">). */
.table-wrap tr.table-group th {
  background: var(--bq-bg-alt);
  color: var(--bq-navy-700);
  font: 600 .8125rem/1.4 var(--bq-font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Included / not included marks: <span class="bq-icon mark yes" data-icon="check" aria-hidden="true"></span>. */
.table-wrap .mark {
  font-size: 1.125rem;
}

.table-wrap .mark.yes {
  color: var(--bq-navy-700);
}

.table-wrap .mark.no {
  color: var(--bq-neutral-500);
}

@media (max-width: 600px) {
  .table-wrap table {
    font-size: .8125rem;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 10px 8px;
  }
}

@media (max-width: 1100px) {
  .cards.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .cards.cols-2,
  .cards.cols-4,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .callout {
    flex-direction: column;
    align-items: start;
    padding: 24px;
  }

  .case-study {
    padding: 24px;
  }
}

.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}

.link-grid a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--bq-border);
  border-radius: var(--bq-radius-pill);
  background: #fff;
  color: var(--bq-navy-700);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}

.link-grid a::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bq-gold-400);
}

.link-grid a:hover {
  border-color: var(--bq-navy-400);
  background: var(--bq-navy-50);
}

.plain-card .icon-chip {
  margin-bottom: 20px;
}

/* Articles: TL;DR summary box */

.prose .tldr {
  padding: 24px 28px;
  border-left: 4px solid var(--bq-gold-400);
  border-radius: 0 var(--bq-radius-md) var(--bq-radius-md) 0;
  background: var(--bq-navy-50);
  color: var(--bq-navy-800);
  font-size: 1rem;
  line-height: 1.7;
}

.prose .tldr strong:first-child {
  display: block;
  margin-bottom: 4px;
  font: 600 .8125rem/1.4 var(--bq-font-mono);
  letter-spacing: .08em;
  color: var(--bq-gold-700);
}

.lang-switch a[aria-current] .lang-flag {
  box-shadow: 0 0 0 1px rgb(10 22 54 / .25);
}

/* Balanced line breaks in headings, no orphan words in leads */

h1,
h2,
h3,
.final-cta h2,
summary {
  text-wrap: balance;
}

.lead,
.section-head p {
  text-wrap: pretty;
}

/* An h2 that keeps the size of an h3 (sections without their own heading) */

h2.h3 {
  font-size: var(--bq-text-h3);
  font-weight: 600;
  margin-bottom: 16px;
}

/* Contact page on small screens: the form first, the other channels after it */

@media (max-width: 767px) {
  .contact-grid .form-panel {
    order: -1;
  }
}
