/* ==========================================================================
   Martin Goode MRICS — site stylesheet
   ========================================================================== */

/* Self-hosted fonts (variable weight, latin subset) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/lora-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #2b3175;
    --navy-dark: #21265c;
    --navy-deep: #14173a;
    --green: #9dc34d;
    --green-dark: #7ea238;
    --ink: #222633;
    --muted: #5c6274;
    --line: #e5e8ef;
    --bg: #f7f8fb;
    --white: #ffffff;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(20, 23, 58, 0.08);
    --shadow-md: 0 10px 30px rgba(20, 23, 58, 0.10);
    --shadow-lg: 0 22px 45px rgba(20, 23, 58, 0.16);
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-head: 'Lora', Georgia, 'Times New Roman', serif;
    --container: 1140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--navy);
}

a:hover {
    color: var(--green-dark);
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    color: var(--navy);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

p {
    margin: 0 0 1.1em;
}

ol, ul {
    padding-left: 1.4em;
}

ol li, ul li {
    margin-bottom: 0.5em;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--white);
    color: var(--navy);
    padding: 0.6rem 1rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--navy);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--navy-dark);
    color: var(--white);
}

.btn-accent {
    background-color: var(--green);
    color: var(--white);
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--green-dark);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--navy);
    color: var(--white);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
    background-color: var(--navy-deep);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 42px;
    flex-wrap: wrap;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.topbar-note {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green);
}

.topbar-contact {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.topbar-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.topbar-contact a:hover {
    color: var(--green);
}

.topbar-contact svg {
    width: 15px;
    height: 15px;
    fill: var(--green);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 104px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    height: 90px;
    width: auto;
    display: block;
}

@media (max-width: 1120px) {
    .header-inner {
        min-height: 88px;
    }

    .brand img {
        height: 68px;
    }
}

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.site-nav li {
    margin: 0;
}

.site-nav a {
    display: block;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
    color: var(--navy);
    background-color: var(--bg);
}

.site-nav a.active {
    color: var(--navy);
    font-weight: 600;
    box-shadow: inset 0 -3px 0 var(--green);
    border-radius: 8px 8px 0 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    color: var(--navy);
}

.nav-toggle .bars {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    position: relative;
    transition: background-color 0.2s ease;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--navy);
    transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle .bars::before {
    top: -7px;
}

.nav-toggle .bars::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .bars::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bars::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 1120px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        display: none;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1.25rem 1rem;
        gap: 0.15rem;
    }

    .site-nav a {
        padding: 0.7rem 0.85rem;
        font-size: 1rem;
    }

    .site-nav a.active {
        box-shadow: inset 3px 0 0 var(--green);
        border-radius: 8px;
        background-color: var(--bg);
    }
}

/* --------------------------------------------------------------------------
   Hero (homepage)
   -------------------------------------------------------------------------- */

.hero {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #3a418f 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 195, 77, 0.28) 0%, rgba(157, 195, 77, 0) 70%);
    pointer-events: none;
}

.hero-inner {
    padding: 4.5rem 1.25rem 4.75rem;
    max-width: 760px;
}

.hero-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 1rem;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    margin-bottom: 0.5em;
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 70%);
    color: var(--white);
    padding: 2.75rem 0 3rem;
}

.page-hero .hero-eyebrow {
    margin-bottom: 0.5rem;
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
    padding: 3.5rem 0;
}

.section-alt {
    background-color: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-dark {
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin-bottom: 0.4em;
}

.section-lead {
    color: var(--muted);
    max-width: 700px;
}

.section-dark .section-lead {
    color: rgba(255, 255, 255, 0.8);
}

.title-rule {
    width: 56px;
    height: 4px;
    border: 0;
    border-radius: 2px;
    background: var(--green);
    margin: 0 0 1.75rem;
}

.title-rule.centered {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

/* Two-column split (about + reviews) */

.split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 860px) {
    .split {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.25rem;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background-color: var(--white);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 1.9rem 1.7rem 1.7rem;
    border-top: 4px solid var(--green);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.section-dark .service-card h3,
.service-card h3 {
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 0.5em;
}

.service-card p {
    color: var(--muted);
    flex-grow: 1;
}

.service-card .btn {
    align-self: flex-start;
    margin-top: 0.75rem;
}

/* Panel — generic white card for content */

.panel {
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

/* Reviews widget wrapper */

.reviews-panel {
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

/* --------------------------------------------------------------------------
   Video boxes
   -------------------------------------------------------------------------- */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 540px));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 760px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.videobox {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background-position: center;
    background-size: cover;
    min-height: 240px;
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.videobox.rightsurvey {
    background-image: url('../WebImages/therightsurvey.jpg');
}

.videobox .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 23, 58, 0.25) 0%, rgba(20, 23, 58, 0.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
}

.videobox:hover .overlay {
    background: linear-gradient(180deg, rgba(20, 23, 58, 0.45) 0%, rgba(20, 23, 58, 0.85) 100%);
}

.videobox .play-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: rgba(157, 195, 77, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.videobox:hover .play-icon {
    transform: scale(1.1);
}

.videobox .play-icon::after {
    content: "";
    display: block;
    margin-left: 5px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--white);
}

.videobox .vbtitle {
    color: var(--white);
    font-family: var(--font-head);
    font-size: 1.35rem;
    margin: 0.25rem 0 0;
}

.videobox .vbplay {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Content pages
   -------------------------------------------------------------------------- */

.page-content {
    padding: 3rem 0 3.75rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 860px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

.prose {
    max-width: 72ch;
}

.prose ol li,
.prose ul li {
    margin-bottom: 0.85em;
}

.prose h2 {
    font-size: 1.4rem;
    margin-top: 1.8em;
}

.prose h3 {
    font-size: 1.1rem;
    margin-top: 1.5em;
}

.prose h2:first-child,
.prose h3:first-child {
    margin-top: 0;
}

/* Sidebar contact / CTA card */

.side-card {
    background-color: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.75rem 1.6rem;
}

.side-card h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5em;
}

.side-card p {
    color: var(--muted);
    font-size: 0.97rem;
}

.side-card + .side-card {
    margin-top: 1.5rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.contact-list li {
    margin: 0;
}

.contact-list a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    border-top: 1px solid var(--line);
}

.contact-list li:first-child a {
    border-top: 0;
}

.contact-list a:hover {
    color: var(--navy);
}

.contact-list svg {
    width: 18px;
    height: 18px;
    fill: var(--green);
    flex-shrink: 0;
}

.side-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--muted);
    font-weight: 600;
    margin: 1.5rem 0;
}

.side-divider::before,
.side-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1.75rem;
}

legend {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
    padding: 0;
    margin-bottom: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1.5rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-field {
    margin: 0 0 1rem;
}

.form-wide {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    color: var(--ink);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(43, 49, 117, 0.15);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-consent label {
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--muted);
}

.form-consent input {
    margin-right: 0.5rem;
}

.field-error {
    display: block;
    color: #b3261e;
    font-size: 0.88rem;
    margin-top: 0.3rem;
}

.btn-submit {
    font-size: 1.05rem;
    padding: 0.8rem 2.2rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
}

.alert h2 {
    font-size: 1.4rem;
}

.alert p:last-of-type {
    margin-bottom: 0;
}

.alert .btn {
    margin-top: 1.25rem;
}

.alert-success {
    background-color: #f2f8e6;
    border: 1px solid var(--green);
}

.alert-error {
    background-color: #fdf0ef;
    border: 1px solid #d9928d;
    color: #7a1f1a;
}

/* --------------------------------------------------------------------------
   Downloads
   -------------------------------------------------------------------------- */

.download-group {
    margin-bottom: 2.5rem;
}

.download-group h2 {
    font-size: 1.35rem;
}

.download-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    gap: 0.85rem;
}

.download-list li {
    margin: 0;
}

.download-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.download-list a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--green);
    color: var(--navy);
}

.download-list svg {
    width: 26px;
    height: 26px;
    fill: var(--navy);
    flex-shrink: 0;
}

.download-list .dl-hint {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green-dark);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--navy-deep);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding: 3.25rem 0 2.5rem;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.site-footer h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.1em;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.55em;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-list a:hover {
    color: var(--green);
}

.footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--white);
    font-weight: 600;
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    fill: var(--green);
    flex-shrink: 0;
}

.footer-contact .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.2em;
}

.footer-contact li {
    margin-bottom: 1.1em;
}

.footer-accreditation {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 56px;
    width: auto;
    background-color: var(--white);
    border-radius: 8px;
    padding: 8px 12px;
}

.footer-accreditation a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-accreditation a:hover {
    color: var(--green);
}

.footer-legal {
    display: inline-flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.copyright {
    background-color: #0e1029;
    padding: 1.1rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.copyright p {
    margin: 0;
}

.copyright a {
    color: rgba(255, 255, 255, 0.8);
}

.copyright a:hover {
    color: var(--green);
}
