/* ============================================================
   TESC STYLE.CSS
   GOV / DATABASE STYLE
   ============================================================ */

:root {
    --tesc-blue: #1d70b8;
    --tesc-blue-dark: #003078;
    --tesc-yellow: #ffdd00;
    --tesc-green: #00703c;
    --tesc-red: #d4351c;

    --text-dark: #0b0c0c;
    --text-mid: #505a5f;
    --text-light: #ffffff;

    --bg-light: #f3f2f1;
    --bg-white: #ffffff;
    --border-light: #b1b4b6;

    --container: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    font-size: 19px;
    line-height: 1.45;
    padding-top: 78px;
}

a {
    color: var(--tesc-blue);
    text-decoration: underline;
}

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

.container {
    width: min(100% - 40px, var(--container));
    margin: 0 auto;
}

/* HEADER */

.gov-topbar {
    background: var(--tesc-blue);
    color: #ffffff;
    border-bottom: 0px solid var(--tesc-blue-dark);
}

.gov-topbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0px;
    font-size: 16px;
    font-weight: 700;
}

.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a {
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 0px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--tesc-blue-dark);
    border-bottom-color: var(--tesc-blue);
}

.nav-cta {
    background: var(--tesc-green);
    color: #ffffff !important;
    padding: 10px 14px !important;
    box-shadow: 0 3px 0 #002d18;
    border-bottom: 0 !important;
}

.nav-toggle{ display:none; width:68px; height:48px; padding:0; border:2px solid #0b0c0c; background:#ffffff; cursor:pointer; justify-content:center; align-items:center; flex-direction:column; } .nav-toggle:hover{ background:#f3f2f1; } .nav-toggle span{ display:block; width:24px; height:3px; margin:2px auto; background:#0b0c0c; } .nav-toggle small{ display:block; margin-top:4px; font-size:9px; font-weight:700; letter-spacing:.8px; color:#0b0c0c; line-height:1; }

/* HERO */

.hero {
    background: #ffffff;
    color: var(--text-dark);
    padding: 48px 0 42px;
    border-bottom: 1px solid var(--border-light);
}

.hero-content {
    max-width: 820px;
}

.hero-kicker {
    display: inline-block;
    background: var(--tesc-blue);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    margin-bottom: 18px;
}

.hero h1,
.page-header h1 {
    margin: 0 0 24px;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    font-weight: 700;
}

.hero p {
    font-size: 24px;
    max-width: 760px;
    margin: 0 0 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* SECTIONS */

.section {
    padding: 54px 0;
}

.section-white {
    background: #ffffff;
}

.section-blue {
    background: var(--tesc-blue);
    color: #ffffff;
}

.section-header {
    max-width: 780px;
    margin-bottom: 30px;
}

.section-header.center {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.section-header h2 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.12;
}

.section-header p {
    color: var(--text-mid);
    margin: 0;
    font-size: 21px;
}

.section-blue .section-header p,
.section-blue p {
    color: #ffffff;
}

/* BUTTONS */

.btn2,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--tesc-red);
    color: #ffffff;
    padding: 13px 22px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 0 #002d18;
    border-radius: 0;
}

.btn2:hover,
button:hover {
    text-decoration: none;
}

.btn2:active,
button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #002d18;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--tesc-green);
    color: #ffffff;
    padding: 13px 22px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 0 #002d18;
    border-radius: 0;
}

.btn:hover,
button:hover {
    text-decoration: none;
}

.btn:active,
button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #002d18;
}

.btn-primary {
    background: var(--tesc-green);
    color: #ffffff;
}

.btn-secondary,
.btn-blue {
    background: var(--tesc-blue);
    color: #ffffff;
    box-shadow: 0 3px 0 var(--tesc-blue-dark);
}

.btn-outline {
    background: #ffffff;
    color: var(--tesc-blue);
    border: 2px solid var(--tesc-blue);
    box-shadow: none;
}

/* GRIDS / CARDS */

.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.info-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 24px;
    box-shadow: none;
    border-radius: 0;
    color: var(--text-dark);
}

.info-card {
    display: block;
    text-decoration: none;
}

.info-card:hover {
    outline: 3px solid var(--tesc-yellow);
    text-decoration: none;
}

.info-card h3,
.card h2,
.card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.2;
}

.info-card p,
.card p {
    color: var(--text-mid);
    margin-bottom: 0;
}

/* Keep image cards, but make them less glossy */

.info-card.has-bg {
    min-height: 230px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image:
        linear-gradient(0deg, rgba(0, 48, 120, 0.82), rgba(0, 48, 120, 0.20)),
        var(--card-bg);
    background-size: cover;
    background-position: center;
    border: 0;
}

.card-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.card-link:hover{
  border-color:var(--gov-blue);
  box-shadow:0 4px 18px rgba(0,0,0,.08);
}

.card-link h3{
  color:var(--gov-blue-dark);
}

.card-link:hover h3{
  text-decoration:underline;
}


.info-card.has-bg h3 {
    color: #ffffff;
}

.info-card.has-bg p {
    color: rgba(255,255,255,0.95);
}

/* Card background paths */

.bg-eicr-register { --card-bg: url('/assets/img/backgrounds/eicr-register.webp'); }
.bg-check-compliance { --card-bg: url('/assets/img/backgrounds/check-compliance.webp'); }
.bg-find-provider { --card-bg: url('/assets/img/backgrounds/find-provider.webp'); }
.bg-contractor-signup { --card-bg: url('/assets/img/backgrounds/contractor-signup.webp'); }
.bg-landlord-guidance { --card-bg: url('/assets/img/backgrounds/landlord-guidance.webp'); }
.bg-letting-agent { --card-bg: url('/assets/img/backgrounds/letting-agent.webp'); }
.bg-failed-eicr { --card-bg: url('/assets/img/backgrounds/failed-eicr.webp'); }
.bg-certificate-check { --card-bg: url('/assets/img/backgrounds/certificate-check.webp'); }
.bg-consumer-unit { --card-bg: url('/assets/img/backgrounds/consumer-unit.webp'); }
.bg-codes { --card-bg: url('/assets/img/backgrounds/c1-c2-c3.webp'); }
.bg-database { --card-bg: url('/assets/img/backgrounds/database.webp'); }
.bg-enforcement { --card-bg: url('/assets/img/backgrounds/enforcement.webp'); }

/* NOTICES / STATS */

.notice {
    background: #f8f8f8;
    border-left: 10px solid var(--tesc-blue);
    padding: 18px 22px;
    box-shadow: none;
    border-radius: 0;
    color: var(--text-dark);
}

.notice2 {
    background: #f8f8f8;
    border-left: 10px solid var(--tesc-red);
    padding: 18px 22px;
    box-shadow: none;
    border-radius: 0;
    color: var(--text-dark);
}

.notice-blue {
    border-left-color: var(--tesc-blue);
}

.notice-warning {
    border-left-color: var(--tesc-red);
}

.section-blue .notice {
    background: #ffffff;
    color: var(--text-dark);
}

.stats-strip {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
    padding: 24px 0;
}

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

.stat {
    border-left: 5px solid var(--tesc-blue);
    padding-left: 14px;
}

.stat strong {
    display: block;
    font-size: 28px;
    color: var(--text-dark);
}

.stat span {
    font-size: 16px;
    color: var(--text-mid);
}

.result-status {
    display: inline-block;
    padding: 8px 12px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #ffffff;
}

.result-status.pass {
    background: var(--tesc-green);
}

.result-status.fail {
    background: var(--tesc-red);
}

.result-list {
    margin: 20px 0 28px;
    border-top: 1px solid var(--border-light);
}

.result-list div {
    display: grid;
    grid-template-columns: 190px 1fr;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
}

.result-list dt {
    font-weight: 700;
}

.result-list dd {
    margin: 0;
}

.lead {
    font-size: 21px;
    max-width: 780px;
}

@media (max-width: 800px) {
    .result-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* FORMS */

.tesc-form,
.form-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 30px;
    box-shadow: none;
    border-radius: 0;
}

.email-link{
    overflow-wrap:anywhere;
    word-break:break-word;
    display:block;
    font-size:0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label,
label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea,
input,
select,
textarea {
    width: 100%;
    border: 2px solid var(--text-dark);
    border-radius: 0;
    padding: 12px;
    font-size: 20px;
    font-family: inherit;
    background: #ffffff;
    color: var(--text-dark);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--tesc-yellow);
    outline-offset: 0;
}

.form-consent {
    font-size: 16px;
    color: var(--text-mid);
}

.form-actions {
    margin-top: 24px;
}

/* FAQ */

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.faq-question {
    width: 100%;
    background: #ffffff;
    border: 0;
    box-shadow: none;
    color: var(--text-dark);
    padding: 18px;
    text-align: left;
    font-weight: 700;
    font-size: 19px;
}

.faq-answer {
    display: none;
    padding: 0 18px 18px;
    color: var(--text-mid);
}

.faq-item.open .faq-answer {
    display: block;
}

/* BREADCRUMBS */

.breadcrumb-wrapper {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    margin: 0;
    font-size: 16px;
}

.breadcrumbs li::after {
    content: "›";
    margin-left: 8px;
    color: var(--text-mid);
}

.breadcrumbs li:last-child::after {
    display: none;
}

/* FOOTER */

.site-footer {
    background: #f8f8f8;
    color: var(--text-dark);
    border-top: 1px solid var(--border-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-col h3 {
    margin-top: 0;
}

.footer-col p,
.footer-col li {
    color: var(--text-mid);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 18px 0;
    font-size: 15px;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

/* ============================================================
   FAIL / PASS EICR RECORD LAYOUT FIXES
   ============================================================ */

.tesc-form,
.notice,
.card {
    min-width: 0;
}

.result-list {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.result-list div {
    min-width: 0;
}

.result-list dd,
.result-list dt {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tesc-form img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 1100px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ANIMATION */

.reveal {
    opacity: 1;
    transform: none;
}

/* RESPONSIVE */

@media (max-width: 1020px) {
    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-light);
        padding: 12px 24px 22px;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 13px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    body {
        font-size: 18px;
    }

    .gov-topbar-inner {
        flex-direction: column;
        gap: 4px;
    }

    .header-logo {
        width: 230px;
    }

    .hero {
        padding: 38px 0;
    }

    .hero h1,
    .page-header h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 21px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    button {
        width: 100%;
    }

    .section {
        padding: 42px 0;
    }

    .tesc-form,
    .form-card,
    .card,
    .info-card,
    .notice {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 70px;
    }

    .site-nav {
        top: 70px;
    }

    .header-logo {
        width: 200px;
    }
}

@media (max-width: 420px) {
    body {
        padding-top: 70px;
    }
}

@media (max-width: 800px) {

    .site-footer {
        text-align: left;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 34px 0;
    }

    .footer-col {
        width: 100%;
    }

    .footer-col ul {
        margin: 0;
        padding: 0;
    }

    .footer-col a,
    .footer-bottom a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .footer-bottom .container {
        display: block;
    }

    .footer-bottom p {
        margin: 0 0 12px;
    }

    .footer-bottom p:last-child {
        margin-bottom: 0;
    }
}

/* ============================================================
   Compatibility helpers for converted TESC legacy pages
   ============================================================ */
.wrap{width:min(100% - 40px, var(--container));margin:0 auto;}
.gov-tag{display:inline-block;background:var(--tesc-blue);color:#fff;font-size:15px;font-weight:700;text-transform:uppercase;padding:3px 8px;margin-bottom:18px;}
.buttons{display:flex;flex-wrap:wrap;gap:14px;margin-top:20px;}
.btn.secondary,.btn-secondary{background:var(--tesc-blue);box-shadow:0 3px 0 var(--tesc-blue-dark);color:#fff;}
.btn.danger,.btn-danger{background:var(--tesc-red);box-shadow:0 3px 0 #8a1f10;color:#fff;}
.search-panel{background:#fff;border:3px solid var(--text-dark);padding:28px;max-width:860px;margin-top:28px;}
.search-option{margin-top:18px;}.search-divider{font-weight:700;font-size:18px;margin:22px 0 8px;color:var(--text-mid);}
.form-row{display:flex;gap:10px;width:100%;align-items:stretch}.form-row input{flex:1}.form-row button{white-space:nowrap}.split-row input:first-child{max-width:210px}.split-row input:nth-child(2){max-width:280px}
.clear-btn{display:inline-flex;align-items:center;justify-content:center;background:#6f777b;color:#fff;text-decoration:none;padding:13px 18px;font-size:18px;font-weight:700;border:0;}
.clear-btn:hover{background:#505a5f;color:#fff;text-decoration:none}.hint,.help{margin-top:12px;color:var(--text-mid);font-size:16px}.lead{font-size:21px;max-width:780px;color:var(--text-mid)}
.alert{border-left:8px solid var(--tesc-blue);background:#f3f2f1;padding:18px 22px;margin:20px 0;}.alert.error{border-left-color:var(--tesc-red);background:#fff4f4}.alert.success{border-left-color:var(--tesc-green);background:#f3fff7}
.result-box{background:#fff;border:3px solid var(--text-dark);padding:26px;max-width:900px;margin-top:24px}.result-status{display:inline-block;padding:8px 12px;font-weight:700;margin-bottom:18px;color:#fff}.result-status.pass{background:var(--tesc-green)}.result-status.fail{background:var(--tesc-red)}
.result-list{margin:18px 0 24px;border-top:1px solid var(--border-light)}.result-list div{display:grid;grid-template-columns:210px 1fr;border-bottom:1px solid var(--border-light);padding:12px 0}.result-list dt{font-weight:700}.result-list dd{margin:0}.status-pill{display:inline-block;padding:6px 10px;font-weight:700;color:#fff;background:var(--tesc-blue)}.status-pill.approved{background:var(--tesc-green)}.status-pill.pending{background:#f47738;color:#0b0c0c}.status-pill.suspended{background:var(--tesc-red)}
.grid2,.grid-2-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.checkbox-grid{display:grid;grid-template-columns:repeat(6,minmax(70px,1fr));gap:8px 14px;margin:12px 0 24px}.checkbox-grid label{font-weight:400;margin:0}.checkbox-grid input{width:auto;margin-right:6px}table{width:100%;border-collapse:collapse;background:#fff}th,td{border-bottom:1px solid var(--border-light);padding:12px;text-align:left;vertical-align:top}th{background:#f3f2f1;font-weight:700}.table-wrap{overflow-x:auto}.alt{background:#f8f8f8;border-top:1px solid var(--border-light);border-bottom:1px solid var(--border-light)}
@media(max-width:800px){.form-row{flex-direction:column}.split-row input:first-child,.split-row input:nth-child(2){max-width:none}.grid2,.grid3,.grid-2-form{grid-template-columns:1fr}.checkbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.result-list div{grid-template-columns:1fr;gap:4px}}
