
/* =========================================
   ForLove — общие настройки и оформление
   ========================================= */

:root {
    --bg: #f8f6ed;
    --white: #fffefa;
    --text: #303d32;
    --muted: #7b887c;
    --green: #55775a;
    --green-dark: #3f6548;
    --green-mid: #83a783;
    --green-light: #eaf0e4;
    --border: #e5e7dc;
    --shadow: 0 12px 35px rgba(49, 69, 48, .07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

/* =========================================
   Шапка
   ========================================= */

.header {
    position: relative;
    z-index: 20;
    background: rgba(248, 246, 237, .96);
    border-bottom: 1px solid rgba(221, 225, 211, .8);
}

.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--green);
    color: white;
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 23px;
    font-weight: 1000;
    letter-spacing: -.6px;
    color: #344b38;
}

.brand-text small {
    margin-top: 4px;
    color: #879184;
    font-size: 11px;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 27px;
}

.nav a {
    color: #59675a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: color .2s;
}

.nav a:hover {
    color: var(--green);
}

.post-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 21px;
    border-radius: 28px;
    background: var(--green);
    color: white;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, transform .2s;
}

.post-button:hover {
    background: var(--green-dark);
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   Первый экран
   ========================================= */

.hero {
    padding: 54px 0 65px;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 55px;
}

.hero-copy {
    position: relative;
    z-index: 2;
    padding: 15px 0;
}

.hero-copy h1 {
    max-width: 600px;
    margin: 0 0 20px;
    color: #344b38;
    font-size: clamp(38px, 4.5vw, 58px);
    font-weight: 1000;
    line-height: 1.08;
    letter-spacing: -1.8px;
}

.hero-copy p {
    max-width: 490px;
    margin: 0;
    color: #758174;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.65;
}

.hero-heart {
    position: absolute;
    top: -30px;
    right: 30px;
    color: #a9c19e;
    font-size: 53px;
    transform: rotate(13deg);
    opacity: .8;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 590px;
    min-height: 66px;
    margin-top: 32px;
    padding: 8px 9px 8px 19px;
    border: 1px solid #e4e7da;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 9px 28px rgba(55, 75, 51, .08);
}

.search-icon {
    flex-shrink: 0;
    color: #8da18a;
    font-size: 20px;
}

.hero-search input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.hero-search input::placeholder {
    color: #a0a99d;
}

.search-divider {
    width: 1px;
    height: 30px;
    flex-shrink: 0;
    background: #e5e8de;
}

.search-submit {
    min-height: 47px;
    padding: 11px 20px;
    border: 0;
    border-radius: 13px;
    background: var(--green);
    color: white;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}

.search-submit:hover {
    background: var(--green-dark);
}

.hero-photo {
    position: relative;
    min-height: 390px;
    border-radius: 34px;
    background-color: #dce8d5;
    background-image: url('/images/hero.jpg');
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 45px rgba(55, 75, 51, .12);
}

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, transparent 55%, rgba(35, 55, 38, .16));
    pointer-events: none;
}

.hero-note {
    position: absolute;
    right: -17px;
    bottom: 25px;
    max-width: 220px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 17px;
    background: rgba(255, 254, 250, .95);
    color: #536750;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(40, 60, 40, .12);
}

/* =========================================
   Общие заголовки разделов
   ========================================= */

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
}

.section-title h2 {
    margin: 0;
    color: #344b38;
    font-size: 31px;
    font-weight: 1000;
    letter-spacing: -.7px;
}

.new-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 20px;
    background: #e9f1e3;
    color: #5e805e;
    font-size: 11px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.new-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #79a875;
}

.outline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border: 1px solid #cbd8c5;
    border-radius: 25px;
    color: #58765a;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: .2s;
}

.outline-link:hover {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

/* =========================================
   Объявления
   ========================================= */

.listings {
    padding: 55px 0 70px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 25px;
}

.filter-button {
    min-height: 39px;
    padding: 8px 16px;
    border: 1px solid #e0e5d9;
    border-radius: 22px;
    background: rgba(255, 254, 250, .75);
    color: #687669;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s;
}

.filter-button:hover,
.filter-button.active {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.listing-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e8e9df;
    border-radius: 19px;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(49, 69, 48, .045);
    cursor: pointer;
    transition: transform .22s, box-shadow .22s;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(49, 69, 48, .11);
}

.listing-card:focus-visible {
    outline: 3px solid #8eaf87;
    outline-offset: 3px;
}

.listing-photo {
    position: relative;
    overflow: hidden;
    background: #edf1e8;
}

.listing-photo.listing-gallery {
    display: flex;
    flex-direction: column;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #edf1e8;
}

.gallery-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbnails {
    display: flex;
    gap: 5px;
    padding: 7px;
    overflow: hidden;
    background: #fffefa;
}

.gallery-thumb {
    width: 43px;
    height: 38px;
    flex: 0 0 43px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e1e7dc;
    border-radius: 7px;
    background: #edf1e8;
    cursor: pointer;
}

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

.gallery-thumb.active {
    border: 2px solid #6d9a70;
}

.listing-photo-placeholder,
.listing-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #edf1e8;
    color: #91a88d;
    font-size: 48px;
}

.listing-tag {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 20px;
    background: #e8f1e3;
    color: #527552;
    font-size: 11px;
    font-weight: 1000;
    line-height: 1.2;
}

.tag-give {
    background: #e6f0df;
    color: #52784e;
}

.tag-need {
    background: #f8eadb;
    color: #a16d3e;
}

.tag-help {
    background: #e5edf3;
    color: #54748b;
}

.favorite-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 254, 250, .94);
    color: #879486;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(40, 60, 40, .1);
    transition: .2s;
}

.favorite-button:hover,
.favorite-button.active {
    color: #d66e73;
    transform: scale(1.08);
}

.listing-content {
    padding: 16px 17px 18px;
}

.listing-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: #354438;
    font-size: 17px;
    font-weight: 1000;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.listing-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #899388;
    font-size: 12px;
    font-weight: 700;
}

.listing-city {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-results {
    grid-column: 1 / -1;
    padding: 45px 20px;
    border: 1px dashed #d7dfd0;
    border-radius: 18px;
    color: #7b897a;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
}

.listing-card[hidden] {
    display: none !important;
}

/* =========================================
   Категории
   ========================================= */

.categories {
    margin-top: 24px;
    padding: 0 16px 16px;
    border-radius: 28px;
    overflow: hidden;
    background: #eff2e8;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 17px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 185px;
    padding: 23px 16px;
    border: 1px solid #e3e9dc;
    border-radius: 19px;
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(49, 69, 48, .035);
    transition: transform .2s, box-shadow .2s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(49, 69, 48, .09);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    height: 51px;
    margin-bottom: 17px;
    border-radius: 16px;
    background: #edf3e8;
    color: #648365;
    font-size: 25px;
}

.category-card strong {
    margin-bottom: 5px;
    color: #3d5140;
    font-size: 16px;
    font-weight: 1000;
}

.category-card small {
    color: #899487;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

/* =========================================
   Как это работает
   ========================================= */

.how {
    padding: 75px 0 85px;
}

.how .section-heading {
    margin-bottom: 35px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    padding: 23px;
    border: 1px solid #e6e8de;
    border-radius: 18px;
    background: rgba(255, 254, 250, .8);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 14px;
    background: #e8f0e2;
    color: #638365;
    font-size: 17px;
    font-weight: 1000;
}

.step-text {
    color: #7b887c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.step-text strong {
    display: block;
    margin-bottom: 6px;
    color: #3e5140;
    font-size: 16px;
    font-weight: 1000;
}

/* =========================================
   Нижний призыв
   ========================================= */

.cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 75px;
    padding: 42px 48px;
    overflow: hidden;
    border-radius: 26px;
    background: #e8eee1;
}

.cta-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.cta-copy h2 {
    margin: 0 0 10px;
    color: #3d5740;
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: -.5px;
}

.cta-copy p {
    margin: 0;
    color: #718071;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
}

.cta-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    flex-shrink: 0;
    padding: 13px 24px;
    border-radius: 28px;
    background: var(--green);
    color: white;
    font-size: 14px;
    font-weight: 1000;
    text-decoration: none;
    transition: .2s;
}

.cta-button:hover {
    background: var(--green-dark);
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   Подвал
   ========================================= */

.footer {
    padding: 38px 0 25px;
    border-top: 1px solid #e4e6dc;
    background: #f1f0e7;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 35px;
}

.footer .brand {
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 13px 25px;
}

.footer-links a {
    color: #718071;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--green);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5ebdf;
    color: #648064;
    text-decoration: none;
    font-weight: 900;
    transition: .2s;
}

.footer-social a:hover {
    background: var(--green);
    color: white;
}

.copyright {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #e2e4d9;
    color: #929b8e;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================
   Форма создания объявления
   ========================================= */

.create-page {
    max-width: 760px;
    padding-top: 38px;
    padding-bottom: 55px;
}

.create-heading {
    position: relative;
    margin-bottom: 25px;
}

.create-heading h1 {
    margin: 0 0 7px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -.7px;
}

.create-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.create-heart {
    position: absolute;
    right: 10px;
    top: -12px;
    color: var(--green-mid);
    font-size: 58px;
    transform: rotate(12deg);
}

.create-form,
.form-success {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.form-section + .form-section {
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.form-section h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 900;
}

.form-label {
    display: block;
    margin: 16px 0 7px;
    font-size: 14px;
    font-weight: 900;
}

.create-form input[type="text"],
.create-form select,
.create-form textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #dedfd3;
    border-radius: 12px;
    outline: none;
    background: #fffefa;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

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

.create-form input:focus,
.create-form select:focus,
.create-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(85,119,90,.10);
}

.form-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    color: #626c61;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.form-agreement input {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--green);
}

.form-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.form-bottom p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: 0;
    border-radius: 28px;
    background: var(--green);
    color: white;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s;
}

.form-submit:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.form-errors {
    margin-bottom: 18px;
    padding: 13px 18px;
    border: 1px solid #e9c9bd;
    border-radius: 14px;
    background: #fff1eb;
    color: #914d3d;
    font-weight: 800;
}

.form-errors p {
    margin: 4px 0;
}

.form-success {
    padding: 45px 30px;
    text-align: center;
}

.success-heart {
    color: var(--green);
    font-size: 55px;
}

.form-success h2 {
    margin: 8px 0;
    font-size: 27px;
    font-weight: 900;
}

.form-success p {
    margin: 0 auto 25px;
    max-width: 430px;
    color: var(--muted);
    line-height: 1.5;
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Подсказки населённых пунктов */

.city-autocomplete {
    position: relative;
}

.city-suggestions {
    position: absolute;
    z-index: 50;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(35, 55, 35, .12);
}

.city-suggestions[hidden] {
    display: none;
}

.city-suggestion {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.city-suggestion:hover,
.city-suggestion.active {
    background: #edf4e9;
    color: var(--green-dark);
}

.city-hint {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.city-hint-error {
    color: #914d3d;
}

/* =========================================
   Страница объявления
   ========================================= */

.listing-page {
    padding-top: 38px;
    padding-bottom: 70px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 25px;
    color: #849087;
    font-size: 14px;
}

.breadcrumbs a {
    color: #568b68;
    text-decoration: none;
}

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

.listing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 32px;
    align-items: start;
}

.listing-gallery {
    min-width: 0;
}

.listing-main-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #edf1e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.listing-no-photo {
    font-size: 64px;
    color: #8ca58d;
}

.listing-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.listing-thumbnail {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #edf1e8;
    cursor: pointer;
}

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

.listing-thumbnail.active {
    border-color: #56a477;
}

.listing-thumbnail:hover {
    border-color: #8ab99a;
}

.listing-details {
    min-width: 0;
    background: #fff;
    border-radius: 18px;
    padding: 26px;
}

.listing-category {
    display: inline-block;
    margin-bottom: 14px;
}

.listing-details h1 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    margin: 0 0 16px;
    color: #29352e;
    overflow-wrap: anywhere;
}

.listing-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #78867b;
    font-size: 14px;
    margin-bottom: 22px;
}

.listing-description {
    color: #46534a;
    font-size: 16px;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding-top: 20px;
    border-top: 1px solid #edf0e9;
}

.listing-contact {
    margin-top: 24px;
    padding: 20px;
    border-radius: 14px;
    background: #f4f7ef;
}

.listing-contact h2 {
    font-size: 19px;
    margin: 0 0 8px;
    color: #34483a;
}

.listing-author {
    color: #758278;
    font-size: 14px;
    margin-bottom: 15px;
}

.listing-contact-value {
    margin: 0 0 15px;
    padding: 12px 14px;
    border: 1px solid #e1e9dc;
    border-radius: 10px;
    background: #fff;
    color: #34483a;
    font-size: 16px;
    font-weight: 800;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.listing-contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.listing-contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    border: 0;
    border-radius: 28px;
    background: var(--green, #438b61);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
    overflow-wrap: anywhere;
}

.listing-contact-button:hover {
    background: var(--green-dark, #34764f);
    color: #fff;
    transform: translateY(-2px);
}

.listing-contact-copy {
    background: #e8f0e4;
    color: #416c4b;
}

.listing-contact-copy:hover {
    background: #dce9d7;
    color: #345c3e;
}

.listing-back {
    display: inline-flex;
    margin-top: 24px;
    color: #568b68;
    text-decoration: none;
    font-weight: 700;
}

.listing-back:hover {
    text-decoration: underline;
}

.not-found {
    max-width: 600px;
    margin: 70px auto;
    padding: 40px 25px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
}

.not-found-symbol {
    font-size: 55px;
    color: #79a786;
}

.not-found h1 {
    margin: 10px 0;
    color: #34483a;
}

.not-found p {
    color: #78867b;
    line-height: 1.6;
}

/* =========================================
   Адаптация под планшеты и телефоны
   ========================================= */

@media (max-width: 1000px) {
    .nav {
        gap: 15px;
    }

    .nav a {
        font-size: 13px;
    }

    .hero-inner {
        gap: 30px;
    }

    .hero-photo {
        min-height: 340px;
    }

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 32px, 600px);
    }

    .header-inner {
        min-height: 72px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 20px;
        overflow-x: auto;
        padding: 5px 0;
    }

    .nav a {
        flex-shrink: 0;
        font-size: 12px;
    }

    .post-button {
        min-height: 41px;
        padding: 9px 15px;
        font-size: 12px;
    }

    .hero {
        padding: 35px 0 45px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-copy {
        padding: 5px 0;
    }

    .hero-copy h1 {
        max-width: 560px;
        font-size: clamp(36px, 8vw, 48px);
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-heart {
        right: 5px;
        top: -20px;
        font-size: 42px;
    }

    .hero-photo {
        min-height: 300px;
        border-radius: 25px;
    }

    .hero-note {
        right: 12px;
        bottom: 14px;
        max-width: 190px;
        padding: 12px 15px;
        font-size: 12px;
    }

    .listings {
        padding: 40px 0 50px;
    }

    .section-title h2 {
        font-size: 25px;
    }

    .listings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .listing-content {
        padding: 13px;
    }

    .listing-title {
        font-size: 15px;
    }

    .categories {
        padding: 45px 0 55px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-card {
        min-height: 160px;
        padding: 17px;
    }

    .category-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }

    .how {
        padding: 50px 0 55px;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cta {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 50px;
        padding: 30px 25px;
    }

    .cta-copy h2 {
        font-size: 25px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 22px;
    }

    .listing-page {
        padding-top: 24px;
    }

    .listing-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .listing-details {
        padding: 21px;
    }

    .listing-thumbnails {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .breadcrumbs {
        margin-bottom: 18px;
    }
}

@media (max-width: 600px) {
    .create-page {
        padding-top: 25px;
        padding-bottom: 35px;
    }

    .create-heading h1 {
        font-size: 27px;
    }

    .create-heading p {
        max-width: 90%;
        font-size: 13px;
    }

    .create-heart {
        right: 0;
        font-size: 43px;
    }

    .create-form,
    .form-success {
        padding: 19px;
        border-radius: 17px;
    }

    .form-section h2 {
        font-size: 19px;
    }

    .form-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .form-submit {
        width: 100%;
    }

    .listing-contact-actions {
        grid-template-columns: 1fr;
    }

    .hero-search {
        flex-wrap: wrap;
        gap: 7px;
        padding: 10px 12px;
    }

    .hero-search input {
        flex: 1 1 35%;
        font-size: 13px;
    }

    .search-divider {
        height: 25px;
    }

    .search-submit {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .filters {
        gap: 7px;
    }

    .filter-button {
        padding: 7px 12px;
        font-size: 12px;
    }

    .gallery-thumb {
        width: 40px;
        height: 38px;
        flex-basis: 40px;
    }
}

@media (max-width: 390px) {
    .listings-grid {
        gap: 9px;
    }

    .listing-content {
        padding: 11px;
    }

    .listing-title {
        font-size: 14px;
    }

    .listing-meta {
        font-size: 11px;
    }

    .category-card {
        padding: 14px;
    }
}

/* Исправление фирменного логотипа и навигации */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 17px;
    background: var(--green);
    color: #fff;
    font-size: 29px;
    font-weight: 1000;
    line-height: 1;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    color: #344b38;
    font-size: 25px;
    font-weight: 1000;
    letter-spacing: -.7px;
}

.brand-tagline {
    margin-top: 4px;
    color: #879184;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 27px;
}

.main-nav a {
    color: #59675a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: color .2s;
}

.main-nav a:hover {
    color: var(--green);
}

.header-actions {
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .brand-mark {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
        font-size: 25px;
    }

    .brand-name {
        font-size: 21px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 20px;
        overflow-x: auto;
        padding: 5px 0;
    }

    .main-nav a {
        flex-shrink: 0;
        font-size: 12px;
    }
}

/* =========================================
   Компактные вертикальные интервалы
   ========================================= */

.hero {
    padding-top: 35px;
    padding-bottom: 35px;
}

.hero-search {
    margin-top: 22px;
}

.listings {
    padding-top: 30px;
    padding-bottom: 80px;
}

.section-heading {
    margin-bottom: 16px;
}

.filters {
    margin-bottom: 16px;
}

/* Категории: верхний отступ убран */

.categories {
    margin-top: 24px;
    padding: 0 16px 16px;
}

.how {
    padding-top: 20px;
    padding-bottom: 55px;
}

.how .section-heading {
    margin-bottom: 22px;
}

.cta {
    margin-bottom: 50px;
    padding-top: 32px;
    padding-bottom: 32px;
}

@media (max-width: 760px) {
    .hero {
        padding-top: 25px;
        padding-bottom: 65px;
    }

    .hero-inner {
        gap: 20px;
    }

    .listings {
        padding-top: 25px;
        padding-bottom: 45px;
    }

    .categories {
        margin-top: 24px;
        padding: 0 12px 12px;
    }

    .how {
        padding-top: 18px;
        padding-bottom: 40px;
    }

    .how .section-heading {
        margin-bottom: 18px;
    }

    .cta {
        margin-bottom: 35px;
        padding-top: 25px;
        padding-bottom: 25px;
    }
}

#searchInput {
    flex: 3 1 0;
}

.hero-search .city-input {
    flex: 1 1 0;
}

/* Постраничная навигация */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 42px 0 12px;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dce5d5;
    border-radius: 13px;
    background: #fff;
    color: #405b43;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: .2s ease;
}

a.pagination-link:hover {
    border-color: #78b77d;
    background: #eff6e9;
    transform: translateY(-2px);
}

.pagination-link.active {
    border-color: #579b65;
    background: #579b65;
    color: #fff;
    cursor: default;
}

.pagination-link.disabled {
    opacity: .35;
    cursor: default;
}

.pagination-arrow {
    font-size: 19px;
}

.pagination-dots {
    padding: 0 3px;
    color: #84917e;
    font-weight: 800;
}

.pagination-info {
    margin: 0 0 35px;
    color: #879080;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 600px) {
    .pagination {
        gap: 6px;
        margin-top: 30px;
    }

    .pagination-link {
        min-width: 36px;
        height: 38px;
        padding: 0 9px;
        border-radius: 11px;
        font-size: 14px;
    }
}
