/*
Theme Name: PHS Theme
Theme URI: https://phsafrica.com
Author: PHS
Author URI: https://phsafrica.com
Description: Custom WordPress theme for PHS. All visual styles come from the original tresio site CSS (assets/css/site.css + assets/css/vendor.css).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://phsafrica.com
Text Domain: chuvision
Tags: elementor, custom-colors, custom-menu, featured-images, threaded-comments
*/

/* Fontello icon font — used by tresio nav chevrons and icons */
@font-face {
    font-family: 'fontello';
    src: url('assets/fonts/fontello.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* No italics anywhere on the site — overrides <i>/<em>, .italic classes, and every
   font-style:italic rule inherited from the Chu Vision vendor stylesheet. */
*,
*::before,
*::after,
.italic {
    font-style: normal !important;
}

/* PHS brand fonts (per PHS WEBSITE_FONTS brief: headings = Lato, body/text = Source Sans 3).
   !important is required to win over assets/css/site.css's leftover Chu Vision font-family
   rules (proxima-nova / ivypresto-display) without touching that 664KB vendor file directly. */
body,
p,
li,
blockquote,
label,
input,
textarea,
button,
.btn,
a:not([class*="icon"]),
span:not([class*="icon"]) {
    font-family: 'Source Sans 3', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Lato', sans-serif !important;
}

/* Custom PHS cursor (upright shield logo) */
html,
body,
a,
button,
input,
textarea,
select,
summary,
[role="button"] {
    cursor: url('assets/images/phs/cursor.png') 43 8, auto !important;
}

/* Pointer fallback on interactive logo */
.logo-holder,
.logo-holder a,
.logo-holder img {
    cursor: url('assets/images/phs/cursor.png') 43 8, pointer !important;
}

/* Header email link */
.phone-holder .header-email {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Footer email */
.partial_footer .footer-email {
    display: block;
    color: #fff !important;
    text-decoration: none;
    margin-top: 6px;
    font-size: 0.9rem;
}

/* Gold on all button hovers */
.btn:hover,
a.btn:hover,
button.btn:hover,
.partial_form .submit-holder .btn:hover,
.partial_form .submit-holder .btn:focus,
.partial_form_sticky .sticky-form-header:hover,
.sticky-form-wrap .sticky-form-header:hover {
    background: var(--chu-secondary, var(--phs-secondary)) !important;
    background-color: var(--chu-secondary, var(--phs-secondary)) !important;
    border-color: var(--chu-secondary, var(--phs-secondary)) !important;
    color: #fff !important;
    filter: none !important;
}

/* Remove white oval / pseudo-element over submit buttons */
.partial_form .submit-holder .btn::before,
.partial_form .submit-holder button::before,
.submit-holder .btn::before,
.submit-holder button::before {
    display: none !important;
    content: none !important;
}

/* Justified paragraphs on about page */
.mod_intro p,
.mod_video .inner p,
.mod_half_image .copy p,
.mod_doctor .copy p,
.template-about p,
.mod_faq .answer p,
.mod_box_grid .box p {
    text-align: justify;
}

/* Center "Why Organisations Trust" box text */
.mod_box_grid .box {
    text-align: center;
}

/* About page heading alignment */
.mod_video .inner h2 {
    text-align: left !important;
}

/* Contact page icons */
.contact-info-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.contact-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--chu-secondary, var(--phs-secondary));
    color: #fff;
}

.contact-info-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Resources page hours alignment */
.phs-resources-contact .hours {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 1.2rem;
}

.phs-resources-contact .hours .tile {
    min-width: 120px;
}

:root {
    --phs-secondary: #d0b56e;
    --phs-primary: #1f3267;
}

h1 i,
h2 i,
h2 em,
.mod_hero h1 i,
.mod_banner h2 i,
.mod_banner h2 em,
.mod_index .copy .title h2,
.phs-service-grid .item h3,
.phs-service-closing,
.phs-quote,
.partial_footer .stars,
.partial_footer .partial_socials.social-v2 a,
.partial_footer .trademark .footer-credit a {
    color: var(--chu-secondary, var(--phs-secondary)) !important;
}

.btn::after,
a.btn::after,
.phs-team-card h2::after,
.mod_intro h2::after,
.mod_banner h2::after,
.phs-service-grid .intro h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 0.55rem;
    background: var(--chu-secondary, var(--phs-secondary));
}

.btn::after,
a.btn::after {
    width: 22px;
    height: 1px;
    margin: 0.35rem auto 0;
    background: currentColor;
    opacity: 0.8;
}

.phs-quote,
.phs-form-notice,
.partial_socials.social-v2 a,
.mod_index .item,
.phs-team-card img {
    border-color: var(--chu-secondary, var(--phs-secondary)) !important;
}

.phs-service-grid .item {
    box-shadow: inset 0 3px 0 var(--chu-secondary, var(--phs-secondary));
}

.phs-service-list li::marker {
    color: var(--chu-secondary, var(--phs-secondary));
}

.partial_footer .trademark .footer-credit .s3-logo,
.partial_footer .trademark .footer-credit .s3-logo::before,
.partial_footer .trademark .footer-credit .s3-logo::after {
    background-color: var(--chu-secondary, var(--phs-secondary)) !important;
}

/* Reduce the framework's ~120px .mod_intro top/bottom padding-block when two
   intro-style sections are stacked directly against each other (Who We Are /
   Our Purpose on the About page), since that usage wasn't how the theme's
   spacing rhythm was originally tuned (one heavy section at a time). */
.mod_intro.phs-tight-top .row {
    padding-top: 24px !important;
}

.mod_box_grid.phs-tight-top .row {
    padding-top: 24px !important;
}

/* Match the top spacing of other section headings on the page (e.g. Our
   Story's .mod_intro row uses this same clamp for its padding-block). */
.mod_box_grid.phs-values-section .row {
    padding-top: clamp(2.5rem, 1.2864rem + 5.178vw, 7.5rem) !important;
}

.phs-dark-box-grid .content-before h2,
.phs-dark-box-grid .content-before p {
    color: #fff;
}

.phs-workshops-band {
    background-color: var(--phs-primary);
    color: #fff;
    padding: clamp(50px, 7vw, 100px) 24px;
}

.phs-workshops-band-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.phs-workshops-band h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
}

.phs-workshops-subhead {
    color: #fff;
    opacity: 0.85;
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 48px);
}

.phs-quote-band,
.phs-cta-band {
    background-color: var(--phs-primary);
    color: #fff;
    padding: clamp(60px, 8vw, 120px) 24px;
    text-align: center;
}

.phs-quote-band-inner,
.phs-cta-band-inner {
    max-width: 720px;
    margin: 0 auto;
}

.phs-quote-band h2,
.phs-cta-band h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.phs-quote-band p,
.phs-cta-band p {
    color: #fff;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.phs-quote-mark {
    display: block;
    font-family: Georgia, serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--chu-secondary, var(--phs-secondary));
    margin-bottom: 0.5rem;
}

.phs-cta-band .btn.white,
.phs-quote-band .btn.white {
    display: inline-block;
    background: #fff;
    color: var(--phs-primary) !important;
    border-radius: 100vmax;
    padding: 14px 32px;
    text-decoration: none;
    font-weight: 600;
}

.phs-team-collage {
    padding: 20px 0;
}

.phs-team-department {
    padding: clamp(40px, 6vw, 72px) 0;
    background-color: #fff;
}

.phs-team-department-blue {
    background-color: var(--phs-primary, #1f3267);
}

.phs-team-department .row > h2 {
    margin-bottom: clamp(20px, 3vw, 36px);
    color: #1f3267;
}

.phs-team-department-blue .row > h2 {
    color: #fff;
}

.phs-team-department-blue .phs-team-card h2,
.phs-team-department-blue .phs-team-card p {
    color: #fff;
}

.phs-team-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    justify-content: center;
    gap: clamp(20px, 2.5vw, 36px);
}

.phs-team-card {
    display: block;
    max-width: 280px;
    text-decoration: none;
}

.phs-team-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 18px;
}

.phs-team-card h2 {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phs-home-silhouette {
    transform: translateX(50px);
}

.phs-value-icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.phs-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-items: start;
    gap: 20px;
    margin: 1.5rem 0;
}

.phs-workshop-card {
    padding: 20px 22px;
    border: 1px solid rgba(31, 50, 103, 0.15);
    background: #fff;
}

.phs-workshop-card {
    color: #333;
}

.phs-workshop-card summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: #1f3267;
}

.phs-workshop-card summary::-webkit-details-marker {
    display: none;
}

.phs-workshop-card summary .title::after {
    content: " +";
    color: var(--chu-secondary, var(--phs-secondary));
}

.phs-workshop-card[open] summary .title::after {
    content: " –";
}

.phs-workshop-card .phs-service-feature {
    margin-top: 12px;
}

/* Who We Are: vertically center the copy within the row on desktop so it
   doesn't leave large empty space below when the circular image is taller
   than the text. */
@media only screen and (min-width: 64.0625rem) {
    .phs-who-we-are .row.half-image-row .copy {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.phs-quote-text {
    text-align: justify;
}

/* Services drill-down closing quotes only (About Us "Our Purpose" keeps the
   normal paragraph size/justify above). */
.phs-quote-text.phs-quote-text-lg {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    line-height: 1.5;
    text-align: center;
}

/* Our Values: solid blue background on each card (not the whole section),
   value icons wired to the client-provided PNGs via phs_values_defaults().
   Layout: first 2 values centered on their own row, remaining 3 below. */
.phs-values-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(20px, 2.5vw, 32px);
}

.phs-values-grid .phs-value-box:nth-child(1) {
    grid-column: 2 / 4;
}

.phs-values-grid .phs-value-box:nth-child(2) {
    grid-column: 4 / 6;
}

.phs-values-grid .phs-value-box:nth-child(3) {
    grid-column: 1 / 3;
}

.phs-values-grid .phs-value-box:nth-child(4) {
    grid-column: 3 / 5;
}

.phs-values-grid .phs-value-box:nth-child(5) {
    grid-column: 5 / 7;
}

@media only screen and (max-width: 64rem) {
    .phs-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .phs-values-grid .phs-value-box:nth-child(1),
    .phs-values-grid .phs-value-box:nth-child(2),
    .phs-values-grid .phs-value-box:nth-child(3),
    .phs-values-grid .phs-value-box:nth-child(4),
    .phs-values-grid .phs-value-box:nth-child(5) {
        grid-column: auto;
    }
}

@media only screen and (max-width: 40rem) {
    .phs-values-grid {
        grid-template-columns: 1fr;
    }
}

.phs-value-box {
    background: #1f3267 !important;
    color: #fff;
    padding: clamp(24px, 3vw, 40px);
    border-radius: 12px;
    width: 100% !important;
    margin: 0 !important;
}

.phs-value-box p {
    text-align: justify;
}

/* Our Story: remove the reliance on a side/top image so the copy can use the
   full row width instead of the narrow default .mod_intro.wide 920px column
   (that theme rule has higher specificity than a single custom class, hence
   the !important). */
.phs-story-wide.mod_intro.wide .row .inner {
    max-width: 100% !important;
}

.phs-story-wide {
    background: #efefef;
}

.phs-story-wide p {
    text-align: justify;
}

.phs-logo-media img {
    object-fit: contain !important;
    padding: clamp(40px, 8vw, 120px);
    background: #fff;
}

.phs-service-tabs details .answer p + p {
    margin-top: 1rem;
}

/* The framework's .mod_faq relies entirely on its background <picture> for
   contrast behind white accordion text — safe as long as the picture keeps
   covering the module's full (possibly unbounded) height, but that's a
   single point of failure. Give every .mod_faq.v2 instance a real navy
   background-color as a permanent fallback, independent of image height. */
.mod_faq.v2 {
    background-color: var(--phs-primary);
}

/* The framework's .mod_faq .questions is built as a short, fixed-height,
   internally-scrolling FAQ list (max-height:480px). Our parent-service
   accordions are far taller (bullet groups + nested workshop cards), so
   force it back to normal in-page flow instead of a clipped scroll box. */
.phs-service-tabs .row {
    display: block !important;
}

.phs-service-tabs .questions {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.phs-service-tabs .intro {
    margin-bottom: clamp(24px, 4vw, 48px);
}

.phs-service-tabs .answer h4 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.phs-service-intro .inner p {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.phs-service-grid .row {
    position: relative;
    z-index: 1;
}

.phs-service-grid .box-wrap {
    align-items: stretch;
}

.phs-service-grid .item p:last-child,
.phs-service-feature p:last-child,
.phs-service-feature li:last-child {
    margin-bottom: 0;
}

.phs-service-closing {
    max-width: 900px;
    margin: clamp(24px, 4vw, 48px) auto 0;
    text-align: center;
    font-weight: 600;
}

.phs-service-list {
    margin: 1.25rem 0 0;
    padding-left: 1.2rem;
    text-align: left;
}

.phs-service-list li + li {
    margin-top: 0.85rem;
}

/* "What's Included" cards on the services drill-down pages: solid blue
   (not the theme's default gold-to-navy gradient), white text throughout. */
.mod_box_grid.phs-services-box-grid .boxes .box {
    background: #1f3267 !important;
}

.mod_box_grid.phs-services-box-grid .boxes .box h2,
.mod_box_grid.phs-services-box-grid .boxes .box h3,
.mod_box_grid.phs-services-box-grid .boxes .box p,
.mod_box_grid.phs-services-box-grid .boxes .box li {
    color: #fff;
}

/* "What's Included" items as a card grid instead of a bullet list (easier
   to scan than a long <ul>) — light overlay chips on the solid blue box. */
.phs-service-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 1.25rem;
    text-align: left;
}

.phs-service-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #fff;
}

.phs-independent-intro {
    margin-top: clamp(40px, 6vw, 80px);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    font-size: 0.85rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: currentColor;
    opacity: 0.65;
}

.breadcrumbs li:not(:last-child):after {
    content: "\203A";
    margin: 0 0.5em;
    opacity: 0.6;
}

.breadcrumbs li[aria-current="page"] {
    opacity: 1;
    font-weight: 600;
}

.breadcrumbs a {
    color: currentColor;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.mod_hero .breadcrumbs,
.mod_hero .breadcrumbs a {
    color: #fff;
}

.phs-quote {
    position: relative;
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid currentColor;
    font-size: 1.15rem;
}

.phs-quote:before,
.phs-quote:after {
    font-family: Georgia, serif;
    font-style: normal;
    opacity: 0.6;
}

.phs-quote:before {
    content: open-quote;
    margin-right: 0.15em;
}

.phs-quote:after {
    content: close-quote;
    margin-left: 0.15em;
}

.contact-page .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: clamp(30px, 5vw, 80px);
}

.contact-page .info {
    background: #1f3267;
    color: #fff;
    padding: clamp(28px, 4vw, 48px);
}

.contact-page .info a {
    color: inherit;
}

.phs-map {
    margin-bottom: clamp(40px, 5vw, 80px);
}

.partial_footer .main {
    position: relative;
    overflow: hidden;
}

.partial_footer .main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.38);
    pointer-events: none;
}

.partial_footer .main > *:not(.phs-footer-video) {
    position: relative;
    z-index: 1;
}

.partial_footer .main > .inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
}

.partial_footer .main .right-holder {
    margin-left: auto;
    text-align: right;
}

.partial_footer .trademark .item.s3.partial {
    display: block;
    visibility: visible;
    opacity: 1;
}

.partial_footer .trademark .item.s3.partial a {
    color: inherit;
}

.partial_footer .trademark .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
}

.partial_footer .trademark .reserved {
    justify-self: start;
}

.partial_footer .trademark .footer-legal {
    justify-self: center;
    margin-left: 0;
}

.partial_footer .trademark .footer-legal-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.partial_footer .trademark .footer-legal-menu li {
    margin: 0;
    padding: 0;
}

.partial_footer .trademark .footer-credit {
    display: block !important;
    justify-self: end;
    min-width: max-content;
    margin-left: 0 !important;
    text-align: right;
    opacity: 1 !important;
    visibility: visible !important;
}

.partial_footer .trademark .footer-credit a {
    display: inline-block !important;
    color: var(--chu-secondary, var(--phs-secondary)) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.phs-footer-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.mod_index .media-btn,
.mod_index .copy .title {
    cursor: url('assets/images/phs/cursor.png') 43 8, pointer !important;
}

.partial_form_sticky {
    z-index: 9999;
}

.phs-team-member-hero .row {
    justify-content: flex-end;
}

.phs-team-member-hero .inner {
    margin-left: auto;
}

.phs-team-member-hero .content {
    margin-left: auto;
    text-align: right;
}

.phs-team-member-hero .module-bg img {
    object-fit: cover;
    object-position: left top;
}

.phs-team-bio-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.mod_banner.background-1.phs-team-credentials {
    background: #fff;
}

.mod_banner.background-1.phs-team-credentials .row {
    background: #fff;
    border-color: #1f3267;
}

.mod_banner.background-1.phs-team-credentials .row h2,
.mod_banner.background-1.phs-team-credentials .row h3,
.mod_banner.background-1.phs-team-credentials .row p {
    color: #1f3267;
}

.mod_home_hero.banner .media .phs-hero-gradient {
    position: sticky;
    top: 0;
    left: 0;
    height: 104svh;
    margin-top: -104svh;
    transform: none;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(3, 21, 41, .6) 0%, rgba(3, 21, 41, .15) 35%, rgba(3, 21, 41, .2) 65%, rgba(3, 21, 41, .65) 100%);
}

@media only screen and (max-width: 64rem) {
    .mod_home_hero.banner .media .phs-hero-gradient {
        position: absolute;
        inset: 0;
        top: 0;
        height: 100%;
        margin-top: 0;
    }
}

.phs-about-hero-photo {
    object-fit: cover;
    object-position: 70% top;
}

.phs-form-notice {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
    background: #eef8f0;
    border-left: 4px solid #2f8f46;
    color: #14331c;
}

.phs-form-notice.error {
    background: #fff1f1;
    border-left-color: #b42318;
    color: #5f1713;
}

.partial_form .submit-holder {
    display: block !important;
    margin-top: 1.25rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.partial_form .submit-holder .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    padding: 14px 28px !important;
    min-width: 140px;
    width: auto !important;
    height: auto !important;
    border: 1px solid #1f3267 !important;
    border-radius: 100vmax !important;
    background: #1f3267 !important;
    color: #fff !important;
    font-family: "proxima-nova", Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.partial_form .submit-holder .btn:hover,
.partial_form .submit-holder .btn:focus {
    background: var(--chu-secondary, var(--phs-secondary)) !important;
    border-color: var(--chu-secondary, var(--phs-secondary)) !important;
    color: #fff !important;
}

.partial_socials.social-v2 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid currentColor;
    border-radius: 50%;
    text-decoration: none;
}

.partial_socials.social-v2 a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0;
    line-height: 1;
}


@media (max-width: 800px) {
    .contact-page .row {
        grid-template-columns: 1fr;
    }

    .phs-team-member-hero .content {
        text-align: left;
    }

    .partial_footer .trademark .row,
    .partial_footer .trademark .footer-legal-menu {
        justify-content: center;
    }

    .partial_footer .trademark .row {
        display: flex;
        flex-direction: column;
    }

    .partial_footer .trademark .footer-legal {
        margin-left: 0;
    }
}

/* 4-card service-type grids (Consulting Services under For Employers) should
   wrap 2-per-row instead of the default 3-per-row the .service-grid tile
   width naturally fits at this max-width. */
.mod_service_grid.phs-cards-2up .service-grid {
    max-width: 870px;
}
}

/* =============================================================
   BLOG LISTING TEMPLATE & SWIPER CAROUSEL FIXES
   ============================================================= */

/* Fix blog index item card images stretching full width without white space */
.partial_blog_index .content a.image {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 420px;
}

.partial_blog_index .content a.image picture,
.partial_blog_index .content a.image picture img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 420px;
    object-fit: cover !important;
}

/* Ensure sidebar category filter active/hover states match site theme */
body.blog .container:not(footer):not(.partial_cta_sub) .row.has-sidebar .sidebar a {
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

body.blog .container:not(footer):not(.partial_cta_sub) .row.has-sidebar .sidebar a:hover,
body.blog .container:not(footer):not(.partial_cta_sub) .row.has-sidebar .sidebar a.active {
    background: #1f3267;
    color: #fff !important;
}

/* Swiper blog carousel controls & layout on homepage */
.mod_phs_blog_carousel {
    padding-block: clamp(40px, 6vw, 80px);
}

.phs-blog-carousel-wrap {
    position: relative;
    padding-inline: 36px;
}

@media (max-width: 640px) {
    .phs-blog-carousel-wrap {
        padding-inline: 0;
    }
}

/* Carousel Card Base */
.phs-blog-swiper .phs-blog-card {
    height: auto !important;
    display: flex;
}

.phs-blog-card-link {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.phs-blog-card-link:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}

/* Card Hero Media — Full width top image, no white space gaps */
.phs-blog-card-media {
    position: relative !important;
    width: 100% !important;
    height: 210px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background: #1f3267;
}

.phs-blog-card-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.35s ease !important;
}

.phs-blog-card-link:hover .phs-blog-card-media img {
    transform: scale(1.05) !important;
}

/* Card Content Area */
.phs-blog-card-link .content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 24px 22px !important;
    background: #fff !important;
}

.phs-blog-card-link .content h3 {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    color: #1f3267 !important;
    font-weight: 700 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.phs-blog-card-link .content p {
    font-size: 0.92rem !important;
    color: #555 !important;
    line-height: 1.55 !important;
    margin-bottom: 20px !important;
    flex: 1 1 auto !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.phs-blog-card-btn {
    align-self: flex-start !important;
    margin-top: auto !important;
    font-size: 0.85rem !important;
    padding: 9px 20px !important;
}

/* Carousel Prev & Next Arrows — Positioned on OPPOSITE sides */
.phs-blog-prev,
.phs-blog-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: #1f3267 !important;
    border: 2px solid #1f3267 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 25 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s !important;
}

.phs-blog-prev:after,
.phs-blog-next:after {
    font-family: 'fontello' !important;
    font-size: 18px !important;
    color: #fff !important;
    line-height: 1 !important;
}

.phs-blog-prev:after {
    content: '\e800' !important; /* icon-left-open */
}

.phs-blog-next:after {
    content: '\e801' !important; /* icon-right-open */
}

.phs-blog-prev {
    left: -18px !important;
    right: auto !important;
}

.phs-blog-next {
    right: -18px !important;
    left: auto !important;
}

.phs-blog-prev:hover,
.phs-blog-next:hover {
    background: var(--chu-secondary, var(--phs-secondary)) !important;
    border-color: var(--chu-secondary, var(--phs-secondary)) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

@media (max-width: 920px) {
    .phs-blog-prev {
        left: 2px !important;
    }
    .phs-blog-next {
        right: 2px !important;
    }
}

/* =============================================================
   4 CARDS AFTER OUR TEAM BUTTON (.grid.phs-tiles-clean) — MOBILE 1 PER ROW
   ============================================================= */
@media (max-width: 800px) {
    .mod_provider_grid_background .wrapper .grid.phs-tiles-clean {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .mod_provider_grid_background .wrapper .grid.phs-tiles-clean .tile {
        width: 100% !important;
        min-height: 220px !important;
        height: 220px !important; /* Exact same width and height for all 5 cards */
        box-sizing: border-box !important;
        padding: 28px 24px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        background: #fff !important;
        border-radius: 1rem !important;
        overflow: hidden !important;
    }

    .mod_provider_grid_background .wrapper .grid.phs-tiles-clean .tile h2 {
        font-size: 1.25rem !important;
        margin-bottom: 10px !important;
        color: #1f3267 !important;
    }

    .mod_provider_grid_background .wrapper .grid.phs-tiles-clean .tile p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        color: #444 !important;
        margin: 0 !important;
    }
}

/* =============================================================
   OUR SERVICES HEADING AT START OF 5 SERVICE CARDS
   ============================================================= */
.phs-services-title {
    margin-bottom: 2.5rem !important;
    padding-top: 1rem !important;
}

.phs-services-title h2.h1 {
    color: #1f3267 !important;
}

.phs-services-title h2.h1 .small {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #d0b56e;
    margin-bottom: 6px;
}

/* =============================================================
   BLOG LISTING PAGE  (home.php — /blog/)
   ============================================================= */

/* Two-column layout: narrow sidebar + wider card grid */
.phs-blog-layout {
    display: grid !important;
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: clamp(24px, 4vw, 60px);
    padding-block: clamp(40px, 6vw, 80px);
}

@media (max-width: 860px) {
    .phs-blog-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Sidebar ──────────────────────────────────────────────── */
.phs-blog-sidebar {
    position: sticky;
    top: 100px;
    background: #f5f7fa;
    padding: 24px 20px;
    border-top: 3px solid var(--chu-secondary, var(--phs-secondary));
}

.phs-blog-sidebar h2 {
    font-size: 1.05rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    color: var(--phs-primary);
}

.phs-blog-sidebar a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.18s, color 0.18s;
}

.phs-blog-sidebar a:hover {
    background: var(--phs-primary);
    color: #fff;
}

.phs-blog-sidebar .count {
    font-size: 0.78rem;
    opacity: 0.6;
    margin-left: 6px;
}

/* "View All" button at the bottom of the sidebar */
.phs-blog-sidebar .btn.small {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 0.88rem;
}

/* ── Blog card grid ───────────────────────────────────────── */

/* Override the carousel's fixed width so cards stretch inside the grid */
.phs-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(18px, 2.5vw, 32px);
}

/* Reset carousel-specific sizing that fights the grid context */
.phs-blog-grid .phs-blog-card {
    width: 100% !important;
    flex-shrink: unset !important;
    min-width: unset !important;
}

/* Card base (dimensions already in site.css; the overrides below
   adjust what's needed for the grid context) */
.phs-blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: box-shadow 0.22s, transform 0.22s;
}

.phs-blog-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    transform: translateY(-3px);
}

.phs-blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail area */
.phs-blog-card-link picture.background {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}

.phs-blog-card-link picture.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
}

.phs-blog-card:hover .phs-blog-card-link picture.background img {
    transform: scale(1.04);
}

/* Content area */
.phs-blog-card-link .content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 24px;
}

/* Category badge */
.phs-blog-card-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--chu-secondary, var(--phs-secondary));
    margin-bottom: 8px;
}

.phs-blog-card-link .content h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    color: var(--phs-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phs-blog-card-link .content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Source attribution line */
.phs-blog-card-source {
    font-size: 0.75rem !important;
    color: #999 !important;
    margin-bottom: 14px !important;
    flex: none !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
}

/* CTA button inside the card */
.phs-blog-card-btn {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.82rem !important;
    padding: 9px 18px !important;
}

/* ── Pagination ───────────────────────────────────────────── */
.phs-blog-pagination {
    margin-top: clamp(28px, 4vw, 52px);
    text-align: center;
}

.phs-blog-pagination .nav-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.phs-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.phs-blog-pagination .page-numbers.current,
.phs-blog-pagination .page-numbers:hover {
    background: var(--phs-primary);
    border-color: var(--phs-primary);
    color: #fff;
}

.phs-blog-pagination .page-numbers.prev,
.phs-blog-pagination .page-numbers.next {
    width: auto;
    padding: 0 14px;
    border-radius: 100vmax;
    font-size: 0.85rem;
}

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 860px) {
    .phs-blog-sidebar {
        position: static;
    }
}

@media (max-width: 560px) {
    .phs-blog-grid {
        grid-template-columns: 1fr;
    }
}
