/* ============================================================
   UK POSTCODES DIRECTORY - PROFESSIONAL DIRECTORY STYLING
   ============================================================ */

/* -------------------------------------------------------------------
   CSS VARIABLES
   ------------------------------------------------------------------- */

:root {
    /* Primary Brand Colors */
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;

    /* Secondary Colors */
    --accent: #059669;
    --accent-light: #10b981;
    --accent-bg: #ecfdf5;

    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Border & Effects */
    --border-color: #e2e8f0;
    --border-dark: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;

    /* Spacing & Layout */
    --navbar-height: 60px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --container-width: 1280px;
}

/* -------------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--primary-dark);
}

/* -------------------------------------------------------------------
   FLAG IMAGES
   WebP flag images in /assets/img/flags/
   Sized by their container; img fills via object-fit: cover
   ------------------------------------------------------------------- */

.flag-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* -------------------------------------------------------------------
   NAVIGATION BAR
   ------------------------------------------------------------------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    height: var(--navbar-height);
}

.navbar__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.navbar__logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar__item {
    position: relative;
}

.navbar__link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.navbar__link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.navbar__link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.navbar__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.2s;
    margin-top: 0.25rem;
}

.navbar__item:hover .navbar__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar__item:hover .navbar__link svg {
    transform: rotate(180deg);
}

.navbar__dropdown-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.navbar__dropdown-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.navbar__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar__search {
    position: relative;
}

.navbar__search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.navbar__search-input {
    width: 220px;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.navbar__search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    width: 280px;
}

.navbar__search-input::placeholder {
    color: var(--text-muted);
}

.navbar__icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.navbar__icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.navbar__icon-btn svg {
    width: 20px;
    height: 20px;
}

/* -------------------------------------------------------------------
   PAGE HEADER (Directory Style)
   ------------------------------------------------------------------- */

.page-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.page-header__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-header__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.page-header__breadcrumb a {
    color: var(--primary);
}

.page-header__breadcrumb a:hover {
    text-decoration: underline;
}

.page-header__breadcrumb svg {
    width: 12px;
    height: 12px;
    stroke: var(--text-light);
}

.page-header__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-header__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.page-header__flag {
    width: 72px;
    height: 48px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}


.page-header__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.tag svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.tag a {
    color: inherit;
}

.tag a:hover {
    color: var(--primary);
}

.tag--primary {
    background: var(--primary-bg);
    border-color: transparent;
    color: var(--primary);
}

/* -------------------------------------------------------------------
   MAIN LAYOUT (Two Column)
   ------------------------------------------------------------------- */

.main-layout {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.main-content {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* -------------------------------------------------------------------
   CARDS - Directory Style
   ------------------------------------------------------------------- */

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card--highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.card__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.card__header svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.card__header--primary {
    background: var(--primary);
    color: white;
    border-bottom: none;
}

.card__header--primary svg {
    color: white;
}

.card__body {
    padding: 1.25rem;
}

.card__body--compact {
    padding: 1rem;
}

/* -------------------------------------------------------------------
   DATA LIST (Key-Value Pairs)
   ------------------------------------------------------------------- */

.data-list {
    display: flex;
    flex-direction: column;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.data-row:first-child {
    padding-top: 0;
}

.data-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.data-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.data-value {
    font-weight: 500;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.data-value a {
    color: var(--primary);
}

.data-row__label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.data-row__value {
    font-weight: 500;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.data-row__value a {
    color: var(--primary);
}

.data-value--mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

/* -------------------------------------------------------------------
   SECTION BLOCKS
   ------------------------------------------------------------------- */

.section-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-block:last-child {
    margin-bottom: 0;
}

.section-block--alt {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.section-block__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-block__title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.section-block__count {
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
}

.section-block__intro {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------------
   INFO GRID (Stats Display)
   ------------------------------------------------------------------- */

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.info-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.info-card__label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* -------------------------------------------------------------------
   ITEM GRIDS
   ------------------------------------------------------------------- */

.grid {
    display: grid;
    gap: 0.75rem;
}

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

/* Link Cards */
.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s;
}

.link-card:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: var(--shadow);
}

.link-card__content {
    min-width: 0;
}

.link-card__title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.link-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.link-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: transform 0.15s;
}

.link-card:hover .link-card__arrow {
    color: var(--primary);
    transform: translateX(2px);
}

.link-card--compact {
    padding: 0.75rem 1rem;
}

.link-card--compact .link-card__title {
    font-size: 0.875rem;
}

.link-card__icon {
    width: 42px;
    height: 28px;
    flex-shrink: 0;
    margin-right: 0.5rem;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.link-card__stat {
    font-size: 0.6875rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Compact Chips */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.chip--code {
    font-family: var(--font-mono);
    font-weight: 600;
}

/* -------------------------------------------------------------------
   NEARBY ITEMS
   ------------------------------------------------------------------- */

.nearby-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.nearby-item:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
}

.nearby-item__info {
    min-width: 0;
}

.nearby-item__name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    color: var(--text-primary);
}

.nearby-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nearby-item__distance {
    text-align: right;
    flex-shrink: 0;
}

.nearby-item__dist-value {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--accent);
}

.nearby-item__dist-unit {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   MAP CONTAINER
   ------------------------------------------------------------------- */

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 280px;
    border: none;
    display: block;
}

.map-container--tall iframe {
    height: 350px;
}

/* -------------------------------------------------------------------
   COORDINATES DISPLAY
   ------------------------------------------------------------------- */

.coords {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.coord-box {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0.875rem;
    text-align: center;
}

.coord-box__label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.coord-box__value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* -------------------------------------------------------------------
   QUICK FACTS
   ------------------------------------------------------------------- */

.quick-facts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-fact {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.quick-fact svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

/* -------------------------------------------------------------------
   RELATED LINKS
   ------------------------------------------------------------------- */

.related-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-links__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.related-links__item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.related-links__item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------
   UTILITY CLASSES
   ------------------------------------------------------------------- */

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* -------------------------------------------------------------------
   SCHOOL CARDS
   ------------------------------------------------------------------- */

.school-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.15s;
}

.school-item__info {
    flex: 1;
    min-width: 0;
}

.school-item:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
}

.school-item__name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.school-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.school-item__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.school-item__badge--rating {
    font-weight: 600;
}

.school-item__badge--rating[data-rating="Outstanding"] { color: var(--accent); }
.school-item__badge--rating[data-rating="Good"] { color: #2563eb; }
.school-item__badge--rating[data-rating="Requires improvement"] { color: #d97706; }

.school-item__rating {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.school-item__rating--outstanding {
    background: var(--accent-bg);
    color: var(--accent);
}

.school-item__rating--good {
    background: #eff6ff;
    color: #2563eb;
}

.school-item__rating--requires-improvement {
    background: #fef3c7;
    color: #d97706;
}

.school-item__rating--inadequate {
    background: #fee2e2;
    color: #dc2626;
}

.school-item__arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
    margin-left: auto;
}

/* -------------------------------------------------------------------
   TRAIN STATIONS
   ------------------------------------------------------------------- */

.station-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.station-item__icon {
    width: 32px;
    height: 32px;
    background: #dc2626;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.station-item__info {
    flex: 1;
    min-width: 0;
}

.station-item__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.station-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.station-item__distance {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent);
}

/* -------------------------------------------------------------------
   POSTCODE CHIPS GRID
   ------------------------------------------------------------------- */

.postcode-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.postcode-chip {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s;
}

.postcode-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

/* -------------------------------------------------------------------
   HOMEPAGE HERO
   ------------------------------------------------------------------- */

.hero {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero__title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__search {
    max-width: 520px;
    margin: 0 auto;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.375rem 0.375rem 0.375rem 1rem;
    box-shadow: var(--shadow-lg);
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-box__icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-box__input::placeholder {
    color: var(--text-muted);
}

.search-box__button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.search-box__button:hover {
    background: var(--primary-dark);
}

/* Search Box Autocomplete */
.search-box--autocomplete {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.autocomplete-dropdown.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.is-selected {
    background: var(--bg-tertiary);
}

.autocomplete-item__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    color: var(--primary);
}

.autocomplete-item__icon svg {
    width: 1rem;
    height: 1rem;
}

.autocomplete-item__content {
    flex: 1;
    min-width: 0;
}

.autocomplete-item__label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item__sublabel {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item__type {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* Different type colors */
.autocomplete-item[href^="/place"] .autocomplete-item__icon {
    background: var(--accent-bg);
    color: var(--accent);
}

.autocomplete-item[href^="/street"] .autocomplete-item__icon {
    background: #fef3c7;
    color: #d97706;
}

.autocomplete-item[href^="/school"] .autocomplete-item__icon {
    background: #fce7f3;
    color: #db2777;
}

/* Hero Badges */
.hero__badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* -------------------------------------------------------------------
   CONTENT SECTIONS
   ------------------------------------------------------------------- */

.content {
    padding: 3rem 0;
    overflow-x: hidden;
}

.content__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    margin-bottom: 3rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section__title svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.section__count {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: auto;
}

.section--alt {
    background: var(--bg-tertiary);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 3rem 1.5rem;
}

/* Card Grid */
.card-grid {
    display: grid;
    gap: 1rem;
}

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

/* Link Card Variants */
.card--link {
    display: block;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.card--link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card--compact {
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9375rem;
}

.card--compact svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

.card--compact:hover svg {
    color: var(--primary);
}

.card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.card__title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.card__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   PROSE (Article Content)
   ------------------------------------------------------------------- */

.prose {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.prose h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.prose p {
    margin: 0 0 1rem;
}

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

/* -------------------------------------------------------------------
   LAYOUT WRAPPER (Old compatibility)
   ------------------------------------------------------------------- */

.layout {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.layout__main {
    min-width: 0;
}

.layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* -------------------------------------------------------------------
   DETAIL LIST (Compatibility)
   ------------------------------------------------------------------- */

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-list__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.detail-list__row:first-child {
    padding-top: 0;
}

.detail-list__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-list__label {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.detail-list__value {
    font-weight: 500;
    text-align: right;
    font-size: 0.875rem;
    max-width: 60%;
}

.detail-list__value a {
    color: var(--primary);
}

/* -------------------------------------------------------------------
   COORDS GRID (Compatibility)
   ------------------------------------------------------------------- */

.coords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.coord {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0.875rem;
    text-align: center;
}

.coord__label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.coord__value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* -------------------------------------------------------------------
   CHIP GRID (Compatibility)
   ------------------------------------------------------------------- */

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* -------------------------------------------------------------------
   BREADCRUMB (Page Header)
   ------------------------------------------------------------------- */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb svg {
    width: 12px;
    height: 12px;
    stroke: var(--text-light);
}

/* -------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------- */

.footer {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand {
    max-width: 280px;
}

.footer__brand-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
}

.footer__brand-logo {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
}

.footer__brand-description {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.65;
}

.footer__column-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 0.625rem;
}

.footer__links a {
    color: #cbd5e1;
    font-size: 0.9375rem;
    transition: color 0.15s;
}

.footer__links a:hover {
    color: white;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: #64748b;
}

/* -------------------------------------------------------------------
   RESPONSIVE - Tablet (1024px)
   ------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .navbar__search-input {
        width: 180px;
    }

    .navbar__search-input:focus {
        width: 220px;
    }

    .layout,
    .main-layout {
        grid-template-columns: 1fr;
    }

    .layout__sidebar,
    .sidebar {
        order: 1;
    }

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

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

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

    .postcode-grid {
        grid-template-columns: repeat(5, 1fr);
    }

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

/* -------------------------------------------------------------------
   RESPONSIVE - Mobile (768px)
   ------------------------------------------------------------------- */

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .page-header__title {
        font-size: 1.625rem;
    }

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

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

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

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

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

/* -------------------------------------------------------------------
   RESPONSIVE - Small Mobile (480px)
   ------------------------------------------------------------------- */

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.75rem;
    }

    .search-box {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .search-box__icon {
        display: none;
    }

    .search-box__input {
        padding: 0.75rem;
        text-align: center;
    }

    .search-box__button {
        width: 100%;
    }

    .card-grid--2,
    .card-grid--3,
    .card-grid--4 {
        grid-template-columns: 1fr;
    }

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

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

    .info-grid {
        grid-template-columns: 1fr;
    }

    .section--alt {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 2rem 1rem;
    }

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

/* -------------------------------------------------------------------
   STATS GRID (Homepage)
   ------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-card__icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.stat-card__value--small {
    font-size: 0.9375rem;
    font-weight: 600;
}

.stat-card__note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* -------------------------------------------------------------------
   COUNTRY CARDS (Homepage)
   ------------------------------------------------------------------- */

.country-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.country-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.country-card__flag {
    width: 56px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}


.country-card__content {
    flex: 1;
    min-width: 0;
}

.country-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.country-card__meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.country-card__count {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 0.25rem;
}

.country-card__arrow {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.15s;
}

.country-card:hover .country-card__arrow {
    color: var(--primary);
    transform: translateX(2px);
}

.country-card--compact {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
}

.country-card--compact .country-card__flag {
    width: 64px;
    height: 44px;
}

.country-card--compact .country-card__name {
    font-size: 0.875rem;
}

/* -------------------------------------------------------------------
   FEATURE CARDS (Homepage)
   ------------------------------------------------------------------- */

.feature-card {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.feature-card__icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.feature-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* -------------------------------------------------------------------
   HERO EXAMPLES
   ------------------------------------------------------------------- */

.hero__examples {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hero__examples-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.hero__example-link {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: white;
    font-weight: 500;
    transition: all 0.15s;
}

.hero__example-link:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* -------------------------------------------------------------------
   LINK CARD CODE
   ------------------------------------------------------------------- */

.link-card__code {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.link-card--active {
    border-color: var(--primary);
    background: var(--primary-bg);
}

/* -------------------------------------------------------------------
   COORDINATE BOX
   ------------------------------------------------------------------- */

.coords {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.coord-box {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.coord-box__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.coord-box__value {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* -------------------------------------------------------------------
   BUTTON GROUP
   ------------------------------------------------------------------- */

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.button svg {
    width: 18px;
    height: 18px;
}

.button--primary {
    background: var(--primary);
    color: white;
}

.button--primary:hover {
    background: var(--primary-dark);
    color: white;
}

.button--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--border-color);
}

.button--outline:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

/* -------------------------------------------------------------------
   PAGE HEADER ERROR
   ------------------------------------------------------------------- */

.page-header--error {
    text-align: center;
}

.page-header__error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.2;
}

/* -------------------------------------------------------------------
   SECTION BLOCK CENTER
   ------------------------------------------------------------------- */

.section-block--center {
    text-align: center;
}

/* -------------------------------------------------------------------
   CONTENT NARROW
   ------------------------------------------------------------------- */

.content__inner--narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* -------------------------------------------------------------------
   MAP CONTAINER TALL
   ------------------------------------------------------------------- */

.map-container--tall {
    height: 400px;
}

/* -------------------------------------------------------------------
   SCHOOL ITEM DISTANCE
   ------------------------------------------------------------------- */

.school-item__distance {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* -------------------------------------------------------------------
   STREET LIST (Sector page)
   ------------------------------------------------------------------- */

.street-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.street-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.street-item__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    text-decoration: none;
    min-width: 200px;
    flex-shrink: 0;
}

.street-item__name:hover {
    text-decoration: underline;
}

.street-item__postcodes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    flex: 1;
}

.street-item__postcode {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.street-item__postcode:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.street-item__more {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
}

/* -------------------------------------------------------------------
   PROPERTY LIST (Street page)
   ------------------------------------------------------------------- */

.property-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.property-item:hover {
    border-color: var(--primary-light);
    background: var(--bg-primary);
}

.property-item__address {
    min-width: 0;
}

.property-item__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-item__postcode a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
}

.property-item__postcode a:hover {
    text-decoration: underline;
}

.property-item__details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.property-item__type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.property-item__tenure {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.property-item__sale {
    text-align: right;
    min-width: 100px;
}

.property-item__price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}

.property-item__date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Stats grid variants */
.stats-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 768px) {
    .stats-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card--compact {
    padding: 1rem;
}

.stat-card--compact .stat-card__value {
    font-size: 1.25rem;
}

.stat-card--compact .stat-card__label {
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .property-item__details {
        flex-direction: row;
        text-align: left;
        gap: 0.5rem;
    }

    .property-item__sale {
        text-align: left;
    }

    .street-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .street-item__name {
        min-width: auto;
    }

    .stats-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------
   HOMEPAGE HERO ENHANCED
   ------------------------------------------------------------------- */

.hero--home {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 5rem 0 4rem;
    color: white;
}

.hero--home .hero__title {
    color: white;
}

.hero--home .hero__subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero__badge svg {
    width: 16px;
    height: 16px;
}

/* Large Search Box Variant */
.search-box--large {
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
}

.search-box--large .search-box__input {
    padding: 1rem;
    font-size: 1.125rem;
}

.search-box--large .search-box__button {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* -------------------------------------------------------------------
   CITY CARDS (Major Cities Grid)
   ------------------------------------------------------------------- */

.city-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.city-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.city-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.city-card__icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.city-card__content {
    flex: 1;
    min-width: 0;
}

.city-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.city-card__location {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.city-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.15s;
}

.city-card:hover .city-card__arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* -------------------------------------------------------------------
   CITY PILLS (Major Cities flex-wrap links)
   ------------------------------------------------------------------- */

.city-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.city-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-light);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.city-pill:hover {
    border-color: var(--primary);
    border-left-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.city-pill__location {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* -------------------------------------------------------------------
   FAQ LIST
   ------------------------------------------------------------------- */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-list .collapsible-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* -------------------------------------------------------------------
   OUTCODE CARDS (Popular Districts Grid)
   ------------------------------------------------------------------- */

.outcode-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.outcode-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.outcode-card__code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.outcode-card__content {
    flex: 1;
    min-width: 0;
}

.outcode-card__town {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.outcode-card__population {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.outcode-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.15s;
}

.outcode-card:hover .outcode-card__arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* -------------------------------------------------------------------
   COUNTY CARDS (Browse by County)
   ------------------------------------------------------------------- */

.county-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    min-width: 0;
}

.county-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.county-card__content {
    flex: 1;
    min-width: 0;
}

.county-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.county-card__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.county-card__country {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.county-card__count {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    background: var(--accent-bg);
    border-radius: 50px;
    white-space: nowrap;
}

.county-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.15s;
}

.county-card:hover .county-card__arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* -------------------------------------------------------------------
   FEATURED SCHOOL CARDS (Homepage)
   ------------------------------------------------------------------- */

.school-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.school-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.school-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.school-card__badge--outstanding {
    background: var(--accent-bg);
    color: var(--accent);
}

.school-card__badge--good {
    background: #eff6ff;
    color: #2563eb;
}

.school-card__badge svg {
    width: 12px;
    height: 12px;
}

.school-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.school-card__phase {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.school-card__location {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.school-card__location svg {
    width: 12px;
    height: 12px;
}

/* -------------------------------------------------------------------
   FEATURE CARD ICON COLORS
   ------------------------------------------------------------------- */

.feature-card__icon--blue {
    background: #eff6ff;
}

.feature-card__icon--blue svg {
    color: #2563eb;
}

.feature-card__icon--green {
    background: var(--accent-bg);
}

.feature-card__icon--green svg {
    color: var(--accent);
}

.feature-card__icon--purple {
    background: #f5f3ff;
}

.feature-card__icon--purple svg {
    color: #7c3aed;
}

.feature-card__icon--orange {
    background: #fff7ed;
}

.feature-card__icon--orange svg {
    color: #ea580c;
}

.feature-card__icon--red {
    background: #fef2f2;
}

.feature-card__icon--red svg {
    color: #dc2626;
}

.feature-card__icon--teal {
    background: #f0fdfa;
}

.feature-card__icon--teal svg {
    color: #0d9488;
}

/* -------------------------------------------------------------------
   HOW IT WORKS SECTION
   ------------------------------------------------------------------- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-card__number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.step-card__title {
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-card__desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step-card {
        display: flex;
        text-align: left;
        gap: 1rem;
        padding: 1rem;
    }

    .step-card__number {
        margin: 0;
        flex-shrink: 0;
    }

    .step-card__content {
        flex: 1;
    }
}

/* -------------------------------------------------------------------
   HOMEPAGE: Feature cards (tools & blog previews)
   ------------------------------------------------------------------- */

.home-feature-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.home-feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.home-feature-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.home-feature-card__category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.home-feature-card__meta .home-feature-card__category {
    margin-bottom: 0;
}

.home-feature-card__date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.home-feature-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.home-feature-card__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

.home-feature-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.15s;
}

.home-feature-card:hover .home-feature-card__link {
    gap: 0.625rem;
}

.section__footer {
    text-align: center;
    margin-top: 1.5rem;
}

.section__more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.15s;
}

.section__more-link:hover {
    gap: 0.625rem;
}

/* -------------------------------------------------------------------
   ABOUT SECTION (Homepage)
   ------------------------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-content {
    padding-right: 1rem;
}

.about-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.about-facts {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: #fff;
}

.about-facts__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.about-facts__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-facts__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.5;
}

.about-facts__list li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
}

.about-fact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.about-fact__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.about-fact__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-content {
        padding-right: 0;
    }

    .about-facts {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-title {
        font-size: 1.25rem;
    }

    .about-facts {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .about-facts__title {
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.625rem;
    }

    .about-facts__list li {
        font-size: 0.8375rem;
    }
}

/* -------------------------------------------------------------------
   CARD GRID 6 COLUMN
   ------------------------------------------------------------------- */

.card-grid--6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1024px) {
    .card-grid--6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .card-grid--6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .card-grid--6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -------------------------------------------------------------------
   SECTION INTRO TEXT
   ------------------------------------------------------------------- */

.section__intro {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

/* -------------------------------------------------------------------
   SECTION LINK (View All)
   ------------------------------------------------------------------- */

.section__link {
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.section__link:hover {
    text-decoration: underline;
}

.section__link svg {
    width: 16px;
    height: 16px;
}

/* -------------------------------------------------------------------
   MEGA MENU NAVIGATION
   ------------------------------------------------------------------- */

/* Navbar Enhancements */
.navbar__menu {
    display: flex;
    align-items: center;
}

.navbar__item--mega {
    position: relative;
}

.navbar__link--btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.navbar__link--btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.navbar__link--btn svg {
    width: 18px;
    height: 18px;
}

.navbar__link--btn svg:first-child {
    margin-right: 0.125rem;
}

.navbar__chevron {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.2s;
}

.navbar__item--mega:hover .navbar__chevron,
.mega-menu.is-open ~ .navbar .navbar__chevron {
    transform: rotate(180deg);
}

/* Search wrapper with keyboard shortcut */
.navbar__search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.navbar__search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.navbar__search-input {
    width: 100%;
    padding: 0.625rem 3rem 0.625rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.navbar__search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: var(--bg-primary);
}

.navbar__search-kbd {
    position: absolute;
    right: 0.75rem;
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Navbar Actions */
.navbar__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar__action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.navbar__action-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.navbar__action-btn svg {
    width: 20px;
    height: 20px;
}

.navbar__action-btn--search {
    display: none;
}

/* Mobile menu toggle */
.navbar__toggle {
    display: none;
}

.navbar__toggle .menu-icon--close {
    display: none;
}

.navbar__toggle.is-active .menu-icon--open {
    display: none;
}

.navbar__toggle.is-active .menu-icon--close {
    display: block;
}

/* Navbar scroll state */
.navbar.is-scrolled {
    box-shadow: var(--shadow);
}

/* -------------------------------------------------------------------
   MEGA MENU PANEL
   ------------------------------------------------------------------- */

.mega-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.mega-menu__column {
    min-width: 0;
}

.mega-menu__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.mega-menu__heading svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

/* Countries Grid */
.mega-menu__grid--countries {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mega-menu__country-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.mega-menu__country-link:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.mega-menu__flag {
    font-size: 1.25rem;
}

.mega-menu__country-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Mega Menu List */
.mega-menu__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-menu__list--cities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.mega-menu__list--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.125rem;
}

.mega-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.1s;
}

.mega-menu__link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mega-menu__link-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.mega-menu__link strong {
    color: var(--text-primary);
    font-weight: 600;
}

.mega-menu__link--all {
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Featured links with icons */
.mega-menu__link--featured {
    gap: 0.5rem;
    justify-content: flex-start;
}

.mega-menu__link--featured svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

/* -------------------------------------------------------------------
   MOBILE NAVIGATION
   ------------------------------------------------------------------- */

.mobile-nav {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 998;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav__inner {
    padding: 1rem;
}

/* Mobile Search Trigger */
.mobile-nav__search {
    margin-bottom: 1.5rem;
}

.mobile-nav__search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.mobile-nav__search-wrapper:hover {
    border-color: var(--primary);
}

.mobile-nav__search-wrapper svg {
    width: 18px;
    height: 18px;
}

.mobile-nav__search-wrapper span {
    font-size: 0.9375rem;
}

/* Mobile Nav Sections */
.mobile-nav__section {
    margin-bottom: 1.5rem;
}

.mobile-nav__heading {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

/* Countries Grid (Mobile) */
.mobile-nav__countries {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mobile-nav__country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.15s;
}

.mobile-nav__country:hover {
    border-color: var(--primary);
}

.mobile-nav__flag {
    width: 28px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}


/* Mobile Nav List */
.mobile-nav__list {
    list-style: none;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.15s;
}

.mobile-nav__link:hover {
    color: var(--primary);
}

.mobile-nav__link svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

.mobile-nav__list li:last-child .mobile-nav__link {
    border-bottom: none;
}

/* Cities Grid (Mobile) */
.mobile-nav__cities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mobile-nav__city {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.mobile-nav__city:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* -------------------------------------------------------------------
   SEARCH OVERLAY (Mobile Full-Screen)
   ------------------------------------------------------------------- */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-overlay__input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-overlay__icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-overlay__input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-primary);
}

.search-overlay__input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-overlay__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.search-overlay__close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-overlay__close svg {
    width: 24px;
    height: 24px;
}

.search-overlay__results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-overlay__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* -------------------------------------------------------------------
   NAV BACKDROP
   ------------------------------------------------------------------- */

.nav-backdrop {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
}

.nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* -------------------------------------------------------------------
   RESPONSIVE: Mega Menu & Navigation
   ------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .mega-menu__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .mega-menu__list--cities {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hide desktop elements */
    .navbar__menu,
    .navbar__search,
    .mega-menu {
        display: none;
    }

    /* Show mobile elements */
    .navbar__toggle,
    .navbar__action-btn--search {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }
}

/* -------------------------------------------------------------------
   HOMEPAGE RESPONSIVE ADJUSTMENTS
   ------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .city-card,
    .outcode-card,
    .county-card {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 768px) {
    .hero--home {
        padding: 3.5rem 0 3rem;
    }

    .search-box--large .search-box__input {
        font-size: 1rem;
    }

    .search-box--large .search-box__button {
        padding: 0.875rem 1.5rem;
    }

    .county-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .county-card__content {
        width: 100%;
    }

    .county-card__name {
        font-size: 0.9375rem;
    }

    .county-card__count {
        align-self: flex-start;
    }

    .county-card__arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero--home {
        padding: 2.5rem 0 2rem;
    }

    .hero__badge {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
}


/* -------------------------------------------------------------------
   STATIC PAGES (About, Contact, Privacy)
   ------------------------------------------------------------------- */

.static-content {
    max-width: 800px;
    margin: 0 auto;
}

.static-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.static-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.static-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.static-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.static-content ul {
    margin: 0 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.static-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.static-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.static-content a:hover {
    color: var(--primary-dark);
}

.static-content em {
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   SEARCH RESULTS PAGE
   ------------------------------------------------------------------- */

.search-page__form {
    margin: 0;
}

.search-page__input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.search-page__icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-page__input {
    flex: 1;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.2s;
}

.search-page__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}

.search-page__btn {
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.search-page__btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

/* Results grid */
.search-page__grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Result icon */
.search-page__result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.search-page__result-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Type badges */
.search-page__badge {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.search-page__badge--postcode,
.search-page__badge--outcode {
    background: #eff6ff;
    color: #1e40af;
}

.search-page__badge--town {
    background: #ecfdf5;
    color: #059669;
}

.search-page__badge--street {
    background: #fefce8;
    color: #a16207;
}

.search-page__badge--school {
    background: #fef2f2;
    color: #dc2626;
}

/* Empty / no results state */
.search-page__empty {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.search-page__empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
}

.search-page__empty-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-light);
}

.search-page__empty h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-page__empty p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.search-page__suggestions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Quick links / popular searches on empty state */
.search-page__quick-links {
    margin-top: 1rem;
}

.search-page__quick-links h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.search-page__chips {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .search-page__input-wrapper {
        flex-direction: column;
    }

    .search-page__input {
        width: 100%;
    }

    .search-page__btn {
        width: 100%;
    }

    .search-page__badge {
        display: none;
    }

    .search-page__result-icon {
        width: 36px;
        height: 36px;
    }
}

/* Contact Methods */
.contact-methods {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.contact-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.contact-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card__icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

.contact-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.contact-card__link {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.contact-card__link:hover {
    text-decoration: underline;
}

@media (min-width: 640px) {
    .contact-methods {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}


/* -------------------------------------------------------------------
   CONTACT PAGE
   ------------------------------------------------------------------- */

.contact-layout {
    display: grid;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 1.5fr 1fr;
        gap: 3rem;
    }
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.contact-form__title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label .required {
    color: #dc2626;
}

.form-input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-dark);
}

.btn--primary:active {
    transform: scale(0.98);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
}

.alert p {
    margin: 0;
    font-size: 0.875rem;
}

.alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert--success svg {
    stroke: #059669;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert--error svg {
    stroke: #dc2626;
}

/* Contact Sidebar */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.contact-info-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-card__icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

.contact-info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-info-card a {
    display: block;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.contact-info-card a:hover {
    text-decoration: underline;
}

.contact-info-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Opportunities Card */
.contact-opportunities {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.contact-opportunities h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-opportunities > p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.opportunity-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--border-color);
}

.opportunity-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.opportunity-item svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
    flex-shrink: 0;
}

.opportunity-item strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.opportunity-item span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   A-Z ALPHABET NAVIGATION
   ------------------------------------------------------------------- */

.alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    justify-content: center;
}

.alpha-nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s;
}

.alpha-nav__link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Sidebar A-Z Grid */
.alpha-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.375rem;
}

.alpha-grid__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.15s;
}

.alpha-grid__link:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.alpha-grid__count {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* -------------------------------------------------------------------
   STREET CARDS GRID (Town Streets Page)
   ------------------------------------------------------------------- */

.street-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.street-card {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.street-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.street-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.street-card:hover .street-card__name {
    text-decoration: underline;
}

.street-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.street-card__postcodes {
    color: var(--text-secondary);
    font-weight: 500;
}

.street-card__area {
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* -------------------------------------------------------------------
   STREET LIST (Town Streets Page - with postcodes)
   ------------------------------------------------------------------- */

.street-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.street-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s;
}

.street-item:hover {
    border-color: var(--primary-light, #60a5fa);
}

.street-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.625rem;
}

.street-item__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.3;
}

.street-item__name:hover {
    text-decoration: underline;
}

.street-item__count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.street-item__postcodes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Postcode Pills */
.postcode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: var(--primary);
    background: var(--primary-bg, #eff6ff);
    border: none;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.postcode-badge:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.25);
}

.postcode-badge--more {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.postcode-badge--more:hover {
    background: var(--primary);
    color: white;
}

@media (max-width: 640px) {
    .street-item__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .street-item__count {
        align-self: flex-start;
    }

    .postcode-badge {
        font-size: 0.75rem;
        padding: 0.3125rem 0.625rem;
    }
}

/* -------------------------------------------------------------------
   POSTCODE CARD GRID (Town Postcodes Page)
   ------------------------------------------------------------------- */

.postcode-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.postcode-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.postcode-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.postcode-card__code {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.postcode-card__code:hover {
    color: var(--primary-dark);
}

.postcode-card__street {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-bg);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.postcode-card__street:hover {
    background: var(--accent);
    color: white;
}

.postcode-card__locality {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sector grid in sidebar */
.sector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sector-grid__link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
}

.sector-grid__link:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
}

.sector-grid__code {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary);
}

.sector-grid__count {
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
}

@media (max-width: 768px) {
    .postcode-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .postcode-card {
        padding: 0.75rem;
    }

    .postcode-card__code {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .postcode-card__street {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .postcode-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -------------------------------------------------------------------
   COLLAPSIBLE SECTIONS (Town Postcodes/Streets Pages)
   ------------------------------------------------------------------- */

.collapsible-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s;
}

.collapsible-header:hover {
    background: var(--bg-tertiary);
}

.collapsible-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.collapsible-header__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.collapsible-section.is-open .collapsible-header__icon {
    transform: rotate(90deg);
}

.collapsible-header__title {
    font-family: var(--font-mono);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.025em;
}

.collapsible-header__count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

.collapsible-content {
    display: none;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.collapsible-section.is-open .collapsible-content {
    display: block;
}

/* -------------------------------------------------------------------
   POSTCODE COMPACT GRID (Multi-column layout)
   ------------------------------------------------------------------- */

.postcode-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.postcode-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.postcode-compact:hover {
    border-color: var(--primary-light, #60a5fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.postcode-compact__code {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.025em;
}

.postcode-compact__code:hover {
    text-decoration: underline;
}

.postcode-compact__street {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.postcode-compact__street:hover {
    text-decoration: underline;
    color: var(--accent-dark, #047857);
}

@media (max-width: 900px) {
    .postcode-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .postcode-grid-compact {
        grid-template-columns: 1fr;
    }

    .collapsible-header {
        padding: 0.875rem 1rem;
    }

    .collapsible-header__title {
        font-size: 0.9375rem;
    }

    .collapsible-content {
        padding: 0.875rem 1rem;
    }
}

/* -------------------------------------------------------------------
   STREET COMPACT GRID (Multi-column layout for streets)
   ------------------------------------------------------------------- */

.street-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.street-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.street-compact:hover {
    border-color: var(--primary-light, #60a5fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.street-compact__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.street-compact:hover .street-compact__name {
    text-decoration: underline;
}

.street-compact__count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.collapsible-header__title--letter {
    font-family: var(--font-body);
    font-size: 1.25rem;
}

@media (max-width: 900px) {
    .street-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .street-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------
   POSTCODE CHIP GRID (Town Page Preview)
   ------------------------------------------------------------------- */

.postcode-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.postcode-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: var(--primary);
    background: var(--primary-bg, #eff6ff);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.postcode-chip:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------
   NEARBY TOWNS GRID (Town Page)
   ------------------------------------------------------------------- */

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.nearby-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nearby-compact:hover {
    border-color: var(--primary-light, #60a5fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nearby-compact__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-compact:hover .nearby-compact__name {
    text-decoration: underline;
}

.nearby-compact__distance {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .nearby-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* -------------------------------------------------------------------
   SCHOOL COMPACT GRID (Town Page)
   ------------------------------------------------------------------- */

.school-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.school-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 0;
    overflow: hidden;
}

.school-compact:hover {
    border-color: var(--primary-light, #60a5fa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.school-compact__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.school-compact:hover .school-compact__name {
    text-decoration: underline;
}

.school-compact__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.school-compact__phase {
    color: var(--accent);
    font-weight: 500;
}

.school-compact__distance {
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .school-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* Famous People Grid */
.famous-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.famous-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.famous-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.famous-card__occupation {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
}

.famous-card__desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Stats Row (Inline mini stats) */
.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.stats-row__item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.stats-row__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.stats-row__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   TRANSPORT GRID (Town Page)
   ------------------------------------------------------------------- */

.transport-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.transport-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.transport-compact__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.transport-compact__icon svg {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--primary);
}

.transport-compact__name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transport-compact__distance {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

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

/* -------------------------------------------------------------------
   ADMIN GRID (Town Page - Local Government)
   ------------------------------------------------------------------- */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.admin-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.admin-item__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.admin-item__value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* -------------------------------------------------------------------
   PRICE SUMMARY & GRID (Town Page - Property Prices)
   ------------------------------------------------------------------- */

.price-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--primary-bg);
    border: 1px solid var(--primary-light, #bfdbfe);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.price-summary__main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.price-summary__label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-summary__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-summary__range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.price-summary__divider {
    color: var(--text-muted);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.price-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
}

.price-type__name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.price-type__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-type__count {
    font-size: 0.6875rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .price-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

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

@media (max-width: 480px) {
    .price-summary__value {
        font-size: 1.25rem;
    }
}

/* Map container medium height */
.map-container--medium {
    height: 280px;
}

.map-container--medium iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius);
}

/* Street Pill (Green) */
.street-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-bg);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.street-pill:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* -------------------------------------------------------------------
   SECTOR NAVIGATION (Postcode Sectors Jump Links)
   ------------------------------------------------------------------- */

.sector-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.sector-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.sector-nav__link:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.sector-nav__code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.025em;
}

.sector-nav__count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
}

.sector-nav__link:hover .sector-nav__count {
    background: var(--primary-light, #bfdbfe);
    color: var(--primary-dark);
}

/* -------------------------------------------------------------------
   SIDEBAR SECTOR LIST (Quick Jump in Sidebar)
   ------------------------------------------------------------------- */

.sidebar-sector-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sidebar-sector-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-sector-link:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.sidebar-sector-link__code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

.sidebar-sector-link__count {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.sidebar-sector-link:hover .sidebar-sector-link__count {
    background: var(--primary-light, #bfdbfe);
    color: var(--primary-dark);
}

/* -------------------------------------------------------------------
   BUTTON OUTLINE VARIANT
   ------------------------------------------------------------------- */

.btn--outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.btn--outline:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments for postcode list */
@media (max-width: 768px) {
    .postcode-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
        padding: 0.75rem 1rem;
    }

    .postcode-row__code {
        font-size: 0.9375rem;
    }

    .street-pill {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
        max-width: 100%;
    }

    .sector-nav {
        gap: 0.375rem;
        padding: 1rem;
    }

    .sector-nav__link {
        padding: 0.4375rem 0.75rem;
    }

    .sector-nav__code {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .sector-nav__link {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }
}

/* -------------------------------------------------------------------
   DATA TABLE (Schools Page)
   ------------------------------------------------------------------- */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-secondary);
}

.data-table .table-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.data-table .table-link:hover {
    text-decoration: underline;
}

.data-table .postcode-link {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.data-table .postcode-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* -------------------------------------------------------------------
   BUTTON BLOCK VARIANT
   ------------------------------------------------------------------- */

.btn--block {
    width: 100%;
}

/* -------------------------------------------------------------------
   RESPONSIVE: Street Grid & Tables
   ------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .street-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .alpha-nav__link {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.625rem;
    }

    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        display: none;
    }
}

/* ===================================================================
   COUNTY PAGE COMPONENTS
   =================================================================== */

/* -------------------------------------------------------------------
   PRICE HISTORY CHART
   ------------------------------------------------------------------- */

.price-history-chart {
    padding: 1rem 0;
}

.price-history-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 200px;
    padding: 0.5rem 0 2.5rem;
}

.price-history-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.price-history-bar__fill {
    width: 100%;
    background: linear-gradient(to top, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    min-height: 20px;
    transition: height 0.3s ease;
    display: flex;
    justify-content: center;
}

.price-history-bar__value {
    position: absolute;
    top: -1.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.price-history-bar__year {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-history-bar__count {
    position: absolute;
    bottom: -2.5rem;
    font-size: 0.625rem;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .price-history-bars {
        gap: 0.25rem;
    }

    .price-history-bar__value {
        font-size: 0.5rem;
        top: -1.25rem;
    }

    .price-history-bar__year {
        font-size: 0.625rem;
    }

    .price-history-bar__count {
        display: none;
    }
}

/* -------------------------------------------------------------------
   BREAKDOWN PANELS (Property Type & Tenure)
   ------------------------------------------------------------------- */

.breakdown-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.breakdown-panel__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.breakdown-panel__title--mt {
    margin-top: 1.5rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.breakdown-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-item__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.breakdown-item__stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.breakdown-item__pct {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

.breakdown-item__price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.breakdown-item__bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-item__fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.breakdown-item__fill--alt {
    background: var(--accent);
}

.breakdown-item__fill--accent {
    background: #f59e0b;
}

/* -------------------------------------------------------------------
   HOTSPOT PANELS (Premium & Budget Postcodes)
   ------------------------------------------------------------------- */

.hotspot-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.hotspot-panel--premium {
    border-top: 3px solid var(--accent);
}

.hotspot-panel--budget {
    border-top: 3px solid var(--primary);
}

.hotspot-panel__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hotspot-panel__icon {
    font-size: 0.75rem;
}

.hotspot-panel__icon--premium {
    color: var(--accent);
}

.hotspot-panel__icon--budget {
    color: var(--primary);
}

.hotspot-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hotspot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s;
}

.hotspot-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.hotspot-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.hotspot-item__code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hotspot-item__town {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.hotspot-item__price {
    font-weight: 700;
    font-size: 0.875rem;
}

.hotspot-item__price--premium {
    color: var(--accent);
}

.hotspot-item__price--budget {
    color: var(--primary);
}

/* -------------------------------------------------------------------
   SALES TABLE (Recent High-Value Sales)
   ------------------------------------------------------------------- */

.sales-table {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.sales-table__header {
    display: grid;
    grid-template-columns: 1fr 100px 80px 100px;
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.sales-table__row {
    display: grid;
    grid-template-columns: 1fr 100px 80px 100px;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.sales-table__row:last-child {
    border-bottom: none;
}

.sales-table__row:hover {
    background: var(--bg-secondary);
}

.sales-table__col {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
}

.sales-table__col--address {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.sales-table__address {
    font-weight: 500;
    color: var(--text-primary);
}

.sales-table__location {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.sales-table__col--type {
    color: var(--text-secondary);
}

.sales-table__col--date {
    color: var(--text-muted);
}

.sales-table__col--price {
    font-weight: 700;
    color: var(--accent);
}

@media (max-width: 768px) {
    .sales-table__header {
        display: none;
    }

    .sales-table__row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .sales-table__col--price {
        font-size: 1rem;
    }
}

/* -------------------------------------------------------------------
   STREET ITEMS (Busiest Streets)
   ------------------------------------------------------------------- */

.street-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.street-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.street-item__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.street-item__town {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.street-item__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.street-item__count {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--primary);
}

.street-item__price {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   DISTRICT & CONSTITUENCY ITEMS
   ------------------------------------------------------------------- */

.district-item,
.constituency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.district-item__name,
.constituency-item__name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.district-item__count,
.constituency-item__count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------
   PHASE CARDS (Schools by Phase)
   ------------------------------------------------------------------- */

.phase-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.phase-card__count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.phase-card__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: capitalize;
}

/* -------------------------------------------------------------------
   DATA ROW VALUE VARIANTS
   ------------------------------------------------------------------- */

.data-row__value--positive {
    color: var(--accent);
    font-weight: 600;
}

.data-row__value--negative {
    color: #dc2626;
    font-weight: 600;
}

/* -------------------------------------------------------------------
   MAP CONTAINER WIDE
   ------------------------------------------------------------------- */

.map-container--wide iframe {
    height: 350px;
}

@media (max-width: 768px) {
    .map-container--wide iframe {
        height: 250px;
    }
}
