/* =========================================================
   Peters & Peters – staging fixes
   Loaded after style.css and custom.css (see functions.php),
   so these rules take priority over the theme's own CSS.
   ========================================================= */


/* ---------------------------------------------------------
   1. Buttons
   --------------------------------------------------------- */

/* All peters-buttons: semi-bold text */
.peters-button,
.peters-button span {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

/* Standard (white) peters-button: navy hover, white text.
   .reverse and .red variants keep their own hover styles. */
.peters-button:not(.reverse):not(.red):hover,
.peters-button:not(.reverse):not(.red):focus {
    background-color: #033859;
    border-color: #033859;
    color: #FFFFFF;
}
.peters-button:not(.reverse):not(.red):hover span,
.peters-button:not(.reverse):not(.red):focus span {
    color: #FFFFFF;
}

/* Hero CTA buttons (Bootstrap .btn.cta-btn): navy hover, white text */
.btn.cta-btn {
    --bs-btn-hover-bg: #033859;
    --bs-btn-hover-border-color: #033859;
    --bs-btn-hover-color: #FFFFFF;
    --bs-btn-active-bg: #033859;
    --bs-btn-active-border-color: #033859;
    --bs-btn-active-color: #FFFFFF;
    font-weight: 600;
}
.btn.cta-btn:hover,
.btn.cta-btn:focus {
    background-color: #033859;
    border-color: #033859;
    color: #FFFFFF;
}


/* Main content links – red, normal weight */
 
.wysiwyg-content p a:not(.peters-button):not(.btn),
.single-post-content p a:not(.peters-button):not(.btn),
.accordion-body p a:not(.peters-button):not(.btn) {
    color: #f23d3d ;
    font-weight: 400;
}
.larger-text.text-white h3 strong {
	  color: #fff ;
}

/* About page "View our vacancies" (and any other .cta-slide-btn):
   semi-bold text, navy hover with white text, like the other buttons */
a.cta-slide-btn {
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
a.cta-slide-btn:hover,
a.cta-slide-btn:focus,
a.cta-slide-btn:focus-visible {
    background-color: #033859;
    border-color: #033859;
    color: #FFFFFF;
    fill: #FFFFFF;
    font-weight: 600;
}


/* ---------------------------------------------------------
   3. Search & Filter load more
   Hide the bar once the last page has loaded.
   --------------------------------------------------------- */
.search-filter-input-button--hidden {
    display: none !important;
}
.sf-load-more-wrapper:has(.search-filter-input-button--hidden) {
    display: none;
}


/* News-grid load more (ESG Tracker etc.): match the other Read More bars.
   Overrides Bootstrap's .fw-normal and .btn-link blue hover/focus,
   makes the whole bar clickable, and thickens the + icon. */
   #news-grid-load-more {
    --bs-btn-color: #121d26;
    --bs-btn-hover-color: #f23d3d;
    --bs-btn-active-color: #121d26;
    --bs-btn-focus-shadow-rgb: none;
    font-weight: 600 !important;
    color: #121d26 !important;
    box-shadow: none !important;
}
#news-grid-load-more .btn-text {
    font-weight: 600 !important;
}
#news-grid-load-more:hover,
#news-grid-load-more:hover .btn-text {
    color: #f23d3d !important;
    background: transparent !important;
}
#news-grid-load-more:focus,
#news-grid-load-more:active,
#news-grid-load-more:focus-visible {
    color: #121d26 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Whole bar is clickable: an invisible layer from the button covers the bar */
.news-grid-footer {
    position: relative;
    cursor: pointer;
}
#news-grid-load-more::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Hovering anywhere on the bar turns the text and + red */
.news-grid-footer:hover #news-grid-load-more,
.news-grid-footer:hover #news-grid-load-more .btn-text,
.news-grid-footer:hover .plus-icon i {
    color: #f23d3d !important;
}

/* Bolder + icon (FA solid is already 900, so a thin outline thickens it) */
.news-grid-footer .plus-icon i {
    font-weight: 900;
    -webkit-text-stroke: 1.5px currentColor;
}


/* ---------------------------------------------------------
   Main menu – top-level items only: brand red on hover.
   A parent stays red while its dropdown is open.
   (Dropdown items already have their own hover colour.)
   --------------------------------------------------------- */
   #masthead ul.menu > li > a:hover,
   #masthead ul.menu > li:hover > a,
   #masthead ul.menu > li > a:focus-visible,
   #masthead .site-nav > li > a:hover,
   #masthead .site-nav > li:hover > a,
   #masthead .site-nav ul > li > a:hover,
   .navigate nav ul.menu > li > a:hover,
   .navigate nav ul.menu > li:hover > a {
       color: #F23D3D !important;
   }
   
   /* Dropdown arrows next to About / Expertise / Thinking turn red with the text */
   #masthead ul.menu > li:hover > a::after,
   #masthead ul.menu > li:hover > a::before,
   #masthead ul.menu > li:hover > a i,
   #masthead ul.menu > li:hover > a svg,
   .navigate nav ul.menu > li:hover > a::after,
   .navigate nav ul.menu > li:hover > a i {
       color: #F23D3D !important;
       border-color: #F23D3D !important;
       fill: #F23D3D !important;
   }


   /* Expertise accordion titles (from the [expertise_list] shortcode) – 15px.
   Targets only links pointing at #expertise-collapse-…, so the large
   titles on the Expertise landing page are not affected. */
a.pp-expertise-item[href^="#expertise-collapse-"],
a.pp-expertise-item[href^="#expertise-collapse-"] span {
    font-size: 1.5rem !important;
}


/* Accordion CTA buttons (e.g. Join us – "Read more"): red pill like live,
   hover inverts to white background with red text */
.accordion-body a.btn.btn-outline-dark {
    --bs-btn-color: #FFFFFF;
    --bs-btn-bg: #F23D3D;
    --bs-btn-border-color: #F23D3D;
    --bs-btn-hover-color: #F23D3D;
    --bs-btn-hover-bg: #FFFFFF;
    --bs-btn-hover-border-color: #F23D3D;
    --bs-btn-active-color: #F23D3D;
    --bs-btn-active-bg: #FFFFFF;
    --bs-btn-active-border-color: #F23D3D;
    background-color: #F23D3D;
    border: 1px solid #F23D3D;
    color: #FFFFFF;
    fill: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    border-radius: 80px !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.accordion-body a.btn.btn-outline-dark:hover,
.accordion-body a.btn.btn-outline-dark:focus,
.accordion-body a.btn.btn-outline-dark:active {
    background-color: #FFFFFF;
    border-color: #F23D3D;
    color: #F23D3D;
    fill: #F23D3D;
    box-shadow: none;
}


/* Text + image slider (e.g. Join us case studies): match live –
   fixed 317px height, width follows the image, never wider than the column */
.case-study-slider .case-study-image-wrapper img {
    width: auto !important;
    max-width: 100%;
    height: 317px;
    max-height: none !important;
    object-fit: fill;
}



/* ---------------------------------------------------------
   News grid "Sort by" control – match live
   --------------------------------------------------------- */

/* Sort control on its own line, right-aligned, below "Related content" */
.news-grid-section > .row.mb-4 > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
}
.news-grid-section > .row.mb-4 > .col-6:last-child {
    margin-top: 1.25rem;
}

/* Button: semi-bold dark label */
.custom-sort-dropdown .btn {
    font-size: 16px;
    font-weight: 600;
    color: #121D26;
    gap: 0.9rem !important;
}
.custom-sort-dropdown .btn:hover,
.custom-sort-dropdown .btn:focus,
.custom-sort-dropdown .btn.show {
    background: transparent !important;
    color: #121D26;
    box-shadow: none !important;
}

/* Hide Bootstrap's own black caret (keeps only the red chevron) */
.custom-sort-dropdown .dropdown-toggle::after {
    display: none !important;
}

/* Larger, thin grey ✕ */
.custom-sort-dropdown .clear-icon {
    font-size: 1.9rem;
    font-weight: 300;
    color: #9a9a9a;
    line-height: 0.7;
}
.custom-sort-dropdown .clear-icon:hover {
    color: #121D26;
}

/* Red chevron that flips up when the menu is open */
.custom-sort-dropdown .dropdown-arrow-icon {
    font-size: 1rem;
    color: #F23D3D;
    transition: transform 0.2s ease;
}
.custom-sort-dropdown .btn[aria-expanded="true"] .dropdown-arrow-icon {
    transform: rotate(180deg);
}

/* Menu: plain items, selected/hovered item blue with white text */
.custom-sort-dropdown .dropdown-menu {
    border-radius: 0;
    border: 1px solid #cfcfcf;
    padding: 0;
    min-width: 0;
    box-shadow: none !important;
}
.custom-sort-dropdown .dropdown-item {
    font-size: 16px;
    font-weight: 400;
    color: #4a4a4a;
    padding: 0.35rem 0.75rem;
}
.custom-sort-dropdown .dropdown-item.active,
.custom-sort-dropdown .dropdown-item:hover,
.custom-sort-dropdown .dropdown-item:focus,
.custom-sort-dropdown .dropdown-item:active {
    background-color: #1E73E8;
    color: #FFFFFF;
    font-weight: 400;
}

/* Case study slider titles (e.g. Join us) – match live */
.case-study-slider .swiper-slide h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 24px !important;
    font-weight: 600 !important;
}

/* ---------------------------------------------------------
   Contact page (page ID 318) – match live
   --------------------------------------------------------- */

/* Page title: bold like live */
.page-id-318 .wysiwyg-content h1 {
    font-weight: 700;
}

/* Section headings: 16px, medium weight, dark */
.page-id-318 .wysiwyg-content h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #121D26;
    margin-bottom: 0;
}

/* The line under each heading, with space before the text */
.page-id-318 .wysiwyg-content hr {
    margin: 14px 0 22px;
    border-top: 1px solid #121D26;
    opacity: 1;
}

/* Body text: 15px, 35px line height, no gaps between lines */
.page-id-318 .wysiwyg-content p {
    font-size: 15px;
    font-weight: 400;
    line-height: 35px;
    margin-bottom: 0;
}

/* "Tel:", "Fax:", "Email:", "DX:" labels: medium rather than bold */
.page-id-318 .wysiwyg-content p strong,
.page-id-318 .wysiwyg-content p b {
    font-weight: 500;
}



/* ---------------------------------------------------------
   Content rows with a YouTube video + caption (e.g. Our values):
   video column ~70%, caption ~30% aligned to the bottom, like live
   --------------------------------------------------------- */
@media (min-width: 768px)  {
    .nested-content-section .row:has(iframe[src*="youtube"]) > .col-md iframe {
        max-width: 755px
    }
    .nested-content-section .row:has(iframe[src*="youtube"]) > .col-md:last-child:not(:first-child) {
        flex: 0 0 40%;
        max-width: 40%;
        justify-content: flex-end;   /* caption sits level with the bottom of the video */
    }
}

/* Video fills its column at the correct 16:9 shape (instead of a fixed 525x295) */
.nested-content-section .wysiwyg-content iframe[src*="youtube"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin-bottom: 0px;
}
.nested-content-section .wysiwyg-content p:has(> iframe[src*="youtube"]) {
    margin-bottom: 0;
}

/* Caption next to the video: semi-bold, like live */
.nested-content-section .row:has(iframe[src*="youtube"]) > .col-md:last-child:not(:first-child) p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   Category badges on post cards – match live
   (Montserrat 14px, uppercase, white text, colour per category)
   --------------------------------------------------------- */
   .pp-cat-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    text-transform: uppercase;
    color: #FFFFFF;
    padding: 0 6px;
    background-color: #121D26;   /* default (News and anything not listed below) */
}
.pp-cat-badge.pp-cat-article  { background-color: #B82B2B; }
.pp-cat-badge.pp-cat-comment  { background-color: #0E3456; }
.pp-cat-badge.pp-cat-events   { background-color: #49461E; }
.pp-cat-badge.pp-cat-news     { background-color: #121D26; }


 