/*
Theme Name:  Valentine & Co 2026
Theme URI:
Author:      Valentine & Co
Description: Professional bespoke WordPress theme for Valentine & Co, a boutique insolvency practice.
Version:     1.0.5
License:     All Rights Reserved
Text Domain: valentine-co
Tags:
*/

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
    --clr-bg:          #FAFAF8;
    --clr-bg-alt:      #EEEEEE;
    --clr-text:        #1A1918;
    --clr-text-muted:  #6B6560;
    --clr-accent:      #0078C1;
    --clr-accent-dark: #00609A;
    --clr-accent-light:#E9F4FB;
    --clr-border:      #E3DDD5;
    --clr-white:       #FFFFFF;
    --clr-nav-bg:      rgba(250, 250, 248, 0.96);
    --clr-footer-bg:   #18120F;
    --clr-footer-text: #BDB5AE;

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-heading: "Cabin", Helvetica Neue, Sans-serif;
    --font-body:    'Open Sans', 'Helvetica Neue', sans-serif;

    --nav-h:         80px;
    --section-py:    24px;
    --container-w:   1200px;
    --container-px:  48px;

    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition: 0.3s var(--ease);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--clr-text);
    background: var(--clr-bg);
    overflow-x: clip;
}

/* H1 uses the body font stack (Open Sans); h2/h3 keep --font-heading */
h1, .hero-strapline, .page-title { font-family: var(--font-body); }

img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* Skip link (a11y) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 10px 20px;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--clr-nav-bg);
    transition: box-shadow var(--transition);
}

/* Blur on ::before so .site-header itself doesn't become a containing block
   for position:fixed descendants (backdrop-filter triggers that behaviour) */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: -1;
    pointer-events: none;
}

.site-header.scrolled {
    box-shadow: 0 2px 40px rgba(26, 25, 24, 0.07);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}

.nav-logo img {
    width: 240px;
    height: auto;
    padding-top:8px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    position: relative; /* needed for dropdown positioning */
}

.nav-menu li a {
    display: inline-block;
    padding: 8px 22px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-text);
    position: relative;
    transition: color var(--transition);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 22px;
    right: 22px;
    height: 1px;
    background: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
}

.nav-menu li a:hover { color: var(--clr-accent); }
.nav-menu li a:hover::after { transform: scaleX(1); transform-origin: left; }

/* nav-cta: WordPress adds custom classes to <li>, so target li.nav-cta > a */
.nav-menu li.nav-cta > a {
    margin-left: 10px;
    padding: 11px 28px;
    background: var(--clr-accent);
    color: var(--clr-white) !important;
    letter-spacing: 0.1em;
    font-size: 0.775rem;
    font-weight: 500;
    transition: background var(--transition), transform var(--transition);
}

.nav-menu li.nav-cta > a::after { display: none; }
.nav-menu li.nav-cta > a:hover { background: var(--clr-accent-dark); color: var(--clr-white) !important; transform: translateY(-1px); }

/* Register button — grouped with menu via .nav-right wrapper */
.nav-register-btn {
    flex-shrink: 0;
    margin-left: 8px;
    padding: 10px 24px;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background var(--transition), transform var(--transition);
}

.nav-register-btn:hover {
    background: var(--clr-accent-dark);
    color: var(--clr-white);
    transform: translateY(-1px);
}

/* ---- Dropdown toggle button (injected by JS) ---- */

.sub-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: -10px;
    font-size: 0.65rem;
    color: var(--clr-text);
    vertical-align: middle;
    transition: transform var(--transition), color var(--transition);
}

.nav-menu li:hover > .sub-menu-toggle,
.nav-menu li.sub-menu-open > .sub-menu-toggle { color: var(--clr-accent); }
.nav-menu li.sub-menu-open > .sub-menu-toggle { transform: rotate(180deg); }

/* ---- Dropdown sub-menus ---- */

.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--clr-nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 2px solid var(--clr-accent);
    box-shadow: 0 8px 32px rgba(26, 25, 24, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s 0.2s;
    z-index: 200;
    padding: 6px 0;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li.sub-menu-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.nav-menu .sub-menu li { display: block; width: 100%; }

.nav-menu .sub-menu a {
    display: block;
    padding: 10px 22px;
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-text);
    white-space: nowrap;
    border-bottom: 1px solid var(--clr-border);
    transition: color var(--transition), background var(--transition), padding-left var(--transition);
}

.nav-menu .sub-menu li:last-child > a { border-bottom: none; }
.nav-menu .sub-menu a:hover { color: var(--clr-accent); padding-left: 30px; background: var(--clr-bg-alt); }

/* Suppress underline animation inside sub-menus */
.nav-menu .sub-menu a::after { display: none; }

/* Third-level dropdown sits to the right */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 2px solid var(--clr-accent);
}

/* Burnt Orange accent line */
.nav-accent-line { height: 3px; background: var(--clr-accent); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 6px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--clr-text);
    transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-right      { display: flex; align-items: center; }
.nav-menu-wrap  { display: flex; align-items: center; }

/* Desktop only: widen the nav box and trim its side padding so the logo
   shifts left and the menu + Register button shift right by the same amount.
   (Below 769px the mobile nav takes over, so this is left untouched there.) */
@media (min-width: 769px) {
    .site-nav {
        max-width: 1320px;
        padding-left: 32px;
        padding-right: 32px;
    }

    .nav-logo {
        margin-left: 72px;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.section-hero {
    position: relative;
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 70px) 0 80px;
    background-color: #f0f6fb;
    background-image: url('assets/images/blue_building.png');
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Gradient overlay so text on the left is exceptionally clear and legible */
.section-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(240, 246, 252, 0.98) 0%, rgba(240, 246, 252, 0.92) 38%, rgba(240, 246, 252, 0.45) 58%, rgba(240, 246, 252, 0) 78%);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    max-width: 660px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0;
}

.hero-eyebrow-wrap {
    margin-bottom: 22px;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #124874;
    display: block;
    line-height: 1.3;
}

.hero-accent-bar {
    width: 44px;
    height: 3px;
    background: #0078c1;
    margin-top: 8px;
}

.hero-strapline {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4.4vw, 3.65rem);
    font-weight: 500;
    line-height: 1.16;
    color: #0c3359;
    letter-spacing: -0.015em;
    margin-bottom: 22px;
}

.hero-lead {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: #1a456e;
    max-width: 560px;
    margin-bottom: 34px;
}

/* Action Buttons */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-btn-touch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #0078c1;
    color: #ffffff;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid #0078c1;
    border-radius: 2px;
    box-shadow: 0 4px 16px rgba(0, 120, 193, 0.25);
    transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.hero-btn-touch:hover {
    background: #00609a;
    border-color: #00609a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 193, 0.35);
}

.hero-btn-touch .btn-arrow {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.25s var(--ease);
}

.hero-btn-touch:hover .btn-arrow {
    transform: translateX(4px);
}

.hero-btn-free {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.75);
    color: #0078c1;
    padding: 14px 24px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid #9dc3e6;
    border-radius: 2px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero-btn-free:hover {
    background: #ffffff;
    border-color: #0078c1;
    color: #005a94;
    transform: translateY(-2px);
}

.hero-phone-icon {
    flex-shrink: 0;
    color: #0078c1;
}

/* Accreditations Bar */
.hero-accreditations {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.accreditation-item {
    display: flex;
    align-items: center;
}

.accreditation-item img {
    height: 100px;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.accreditation-item img:hover {
    transform: translateY(-2px);
}

.accreditation-divider {
    width: 1px;
    height: 90px;
    background: rgba(18, 72, 116, 0.22);
}

@media (max-width: 1024px) {
    .section-hero {
        background-position: 70% center;
        padding: calc(var(--nav-h) + 40px) 0 60px;
    }

    .hero-strapline {
        font-size: clamp(2rem, 3.8vw, 2.8rem);
    }

    .accreditation-item img {
        height: 90px;
    }

    .accreditation-divider {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .section-hero {
        background-position: 80% top;
        min-height: auto;
        padding: calc(var(--nav-h) + 30px) 0 50px;
    }

    .section-hero::before {
        background: linear-gradient(to bottom, rgba(240, 246, 252, 0.97) 0%, rgba(240, 246, 252, 0.94) 65%, rgba(240, 246, 252, 0.88) 100%);
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-strapline {
        font-size: 1.85rem;
        margin-bottom: 16px;
    }

    .hero-lead {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        margin-bottom: 36px;
    }

    .hero-btn-touch, .hero-btn-free {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .hero-accreditations {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
        width: 100%;
        overflow-x: visible;
    }

    .accreditation-item {
        flex: 0 0 auto;
    }

    .accreditation-item img {
        height: 60px;
        width: auto;
        max-width: none;
    }

    .accreditation-divider {
        height: 44px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .hero-accreditations {
        gap: 8px;
    }

    .accreditation-item img {
        height: 60px;
        max-width: none;
    }

    .accreditation-divider {
        height: 40px;
    }
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */

.section-services { position: relative; padding: var(--section-py) 0; background: var(--clr-white); }
.section-about    { position: relative; padding: var(--section-py) 0; background: var(--clr-bg-alt); }
.section-contact  { position: relative; padding: var(--section-py) 0; background: var(--clr-white); }

.section-header { text-align: center; margin-bottom: 32px; }

.section-label {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 18px;
}

h2, .section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    color: #0c3359;
    letter-spacing: -0.015em;
}

.section-desc {
    margin-top: 22px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    color: var(--clr-text-muted);
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Scroll-reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible            { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible    { transition-delay: 0.1s; }
.reveal-delay-2.is-visible    { transition-delay: 0.2s; }
.reveal-delay-3.is-visible    { transition-delay: 0.3s; }
.reveal-delay-4.is-visible    { transition-delay: 0.4s; }

/* Service cards use fade-only — translateY creates a gap that exposes the grid background */
.service-card.reveal,
.service-card.reveal.is-visible { transform: none; }

/* ============================================================
   SERVICES SECTION
   ============================================================ */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    background: var(--clr-border);
}

.service-card {
    background: var(--clr-bg);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.service-card:hover { transform: translateY(-3px); box-shadow: 0 24px 64px rgba(26, 25, 24, 0.09); }
.service-card:hover::before { transform: scaleX(1); }

/* Content area (everything except the thumbnail) */
.service-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 52px 40px 44px;
}

.service-card-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--clr-bg-alt);
    flex-shrink: 0;
}

.service-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease);
}

.service-card:hover .service-card-thumb img { transform: scale(1.04); }


.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 14px;
    line-height: 1.25;
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 0.9375rem;
    line-height: 1.75;
    flex: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-accent);
    transition: gap var(--transition), color var(--transition);
}

.service-link:hover { gap: 16px; }
.service-link::after { content: '→'; }

.services-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    color: var(--clr-text-muted);
    border: 1px dashed var(--clr-border);
    background: var(--clr-bg);
}

/* ---- One-per-row: horizontal block layout ---- */

.services-grid:not(.is-carousel) .service-card {
    flex-direction: row;
    align-items: stretch;
}

.services-grid:not(.is-carousel) .service-card-thumb {
    flex: 0 0 300px;
    height: auto;
    min-height: 240px;
}

.services-grid:not(.is-carousel) .service-card-body {
    padding: 44px 52px;
    border-left: 1px solid var(--clr-border);
}

/* ---- Service group heading (one-per-row mode) ---- */

.service-group {
    margin-bottom: 52px;
}

.service-group:last-child { margin-bottom: 0; }

.service-group-heading {
    font-family: var(--font-heading);
    font-size: 1.50rem;
    text-align:center;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--clr-accent);
    padding-bottom: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--clr-accent);
}

/* ---- Carousel group divider block ---- */

.service-group-divider {
    flex: 0 0 calc(33.333% - 2px);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-accent);
    min-height: 300px;
    pointer-events: none;
}

.service-group-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--clr-white);
}

/* ============================================================
   SERVICES CAROUSEL MODE
   Toggled via Appearance > Customise > Services Section
   ============================================================ */

.services-carousel-wrap { position: relative; }

.services-grid.is-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 2px;
    background: transparent;
    cursor: grab;
}

.services-grid.is-carousel::-webkit-scrollbar { display: none; }

/* While mouse-dragging: disable snap so scroll tracks finger exactly */
.services-grid.is-carousel.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.services-grid.is-carousel .service-card {
    flex: 0 0 calc(33.333% - 2px);
    scroll-snap-align: start;
    /* Prevent card from acting as drag handle for text */
    pointer-events: none;
}

/* Re-enable pointer events on links/buttons inside cards */
.services-grid.is-carousel .service-card a,
.services-grid.is-carousel .service-card button { pointer-events: auto; }

/* Arrow buttons — absolutely positioned on left/right of the wrap */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(250, 250, 248, 0.94);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(26, 25, 24, 0.1);
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-btn:hover {
    background: var(--clr-accent);
    color: var(--clr-white);
    border-color: var(--clr-accent);
    box-shadow: 0 4px 20px rgba(0, 120, 193, 0.3);
}

.carousel-btn:disabled {
    opacity: 0.22;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dots row below the carousel */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
}

.carousel-dots { display: flex; gap: 8px; align-items: center; }

.carousel-dot {
    width: 7px;
    height: 7px;
    background: var(--clr-border);
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), width var(--transition);
    flex-shrink: 0;
}

.carousel-dot.is-active { background: var(--clr-accent); transform: scale(1.4); width: 20px; border-radius: 4px; }

/* Responsive widths in carousel mode (cards + dividers match) */
@media (max-width: 1024px) {
    .services-grid.is-carousel .service-card,
    .service-group-divider { flex: 0 0 calc(50% - 1px); }
}

@media (max-width: 768px) {
    .services-grid.is-carousel .service-card,
    .service-group-divider { flex: 0 0 100%; }

    /* Collapse horizontal card back to vertical on mobile */
    .services-grid:not(.is-carousel) .service-card { flex-direction: column; }
    .services-grid:not(.is-carousel) .service-card-thumb { flex: none; height: 220px; }
    .services-grid:not(.is-carousel) .service-card-body { border-left: none; border-top: 1px solid var(--clr-border); padding: 36px 28px; }
}

/* ============================================================
   SERVICES VERTICAL TABBED CONTENT COMPONENT (Interactive List Toggle)
   Toggled via Appearance > Customise > Services Section
   ============================================================ */

.services-vtabs-section {
    position: relative;
    margin-bottom: 28px;
}

.services-vtabs-section:last-child {
    margin-bottom: 0;
}

.services-vtabs-sticky-stage {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    padding: 12px 0 20px 0;
}

.services-vtabs-section .service-group-heading {
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.services-vtabs-inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 56px;
    align-items: center;
    width: 100%;
}

/* ---- Left Navigation Menu ---- */

.vtabs-nav-col {
    display: flex;
    flex-direction: column;
}

.vtabs-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 3px solid #DDD8D2;
}

.vtabs-nav-item {
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
}

.vtabs-nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 8px 0 8px 18px;
    margin-left: -3px;
    border: none;
    background: transparent;
    color: #1A1918;
    font-family: var(--font-heading);
    font-size: 1.025rem;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: color 0.25s var(--ease);
}

/* Line indicator: continuous full height overlay on active */
.vtabs-indicator {
    display: block;
    width: 3px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: transparent;
    flex-shrink: 0;
    transition: background 0.25s var(--ease);
}

.vtabs-btn-title {
    flex: 1;
}

.vtabs-nav-btn:hover:not(.is-active) {
    color: #0c3359;
}

.vtabs-nav-btn:hover:not(.is-active) .vtabs-indicator {
    background: #ABA39A;
}

.vtabs-nav-btn.is-active {
    color: #0c3359;
    font-weight: 600;
}

.vtabs-nav-btn.is-active .vtabs-indicator {
    background: #0c3359;
}

/* ---- Right Content Panels ---- */

.vtabs-content-col {
    position: relative;
    width: 100%;
    min-width: 0;
}

.vtabs-panels-container {
    position: relative;
    width: 100%;
    min-height: 380px;
}

.vtabs-panel.service-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: row;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s;
    visibility: hidden;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(26, 25, 24, 0.05);
}

.vtabs-panel.service-card.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    z-index: 2;
}

.vtabs-panel .service-card-thumb {
    flex: 0 0 320px;
    min-height: 280px;
    height: auto;
    background: var(--clr-bg-alt);
}

.vtabs-panel .service-card-body {
    padding: 40px 44px;
    border-left: 1px solid var(--clr-border);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vtabs-panel h3 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 14px;
    line-height: 1.25;
}

.vtabs-panel p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 24px;
}

/* ---- Responsive Vertical Tabs ---- */

@media (max-width: 1024px) {
    .services-vtabs-inner {
        grid-template-columns: 260px 1fr;
        gap: 32px;
    }

    .vtabs-panel .service-card-thumb {
        flex: 0 0 240px;
    }

    .vtabs-panel .service-card-body {
        padding: 32px 30px;
    }
}

@media (max-width: 768px) {
    .nav-logo img {
        width: 175px;
        max-width: 100%;
        padding-top: 4px;
    }

    .services-vtabs-section {
        margin-bottom: 24px;
    }

    .services-vtabs-sticky-stage {
        top: calc(var(--nav-h) + 12px);
        min-height: auto;
        padding: 4px 0 12px 0;
        justify-content: flex-start;
    }

    .service-group-heading {
        font-size: 1.25rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .services-vtabs-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vtabs-nav-col {
        border-bottom: none;
        padding-bottom: 0;
    }

    .vtabs-nav-list {
        flex-direction: column;
        gap: 0;
        border-left: 3px solid #DDD8D2;
    }

    .vtabs-nav-btn {
        padding: 5px 0 5px 14px;
        margin-left: -3px;
        font-size: 0.925rem;
        color: #1A1918;
    }

    .vtabs-indicator {
        width: 3px;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        height: auto;
    }

    .vtabs-nav-btn.is-active {
        color: #0c3359;
    }

    .vtabs-nav-btn.is-active .vtabs-indicator {
        background: #0c3359;
        width: 3px;
        height: auto;
    }

    .vtabs-panels-container {
        min-height: 260px;
    }

    .vtabs-panel.service-card {
        flex-direction: row;
    }

    .vtabs-panel .service-card-thumb {
        flex: 0 0 160px;
        min-height: 200px;
        height: auto;
    }

    .vtabs-panel .service-card-body {
        border-left: 1px solid var(--clr-border);
        border-top: none;
        padding: 24px 22px;
    }

    .vtabs-panel h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
        font-weight: 500;
    }

    .vtabs-panel p {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .vtabs-panel .service-link {
        font-size: 0.825rem;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .nav-logo img {
        width: 150px;
    }

    .vtabs-nav-btn {
        font-size: 0.875rem;
        padding: 4px 0 4px 12px;
    }

    .vtabs-panels-container {
        min-height: 310px;
    }

    .vtabs-panel.service-card {
        flex-direction: column;
    }

    .vtabs-panel .service-card-thumb {
        flex: none;
        height: 160px;
        min-height: 160px;
        width: 100%;
    }

    .vtabs-panel .service-card-body {
        border-left: none;
        border-top: 1px solid var(--clr-border);
        padding: 18px 16px 20px;
    }

    .vtabs-panel h3 {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .vtabs-panel p {
        font-size: 0.85rem;
        line-height: 1.55;
        margin-bottom: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.about-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 44px;
    align-items: start;
}

/* Label sits directly above the carousel — grid gap handles the spacing */
.about-inner > .section-label { margin-bottom: 0; }

/* Text spans the full width (old text column + the old photo column) */
.about-text-block { max-width: 100%; }

/* Full-width team carousel sitting between the label and the About text */
.about-carousel { width: 100%; }

.about-text-block h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 500;
    line-height: 1.2;
    color: #0c3359;
    letter-spacing: -0.015em;
    margin-top: 14px;
    margin-bottom: 32px;
}

.about-text-block p {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 22px;
}

.about-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 15px 36px;
    background: var(--clr-text);
    color: var(--clr-white);
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background var(--transition), transform var(--transition);
}

.about-cta:hover { background: var(--clr-accent); transform: translateY(-2px); }

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.team-card { background: var(--clr-white); overflow: hidden; }

.team-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--clr-border);
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.team-card:hover .team-card-image img { transform: scale(1.04); }

.team-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--clr-bg-alt) 0%, var(--clr-border) 100%);
}

.team-card-info { padding: 20px 4px 12px; }

.team-card-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 5px;
}

.team-card-role {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-accent);
}

/* ---- Meet the Team page template ---- */

.team-page-section {
    padding: var(--section-py) 0;
}

.team-page-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.team-card--full .team-card-info {
    padding: 20px 4px 20px;
}

.team-empty {
    text-align: center;
    color: var(--clr-text-muted);
    padding: 60px 0;
}

/* ---- Clickable team cards (link or modal trigger) ---- */
.team-card-link {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.team-card-link .team-card-name { transition: color var(--transition); }
.team-card-link:hover .team-card-name,
.team-card-link:focus-visible .team-card-name { color: var(--clr-accent); }
.team-card-link:focus-visible { outline: 2px solid var(--clr-accent); outline-offset: 4px; }

/* ---- Single team member: banner + body layout ---- */
.person-role {
    margin-top: 12px;
    font-size: clamp(1rem, 1.6vw, 1.375rem);   /* slightly smaller than the name */
    font-weight: 400;
    color: var(--clr-accent);
    letter-spacing: 0.02em;
}

/* Copy on the left (~66%), photo on the right (~33%), both top-aligned */
.person-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 56px;
    align-items: start;
}

.person-body-main { min-width: 0; }

.person-body-photo { margin: 0; }

.person-body-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 782px) {
    .person-body {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .person-body-photo {
        order: -1;              /* photo above the copy on narrow screens */
        max-width: 260px;
    }
}

/* ---- Team member modal (page-less members) ---- */
body.tm-modal-open { overflow: hidden; }

.team-modal[hidden] { display: none; }

.team-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 18, 15, 0.62);
    animation: tm-fade 0.2s var(--ease);
}

.team-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 48px;
    background: var(--clr-white);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(24, 18, 15, 0.35);
    animation: tm-rise 0.25s var(--ease);
}

.team-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 30px;
    line-height: 1;
    color: var(--clr-text-muted);
    cursor: pointer;
}

.team-modal-close:hover { color: var(--clr-accent); }

.team-modal-name {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--clr-text);
    padding-right: 28px;
}

.team-modal-role {
    margin-top: 8px;
    margin-bottom: 22px;
    font-size: 1rem;
    color: var(--clr-accent);
    letter-spacing: 0.04em;
}

@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .team-modal-backdrop, .team-modal-dialog { animation: none; }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    gap: 88px;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 2.5vw, 2.5rem);
    font-weight: 400;
    color: var(--clr-text);
    margin-top: 14px;
    margin-bottom: 24px;
    line-height: 1.2;
}

.contact-info > p {
    color: var(--clr-text-muted);
    line-height: 1.8;
    margin-bottom: 36px;
    font-size: 0.9375rem;
}

.contact-detail { display: flex; flex-direction: column; gap: 20px; }

.contact-detail-item { display: flex; flex-direction: column; gap: 5px; }

.contact-detail-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-accent);
}

.contact-detail-value { font-size: 0.9375rem; color: var(--clr-text); }
.contact-detail-value a:hover { color: var(--clr-accent); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 9px; }

.form-group label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.9375rem;
    color: var(--clr-text);
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    transition: border-color var(--transition), background var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--clr-accent); background: var(--clr-white); }

.form-group textarea { min-height: 150px; resize: vertical; }

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236B6560' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 17px 40px;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 0;
    width: 100%;
    transition: background var(--transition), transform var(--transition);
}

.form-submit:hover         { background: var(--clr-accent-dark); transform: translateY(-2px); }
.form-submit:disabled      { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-message {
    padding: 16px;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.form-message.success { background: var(--clr-accent-light); color: var(--clr-accent-dark); border: 1px solid var(--clr-accent); display: block; }
.form-message.error   { background: #fef2f2; color: #c0392b; border: 1px solid #f5c6cb; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer-accent { height: 3px; background: var(--clr-accent); }

.site-footer { background: var(--clr-footer-bg); color: var(--clr-footer-text); padding: 72px 0 0; }

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand { display: flex; flex-direction: column; gap: 26px; }

.footer-logo img {
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.88;
}

.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.75;
    opacity: 0.6;
    max-width: 300px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-white);
    margin-bottom: 22px;
    opacity: 0.9;
}

.footer-links { display: flex; flex-direction: column; gap: 13px; }

.footer-links a {
    font-size: 0.875rem;
    color: var(--clr-footer-text);
    opacity: 0.65;
    transition: opacity var(--transition), color var(--transition);
}

.footer-links p{
    font-size: 0.875rem;
    color: var(--clr-footer-text);
    opacity: 0.65;
    transition: opacity var(--transition), color var(--transition);
}

.footer-links a:hover { opacity: 1; color: var(--clr-accent); }

address.footer-address {
    font-style: normal;
    font-size: 0.875rem;
    opacity: 0.55;
    line-height: 1.75;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    gap: 20px;
}

.footer-bottom p { font-size: 0.8rem; opacity: 0.45; }

.footer-legal { display: flex; gap: 28px; }

.footer-legal a {
    font-size: 0.8rem;
    opacity: 0.45;
    transition: opacity var(--transition), color var(--transition);
}

.footer-legal a:hover { opacity: 1; color: var(--clr-accent); }

/* ============================================================
   RESOURCES PAGE  (page-resources.php)
   ============================================================ */

.resources-body { padding: 72px 0 100px; }

.resources-intro {
    max-width: 720px;
    margin-bottom: 64px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--clr-text-muted);
}

/* Category group */
.resource-group { margin-bottom: 64px; }

.resource-group-title {
    font-family: var(--font-heading);
    font-size: 1.625rem;
    font-weight: 500;
    color: var(--clr-text);
    padding-bottom: 18px;
    margin-bottom: 0;
    border-bottom: 3px solid var(--clr-accent);
}

.resource-group-blurb {
    margin: 16px 0 20px;
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--clr-text-muted);
}

/* Resource list */
.resource-list { display: flex; flex-direction: column; gap: 2px; }

.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 28px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-top: none;
    transition: background var(--transition), border-color var(--transition);
}

.resource-item:first-child { border-top: 1px solid var(--clr-border); }
.resource-item:hover { background: var(--clr-accent-light); border-color: var(--clr-accent); }

.resource-item-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

.resource-item-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--clr-text);
    line-height: 1.3;
}

.resource-item-category {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-accent);
}

/* Download button */
.resource-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition), transform var(--transition);
}

.resource-download::before { content: '↓ '; }
.resource-download:hover   { background: var(--clr-accent-dark); color: var(--clr-white); transform: translateY(-1px); }

.resource-no-file {
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    opacity: 0.6;
    white-space: nowrap;
    flex-shrink: 0;
}

.resources-empty {
    text-align: center;
    padding: 80px 40px;
    color: var(--clr-text-muted);
    border: 1px dashed var(--clr-border);
}

@media (max-width: 640px) {
    .resource-item { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
    .resource-download { width: 100%; justify-content: center; }
}

/* ============================================================
   PAGE / SINGLE / BLOG TEMPLATES
   ============================================================ */

.page-content-wrap {
    padding: calc(var(--nav-h) + 3px) 0 0;
    background: var(--clr-white);
    min-height: 70vh;
}

.page-banner {
    padding: 80px 0;
    background: var(--clr-bg-alt);
    border-bottom: 3px solid var(--clr-accent);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--clr-text);
    line-height: 1.2;
}

.page-body { padding: 72px 0 100px; }

.entry-content { font-size: 1.0625rem; line-height: 1.85; color: var(--clr-text); }

/* Keep prose elements at a comfortable reading width; block shortcodes go full-width */
.entry-content > h1,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote,
.entry-content > figure { max-width: 72ch; }

.entry-content h2 { font-family: var(--font-heading); font-size: 2rem; font-weight: 500; margin: 48px 0 18px; }
.entry-content h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 500; margin: 36px 0 14px; }
.entry-content p  { margin-bottom: 22px; }
.entry-content a  { color: var(--clr-accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin-bottom: 22px; padding-left: 26px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 9px; }
.entry-content figure { margin: 36px 0; }
.entry-content figure img { width: 100%; height: auto; }

/* Services shortcode inside page content */
.services-shortcode { margin-top: 48px; }

/* Posts archive grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--clr-border);
    margin-bottom: 52px;
}

.post-card { display: flex; flex-direction: column; background: var(--clr-bg); }

.post-card-image { display: block; overflow: hidden; aspect-ratio: 16/9; background: var(--clr-bg-alt); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s var(--ease); }
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body { padding: 32px; flex: 1; display: flex; flex-direction: column; }

.post-card-meta {
    font-size: 0.72rem;
    color: var(--clr-accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-card-title {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 14px;
}

.post-card-title a:hover { color: var(--clr-accent); }

.post-card-excerpt { font-size: 0.9375rem; color: var(--clr-text-muted); line-height: 1.7; margin-bottom: 24px; flex: 1; }

/* Pagination */
.pagination { margin: 12px 0 52px; text-align: center; }

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

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    font-size: 0.875rem;
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--clr-accent); color: var(--clr-white); border-color: var(--clr-accent); }

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.775rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 32px;
    transition: gap var(--transition);
}

.back-link:hover { gap: 12px; }
.back-link::before { content: '←'; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    :root {
        --section-py:    24px;
        --container-px:  36px;
    }

    .about-inner      { gap: 56px; }
    .contact-inner    { gap: 56px; }
    .posts-grid       { grid-template-columns: repeat(2, 1fr); }
    .team-page-grid   { grid-template-columns: repeat(3, 1fr); gap: 24px; }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 44px;
    }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root {
        --nav-h:         68px;
        --section-py:    18px;
        --container-px:  24px;
    }

    /* Mobile Nav */
    .nav-toggle { display: flex; }

    .nav-menu-wrap {
        position: fixed;
        inset: 0;
        background: var(--clr-bg);
        z-index: 999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s var(--ease);
    }

    body.nav-open .nav-menu-wrap { opacity: 1; pointer-events: all; }

    .nav-menu { flex-direction: column; gap: 4px; text-align: center; }
    .nav-menu li a { font-size: 1.125rem; padding: 16px 28px; letter-spacing: 0.12em; }
    .nav-menu li a::after { display: none; }
    .nav-menu li.nav-cta > a { margin: 20px 0 0; padding: 15px 40px; font-size: 0.85rem; }

    /* Register button stays in the header bar on mobile, shrinks slightly */
    .nav-register-btn { margin-left: 8px; padding: 8px 16px; font-size: 0.72rem; }

    /* Mobile dropdowns — disable CSS hover, use accordion via JS toggle */
    .nav-menu li:hover > .sub-menu { opacity: 0; visibility: hidden; transform: translateY(6px); }

    .nav-menu li.sub-menu-open > .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        border-left: none;
        background: transparent;
        padding: 0;
        margin-bottom: 8px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-menu .sub-menu a {
        font-size: 0.9rem;
        padding: 10px 20px;
        border-bottom: none;
        color: var(--clr-text-muted);
    }

    .nav-menu .sub-menu a:hover { padding-left: 20px; background: transparent; }

    .sub-menu-toggle { width: 32px; height: 32px; margin-left: 4px; font-size: 1rem; }

    /* Sections */
    .section-hero { padding-left: 20px; padding-right: 20px; }
    .hero-credentials { gap: 28px; flex-wrap: wrap; }
    .hero-credentials img { height: 46px; width: auto; }

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

    .about-inner      { grid-template-columns: 1fr; gap: 52px; }
    .about-text-block { max-width: 100%; }
    .team-grid        { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .team-page-grid   { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    .contact-inner { grid-template-columns: 1fr; gap: 52px; }
    .form-row      { grid-template-columns: 1fr; }

    .footer-inner  { grid-template-columns: 1fr; gap: 36px; }
    .footer-brand  { grid-column: 1; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 14px; }
    .footer-legal  { flex-wrap: wrap; justify-content: center; gap: 16px; }

    .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .team-grid      { grid-template-columns: 1fr; }
    .team-page-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hero-strapline { font-size: 1.875rem; }
    .footer-legal { flex-direction: column; gap: 10px; }
}