/*
Theme Name: Mecklenburger Branchen
Theme URI: https://mecklenburgerbranchen.de
Author: Daniel Dübner
Description: Maßgeschneidertes, ultraschnelles Branchenbuch-Theme für Mecklenburg-Vorpommern.
Version: 1.3
Text Domain: mecklenburger-branchen
*/

:root {
    --mb-navy: #0b3d66;
    --mb-navy-dark: #072946;
    --mb-teal: #008c8c;
    --mb-teal-hover: #007070;
    --mb-bg: #f4f7f9;
    --mb-text: #1e293b;
    --mb-muted: #64748b;
    --mb-white: #ffffff;
    --mb-radius: 10px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--mb-bg);
    color: var(--mb-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fixed Header */
.mb-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(11, 61, 102, 0.96);
    backdrop-filter: blur(8px);
    color: var(--mb-white);
    padding: 12px 0;
    border-bottom: 3px solid var(--mb-teal);
    box-shadow: 0 6px 20px rgba(7, 28, 48, 0.22);
    transition: padding 0.2s ease, background-color 0.2s ease;
}

/* Anker-Sprünge sauber unter dem Header abfangen */
section[id],
div[id] {
    scroll-margin-top: 95px;
}

.mb-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--mb-white);
}

.mb-brand img {
    height: 44px;
    width: auto;
}

.mb-brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
}

.mb-brand-sub {
    font-size: 0.78rem;
    opacity: 0.85;
}

.mb-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.mb-nav a {
    color: var(--mb-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.mb-nav a:hover {
    color: #5eead4;
}

.mb-btn-cta {
    background-color: var(--mb-teal);
    color: var(--mb-white) !important;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700 !important;
    transition: background 0.2s;
}

.mb-btn-cta:hover {
    background-color: var(--mb-teal-hover);
}

/* Modernes 2-Spalten Hero mit SVG-Landkarte MV (nahtlos unter Fixed-Header) */
.mb-hero {
    position: relative;
    background:
        linear-gradient(105deg, rgba(7, 28, 48, 0.90) 0%, rgba(11, 61, 102, 0.78) 52%, rgba(7, 41, 70, 0.85) 100%),
        url('assets/img/hero-mv.jpg') center/cover no-repeat;
    padding: 142px 0 56px;
    color: var(--mb-white);
    overflow: hidden;
}

/* Abstand auf Unterseiten ohne Hero */
.mb-header + .mb-section,
.mb-header + main.mb-section {
    padding-top: 135px;
}

.mb-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: center;
}

.mb-hero-grid > div {
    min-width: 0;
    max-width: 100%;
}

.mb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.mb-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 8px #2dd4bf;
}

.mb-hero h1 {
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    line-height: 1.12;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.mb-hero h1 span {
    display: block;
    color: #5eead4;
}

.mb-hero-lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 28px;
    max-width: 540px;
}

/* Zweigeteilte Pill-Suchbox (WAS / WO) */
.mb-pill-search {
    background: var(--mb-white);
    border-radius: 999px;
    padding: 7px;
    display: flex;
    align-items: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    max-width: 650px;
}

.mb-pill-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px;
    min-width: 0;
}

.mb-pill-field + .mb-pill-field {
    border-left: 1px solid #e2e8f0;
}

.mb-pill-icon {
    color: var(--mb-teal);
    flex-shrink: 0;
}

.mb-pill-inputs {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.mb-pill-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mb-teal);
    line-height: 1.1;
}

.mb-pill-inputs input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--mb-text);
    background: transparent;
    width: 100%;
    padding-top: 2px;
}

.mb-pill-submit {
    background: var(--mb-teal);
    color: var(--mb-white);
    border: none;
    border-radius: 999px;
    padding: 15px 26px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.mb-pill-submit:hover {
    background: var(--mb-teal-hover);
    transform: translateY(-1px);
}

/* Beliebt-Tags unter der Suche */
.mb-popular-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.8);
}

.mb-popular-tag {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--mb-white);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.mb-popular-tag:hover {
    background: var(--mb-teal);
    border-color: var(--mb-teal);
}

/* Selbst erstellte SVG-Landkarte MV rechts im Hero */
.mb-svg-map-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mb-mv-svg {
    width: 100%;
    max-width: 540px;
    height: auto;
    display: block;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.38));
    overflow: hidden;
}

.mb-mv-land {
    fill: rgba(20, 184, 166, 0.16);
    stroke: #5eead4;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.mb-mv-network {
    fill: none;
    stroke: rgba(255, 255, 255, 0.32);
    stroke-width: 1.15;
    stroke-dasharray: 3 3;
}

.mb-city-node {
    cursor: pointer;
    text-decoration: none;
}

.mb-city-pulse {
    fill: rgba(45, 212, 191, 0.30);
    transition: r 0.25s ease, fill 0.25s ease;
}

.mb-city-dot {
    fill: #0d9488;
    stroke: #ffffff;
    stroke-width: 2.2;
    transition: fill 0.2s ease;
}

.mb-city-label {
    fill: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    paint-order: stroke;
    stroke: rgba(7, 28, 48, 0.92);
    stroke-width: 3.2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 0.2s ease;
}

.mb-city-node:hover .mb-city-pulse {
    fill: rgba(94, 234, 212, 0.62);
}

.mb-city-node:hover .mb-city-dot {
    fill: #2dd4bf;
}

.mb-city-node:hover .mb-city-label {
    fill: #5eead4;
}

.mb-map-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

/* Sektionen & Top-Branchen Grid */
.mb-section {
    padding: 55px 0;
}

.mb-section-title {
    text-align: center;
    font-size: 1.75rem;
    color: var(--mb-navy);
    margin-bottom: 32px;
    font-weight: 800;
}

.mb-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.mb-cat-card {
    position: relative;
    height: 175px;
    border-radius: var(--mb-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-color: var(--mb-navy);
}

.mb-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.mb-cat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mb-cat-card:hover img {
    transform: scale(1.06);
}

.mb-cat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 41, 70, 0.88) 0%, rgba(7, 41, 70, 0.1) 65%);
}

.mb-cat-card span {
    position: relative;
    z-index: 2;
    color: var(--mb-white);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 14px 18px;
    width: 100%;
    text-align: center;
}

/* Branchen A-Z Wolke */
.mb-az-section {
    background: var(--mb-white);
    border-top: 1px solid #e2e8f0;
}

.mb-az-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    list-style: none;
}

.mb-az-list a {
    color: var(--mb-navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mb-az-list a:hover {
    background: var(--mb-teal);
    color: var(--mb-white);
}

/* Footer */
.mb-footer {
    background-color: var(--mb-navy);
    color: var(--mb-white);
    padding: 50px 0 0;
    font-size: 0.9rem;
}

.mb-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.mb-footer h4 {
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: #5eead4;
}

.mb-footer ul {
    list-style: none;
}

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

.mb-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.mb-footer a:hover {
    color: var(--mb-white);
    text-decoration: underline;
}

.mb-footer-bottom {
    background-color: var(--mb-navy-dark);
    text-align: center;
    padding: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Tablet & Smartphone */
@media (max-width: 960px) {
    .mb-hero {
        padding: 124px 0 44px;
    }
    .mb-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    .mb-hero-lead {
        max-width: 100%;
    }
    .mb-pill-search {
        max-width: 100%;
    }
    .mb-mv-svg {
        max-width: 460px;
    }
}

/* Handy-Ansicht */
@media (max-width: 640px) {
    .mb-header {
        padding: 10px 0;
    }
    .mb-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .mb-brand-title {
        font-size: 1.15rem;
    }
    .mb-brand-sub {
        display: none;
    }
    .mb-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 14px;
    }
    .mb-nav a {
        font-size: 0.88rem;
        white-space: nowrap;
    }
    .mb-btn-cta {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .mb-hero {
        padding: 132px 0 40px;
    }
    .mb-header + .mb-section,
    .mb-header + main.mb-section {
        padding-top: 132px;
    }
    .mb-hero h1 {
        font-size: 1.85rem;
    }
    .mb-hero-lead {
        font-size: 0.96rem;
        margin-bottom: 20px;
    }

    /* WAS und WO sauber untereinander */
    .mb-pill-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 18px;
        padding: 10px;
        gap: 4px;
    }
    .mb-pill-field {
        width: 100%;
        padding: 10px 12px;
    }
    .mb-pill-field + .mb-pill-field {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
    .mb-pill-inputs input {
        font-size: 1rem;
        min-height: 24px;
    }
    .mb-pill-submit {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
        margin-top: 6px;
    }

    .mb-mv-svg {
        max-width: 100%;
    }
    .mb-city-label {
        font-size: 13px;
    }
}

/* Ergebnis- & Archivseiten (Branchen, Orte, Suche) */
.mb-archive-header {
    background: linear-gradient(115deg, var(--mb-navy) 0%, #0e4f82 100%);
    color: var(--mb-white);
    padding: 128px 0 40px;
}

.mb-archive-header h1 {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.mb-archive-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 22px;
}

.mb-filter-bar {
    background: var(--mb-white);
    padding: 14px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.mb-filter-bar input,
.mb-filter-bar select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--mb-text);
    background: #fff;
}

.mb-filter-bar button {
    background: var(--mb-teal);
    color: var(--mb-white);
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.mb-filter-bar button:hover {
    background: var(--mb-teal-hover);
}

.mb-results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--mb-muted);
    font-size: 0.92rem;
}

.mb-firma-list {
    display: grid;
    gap: 18px;
}

.mb-firma-card {
    background: var(--mb-white);
    border-radius: var(--mb-radius);
    border: 1px solid #e2e8f0;
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    box-shadow: 0 3px 10px rgba(11, 61, 102, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mb-firma-card:hover {
    transform: translateY(-2px);
    border-color: #99f6e4;
    box-shadow: 0 8px 22px rgba(11, 61, 102, 0.10);
}

.mb-firma-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.mb-badge-branche {
    background: #f0fdfa;
    color: var(--mb-teal);
    border: 1px solid #99f6e4;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    text-decoration: none;
}

.mb-badge-ort {
    background: #eff6ff;
    color: var(--mb-navy);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
}

.mb-firma-title {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.mb-firma-title a {
    color: var(--mb-navy);
    text-decoration: none;
    font-weight: 800;
}

.mb-firma-title a:hover {
    color: var(--mb-teal);
}

.mb-firma-address {
    font-size: 0.92rem;
    color: var(--mb-muted);
    margin-bottom: 8px;
}

.mb-firma-excerpt {
    font-size: 0.94rem;
    color: var(--mb-text);
}

.mb-firma-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 190px;
}

.mb-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--mb-navy);
    color: var(--mb-navy);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.mb-btn-outline:hover {
    background: var(--mb-navy);
    color: var(--mb-white);
}

.mb-btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--mb-teal);
    color: var(--mb-white);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
}

.mb-btn-solid:hover {
    background: var(--mb-teal-hover);
}

/* Pagination */
.mb-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mb-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--mb-white);
    border: 1px solid #cbd5e1;
    color: var(--mb-navy);
    font-weight: 600;
    text-decoration: none;
}

.mb-pagination .page-numbers.current,
.mb-pagination .page-numbers:hover {
    background: var(--mb-teal);
    border-color: var(--mb-teal);
    color: var(--mb-white);
}

@media (max-width: 820px) {
    .mb-filter-bar {
        grid-template-columns: 1fr;
    }
    .mb-firma-card {
        grid-template-columns: 1fr;
    }
    .mb-firma-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .mb-firma-actions a {
        flex: 1;
        min-width: 140px;
    }
}

/* Übersichtsseiten: Alle Branchen & Orte in MV */
.mb-alpha-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 28px;
}

.mb-alpha-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--mb-white);
    border: 1px solid #cbd5e1;
    color: var(--mb-navy);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.mb-alpha-bar a:hover {
    background: var(--mb-teal);
    border-color: var(--mb-teal);
    color: var(--mb-white);
}

.mb-dir-groups {
    display: grid;
    gap: 24px;
}

.mb-dir-group {
    background: var(--mb-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--mb-radius);
    padding: 22px 26px;
    box-shadow: 0 3px 10px rgba(11, 61, 102, 0.04);
}

.mb-dir-letter {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--mb-teal);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.mb-dir-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 18px;
    list-style: none;
}

.mb-dir-items a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--mb-navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.18s ease;
}

.mb-dir-items a:hover {
    background: #f0fdfa;
    color: var(--mb-teal);
}

.mb-dir-count {
    background: #f1f5f9;
    color: var(--mb-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.mb-dir-items a:hover .mb-dir-count {
    background: var(--mb-teal);
    color: var(--mb-white);
}

.mb-footer-premium-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none;
}

.mb-footer-badge {
    background: var(--mb-teal, #008c8c);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.mb-premium-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(90deg, #f0fdfa 0%, #ecfeff 100%);
    border: 1px solid #5eead4;
    border-left: 4px solid var(--mb-teal, #008c8c);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 18px;
}

.mb-premium-banner-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--mb-navy, #0b3d66);
}

.mb-premium-banner-sub {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f766e;
}

.mb-firma-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

