/* Shared layout spacing for the restructured PHP pages. */
:root {
    --page-space: 64px;
    --section-space: 32px;
}

#themesflat-content {
    margin-top: 0 !important;
    padding-top: var(--page-space) !important;
    padding-bottom: var(--page-space) !important;
}

.page-home #themesflat-content {
    padding-top: 0 !important;
}

.content-wrapper > .row {
    margin-bottom: 0;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content > :last-child,
.wpb_wrapper > :last-child {
    margin-bottom: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.25rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.page-services .wpb_single_image {
    margin: 28px 0 36px;
    text-align: center;
    opacity: 1 !important;
    visibility: visible !important;
}

.page-services .wpb_single_image img {
    display: block !important;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(21, 63, 104, 0.12);
}

.page-services .service-content-image {
    display: block !important;
    margin: 28px 0 36px;
    text-align: center;
    opacity: 1 !important;
    visibility: visible !important;
}

.page-services .service-content-image img {
    display: block !important;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(21, 63, 104, 0.12);
    opacity: 1 !important;
    visibility: visible !important;
}


.footer_background {
    margin-top: 0;
}

.blog-heading{margin-bottom:32px}.blog-manager-list>.row{display:flex;flex-wrap:wrap}.blog-card{margin-bottom:32px}.blog-card-image{display:block;overflow:hidden;background:#eef2f6}.blog-card-image img{width:100%;height:260px;object-fit:cover;transition:transform .3s}.blog-card:hover .blog-card-image img{transform:scale(1.03)}.blog-card-body{padding:24px;border:1px solid #e1e7ee;border-top:0;min-height:240px}.blog-card-body h2{margin-top:0}.blog-date{color:#6c7a89;font-size:14px}.single-managed-post{max-width:900px;margin:auto}.single-managed-post h1{margin-bottom:8px}.post-featured-image{width:100%;max-height:520px;object-fit:cover;margin:24px 0 36px}

/* Homepage refinement: layout only; the established theme colours remain unchanged. */
.page-home .content-wrapper {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.page-home .entry-content > .vc_row:not(:first-child) {
    position: relative;
}

.page-home .entry-content > .vc_row:not(.vc_row-has-fill):not(:first-child) {
    width: min(1170px, calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
}

.page-home #rev_slider_7_1_wrapper,
.page-home #rev_slider_7_1 {
    max-height: min(720px, 78vh) !important;
    overflow: hidden;
}

.page-home rs-slide .rev-slidebg {
    object-fit: cover;
}

.page-home .title-section .title,
.page-home .vc_separator h4 {
    text-wrap: balance;
}

.page-home .title-section .title {
    font-size: clamp(30px, 4vw, 52px) !important;
    line-height: 1.15 !important;
}

.page-home .title-section .title-content {
    max-width: 780px;
    line-height: 1.7 !important;
}

.page-home .vc_custom_1619020667564 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 24px 0;
    padding-top: 72px;
    padding-bottom: 72px;
}

.page-home .vc_custom_1619020667564 > .vc_column_container {
    display: flex;
}

.page-home .vc_custom_1619020667564 > .vc_column_container > .vc_column-inner {
    width: 100%;
    min-height: 0 !important;
    margin: 0 12px !important;
    padding: 28px 28px 30px !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(20, 35, 55, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.page-home .vc_custom_1619020667564 > .vc_column_container > .vc_column-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(20, 35, 55, 0.12);
}

.page-home .vc_custom_1619020667564 .vc_separator h4 {
    margin-bottom: 18px;
    padding: 0;
    font-size: 20px;
    line-height: 1.35;
}

.page-home .vc_custom_1619020667564 .wpb_text_column {
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
}

.page-home .themesflat_counter {
    height: 100%;
    padding: 24px 18px;
    text-align: center;
}

.page-home .themesflat_counter .counter-content-right,
.page-home .themesflat_counter .counter-content-left {
    float: none;
    display: block;
    width: 100%;
}

.page-home .themesflat_counter .title {
    max-width: 220px;
    margin: 10px auto 0;
    line-height: 1.45;
}

.page-home .themesflat-button,
.page-home .button-header {
    border-radius: 5px;
}

.page-home .wpb_single_image img {
    display: block;
    border-radius: 8px;
}

@media (max-width: 991px) {
    :root {
        --page-space: 48px;
    }

    #secondary {
        margin-top: var(--section-space);
    }

    .page-home #rev_slider_7_1_wrapper,
    .page-home #rev_slider_7_1 {
        max-height: 620px !important;
    }

    .page-home .vc_custom_1619020667564 > .vc_column_container {
        width: 50%;
    }
}

@media (max-width: 767px) {
    :root {
        --page-space: 32px;
    }

    .content-wrapper {
        padding-right: 20px;
        padding-left: 20px;
    }

    .entry-content p,
    .entry-content li {
        line-height: 1.7;
    }

    .page-home .entry-content > .vc_row:not(.vc_row-has-fill):not(:first-child) {
        width: calc(100% - 32px);
    }

    .page-home #rev_slider_7_1_wrapper,
    .page-home #rev_slider_7_1 {
        max-height: 480px !important;
    }

    .page-home .vc_custom_1619020667564 {
        padding-top: 44px;
        padding-bottom: 44px;
    }

    .page-home .vc_custom_1619020667564 > .vc_column_container {
        width: 100%;
    }

    .page-home .vc_custom_1619020667564 > .vc_column_container > .vc_column-inner {
        margin: 0 !important;
        padding: 24px !important;
    }

    .page-home .title-section .title {
        font-size: clamp(28px, 9vw, 40px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-home .vc_column-inner,
    .page-home img {
        transition: none !important;
    }
}

/* Unified brand palette sampled from the supplied reference. */
:root {
    --brand-navy: #153f68;
    --brand-gold: #ffca18;
    --brand-white: #ffffff;
    --brand-ink: #153f68;
    --brand-muted: #5f6f7f;
    --brand-line: #e3e8ed;
}

body,
p,
li {
    color: var(--brand-muted);
}

h1, h2, h3, h4, h5, h6,
strong,
.title-section .title,
.widget .widget-title {
    color: var(--brand-navy) !important;
}

a,
.entry-content a,
.bottom .copyright a {
    color: var(--brand-navy);
}

a:hover,
a:focus,
.footer a:hover,
.bottom .copyright a:hover {
    color: var(--brand-gold) !important;
}

.nav,
#mainnav-mobi,
.footer_background,
.footer,
.bottom {
    background-color: var(--brand-navy) !important;
}

#mainnav > ul > li > a,
.footer,
.footer p,
.footer li,
.footer a,
.bottom,
.bottom p {
    color: var(--brand-white) !important;
}

#mainnav > ul > li.current-menu-item > a,
#mainnav > ul > li.current_page_item > a {
    color: #000 !important;
}

#mainnav > ul > li > a:hover,
.footer-widgets .widget ul li i {
    color: var(--brand-gold) !important;
}

button,
input[type="submit"],
.themesflat-button,
.button-header,
.brand-button {
    border-color: var(--brand-navy) !important;
    background: var(--brand-navy) !important;
    color: var(--brand-white) !important;
}

button:hover,
input[type="submit"]:hover,
.themesflat-button:hover,
.button-header:hover,
.brand-button:hover,
.brand-button.gold {
    border-color: var(--brand-gold) !important;
    background: var(--brand-gold) !important;
    color: var(--brand-navy) !important;
}

/* Clean homepage layout. */
.home-modern {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.site-shell {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.home-hero {
    position: relative;
    height: clamp(440px, 66vw, 720px);
    background: var(--brand-navy);
}

.home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s ease;
}

.home-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.home-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(21,63,104,.7), rgba(21,63,104,.08));
}

.home-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-slide-content {
    position: absolute;
    z-index: 2;
    inset: 50% 0 auto;
    transform: translateY(-50%);
}

.home-slide-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--brand-white) !important;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.06;
}

.home-slide-content p {
    max-width: 650px;
    color: var(--brand-white);
    font-size: clamp(18px, 2vw, 24px);
}

.home-slider-dots {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 28px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.home-slider-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid var(--brand-white) !important;
    border-radius: 50%;
    background: transparent !important;
}

.home-slider-dot.is-active {
    border-color: var(--brand-gold) !important;
    background: var(--brand-gold) !important;
}

.home-section {
    padding: 88px 0;
    background: var(--brand-white);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-heading > span,
.eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.section-heading h1,
.section-heading h2,
.home-split h2 {
    margin: 0 0 18px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.section-heading p,
.home-split p {
    font-size: 18px;
    line-height: 1.75;
}

.home-card-grid {
    display: grid;
    gap: 24px;
}

.home-card-grid.three { grid-template-columns: repeat(3, 1fr); }
.home-card-grid.two { grid-template-columns: repeat(2, 1fr); }

.home-card,
.publication-card {
    padding: 34px;
    border: 1px solid var(--brand-line);
    border-top: 5px solid var(--brand-gold);
    border-radius: 8px;
    background: var(--brand-white);
    box-shadow: 0 14px 34px rgba(21,63,104,.08);
}

.home-card h2,
.publication-card h3 {
    margin: 0 0 16px;
    font-size: 24px;
}

.home-card p,
.publication-card p,
.publication-card blockquote {
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.8;
}

.publication-cover{width:100%;height:230px;margin-bottom:24px;border-radius:5px;object-fit:cover}.publication-link{margin-top:24px}.publication-link span{margin-left:8px;font-size:18px}.publications-grid:empty::after{content:"Publications will be available soon.";grid-column:1/-1;text-align:center;color:var(--brand-muted)}
.publications-page{padding:88px 0!important}.publications-page .publication-card h2{margin:0 0 16px;font-size:26px}.publications-page .publication-cover{height:360px;object-fit:contain;background:#fff}
.contact-page{padding:88px 0!important}.contact-layout{display:grid;grid-template-columns:1fr 1fr;gap:40px}.contact-details,.contact-form-panel{padding:32px;border:1px solid var(--brand-line);border-top:5px solid var(--brand-gold);border-radius:8px;background:#fff;box-shadow:0 14px 34px rgba(21,63,104,.08)}.contact-details h2,.contact-form-panel h2{margin-top:0}.contact-details ul{margin:0 0 28px;padding:0;list-style:none}.contact-details li{display:grid;gap:4px;margin-bottom:18px}.contact-details li strong{color:var(--brand-navy)}.contact-map iframe{width:100%;height:280px;border:0;border-radius:6px}.contact-form-panel label{display:grid;gap:7px;margin-bottom:18px;color:var(--brand-navy);font-weight:700}.contact-form-panel input,.contact-form-panel textarea{width:100%;padding:12px;border:1px solid var(--brand-line);border-radius:5px}.contact-form-panel label span{color:var(--brand-gold)}.honeypot{position:absolute!important;left:-9999px!important}.form-notice{margin-bottom:20px;padding:13px;border-radius:5px}.form-notice.success{background:#eaf7ee;color:#245d35}.form-notice.error{background:#fff0f0;color:#8d2525}.cf-turnstile{margin-bottom:20px}@media(max-width:800px){.contact-layout{grid-template-columns:1fr}.contact-page{padding:60px 0!important}}

/* Compact homepage publication cards with uncropped covers. */
.home-books .publication-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 28px;
}

.home-books .publications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1040px;
    margin: 0 auto;
}

.home-books .publication-cover {
    width: 100%;
    height: 180px;
    margin: 0 0 24px;
    border-radius: 5px;
    object-fit: contain;
    object-position: center;
    background: var(--brand-white);
}

.home-books .publication-card > div {
    display: block;
    width: 100%;
}

.home-books .publication-card h3 {
    margin-bottom: 14px;
    font-size: 26px;
    line-height: 1.3;
}

.home-books .publication-card blockquote,
.home-books .publication-card p {
    width: 100%;
    max-width: none;
    font-size: 16px;
    line-height: 1.75;
}

.home-books .publication-link {
    min-height: 42px;
    margin-top: 18px;
    padding: 9px 16px;
    font-size: 14px;
}

.home-books {
    border-top: 1px solid var(--brand-line);
    scroll-margin-top: 100px;
}

.publication-year {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--brand-gold);
    color: var(--brand-navy);
    font-weight: 800;
}

.publication-card blockquote {
    margin: 0 0 18px;
    padding-left: 18px;
    border-left: 3px solid var(--brand-gold);
    color: var(--brand-navy);
}

.home-experience,
.home-cta {
    padding: 88px 0;
    background: var(--brand-navy);
}

.home-experience h2,
.home-experience p,
.home-experience .eyebrow,
.home-cta h2,
.home-cta p,
.home-cta .eyebrow {
    color: var(--brand-white) !important;
}

.home-experience .eyebrow,
.home-cta .eyebrow {
    color: var(--brand-gold) !important;
}

.home-innovation {
    background: var(--brand-white);
}

.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(40px, 8vw, 100px);
}

.brand-button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 10px;
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 5px;
    font-weight: 800;
    text-decoration: none;
}

.home-stats {
    padding: 58px 0;
    background: var(--brand-gold);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stats-grid > div {
    padding: 12px 24px;
    border-right: 1px solid rgba(21,63,104,.25);
    text-align: center;
}

.stats-grid > div:last-child { border-right: 0; }

.stats-grid strong,
.stats-grid span {
    display: block;
    color: var(--brand-navy) !important;
}

.stats-grid strong {
    margin-bottom: 6px;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1;
}

.stats-grid span {
    font-weight: 700;
}

@media (max-width: 900px) {
    .home-card-grid.three { grid-template-columns: 1fr; }
    .home-card-grid.two,
    .home-split { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
    .stats-grid > div:nth-child(2) { border-right: 0; }
}

@media (max-width: 600px) {
    .site-shell { width: min(100% - 32px, 1160px); }
    .home-hero { height: 470px; }
    .home-section,
    .home-experience,
    .home-cta { padding: 62px 0; }
    .home-card,
    .publication-card { padding: 26px 22px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-grid > div { border-right: 0; border-bottom: 1px solid rgba(21,63,104,.25); }
    .stats-grid > div:last-child { border-bottom: 0; }
    .home-books .publications-grid { grid-template-columns: 1fr; }
    .home-books .publication-card { padding: 22px; }
    .home-books .publication-cover { width: 100%; height: 170px; margin: 0 0 20px; }
    .home-books .publication-card h3 { font-size: 23px; }
    .home-books .publication-card blockquote,
    .home-books .publication-card p { max-width: none; font-size: 15px; }
}
