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

:root {
    --wh-green-deep: #14532d;
    --wh-green-brand: #1F8A63;
    --wh-green-accent: #2e7d32;
    --wh-green-lite: #22c55e;
    --nk-blue-deep: #0b147a;
    --nk-blue-mid: #121f94;
    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --radius-card: 20px;
    --radius-input: 8px;
    --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06), 0 12px 40px rgba(15, 23, 42, 0.04);
    --shadow-input: 0 2px 8px rgba(15, 23, 42, 0.04);
    --nav-height: 64px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    min-height: 100vh;
    padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ——— Fixierte Navbar ——— */
.portal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.portal-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1140px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.portal-logo,
.portal-logo--brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: var(--wh-green-deep);
    transition: opacity 0.2s;
}

.portal-logo:hover,
.portal-logo--brand:hover { opacity: 0.85; }

.portal-logo__img {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}

.portal-logo__text {
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--wh-green-deep);
    font-size: 0.92rem;
}

.portal-logo-icon {
    display: none !important;
}

.portal-nav-secondary {
    display: flex;
    align-items: center;
    gap: 4px 18px;
    margin-left: auto;
    margin-right: 8px;
}

.portal-nav-secondary a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 0;
    transition: color 0.2s ease;
}

.portal-nav-secondary a:hover {
    color: var(--wh-green-brand);
}

.portal-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .portal-nav-secondary {
        display: none;
    }
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    white-space: nowrap;
}

.portal-btn:hover { transform: translateY(-1px); }

.portal-btn--ghost {
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-input);
}

.portal-btn--ghost:hover {
    color: var(--text);
    border-color: rgba(15, 23, 42, 0.14);
}

.portal-btn--nk {
    background: linear-gradient(145deg, var(--nk-blue-mid), var(--nk-blue-deep));
    color: #fff;
    box-shadow: 0 6px 20px rgba(11, 20, 122, 0.22);
}

.portal-btn--switch {
    background: linear-gradient(145deg, var(--wh-green-lite), var(--wh-green-brand));
    color: #fff;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.28);
}

.portal-btn--login {
    background: #fff;
    color: var(--wh-green-deep);
    border: 1px solid var(--wh-green-accent);
    box-shadow: none;
}

.portal-btn--login:hover {
    background: #f0fdf4;
    border-color: #1b5e20;
}

.portal-btn--primary {
    background: linear-gradient(145deg, var(--wh-green-lite), var(--wh-green-brand));
    color: #fff;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.25);
    width: 100%;
}

.portal-btn--primary:hover {
    box-shadow: 0 10px 28px rgba(46, 125, 50, 0.32);
}

/* Kontrast-Schutz: Text in dunklen Buttons immer klar lesbar */
.portal-btn--register,
.portal-btn--primary,
.portal-btn--nk,
.portal-btn--switch,
.btn-cta-primary {
    color: #fff !important;
}

/* ——— Layout ——— */
.portal-main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 24px 72px;
}

.portal-hero {
    text-align: center;
    margin-bottom: 48px;
}

.portal-brand-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wh-green-accent);
    background: rgba(46, 125, 50, 0.1);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.portal-hero h1 {
    font-size: clamp(1.65rem, 3.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.portal-hero h1 span { color: var(--wh-green-accent); }

.portal-hero-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 54ch;
    margin: 0 auto;
    line-height: 1.65;
}

.portal-section {
    margin-bottom: 56px;
}

.portal-section-head {
    margin-bottom: 24px;
}

.portal-section-head h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--wh-green-deep);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.portal-section-head p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.portal-section-cta {
    margin-top: 14px;
}

.portal-section-cta .portal-btn {
    width: auto;
    display: inline-flex;
    padding: 12px 24px;
}

.portal-section--listings {
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .portal-grid { grid-template-columns: 1fr; }
    .portal-btn--nk .btn-label-long,
    .portal-btn--switch .btn-label-long { display: none; }
    .portal-btn--nk .btn-label-short,
    .portal-btn--switch .btn-label-short { display: inline; }
}

@media (min-width: 901px) {
    .portal-btn--nk .btn-label-short,
    .portal-btn--switch .btn-label-short { display: none; }
}

.portal-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 999px;
    width: fit-content;
}

.portal-card-badge--ai {
    background: rgba(46, 125, 50, 0.1);
    color: var(--wh-green-accent);
}

.portal-card-badge--manual {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-muted);
}

.portal-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.portal-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: -6px;
}

/* ——— KI Drop-Zone ——— */
.drop-zone-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drop-zone {
    border: 2px dashed #2e7d32;
    border-radius: 14px;
    background: linear-gradient(165deg, #f7fdf9 0%, #f0fdf4 55%, #ecfdf5 100%);
    padding: 40px 28px 36px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #1b5e20;
    background: #ecfdf5;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.12);
}

.drop-zone-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.1);
    display: grid;
    place-items: center;
    color: var(--wh-green-accent);
}

.drop-zone-icon {
    width: 28px;
    height: 28px;
}

.drop-zone-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.55;
    max-width: 32ch;
    font-weight: 500;
}

.drop-zone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* KI-Scan Progress (Demo-Animation beim Laden) */
.progress-bar {
    height: 3px;
    background: rgba(46, 125, 50, 0.12);
    border-radius: 999px;
    overflow: hidden;
    width: 100%;
}

.progress-bar__fill {
    display: block;
    height: 100%;
    width: 35%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2e7d32, #66bb6a, #2e7d32);
    background-size: 200% 100%;
    animation: ki-scan 2.8s ease-in-out infinite;
}

@keyframes ki-scan {
    0% { transform: translateX(-100%); width: 40%; }
    50% { transform: translateX(80%); width: 55%; }
    100% { transform: translateX(220%); width: 40%; }
}

.progress-bar.is-active .progress-bar__fill {
    animation-duration: 1.2s;
}

.progress-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--wh-green-accent);
    text-align: center;
    opacity: 0.85;
}

.drop-file-list {
    list-style: none;
    font-size: 0.85rem;
    color: var(--wh-green-deep);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drop-file-list:empty { display: none; }

.ai-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    background: #f1f5f9;
    border-radius: var(--radius-input);
    line-height: 1.5;
}

/* ——— Express-Formular ——— */
.inserat-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.inserat-form .field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.inserat-form input,
.inserat-form select,
.inserat-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-family: inherit;
    font-size: 0.9375rem;
    background: #fff;
    box-shadow: var(--shadow-input);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.inserat-form input:focus,
.inserat-form select:focus,
.inserat-form textarea:focus {
    outline: none;
    border-color: rgba(46, 125, 50, 0.45);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12), var(--shadow-input);
}

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

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

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

.portal-footer {
    text-align: center;
    padding: 28px 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.portal-footer a {
    color: var(--wh-green-accent);
    font-weight: 600;
}

.portal-footer a:hover { text-decoration: underline; }

.portal-footer--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 32px;
    font-size: 0.75rem;
    color: #475569;
}
.portal-footer--inline a,
.portal-footer--inline .portal-footer__link-btn {
    text-decoration: underline;
    color: #475569;
    font-weight: 400;
    font-size: 0.75rem;
}

/* Vorbild Location-Fix PortalFooter: Inter, Abstände, Homepage rechts */
.portal-footer--brand {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    background: #14532d;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25rem;
    letter-spacing: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.portal-footer--brand .portal-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .portal-footer--brand .portal-footer__inner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .portal-footer--brand .portal-footer__inner {
        padding-left: 1.25rem;
        padding-right: 1.5rem;
    }
}

.portal-footer--brand .portal-footer__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 2rem;
    min-width: 0;
}

.portal-footer--brand .portal-footer__copy {
    color: rgba(255, 255, 255, 0.9);
}

.portal-footer--brand a,
.portal-footer--brand .portal-footer__link-btn {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.25rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s ease;
}

.portal-footer--brand a:hover,
.portal-footer--brand .portal-footer__link-btn:hover {
    color: #fff;
}

.portal-footer--brand .portal-footer__home {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-left: 0;
    flex-shrink: 0;
    white-space: nowrap;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.75rem;
    line-height: 1.25rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    z-index: 2;
}

/* ——— Inserat-Übersicht ——— */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.listing-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
}

.listing-card:hover {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 520px) {
    .listing-card { grid-template-columns: 1fr; }
}

.listing-card__visual {
    min-height: 140px;
    background: linear-gradient(160deg, #d9fae3 0%, #86efac 45%, var(--wh-green-brand) 100%);
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.listing-card__visual--draft {
    background: linear-gradient(160deg, #f1f5f9 0%, #cbd5e1 50%, #94a3b8 100%);
}

.listing-card__visual-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
}

.listing-card__body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.listing-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.listing-card__title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
}

.listing-status {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
}

.listing-status--online {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

.listing-status--draft {
    background: rgba(251, 191, 36, 0.2);
    color: #92400e;
}

.listing-card__address {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.listing-card__meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wh-green-deep);
}

.listing-btn-edit {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--wh-green-deep);
    background: #fff;
    border: 1px solid rgba(46, 125, 50, 0.35);
    border-radius: var(--radius-input);
    cursor: pointer;
    box-shadow: var(--shadow-input);
    transition: background 0.2s, border-color 0.2s;
}

.listing-btn-edit:hover {
    background: #f0fdf4;
    border-color: var(--wh-green-accent);
}

/* ——— Globaler Unternehmens-Footer ——— */
.portal-site-footer {
    margin-top: 48px;
    padding: 40px 24px 32px;
    background: #fff;
    border-top: 1px solid var(--border);
}

.portal-site-footer__inner {
    max-width: 1140px;
    margin: 0 auto;
}

.portal-site-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 32px;
    margin-bottom: 28px;
}

.portal-site-footer__head {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #334155;
    margin-bottom: 12px;
}

.portal-site-footer__col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-site-footer__col a {
    font-size: 0.88rem;
    color: #475569;
    transition: color 0.2s;
}

.portal-site-footer__col a:hover {
    color: #0f172a;
}

.portal-site-footer__copy {
    font-size: 0.8rem;
    color: #64748b;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .portal-site-footer__cols {
        grid-template-columns: 1fr;
    }
}

.portal-footer--legacy {
    display: none;
}
