/* ==============================================================
   GLOBAL TYPOGRAPHY — unified, easy to adjust
   ============================================================== */

/* Base font for all text elements */
body,
button,
input,
select,
textarea {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
                 sans-serif !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 300 !important;
}

/* Headings — global hierarchy */
h1 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 700 !important;
    font-size: 48px !important;
    line-height: 1.2 !important;
}

h2 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 600 !important;  /* premium, stronger H2 */
    font-size: 36px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.5px !important;
}

/* GLOBAL H3 — tuned to sit correctly under the stronger H2 */
h3 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 550 !important;   /* stronger, but not competing with H2 */
    font-size: 24px !important;    /* slight bump for clarity */
    line-height: 1.32 !important;  /* tighter, more premium geometry */
    letter-spacing: 0.3px !important;
}


h4 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 500 !important;
    font-size: 20px !important;
    line-height: 1.4 !important;
}

h5 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 500 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
}

h6 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}


/* Paragraphs and list items */
p,
li {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 300 !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* Strong/emphasis still respect hierarchy */
strong, b {
    font-weight: 600 !important;
}

em, i {
    font-style: italic !important;
}

/* /* ==============================================================
   UPPER FOOTER (footer-widgets) — charcoal premium finish
   ============================================================== */

.footer-widgets,
.footer-widgets .wrap,
.footer-widgets .widget {
    background-color: #111111 !important;   /* charcoal */
    color: #ffffff !important;
}

/* Footer widget headings */
.footer-widgets h2,
.footer-widgets h3,
.footer-widgets h4 {
    color: #ffffff !important;
}

/* Footer links */
.footer-widgets a {
    color: #ffffff !important;
    font-weight: 500 !important;
}

.footer-widgets a:hover {
    color: #d0e6ff !important;   /* soft blue hover */
}

/* ==============================================================
   FP1 HERO — remove ALL extra top padding on mobile
   ============================================================== */

@media (max-width: 768px) {

    /* Remove theme padding */
    .front-page-1,
    .front-page-1 .image-section,
    .front-page-1 .widget-area {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove Genesis widget padding */
    .front-page-1 .widget {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove pseudo-element padding */
    .front-page-1 .image-section::before {
        padding-top: 0 !important;
        margin-top: 0 !important;
        height: auto !important;
    }

    /* Force the hero to start immediately */
    .front-page-1 .image-section {
        padding-top: 32px !important;   /* controlled, minimal */
        padding-bottom: 48px !important;
    }
}

/* ==============================================================
   FP2 — Force H2 to match global weight (600)
   ============================================================== */

.front-page-2 h2 {
    font-weight: 600 !important;
}
.front-page-2 h3 {
    font-weight: 550 !important;
}

/* ==============================================================
   EXISTING WORKING CUSTOM CSS (LAYOUT, CARDS, FP SECTIONS)
   ============================================================== */

/*
==============================================================
GLOBAL / LEGACY CUSTOMISATIONS (KEPT)
==============================================================
*/

@media only screen and (max-width: 800px) {
    .one-third-center {
        margin: 0;
        width: 100%;
    }
}

.team-content {
    padding: 0 0 25px !important;
}

.entry-header::after {
    padding-bottom: 10px !important;
}

/* Background boxes for FP4 */
#text-86 { background: rgba(2,116,189,0.8); }
#text-88 { background: rgba(127,28,106,0.8); }
#text-87 { background: rgba(204,202,201,0.8); }
#text-85 { background: rgba(86,143,15,0.8); }

/* Blog styling */
.display-posts-listing .listing-item { clear: both; }
.display-posts-listing img {
    float: left;
    margin: 0 10px 10px 0;
    padding: 10px;
}

.pt-cv-title a { font-weight: 600; }
.pt-cv-title { font-size: 20px; }
.pt-cv-content, .pt-cv-content * { font-size: 16px; }

.btn-success {
    color: #ffffff;
    background-color: #0274bd;
    border-color: #0274bd;
}

/* Footer */
.footer-widgets .wrap {
    padding-bottom: 25px;
    padding-top: 25px;
}

.footer-widgets .widget { margin-bottom: 0; }

/* Popup */
.popmake.theme-2557 > .popmake-close { display: none; }
.popmake.theme-2557 p { margin: 5px; }
.popmake.theme-2557 input { padding: 5px; }
.popmake.theme-2557 { max-height: 100%; }

/*
==============================================================
FRONT PAGE 2 — LAYOUT ONLY (NO TYPOGRAPHY, NO EXTRA PADDING)
==============================================================
*/

/* Left align FP2 content */
.front-page-2 .fp2-why-optimal {
    text-align: left !important;
}

/* FP2 grid layout */
.front-page-2 .fp2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px !important;
    max-width: 1100px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 900px) {
    .front-page-2 .fp2-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .front-page-2 .fp2-grid {
        grid-template-columns: 1fr;
    }
}

/*
==============================================================
FRONT PAGE 3 — LAYOUT ONLY (NO TYPOGRAPHY, NO EXTRA PADDING)
==============================================================
*/

/* Remove table layout */
#front-page-3 .image-section {
    display: block !important;
    height: auto !important;
}

#front-page-3 .image-section .widget-area {
    display: block !important;
    text-align: left !important;
    vertical-align: top !important;
    padding: 0 !important;
}

/* FP3 cards */
#front-page-3 .widget {
    background: rgba(0,0,0,0.35) !important;
    padding: 16px !important;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    backdrop-filter: blur(2px);
    text-align: left !important;
    margin-bottom: 24px;
}

/* FP3 grid */
#front-page-3 .widget-area {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    padding: 0 !important;
}

/*
==============================================================
FRONT PAGE 7 — LAYOUT ONLY (NO TYPOGRAPHY, NO EXTRA PADDING)
==============================================================
*/

/* Neutralise theme floats */
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text,
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text > .widget-wrap {
    float: none !important;
    width: 100% !important;
    clear: none !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box;
}

/* Flex layout */
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

/* Header full width */
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text:nth-of-type(1) {
    flex: 0 0 100% !important;
}

/* Three equal columns */
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text:nth-of-type(2),
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text:nth-of-type(3),
#front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text:nth-of-type(4) {
    flex: 0 0 calc(33.333% - 24px) !important;
}

/* FP7 cards */
#front-page-7 .widget {
    background: rgba(0,0,0,0.35) !important;
    padding: 16px !important;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    backdrop-filter: blur(2px);
}

/* FP7 text stays white */
#front-page-7,
#front-page-7 .widget,
#front-page-7 .widget * {
    color: #ffffff !important;
}

/* ==========================================================
   REMOVE TABLE LAYOUT FROM ALL FRONT-PAGE IMAGE SECTIONS
   (This restores automatic height behaviour)
   ========================================================== */

.front-page-1 .image-section,
.front-page-3 .image-section,
.front-page-5 .image-section,
.front-page-7 .image-section {
    display: block !important;
    table-layout: auto !important;
}

.front-page-1 .image-section .widget-area,
.front-page-3 .image-section .widget-area,
.front-page-5 .image-section .widget-area,
.front-page-7 .image-section .widget-area {
    display: block !important;
    vertical-align: top !important;
    text-align: left !important;
}

/* ==========================================================
   FORCE-REMOVE TABLE LAYOUT FROM ALL IMAGE-SECTIONS
   (This restores automatic height behaviour)
   ========================================================== */

.front-page-1 .image-section,
.front-page-5 .image-section,
.front-page-7 .image-section {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
}

.front-page-1 .image-section .widget-area,
.front-page-5 .image-section .widget-area,
.front-page-7 .image-section .widget-area {
    display: block !important;
    vertical-align: top !important;
    text-align: left !important;
}

/* Unified vertical padding for all image sections on the front page */

.front-page-1 .image-section,
.front-page-3 .image-section,
.front-page-5 .image-section,
.front-page-7 .image-section {
    padding-top: 62px !important;
    padding-bottom: 62px !important;
}

.front-page-5 .image-section,
.front-page-7 .image-section {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
}

/* FP5 – header full width, three boxes in thirds */
.front-page-5 .flexible-widgets.widget-thirds .widget:first-child {
    float: none;
    width: 100%;
    clear: both;
}

/* All widgets after the header = thirds */
.front-page-5 .flexible-widgets.widget-thirds .widget:nth-of-type(n+2) {
    float: left;
    width: 31.6239%;
    margin-left: 2.564%;
}

.front-page-5 .flexible-widgets.widget-thirds .widget:nth-of-type(2) {
    margin-left: 0;
}

/* FP5 — Shading for ALL widgets including header */
.front-page-5 .flexible-widgets.widget-thirds .widget {
    background: rgba(0,0,0,0.35) !important;
    padding: 24px !important;
    border-radius: 12px !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25) !important;
    box-sizing: border-box !important;
}

/* FP6 — same layout as FP5: header full width, boxes in thirds */
.front-page-6 .flexible-widgets.widget-thirds .widget:first-child {
    float: none !important;
    width: 100% !important;
    clear: both !important;
}

/* All widgets after the header = thirds */
.front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(n+2) {
    float: left !important;
    width: 31.6239% !important;
    margin-left: 2.564% !important;
}

/* First box in the row has no left margin */
.front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(2) {
    margin-left: 0 !important;
}

/* FP6 — shading for ALL widgets including header */
.front-page-6 .flexible-widgets.widget-thirds .widget {
    background: rgba(0,0,0,0.35) !important;
    padding: 24px !important;
    border-radius: 12px !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25) !important;
    box-sizing: border-box !important;
}

/* FP6 — improve vertical rhythm */
.front-page-6 {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

.front-page-6 .widget:nth-of-type(1),
.front-page-6 .widget:nth-of-type(2) {
    margin-bottom: 32px !important;
}

.front-page-6 .widget:nth-of-type(n+3) {
    margin-bottom: 32px !important;
}

/* FP6 — refine card appearance */
.front-page-6 .widget:nth-of-type(n+3) {
    background: rgba(0,0,0,0.45) !important;
    padding: 28px !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.28) !important;
}

/* FP6 — strengthen background overlay */
.front-page-6 .image-section::before {
    background: rgba(0,0,0,0.45) !important;
}

/* FP6 — spacing between boxes */
.front-page-6 .flexible-widgets.widget-thirds .widget {
    margin-bottom: 32px !important;
}
/* ==============================================================
   MOBILE FIX — stack FP3, FP5, FP6, FP7 cards vertically
   ============================================================== */

@media (max-width: 768px) {

    /* FP3 grid collapses to 1 column */
    #front-page-3 .widget-area {
        grid-template-columns: 1fr !important;
    }

    /* FP5, FP6, FP7 — remove floats and forced widths */
    .front-page-5 .flexible-widgets.widget-thirds .widget,
    .front-page-6 .flexible-widgets.widget-thirds .widget,
    .front-page-7 .flexible-widgets.widget-thirds .widget {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* FP7 flex layout collapses cleanly */
    #front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap {
        flex-direction: column !important;
    }

    #front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text {
        flex: 0 0 100% !important;
    }
}
/* ==============================================================
   FP6 MOBILE FIX — force stacking, override all floats/widths
   ============================================================== */

@media (max-width: 768px) {

    /* Kill ALL floats and widths in FP6 */
    .front-page-6 .flexible-widgets.widget-thirds .widget {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
    }

    /* Ensure header and cards stack cleanly */
    .front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(1),
    .front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(2),
    .front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(3),
    .front-page-6 .flexible-widgets.widget-thirds .widget:nth-of-type(4) {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Remove any leftover grid/flex behaviour */
    .front-page-6 .flexible-widgets.widget-thirds .wrap {
        display: block !important;
    }
}
/* ==============================================================
   GLOBAL MOBILE SYSTEM — typography, spacing, cards, FP1 hero
   ============================================================== */

@media (max-width: 768px) {

    /* -----------------------------------------
       MOBILE TYPOGRAPHY — H1 / H2 / H3
       ----------------------------------------- */

    h1 {
        font-size: 32px !important;
        line-height: 1.25 !important;
    }

    h2 {
        font-size: 28px !important;
        line-height: 1.28 !important;
    }

    h3 {
        font-size: 20px !important;
        line-height: 1.32 !important;
    }

    p, li {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }


    /* -----------------------------------------
       MOBILE CARD PADDING — FP3 / FP5 / FP6 / FP7
       ----------------------------------------- */

    #front-page-3 .widget,
    .front-page-5 .flexible-widgets.widget-thirds .widget,
    .front-page-6 .flexible-widgets.widget-thirds .widget,
    #front-page-7 .widget {
        padding: 18px !important;
        border-radius: 12px !important;
    }


    /* -----------------------------------------
       MOBILE STACKING — FP3 / FP5 / FP6 / FP7
       ----------------------------------------- */

    /* FP3 grid → 1 column */
    #front-page-3 .widget-area {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    /* FP5 / FP6 — kill floats + widths */
    .front-page-5 .flexible-widgets.widget-thirds .widget,
    .front-page-6 .flexible-widgets.widget-thirds .widget {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
    }

    /* FP7 flex → column */
    #front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap {
        flex-direction: column !important;
        gap: 18px !important;
    }

    #front-page-7 .flexible-widgets.widget-area.widget-thirds .wrap > .widget_text {
        flex: 0 0 100% !important;
    }


    /* -----------------------------------------
       UNIFIED MOBILE SPACING — FP3 / FP5 / FP6 / FP7
       ----------------------------------------- */

    #front-page-3 .widget,
    .front-page-5 .flexible-widgets.widget-thirds .widget,
    .front-page-6 .flexible-widgets.widget-thirds .widget,
    #front-page-7 .widget {
        margin-bottom: 24px !important;
    }

    .front-page-5,
    .front-page-6,
    #front-page-7,
    #front-page-3 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }


    /* -----------------------------------------
       FP1 HERO — mobile layout fix
       ----------------------------------------- */

    .front-page-1 .image-section {
        padding-top: 80px !important;
        padding-bottom: 80px !important;
        text-align: left !important;
    }

    .front-page-1 h1 {
        font-size: 34px !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
    }

    .front-page-1 p {
        font-size: 18px !important;
        line-height: 1.55 !important;
        margin-bottom: 24px !important;
    }

    /* FP1 hero button spacing */
    .front-page-1 .button,
    .front-page-1 a.button {
        margin-top: 12px !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
    }
}
/* ==============================================================
   FP1 HERO — reduced top padding on mobile
   ============================================================== */

@media (max-width: 768px) {
    .front-page-1 .image-section {
        padding-top: 32px !important;   /* reduced from 80px */
        padding-bottom: 48px !important; /* still balanced */
    }
}
/* ==============================================================
   FP1 HERO — remove ALL extra top padding on mobile
   ============================================================== */

@media (max-width: 768px) {

    /* Remove theme padding */
    .front-page-1,
    .front-page-1 .image-section,
    .front-page-1 .widget-area {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove Genesis widget padding */
    .front-page-1 .widget {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove pseudo-element padding */
    .front-page-1 .image-section::before {
        padding-top: 0 !important;
        margin-top: 0 !important;
        height: auto !important;
    }

    /* Force the hero to start immediately */
    .front-page-1 .image-section {
        padding-top: 32px !important;   /* controlled, minimal */
        padding-bottom: 48px !important;
    }
}
