/*
Theme Name: Vanguard Life
Theme URI: https://vanguardlife.com/vl/
Author: Vanguard Life Assurance
Description: Theme for Vanguard Life Assurance with the same look as the static site: blue top bar, dropdown menu, home slider, product groups, Management & Board profiles, news and navy footer. After activating, go to Appearance > Import Vanguard Life content to load the pages, products, people, news and pictures. Works with the normal WordPress admin and its user roles (Administrator, Editor, Author, Contributor).
Version: 2.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: vanguard-life
*/

/* The design lives in assets/site.css (shared with the static site). WordPress-only extras: */
.wp-block-image img, .entry-content img { height: auto; }
.entry-content h2, .entry-content h3 { margin: 28px 0 12px; }
.wrap.narrow > .entry-content { line-height: 28px; }
.alignwide { max-width: 1140px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pagination { display: flex; gap: 8px; padding: 24px 0 0; }
.pagination:empty { display: none; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid #e6e6f8; border-radius: 6px; }
.pagination .current { background: #3131c0; color: #fff; }

/* A normal "List" block with the extra class "checks" gets the round tick icons. */
.checks li:not(:has(> svg))::before {
  content: ""; flex: 0 0 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
/* Pages built with blocks: text keeps a reading width, sections and galleries use the full width. */
.wrap.page-flow > * { max-width: 800px; margin-left: auto; margin-right: auto; }
.page-flow > .vl-block, .page-flow > .wp-block-gallery, .page-flow > .alignwide, .page-flow > .wp-block-columns, .page-flow > .wp-block-group { max-width: none; }
.page-flow > .vl-block { margin-top: 48px; margin-bottom: 48px; }
.page-flow > :first-child { margin-top: 0; }
.page-flow > :last-child { margin-bottom: 0; }
.page-flow > .vl-faqs, .page-flow > .vl-vacancies { max-width: 800px; }
.page-flow > .wp-block-gallery { margin-bottom: 48px; }
.wrap.page-flow > .wp-block-heading:has(+ .wp-block-gallery) { max-width: none; }
.wp-block-gallery .wp-block-image img { border-radius: 14px; }
.vl-block h2 { margin-top: 0; }
.vl-block .section-head { margin-bottom: 28px; }
.claim-box { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 48px; border-radius: var(--radius-lg); background: var(--soft); }
.csr-list { display: grid; gap: 24px; }
@media (max-width: 899px) { .claim-box { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; } }

/* Block styles you can pick in the editor: "Ticks" (lists) and "Large intro" (paragraphs). */
.is-style-checks { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 14px; }
.is-style-checks li { display: flex; gap: 12px; align-items: flex-start; }
.is-style-checks li::before { content: ""; flex: 0 0 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 16px no-repeat; }
.is-style-lead { font-size: 19px; color: var(--ink); line-height: 1.6; }
.prose > .is-style-lead:first-child, .page-flow > .is-style-lead:first-child { margin-top: 0; }

/* Footer: "Contact Us" leads to the head office page */
.footer h4 a.footer-head-link { color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.footer h4 a.footer-head-link svg { width: 14px; height: 14px; opacity: .7; }
.footer-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 600; color: #fff; }
.footer-more svg { width: 14px; height: 14px; }

/* Branches */
a.branch { color: inherit; transition: border-color .2s, box-shadow .2s; }
a.branch:hover { border-color: var(--brand); box-shadow: var(--shadow); }
a.branch > div { flex: 1; min-width: 0; }
a.branch > svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.branch span { display: block; }
.branch-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 28px; }
.branch-info > div { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.branch-info dt { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-width: 0; }
.branch-info dd { margin: 0; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.branch-map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 28px; }
.branch-map iframe { display: block; width: 100%; height: 360px; border: 0; }
@media (max-width: 599px) { .branch-info { grid-template-columns: 1fr; } .branch-map iframe { height: 280px; } }

/* FAQ answers written in the editor */
.faq details > :not(summary) { padding: 0 24px; margin: 0 0 14px; }
.faq details > :last-child { padding-bottom: 20px; margin-bottom: 0; }

/* Vacancies */
.job-list { display: grid; gap: 16px; margin: 18px 0 28px; }
.job-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.job-card h3 { margin: 0 0 6px; font-size: 19px; }
.job-card h3 a { color: var(--ink); }
.job-card p { margin: 0 0 10px; }
.job-card .job-meta { font-size: 14px; color: var(--muted); }
.jobs-empty { padding: 20px 24px; border-radius: var(--radius); background: var(--soft); margin: 18px 0 28px; }
.jobs-empty p:last-child { margin-bottom: 0; }
.job-closed { padding: 14px 18px; border-radius: var(--radius); background: var(--soft-2); }

.results ul { padding-left: 20px; }
.results li { margin: 8px 0; }
