/*
Theme Name: Monkeywood
Theme URI: https://www.monkeywood.co.uk/
Author: Technique Web
Author URI: https://www.techniqueweb.co.uk
Description: Bespoke theme for Monkeywood — handmade kitchens and whole-home interiors, Oxfordshire. SEO ready with LocalBusiness, Service and FAQPage schema, llms.txt and AI-crawler rules (inc/mw-seo.php). Built to run with Yoast SEO and ACF Pro.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: monkeywood
Tags: custom-logo, featured-images, translation-ready
*/

/* ============================================================
   1. Theme base
   ============================================================ */

.mw-social-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.mw-social-icons a {
    color: #ddcca0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}



.mw-social-icons a:hover i {
    color: #fff;
}

.mw-social-icons a i {
    color: #ddcca0;
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mw-social-icons a i.fa-instagram {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mw-social-icons a i.fa-instagram {
    font-size: 20px;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    position: relative;
    top: 2px;
}

/* ============================================================
   2. Site overrides (merged from Appearance → Customise → Additional CSS)
   style.css is enqueued last (priority 999), so these rules keep the
   same cascade position the Customiser gave them.
   ============================================================ */

:root {
    --mw-dark-green: #495037;
    --ct-green: #495037;
}

/* ── Mobile ──────────────────────────────────────── */
@media ( max-width: 768px ) {

    body header#masthead .col-1-1.logo img {
        transition: height 0.4s ease;
        height: 50px !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        margin-top: 20px !important;
        display: block;
    }

    .icons {
        width: 150px;
        float: right;
        margin-top: -47px;
        margin-right: 30px;
    }

    .mw-social-icons {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 11px;
        float: right;
        margin-top: -10px;
        margin-right: -10px;
    }

    .kfl-hero__heading,
    span.ep-eyebrow,
    h1.ep-hero__heading,
    h1.mtt-hero__heading,
    h1.proc-hero__heading,
    h1.oi-hero__heading,
    h2.sr-split__heading,
    h1.ct-hero__heading,
    h2.ct-info__showroom-heading,
    h2.fb-feature__heading,
    h2.ep-split__heading,
    h3.mtt-modal__name {
        padding-left: 10px;
    }

    .proc-stage p {
        font-size: 1.1em;
        margin: 0px;
    }
}

@media ( max-width: 768px ) {
    #page {
        padding-top: 0px;
    }

    header#masthead {
        margin-top: 0px !important;
    }

    body header#masthead.is-scrolled .col-1-1.logo img {
        height: 50px !important;
        width: auto !important;
        margin-top: 20px !important;
    }

    .site-header .site-branding {
        min-height: 88px !important;
    }

    main {
        padding-top: 90px;
    }

    .gform_wrapper.gravity-theme .gfield--type-phone .gform-phone__country-selector {
        height: 100%;
    }

    .home main {
        padding-top: 0px;
    }

    body.home #page,
    body.fb-page-template #page {
        padding-top: 0 !important;
    }
}

.posts .grid {
    max-width: 90% !important;
    margin: 0 auto;
}

.site .oi-hero__media {
    aspect-ratio: auto !important;
}

.site .kfl-hero__media {
    aspect-ratio: auto !important;
}

.fb-image-panels__label {
    text-align: center;
    padding: 12px 30px !important;
}

section.default-page__header {
    clear: both;
}

.ct-email-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--ct-text-mid);
    border-bottom: 0;
    padding-bottom: 0;
    font-size: 1.0em;
}

.twvc__viewport {
    position: relative;
    padding: 0 !important;
}

.twvc {
    padding: 20px 0px 12px !important;
}

.page-id-64 .ep-hero__media.ep-hero__media--image {
    aspect-ratio: auto !important;
}

section.proc-cta {
    display: none;
}

.site-branding {
    min-height: 160px !important;
}

.fb-hero-slider {
    width: 100%;
}

section.ct-form-section {
    display: none;
}

section.oi-cta {
    display: none;
}

.site-footer .col-1-4 {
    width: 100%;
    display: inline-grid;
    align-content: start;
    align-items: center;
    justify-content: start;
    grid-auto-flow: row;
}

.home .icons {
    width: 150px;
    float: right;
}

.site-footer .grid-pad {
    display: grid;
    grid-auto-flow: column;
}

.col-1-4.footer-logo {
    justify-content: center;
}

.col-1-4.footer-awards {
    display: inline-grid;
    grid-auto-flow: column;
}

h2.gform_title {
    display: none;
}

/* Desktop only — on phones the theme's `.sliderhome { margin: 0 !important }` applies. */
@media ( min-width: 769px ) {
    .sliderhome {
        margin-top: -198px !important;
    }
}

.wp-block-stackable-columns.alignfull.stk-block-columns.stk-block.stk-7a2103b.stk-block-background {
    margin-top: -10px !important;
}

span.kfl-section-label {
    display: none;
}

section.kfl-cta {
    display: none;
}

/* Header gradient on hero pages is handled by css/05-structure.css + functions.php. */

.gs_team_area.gs-grid-style-four .single-member-div {
    padding-bottom: 32px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    max-width: 22%;
}

.entry-content h2 {
    border: 0 !important;
    color: #857e6c !important;
    font-size: 1.8em;
}

.kfl-grid {
    background: var(--kfl-cream);
    padding-bottom: 80px;
    padding-top: 80px;
}

.ugb-feature.ugb-feature--v2 .ugb-feature__content,
.ugb-feature.ugb-feature--v2 .ugb-feature__item {
    background-position: 50%;
    background-size: cover;
    min-height: 500px;
}

header#masthead {
    margin-top: -27px;
}

.home header#masthead {
    margin-top: 0;
}

.wp-block-stackable-columns.alignfull.stk-block-columns.stk-block.stk-5449ca3 {
    padding: 0;
}

@media only screen and ( max-width: 767px ) {
    .col-1-1.logo img {
        height: 100px !important;
    }
}

/* ============================================================
   3. Header — burger | logo | social icons on one centred row
   The three sit in a 3-column grid inside .site-branding, all
   vertically centred on the logo. Nothing is absolutely positioned,
   so they can't drift off-screen on mobile hero pages, and they stay
   level as the sticky header shrinks.
   ============================================================ */
html body header#masthead .site-branding {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 20px 30px !important;
}

/* Logo — centre column, no offsets */
html body header#masthead .site-branding .col-1-1.logo {
    grid-column: 2;
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
html body header#masthead .site-branding .col-1-1.logo img {
    margin: 0 !important;
}

/* Burger — left column */
.mw-burger {
    grid-column: 1;
    justify-self: start;
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 44px;
    height: 44px;
    margin: 0 0 0 -7px;
    padding: 0 7px;
    box-sizing: border-box;
    background: none;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mw-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ddcca0;
    transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.mw-burger:hover span,
.mw-burger:focus-visible span {
    background: #fff;
}

.mw-burger:focus-visible {
    outline: 1px solid #ddcca0;
    outline-offset: 2px;
}

.mw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.mw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Social icons — right column */
html body header#masthead .site-branding .icons {
    grid-column: 3;
    justify-self: end;
    position: static !important;
    transform: none !important;
    display: block !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html body header#masthead .mw-social-icons {
    display: flex !important;
    align-items: center;
    float: none !important;
    margin: 0 !important;
}

/* Superfly's own triggers — kept in the DOM (the theme burger clicks them)
   but never shown. Only applied once the theme burger has found one. */
html.mw-has-burger .sfm-rollback,
html.mw-has-burger #sfm-mob-navbar {
    display: none !important;
}
html.mw-has-burger body {
    padding-top: 0 !important; /* Superfly's mobile bar spacer */
}

/* Sticky — height comes from the content so the green bar and the
   centre line always match. */
html body header#masthead.is-scrolled {
    max-height: none !important;
}
html body header#masthead.is-scrolled .site-branding {
    min-height: 0 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* Mobile */
@media ( max-width: 768px ) {
    html body header#masthead .site-branding,
    html body header#masthead.is-scrolled .site-branding {
        min-height: 0 !important;
        padding: 10px 12px !important;
        column-gap: 8px;
    }

    .mw-burger {
        width: 40px;
        height: 40px;
        gap: 7px;
    }
    .mw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    html body header#masthead .mw-social-icons {
        gap: 10px !important;
    }
    html body header#masthead .mw-social-icons a {
        min-width: 20px;
        min-height: 32px;
        justify-content: center;
    }
}

@media ( max-width: 400px ) {
    html body header#masthead .mw-social-icons { gap: 6px !important; }
    html body header#masthead .mw-social-icons a i { font-size: 15px; }
    html body header#masthead .mw-social-icons a i.fa-instagram { font-size: 18px; }
}


/*
 * 404 Page — Styles
 */

.error-404 {
    background: #faf8f5;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-404__hero {
    width: 100%;
    padding: 120px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-404__content {
    text-align: center;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.error-404__eyebrow {
    display: block;
    font-size: 7em;
    font-weight: 400;
    color: #e0d8cc;
    line-height: 1;
    font-family: Georgia, serif;
}

.error-404__heading {
    font-weight: 400;
    color: #3a3228;
    line-height: 1.3;
    margin: 0;
}

.error-404__body {
    color: #6b5f50;
    line-height: 1.8;
    margin: 0;
}

.error-404__btn {
    display: inline-block;
    background: #495037;
    color: #e8dfc8;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 16px 40px;
    text-decoration: none;
    margin-top: 8px;
    transition: opacity 0.2s ease;
}

.error-404__btn:hover {
    opacity: 0.88;
}

.error-404__links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 8px;
}

.error-404__links a {
    color: #9a8c6e;
    text-decoration: none;
    letter-spacing: 0.08em;
    border-bottom: 0.5px solid #e0d8cc;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.error-404__links a:hover {
    color: #495037;
}

@media ( max-width: 768px ) {
    .error-404__hero { padding: 80px 20px; }
    .error-404__eyebrow { font-size: 5em; }
    .error-404__links { gap: 16px; }
}