/* =====================================================================
   Sustainify design refresh – loaded after style.css and overrides it.
   Light, airy look: white glass header, soft green accents, rounded
   cards with gentle shadows, pill buttons. No external fonts (CSP).
   ===================================================================== */

:root {
    --c-primary: #15803d;          /* emerald 700 – text-safe green (AA on white) */
    --c-primary-600: #16a34a;
    --c-primary-500: #22c55e;
    --c-primary-50: #f0fdf4;
    --c-primary-100: #dcfce7;
    --c-accent: #0d9488;           /* teal for gradients */
    --c-ink: #0f172a;
    --c-text: #334155;
    --c-muted: #64748b;
    --c-line: #e2e8f0;
    --c-surface: #ffffff;
    --c-bg: #f6f8f7;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 18px 40px -16px rgba(21, 128, 61, 0.28);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: var(--font);
    color: var(--c-text);
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(34, 197, 94, 0.10), transparent 60%),
        radial-gradient(900px 400px at -10% 10%, rgba(13, 148, 136, 0.08), transparent 60%),
        var(--c-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--c-ink); letter-spacing: -0.015em; line-height: 1.25; }
a { color: var(--c-primary); text-underline-offset: 2px; }
::selection { background: var(--c-primary-100); color: var(--c-ink); }
:focus-visible { outline: 3px solid rgba(22, 163, 74, 0.45); outline-offset: 2px; border-radius: 6px; }

.container { max-width: 1240px; padding: 0 24px; }
/* Sticky footer: page wrapper fills the viewport, main grows, footer sits at the bottom on short pages */
body > .container { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .container > .main { flex: 1 0 auto; }
main, .main { padding: 2.25rem 0 3rem; }

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1100;   /* above Leaflet map panes/controls (z-index up to 1000) when scrolling */
    margin: 0 -24px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    color: var(--c-ink);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: none;
}
.header-content { padding: 0.85rem 0; gap: 0.75rem 1.5rem; flex-wrap: nowrap; }
.header-content .logo { color: var(--c-ink); gap: 0.6rem; flex-shrink: 0; }
/* The logo mark is white on transparent (made for the old green header): give it its own green tile */
.logo-image {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c-primary-500), var(--c-primary) 55%, var(--c-accent));
    box-shadow: 0 6px 14px -6px rgba(21, 128, 61, 0.7);
}
.logo-text {
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Menu sits in the same row as logo on wide screens */
.header .tabs {
    order: 2;
    flex-basis: auto;
    flex: 1 1 auto;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.15rem;
    min-width: 0;
}
.header .language-switcher { order: 3; flex-shrink: 0; }

.tab-btn, .tab-btn:link, .tab-btn:visited {
    background: transparent;
    color: var(--c-text);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.92rem;
    white-space: nowrap;
    font-weight: 550;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.tab-btn:hover { background: var(--c-primary-50); color: var(--c-primary); }
.tab-btn.active { background: var(--c-primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(21, 128, 61, 0.7); }

.lang-btn, .lang-btn:link, .lang-btn:visited, .lang-btn:hover, .lang-btn:active {
    color: inherit;
    font-size: 1.15rem;
    padding: 0.3rem 0.45rem;
    border-radius: 999px;
    opacity: 0.45;
}
.lang-btn:hover { background: var(--c-primary-50); opacity: 0.9; transform: none; }
.lang-btn.active { opacity: 1; background: var(--c-primary-50); }

.breadcrumb {
    background: transparent;
    border-top: 1px solid var(--c-line);
    padding: 0.55rem 0;
    font-size: 0.82rem;
}
.breadcrumb-item, .breadcrumb-item:link, .breadcrumb-item:visited { color: var(--c-muted); }
.breadcrumb-item:hover { color: var(--c-primary); }
.breadcrumb-item.current { color: var(--c-ink); font-weight: 600; }
.breadcrumb-separator { color: #cbd5e1; }

@media (max-width: 1180px) {
    .header-content { flex-wrap: wrap; }
    .header .tabs { order: 3; flex-basis: 100%; justify-content: flex-start; flex-wrap: nowrap;
        overflow-x: auto; scrollbar-width: none; padding-bottom: 0.15rem; }
    .header .tabs::-webkit-scrollbar { display: none; }
    .tab-btn { white-space: nowrap; }
    .header .language-switcher { order: 2; margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 999px;
    padding: 0.7rem 1.35rem;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.2;
}
.btn-primary, button.btn-primary {
    background: linear-gradient(135deg, var(--c-primary-600), var(--c-primary));
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(21, 128, 61, 0.65);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--c-primary), #166534); transform: translateY(-1px); }
.btn:not(.btn-primary) { background: var(--c-surface); border-color: var(--c-line); color: var(--c-ink); }
.btn:not(.btn-primary):hover { border-color: var(--c-primary-500); color: var(--c-primary); }

/* ---------- Landing ---------- */
.landing-hero { padding: 3.5rem 1rem 2.5rem; }
.landing-hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--c-ink) 20%, var(--c-primary) 60%, var(--c-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}
.landing-hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--c-muted); max-width: 40rem; margin: 0 auto; }

.landing-mission {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
    max-width: 920px;
    margin: 0 auto 2.5rem;
    position: relative;
    overflow: hidden;
}
.landing-mission::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--c-primary-500), var(--c-accent));
}
.landing-mission p, .landing-mission { line-height: 1.75; color: var(--c-text); }
.landing-mission strong, .landing-mission b { color: var(--c-ink); }

.landing-sections { gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.landing-sections + .landing-mission { margin-top: 2.5rem; }
@media (max-width: 900px) { .landing-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .landing-sections { grid-template-columns: 1fr; } }
.landing-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.6rem 1.4rem;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.landing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(34, 197, 94, 0.45); }
.landing-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c-primary-50), #ccfbf1);
    margin-bottom: 0.9rem;
}
.landing-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.landing-card p { color: var(--c-muted); font-size: 0.93rem; }

/* Blog: one post per row, newest first */
.blog-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.blog-card { display: block; color: inherit; text-decoration: none; }
.blog-date { display: block; color: var(--c-muted); font-size: 0.85rem; margin-bottom: 0.35rem; }

/* ---------- Generic surfaces (detail pages, static pages, lists) ---------- */
.location-detail, .product-detail, .static-page, .legal-page, .coming-soon,
.filters, .software-directory .software-filters, .locations-list, .addresses-list {
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow);
    background: var(--c-surface);
}
.location-detail, .product-detail { padding: 2.25rem; }
.static-page, .legal-page { padding: 2.25rem 2.5rem; }
.detail-header { gap: 1.25rem; }
.location-logo {
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--c-primary-50), #ecfeff);
    border: 1px solid var(--c-line);
}
.detail-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.detail-info-text h2 { font-size: 1.3rem; }
.detail-info-text p { color: var(--c-text); }
.location-category, .location-url { color: var(--c-primary); }

/* Filters & form controls */
.filters, .software-filters { padding: 1rem 1.25rem; }
select, input[type="text"], input[type="search"], input[type="url"], input[type="email"], textarea {
    font-family: inherit;
    border: 1px solid var(--c-line) !important;
    border-radius: var(--radius-sm) !important;
    background: #fff;
    color: var(--c-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--c-primary-500) !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}
.filter-group button, .software-filters button {
    border-radius: 999px !important;
    background: var(--c-ink) !important;
    color: #fff !important;
    border: none !important;
}

/* Chips */
.chip { border-color: var(--c-line); font-weight: 550; transition: all 0.15s; }
.chip:hover { border-color: var(--c-primary-500); color: var(--c-primary); background: var(--c-primary-50); }
.chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.chip-row-label { color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; }

/* Cards: products, brands, software */
.product-card, .software-tool-card, .device-card {
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--c-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover, .software-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(34, 197, 94, 0.45);
}
.software-tool-card { align-items: flex-start; }
.software-tool-logo { border-radius: 12px; background: var(--c-bg); flex-shrink: 0; }
.software-category h2 { font-size: 1.25rem; border-bottom-color: var(--c-line) !important; }
.platform-badge { border-radius: 999px; background: #f1f5f9; color: var(--c-muted); border: none; }
.card-label { border-radius: 999px; background: var(--c-primary-50); color: var(--c-primary); }

/* List rows (Grüne Liste) */
.location-item { border-bottom-color: #eef2f1; border-radius: var(--radius-sm); }
.location-item:hover { background: var(--c-primary-50); }

/* Badges */
.oss-badge, .criterion-badge, .label-badge { border-radius: 999px; }
.label-badge { border: 1px solid var(--c-line); background: #fff; box-shadow: var(--shadow-sm); }

/* Article boxes inherit the softer palette */
.article-box { border-radius: var(--radius); border-left-width: 4px; }
.article-figure img { border-radius: var(--radius); }
.article-table th { background: var(--c-primary-50); color: var(--c-ink); }

/* Pagination */
.pagination button, .pagination a {
    border-radius: 999px !important;
    border: 1px solid var(--c-line) !important;
}

/* ---------- Footer ---------- */
.footer {
    margin: 3rem -24px 0;
    padding: 0 24px;
    background:
        radial-gradient(700px 240px at 15% 0%, rgba(34, 197, 94, 0.22), transparent 70%),
        linear-gradient(180deg, #0f2a1d, #0b1f16);
    color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.footer-content { padding: 2rem 0 0.75rem; gap: 0.5rem 1.75rem; }
.footer-link, .footer-link:link, .footer-link:visited { color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.footer-link:hover { color: #86efac; text-decoration: none; }
.footer-disclaimer { color: rgba(255, 255, 255, 0.5) !important; padding-bottom: 1.75rem; }

/* ---------- Overlays ---------- */
.cookie-notice {
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45);
}
.cookie-notice a { color: #86efac; }
.cookie-notice-ok { border-radius: 999px !important; background: var(--c-primary-600) !important; }
.external-dialog { border: none; border-radius: var(--radius-lg); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.45); }
.external-dialog::backdrop { background: rgba(15, 23, 42, 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .header, .footer { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
    .location-detail, .product-detail, .static-page, .legal-page { padding: 1.4rem; border-radius: var(--radius); }
    .landing-mission { padding: 1.5rem 1.4rem; }
}

/* ---------- Detail pages (provider, product): hero + main column + "at a glance" side column ---------- */
.detail-page { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-hero {
    display: flex; gap: 1.75rem; align-items: center;
    background: linear-gradient(135deg, #ffffff 40%, var(--c-primary-50));
    border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
}
.detail-hero-logo {
    flex: 0 0 auto; width: 132px; height: 132px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center; font-size: 3.2rem; overflow: hidden; padding: 14px;
}
.detail-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-hero-text { min-width: 0; }
.detail-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; margin: 0.35rem 0 0.4rem; }
.detail-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.7rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 650; background: var(--c-primary); color: #fff; }
.pill-soft { background: #fff; color: var(--c-text); border: 1px solid var(--c-line); }
.pill-warn { background: #fef3c7; color: #92400e; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--c-muted); font-size: 0.95rem; margin: 0 0 1rem; }
.detail-meta a { font-weight: 600; }
.detail-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.detail-section {
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 1.6rem 1.8rem;
}
.detail-section h2, .aside-card h2 { font-size: 1.12rem; margin: 0 0 0.9rem; }
.detail-lead { font-size: 1.05rem; line-height: 1.75; color: var(--c-text); max-width: 68ch; }

/* Products as compact rows instead of big empty cards */
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; }
.mini-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm);
    border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.mini-card:hover { border-color: var(--c-primary-500); background: var(--c-primary-50); transform: translateY(-1px); }
.mini-card-icon { width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--c-primary-50);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.mini-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mini-card-text small { color: var(--c-muted); font-size: 0.8rem; }
.mini-card-arrow { margin-left: auto; color: var(--c-muted); }

/* Addresses next to the map */
.detail-places { display: grid; gap: 1rem; }
.detail-places.with-map { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.address-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem;
    max-height: 340px; overflow-y: auto; }
.detail-places .address-item { padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--c-line);
    font-size: 0.92rem; cursor: default; background: #fff; }
.detail-places .address-item[data-lat] { cursor: pointer; }
.detail-places .address-item[data-lat]:hover, .detail-places .address-item[data-lat]:focus-visible { border-color: var(--c-primary-500); background: var(--c-primary-50); }
.detail-places .map-container { height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-line); }

/* Side column */
.detail-aside { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 90px; }
.aside-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 1.3rem 1.35rem; }
.fact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.fact { display: flex; gap: 0.7rem; align-items: flex-start; }
.fact-mark { flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; background: var(--c-primary); color: #fff; }
.fact-claimed .fact-mark { background: #fff; color: var(--c-primary); border: 2px solid var(--c-primary-500); }
.fact-not_met .fact-mark { background: #fee2e2; color: #b91c1c; }
.fact-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.fact-name { font-weight: 650; color: var(--c-ink); font-size: 0.95rem; }
.fact-status { font-size: 0.8rem; color: var(--c-muted); }
.fact-tip { font-size: 0.8rem; color: var(--c-text); margin-top: 0.15rem; }
.aside-note { font-size: 0.78rem; color: var(--c-muted); margin-top: 0.9rem; line-height: 1.5; }
.aside-disclaimer { font-size: 0.75rem; color: var(--c-muted); line-height: 1.5; padding: 0 0.4rem; }
.label-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.label-tile { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.7rem 0.5rem; text-align: center;
    border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; color: var(--c-ink); text-decoration: none; height: 100%; }
a.label-tile:hover { border-color: var(--c-primary-500); background: var(--c-primary-50); }
.label-tile img { height: 44px; max-width: 100%; object-fit: contain; }
.label-tile-icon { font-size: 1.8rem; }
.label-tile-name { font-size: 0.82rem; font-weight: 650; }
.label-tile-proof { font-size: 0.72rem; color: var(--c-primary); }

@media (max-width: 960px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-aside { position: static; order: -1; }   /* key facts right below the header on phones */
    .detail-places.with-map { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .detail-hero { flex-direction: column; align-items: flex-start; padding: 1.4rem; gap: 1rem; }
    .detail-hero-logo { width: 96px; height: 96px; font-size: 2.4rem; }
    .detail-section { padding: 1.2rem 1.25rem; }
}
