/* GHU Installer Directory — matches green-home-upgrade theme */

/* Use theme variables when available, fall back to values */
.ghu-directory-page {
    --lime: #7bdd4e;
    --lime-soft: #eaf9e2;
    --lime-deep: #5bb82f;
    --ink: #0a0a0a;
    --ink-2: #1a1a1a;
    --grey-1: #6b7280;
    --grey-2: #9ca3af;
    --grey-3: #d1d5db;
    --line: #ececec;
    --line-soft: #f3f4f6;
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --bg-panel: #f7f8f6;
}

.ghu-directory-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px 80px;
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
    color: var(--ink);
}

/* ===== Breadcrumbs (matches theme .pillar-crumbs) ===== */
.ghu-breadcrumbs {
    margin-bottom: 24px;
}
.ghu-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-1);
}
.ghu-breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--grey-3);
}
.ghu-breadcrumbs li:last-child {
    color: var(--ink);
}
.ghu-breadcrumbs a {
    color: var(--grey-1);
    text-decoration: none;
}
.ghu-breadcrumbs a:hover {
    color: var(--ink);
}

/* ===== Hero (matches theme .pillar-hero) ===== */
.ghu-directory-hero {
    padding: 56px 0 40px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--line);
}
.ghu-directory-hero h1 {
    font-size: 72px;
    font-weight: 600;
    letter-spacing: -2.5px;
    line-height: 1.02;
    margin: 0 0 20px;
    max-width: 900px;
    color: var(--ink);
}
.ghu-hero-subtitle {
    font-size: 20px;
    color: var(--grey-1);
    max-width: 680px;
    line-height: 1.5;
    letter-spacing: -0.2px;
}
.ghu-county-stats {
    font-size: 14px;
    color: var(--lime-deep);
    margin-top: 14px;
    font-weight: 500;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* ===== Postcode Search ===== */
.ghu-postcode-search {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}
.ghu-postcode-search::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(123,221,78,0.15) 0%, transparent 65%);
    pointer-events: none;
}
.ghu-postcode-search h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: var(--ink);
}
.ghu-postcode-search p {
    font-size: 15px;
    color: var(--grey-1);
    margin: 0 0 20px;
}
.ghu-search-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}
.ghu-search-input {
    flex: 1;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    outline: none;
    transition: border-color 0.15s;
}
.ghu-search-input:focus {
    border-color: var(--lime-deep);
}
.ghu-search-input::placeholder {
    color: var(--grey-2);
}
.ghu-search-btn {
    height: 48px;
    padding: 0 24px;
    background: var(--lime);
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    transition: background 0.15s;
    white-space: nowrap;
}
.ghu-search-btn:hover {
    background: var(--lime-deep);
}
.ghu-search-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}
.ghu-search-loading {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--grey-1);
    margin-top: 8px;
}
.ghu-search-loading .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--line);
    border-top-color: var(--lime-deep);
    border-radius: 50%;
    animation: ghu-spin 0.6s linear infinite;
}
@keyframes ghu-spin {
    to { transform: rotate(360deg); }
}

/* ===== Section headings ===== */
.ghu-directory-page section {
    margin-bottom: 64px;
}
.ghu-directory-page h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 16px;
    color: var(--ink);
}
.ghu-directory-page h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 28px 0 12px;
    color: var(--ink);
}
.ghu-directory-page section > p {
    font-size: 15px;
    color: var(--grey-1);
    max-width: 640px;
    line-height: 1.55;
}

/* ===== Tag / kicker above sections ===== */
.ghu-section-tag {
    font-size: 12px;
    color: var(--lime-deep);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ghu-section-tag::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--lime-deep);
}

/* ===== Installer Table ===== */
.ghu-installer-table-wrap {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.ghu-installer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ghu-installer-table th {
    background: var(--bg-panel);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-1);
    border-bottom: 1px solid var(--line);
}
.ghu-installer-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    color: var(--ink);
}
.ghu-installer-table tbody tr:last-child td {
    border-bottom: none;
}
.ghu-installer-table tbody tr:hover {
    background: var(--bg-soft);
}
.ghu-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 500;
}
.ghu-badge-trustmark {
    background: var(--lime-soft);
    color: var(--lime-deep);
}
.ghu-rating {
    color: #f59e0b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ghu-installer-table code {
    font-size: 12px;
    color: var(--grey-1);
    background: var(--line-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Geist Mono', ui-monospace, monospace;
}

/* ===== Town Grid (county pages) ===== */
.ghu-town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}
.ghu-town-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.ghu-town-card:hover {
    background: var(--bg-soft);
}
.ghu-town-card-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.ghu-town-card-council {
    font-size: 12px;
    color: var(--grey-2);
    margin-top: 4px;
}

/* ===== Trade Links (county pages) ===== */
.ghu-trade-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.ghu-trade-link-card {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    font-size: 14px;
    transition: border-color 0.15s, background 0.15s;
}
.ghu-trade-link-card:hover {
    border-color: var(--lime);
    background: var(--lime-soft);
}

/* ===== Local Info / How to Choose ===== */
.ghu-local-info p,
.ghu-what-to-look-for p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
    margin-bottom: 14px;
}
.ghu-what-to-look-for ul {
    padding-left: 0;
    list-style: none;
}
.ghu-what-to-look-for li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
}
.ghu-what-to-look-for li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
}

/* ===== FAQs ===== */
.ghu-faqs {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.ghu-faqs > h2 {
    padding: 24px 28px 0;
}
.ghu-faq-item {
    border-bottom: 1px solid var(--line-soft);
    padding: 20px 28px;
}
.ghu-faq-item:last-child {
    border-bottom: none;
}
.ghu-faq-item h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    color: var(--ink);
}
.ghu-faq-item p {
    margin: 0;
    font-size: 14px;
    color: var(--grey-1);
    line-height: 1.6;
}
.ghu-faq-item a {
    color: var(--lime-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ===== CTA ===== */
.ghu-cta-section {
    background: var(--ink);
    color: #fff;
    border-radius: 20px;
    padding: 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ghu-cta-section::before {
    content: "";
    position: absolute;
    right: -100px;
    top: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(123,221,78,0.2) 0%, transparent 65%);
    pointer-events: none;
}
.ghu-cta-section h2 {
    color: #fff;
    font-size: 36px;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.ghu-cta-section p {
    color: var(--grey-2);
    font-size: 15px;
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.55;
}
.ghu-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lime);
    color: var(--ink);
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.15s;
}
.ghu-cta-button:hover {
    background: var(--lime-deep);
    color: var(--ink);
}

/* ===== Other Trades section ===== */
.ghu-other-trades h2 {
    margin-bottom: 16px;
}

/* ===== Collapsible County Accordion ===== */
.ghu-county-accordion {
    border: 1px solid var(--line, #ececec);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 24px;
}
.ghu-county-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-panel, #f7f8f6);
    border: none;
    cursor: pointer;
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink, #0a0a0a);
    letter-spacing: -0.01em;
    transition: background 0.15s;
}
.ghu-county-toggle:hover {
    background: var(--line-soft, #f3f4f6);
}
.ghu-county-toggle svg {
    transition: transform 0.2s;
    color: var(--grey-1, #6b7280);
}
.ghu-county-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.ghu-county-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 24px;
}
.ghu-county-panel[aria-hidden="false"] {
    max-height: 3000px;
    padding: 0 24px 24px;
}
.ghu-county-panel h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink, #0a0a0a);
    margin: 20px 0 6px;
}
.ghu-county-panel h3:first-child {
    margin-top: 8px;
}
.ghu-county-panel p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--grey-1, #6b7280);
    margin: 0 0 4px;
}
.ghu-county-panel a {
    color: var(--lime-deep, #5bb82f);
    text-decoration: none;
}
.ghu-county-panel a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ghu-directory-page {
        padding: 0 20px 60px;
    }
    .ghu-directory-hero h1 {
        font-size: 40px;
        letter-spacing: -1.5px;
    }
    .ghu-directory-page h2 {
        font-size: 24px;
    }
    .ghu-postcode-search {
        padding: 28px;
    }
    .ghu-postcode-search h2 {
        font-size: 22px;
    }
    .ghu-search-form {
        flex-direction: column;
    }
    .ghu-search-btn {
        width: 100%;
    }
    .ghu-installer-table {
        font-size: 13px;
    }
    .ghu-installer-table th,
    .ghu-installer-table td {
        padding: 10px 12px;
    }
    .ghu-town-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .ghu-cta-section {
        padding: 36px 24px;
        border-radius: 16px;
    }
    .ghu-cta-section h2 {
        font-size: 26px;
    }
    .ghu-faqs > h2 {
        padding: 20px 20px 0;
    }
    .ghu-faq-item {
        padding: 16px 20px;
    }
}
