:root {
    --green: #2e7d32;
    --green-dark: #1b5e20;
    --green-soft: #eef5ec;
    --accent: #f0a500;
    --accent-dark: #d9930a;
    --bg: #f6f7f4;
    --card: #fff;
    --text: #243027;
    --muted: #6b7a70;
    --border: #e3e8e1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(20,40,25,.04), 0 4px 16px rgba(20,40,25,.06);
    --shadow-hover: 0 6px 14px rgba(20,40,25,.10), 0 12px 28px rgba(20,40,25,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header */
.site-header {
    background: var(--green); color: #fff; position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 10px rgba(20,40,25,.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.logo { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.2px; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 8px; align-items: center; }
.main-nav a { color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }
.main-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.main-nav a.btn-accent { color: #2a2200; }
.main-nav a.btn-accent:hover { background: var(--accent-dark); }

/* Footer */
.site-footer { margin-top: 56px; padding: 36px 0 8px; background: #1d2520; color: #c7d2c9; font-size: .92rem; }
.site-footer a { color: #cfe0d0; }
.site-footer .logo { font-size: 1.2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 24px; }
.footer-about p { margin: 12px 0 0; max-width: 420px; color: #9fb0a4; }
.footer-col h4 { margin: 0 0 12px; color: #fff; font-size: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #2c3730; padding-top: 16px; }
.footer-bottom .muted { color: #8a9b8e; }

/* Buttons */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
    background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--border);
    cursor: pointer; font-size: .95rem; font-weight: 600; text-decoration: none;
    transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: #e3ebe0; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #2a2200; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; }
.alert-success { background: #e6f4e6; border: 1px solid #b9dcb9; color: #1b5e20; }
.alert-error { background: #fdecea; border: 1px solid #f5c6c0; color: #b02a1a; }

/* ===== Home: hero ===== */
.hero {
    background: linear-gradient(135deg, var(--green-dark), var(--green) 70%);
    color: #fff; padding: 56px 0 60px;
}
.hero-inner { max-width: 820px; }
.hero-title { font-size: 2.3rem; margin: 0 0 14px; color: #fff; letter-spacing: -.5px; }
.hero-sub { font-size: 1.12rem; margin: 0 0 26px; color: #dff0e1; max-width: 680px; }
.hero-search { display: flex; align-items: center; gap: 8px; background: #fff; padding: 8px 8px 8px 16px; border-radius: 14px; box-shadow: var(--shadow-hover); max-width: 720px; }
.hero-search-ico { font-size: 1.15rem; opacity: .6; flex: none; }
.hero-search input { flex: 1; border: none; padding: 14px 6px; font-size: 1.05rem; outline: none; color: var(--text); background: transparent; }
.hero-search input::placeholder { color: #93a298; }
.hero-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .92rem; color: #cfe7d2; }
.hero-tags a { color: #fff; background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 20px; }
.hero-tags a:hover { background: rgba(255,255,255,.26); text-decoration: none; }

/* Stats strip */
.stats { background: var(--card); border-bottom: 1px solid var(--border); }
.stats-inner { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; padding: 26px 16px; text-align: center; }
.stat { padding: 4px 8px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat b { display: block; font-size: 2.1rem; color: var(--green-dark); font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Home blocks */
.home-block { margin: 44px 0; }
.home-block > h2.center { margin-bottom: 24px; font-size: 1.6rem; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 1.5rem; }
.more { font-weight: 600; white-space: nowrap; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 14px; }
.cat-tile {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #cfe0cf; text-decoration: none; }
.cat-ico { font-size: 2.2rem; line-height: 1; }
.cat-name { font-weight: 700; color: var(--text); }
.cat-count { color: var(--muted); font-size: .85rem; }

/* "How it works" */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.how-col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.how-col h3 { margin: 0 0 14px; color: var(--green-dark); }
.steps { margin: 0 0 18px; padding-left: 22px; }
.steps li { margin-bottom: 12px; }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* Regions */
.region-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.region-pill { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 8px 16px; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
.region-pill:hover { border-color: var(--green); text-decoration: none; box-shadow: var(--shadow-hover); }
.region-pill span { color: var(--muted); font-size: .85rem; margin-left: 4px; }

/* CTA banner */
.cta-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: linear-gradient(120deg, #243027, #2e7d32); color: #fff;
    border-radius: var(--radius); padding: 30px 36px; margin: 44px 0; flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 6px; color: #fff; }
.cta-banner p { margin: 0; color: #dff0e1; max-width: 560px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 0 18px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 700; }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { padding: 0 0 16px; color: #41514a; }

/* ===== Catalog ===== */
.page-head { margin: 24px 0 8px; }
.page-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.lead { margin: 4px 0 8px; font-size: 1.05rem; color: #41514a; }
.seo-text { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin: 32px 0; color: #41514a; box-shadow: var(--shadow); }
.seo-text h2, .seo-text h3 { color: var(--green-dark); margin-top: 0; }
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; margin-top: 16px; }
.sidebar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 76px; box-shadow: var(--shadow); }
.sidebar h3 { margin: 18px 0 10px; font-size: 1rem; }
.sidebar h3:first-child { margin-top: 0; }
.cat-list { list-style: none; margin: 0 0 8px; padding: 0; }
.cat-list li { margin-bottom: 2px; }
.cat-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text); }
.cat-list a:hover, .cat-list a.active { background: var(--green-soft); text-decoration: none; color: var(--green-dark); font-weight: 600; }
.cat-list .count { color: var(--muted); font-size: .85rem; font-weight: 400; }
.geo-list { max-height: 320px; overflow: auto; }

.filters { border-top: 1px solid var(--border); padding-top: 8px; }
.filters label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.filters input, .filters select { width: 100%; padding: 9px; margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; }
.filters .btn { width: 100%; margin-top: 4px; }
.filters .reset { display: inline-block; margin-top: 10px; font-size: .85rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-logo { height: 130px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f0f5ee,#e7efe5); }
.card-logo img { max-height: 110px; max-width: 88%; object-fit: contain; }
.card-logo.big { height: 150px; width: 150px; border-radius: var(--radius); flex: none; }
.logo-placeholder { font-size: 3rem; font-weight: 800; color: var(--green); text-transform: uppercase; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h2, .card-title { margin: 0; font-size: 1.15rem; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge-verified { font-size: .72rem; font-weight: 700; color: var(--green-dark); background: var(--green-soft); border: 1px solid #cfe3cd; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.card-region { margin: 0; color: var(--muted); font-size: .9rem; }
.card-desc { margin: 0; font-size: .92rem; color: #3c4a42; }
.card-meta { list-style: none; margin: 0; padding: 0; font-size: .88rem; color: var(--muted); }
.card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { background: var(--green-soft); color: var(--green-dark); padding: 3px 10px; border-radius: 20px; font-size: .8rem; }
a.tag:hover { background: #dcebd9; text-decoration: none; }
.card .btn { margin-top: 10px; align-self: flex-start; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.chip { background: var(--green-soft); color: var(--green-dark); border: 1px solid #cfe3cd; padding: 4px 12px; border-radius: 20px; font-size: .85rem; }
.chip-reset { font-size: .85rem; color: var(--muted); }
.chip-reset:hover { color: #b02a1a; }

.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 28px 0; }
.empty { text-align: center; padding: 48px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ===== Company detail ===== */
.breadcrumbs { margin: 20px 0 8px; font-size: .9rem; color: var(--muted); }
.company { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.company-head { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.company-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.block h2 { margin: 0 0 12px; font-size: 1.2rem; }
.terms { width: 100%; border-collapse: collapse; }
.terms th { text-align: left; padding: 9px 12px 9px 0; color: var(--muted); font-weight: 500; width: 45%; vertical-align: top; }
.terms td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.gallery img { width: 100%; border-radius: var(--radius-sm); }
.company-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.contact-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.contact-box h3 { margin: 0 0 12px; }
.contact-box p { margin: 7px 0; }

/* ===== Forms ===== */
.reg-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; max-width: 760px; box-shadow: var(--shadow); }
.reg-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.reg-form legend { padding: 0 8px; font-weight: 700; color: var(--green-dark); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: .9rem; margin-bottom: 4px; font-weight: 500; }
.field .form-control, .reg-form input[type=text], .reg-form input[type=email], .reg-form input[type=url],
.reg-form textarea, .reg-form select, .reg-form input[type=file] {
    width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
}
.field small { color: var(--muted); font-size: .82rem; }
.field .err, .err { color: #b02a1a; font-size: .85rem; display: block; }
.has-error .form-control { border-color: #e0796b; }
.checkbox-field { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.checkbox-field label { margin: 0; }
ul#id_categories { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 4px; }
ul#id_categories label { font-weight: 400; }

.done-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px; text-align: center; max-width: 600px; margin: 36px auto; box-shadow: var(--shadow); }
.done-box .btn { margin-top: 16px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .layout, .company, .how { grid-template-columns: 1fr; }
    .sidebar, .company-side { position: static; }
    .stats-inner { grid-template-columns: repeat(2,1fr); gap: 18px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 1.8rem; }
}
@media (max-width: 560px) {
    .hero-search { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-banner { flex-direction: column; align-items: flex-start; }
    .main-nav a:not(.btn-accent) { display: none; }
}
