/* === CitySip === */

/* Cyrillic */
@font-face {
    font-family: "PT Sans";
    src: url("/static/fonts/pt-sans-regular-cyrillic.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "PT Sans";
    src: url("/static/fonts/pt-sans-bold-cyrillic.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Latin */
@font-face {
    font-family: "PT Sans";
    src: url("/static/fonts/pt-sans-regular-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "PT Sans";
    src: url("/static/fonts/pt-sans-bold-latin.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
    --teal: #28827C;
    --teal-hover: #1f6d68;
    --teal-light: rgba(40,130,124, 0.06);
    --green: #689F38;
    --green-dark: #558B2F;
    --orange: #F96826;
    --brown: #795548;
    --brown-dark: #251A16;
    --brown-sec: #584D49;
    --brown-muted: #918682;
    --bg-header: #FFFEF8;
    --bg-page: #FFFCF3;
    --bg-card-img: #FFF9E7;
    --bg-card-bottom: #FFF4D4;
    --bg-warm: #FFF4D4;
    --white: #fff;
    --font: "PT Sans", Helvetica, Arial, sans-serif;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

html { font-size: 16px; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; color: #000; background: var(--bg-page); }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--brown-dark); margin: 20px 0; }
h2 { font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--brown-dark); margin: 20px 0; }
h2 a { color: var(--teal); }
h3 { font-size: 20px; font-weight: 700; color: var(--brown-dark); margin: 10px 0; }

img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
.center { width: 1200px; max-width: 100%; margin: 0 auto; padding: 0 20px; }

/* ====================== HEADER ====================== */
.header {
    background: var(--bg-header);
    box-shadow: 0 1px 0 rgba(121,85,72,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__row {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 72px;
}

/* -- Logo + slogan -- */
.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}
.header__logo:hover { text-decoration: none; opacity: 0.9; }
.header__logo img { width: 56px; height: 56px; }

.header__slogan {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.5;
    color: var(--teal);
    align-self: flex-end;
    margin-bottom: -2px;
}

/* -- Nav -- */
.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.nav__link {
    font-size: 15px;
    font-weight: 600;
    color: var(--brown-dark);
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    letter-spacing: -0.1px;
}
.nav__link:hover {
    background: var(--teal-light);
    color: var(--teal);
    text-decoration: none;
}
.nav__link.active {
    background: var(--teal);
    color: var(--white);
}

/* Nav desktop/mobile visibility */
.nav__mobile-only { display: none; }
.nav__desktop-only { display: inline-block; }

/* Nav dropdown */
.nav__dropdown { position: relative; }
.nav__dropdown-arrow { margin-left: 2px; transition: transform 0.2s; }
.nav__dropdown:hover .nav__dropdown-arrow { transform: rotate(180deg); }
.nav__dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 180px;
    padding: 6px 0;
    z-index: 100;
}
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--brown-dark);
    text-decoration: none;
    white-space: nowrap;
}
.nav__dropdown-menu a:hover {
    background: var(--teal-light);
    color: var(--teal);
}

.nav__extra { display: none; }
.nav__overlay { display: none; }
.nav__contact { display: none; }
.nav__close { display: none; }

/* -- Action icons (calc, favorites) -- */
.header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.header__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--teal);
    transition: background 0.15s;
}
.header__action:hover {
    background: var(--teal-light);
    text-decoration: none;
}
.header__action svg { display: block; }
.header__action[href="/calculator/"] { display: none; } /* скрыт на десктопе, дублирует меню */

/* -- Slogan bar (mobile only) -- */
.header__slogan-bar { display: none; }

/* -- Phone block -- */
.header__phone-block { flex-shrink: 0; text-align: right; }

.header__phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--brown-dark);
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.header__phone:hover { text-decoration: none; color: var(--teal); }

.header__phone-meta {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    font-size: 14px;
    color: var(--brown-muted);
    margin-top: 2px;
}
.header__divider { opacity: 0.4; }
.header__callback {
    background: none; border: none; color: var(--teal);
    font-size: 14px; font-family: var(--font); cursor: pointer;
    padding: 0; text-decoration: underline;
}

/* -- Burger -- */
.burger__checkbox { display: none; }
.burger__btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.burger__btn:hover { background: var(--teal-light); }
.burger__btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--brown-dark);
    border-radius: 2px;
    transition: all 0.25s;
    transform-origin: center;
}

/* ====================== HERO ====================== */
.hero {
    background: var(--bg-card-img);
    padding: 40px 0 48px;
}

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

.hero__content h1 { margin-top: 0; margin-bottom: 12px; }

.hero__badge {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 5px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero__lead {
    font-size: 18px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 12px;
}

.hero__list { margin-bottom: 24px; display: flex; flex-direction: column; gap: 6px; }
.hero__list li {
    font-size: 16px; color: var(--brown-sec);
    padding-left: 18px; position: relative;
}
.hero__list li::before { content: "—"; position: absolute; left: 0; color: var(--brown-muted); }

.hero__form { display: flex; max-width: 440px; }
.hero__input {
    flex: 1; padding: 16px 20px; border: 1px solid #ccc;
    border-right: none; border-radius: var(--radius) 0 0 var(--radius);
    font-size: 20px; font-family: var(--font); background: var(--white);
    letter-spacing: 0.5px;
}
.hero__input:focus { outline: none; border-color: var(--teal); }
.hero__form .btn { border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap; }

.hero__image { display: flex; align-items: center; justify-content: center; }
.hero__image img {
    width: 100%; border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* ====================== BENEFITS BAR ====================== */
.benefits-bar {
    background: var(--white);
    border-bottom: 1px solid rgba(121,85,72,0.08);
    padding: 0;
}
.benefits-bar__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 56px;
}
.benefits-bar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    font-size: 15px;
    color: var(--brown-dark);
    white-space: nowrap;
    transition: color 0.15s;
}
.benefits-bar__item:hover { text-decoration: none; color: var(--teal); }
.benefits-bar__item strong { font-weight: 700; }
.benefits-bar__icon { flex-shrink: 0; display: block; }
.benefits-bar__sep {
    width: 1px;
    height: 24px;
    background: rgba(121,85,72,0.15);
    flex-shrink: 0;
}

/* ====================== CHOOSE CATS ====================== */
.choose-cats {
    display: flex; flex-wrap: wrap; gap: 8px 10px;
    align-items: center; margin-top: 12px;
}
.choose-cats__label { font-size: 16px; color: var(--brown-muted); margin-right: 4px; }
.choose-cats a {
    font-size: 16px; color: var(--teal);
    padding: 6px 16px; border: 1px solid var(--teal);
    border-radius: 20px; transition: all 0.15s;
}
.choose-cats a:hover { background: var(--teal); color: var(--white); text-decoration: none; }

/* ====================== BUTTONS ====================== */
.btn {
    display: inline-block; padding: 12px 24px; border-radius: var(--radius);
    font-size: 16px; font-weight: 700; cursor: pointer; border: none;
    text-decoration: none; transition: all 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-dark); }
.btn--outline { background: transparent; color: var(--teal); border: 1px solid var(--teal); }
.btn--outline:hover { background: var(--teal-light); }

/* ====================== SECTIONS ====================== */
.section { padding: 40px 0; }
.section--warm { background: var(--bg-warm); }
.section__more { text-align: center; margin-top: 24px; }

/* ====================== BENEFITS GRID ====================== */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.benefit {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; border: 1px solid rgba(121,85,72,0.08);
}
.benefit__title { font-size: 20px; font-weight: 700; color: var(--brown-dark); margin-bottom: 8px; }
.benefit p { font-size: 16px; color: var(--brown-sec); line-height: 1.5; }

/* ====================== PROJECT CARDS ====================== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.project-card {
    display: block; color: inherit; border-radius: var(--radius);
    overflow: hidden; transition: box-shadow 0.2s; background: var(--white);
    border: 1px solid rgba(121,85,72,0.15);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.project-card:hover { text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,0.12); }

.project-card__image {
    position: relative; background: var(--bg-card-img);
    aspect-ratio: 3/2; overflow: hidden;
}
.project-card__image img { width: 100%; height: 100%; object-fit: cover; }
.project-card__placeholder { width: 100%; height: 100%; background: var(--bg-card-img); }

.project-card__label {
    position: absolute; top: 10px; left: 10px;
    padding: 3px 12px; border-radius: 4px; font-size: 14px; font-weight: 700;
}
.project-card__label--new { background: var(--green); color: var(--white); }

.project-card__fav {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    color: var(--brown-muted);
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: all 0.15s; z-index: 1;
}
.project-card__fav:hover { background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.project-card__fav svg { display: block; }
.project-card__fav.active { color: #e53935; }
.project-card__fav.active svg { fill: #e53935; stroke: #e53935; }

.project-card__image::after {
    content: "";
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.45));
    pointer-events: none;
}
.project-card__title {
    position: absolute; bottom: 10px; left: 12px;
    font-size: 22px; font-weight: 700; color: var(--white);
    z-index: 1;
}

.project-card__bottom {
    background: var(--bg-card-bottom); padding: 14px 20px 16px;
    min-height: 110px; display: flex; flex-direction: column; justify-content: space-between;
}
.project-card__specs { display: flex; gap: 16px; margin-bottom: 8px; }
.project-card__spec {
    display: flex; align-items: center; gap: 5px;
    font-size: 15px; color: var(--brown-sec);
}
.project-card__spec svg { color: var(--teal); flex-shrink: 0; }

.project-card__price { margin-bottom: 10px; }
.project-card__price-label { display: block; font-size: 14px; color: var(--brown-muted); }
.project-card__price-value { font-size: 20px; font-weight: 700; color: #000; }

.project-card__btn {
    display: inline-block; padding: 8px 20px;
    border: 1px solid var(--teal); border-radius: var(--radius);
    color: var(--teal); font-size: 16px; font-weight: 600;
    text-align: center; align-self: flex-start; transition: all 0.15s;
}
.project-card:hover .project-card__btn { background: var(--teal); color: var(--white); }

/* ====================== CATALOG TOOLBAR (mobile sort + filter btn) ====================== */
/* catalog-toolbar removed — filter button is now in sort bar */

/* ====================== FILTER BOTTOM SHEET (mobile) ====================== */
.filter-sheet {
    display: none; /* shown only on mobile via .open */
}
.filter-sheet.open {
    display: block;
}
.filter-sheet__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}
.filter-sheet__panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--white);
    border-radius: 16px 16px 0 0;
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(121,85,72,0.08);
    flex-shrink: 0;
}
.filter-sheet__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brown-dark);
}
.filter-sheet__close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--brown-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.filter-sheet__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 20px;
    flex: 1;
}
.filter-sheet__group {
    margin-bottom: 16px;
}
.filter-sheet__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--brown-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.filter-sheet__group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(121,85,72,0.15);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: var(--font);
    background: var(--white);
}
.filter-sheet__footer {
    padding: 12px 20px 20px;
    border-top: 1px solid rgba(121,85,72,0.08);
    flex-shrink: 0;
}
.filter-sheet__apply {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 16px;
}

/* Size grid variants */
.sidebar__sizes--2col { grid-template-columns: repeat(2, 1fr); }
.sidebar__sizes--3col { grid-template-columns: repeat(3, 1fr); }
.sidebar__sizes--4col { grid-template-columns: repeat(4, 1fr); }
.sidebar__sizes--mobile { grid-template-columns: repeat(4, 1fr); }

/* ====================== CATALOG LAYOUT ====================== */
.catalog-intro {
    font-size: 16px;
    color: var(--brown-sec);
    line-height: 1.6;
    width: 100%;
    margin-bottom: 4px;
}
.catalog-layout { display: flex; gap: 24px; margin-top: 20px; }
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid rgba(121,85,72,0.1);
    border-radius: var(--radius);
    padding: 16px;
    align-self: flex-start;
}
.catalog-content { flex: 1; min-width: 0; }

.sidebar__reset {
    float: right;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--teal);
    text-decoration: underline;
}
.sidebar__reset:hover { color: var(--teal-hover); }

.sidebar__group {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(121,85,72,0.08);
}
.sidebar__group:last-child { border-bottom: none; }
.sidebar__caption {
    font-size: 14px;
    font-weight: 700;
    color: var(--brown-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Chips (этажность, особенности) */
.sidebar__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar__chip {
    display: inline-block;
    padding: 6px 14px;
    font-size: 15px;
    color: var(--brown-dark);
    background: var(--white);
    border: 1px solid rgba(121,85,72,0.15);
    border-radius: 20px;
    transition: all 0.15s;
}
.sidebar__chip:hover {
    border-color: var(--teal);
    color: var(--teal);
    text-decoration: none;
}
.sidebar__chip.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}
.sidebar__chip--sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* Size grid (размеры — 4 колонки) */
.sidebar__sizes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
.sidebar__size {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brown-dark);
    background: var(--white);
    border: 1px solid rgba(121,85,72,0.15);
    border-radius: var(--radius);
    transition: all 0.15s;
}
.sidebar__size:hover {
    border-color: var(--teal);
    color: var(--teal);
    text-decoration: none;
}
.sidebar__size.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

/* Legacy links fallback */
.sidebar__links { display: flex; flex-direction: column; gap: 4px; }
.sidebar__links a { font-size: 16px; color: var(--teal); padding: 3px 0; }
.sidebar__links a.active { font-weight: 700; color: var(--brown-dark); }

.sidebar__select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(121,85,72,0.15);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font);
    background: var(--white);
    color: var(--brown-dark);
}

/* Range inputs (от-до) */
.sidebar__range-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.sidebar__input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid rgba(121,85,72,0.15);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    background: var(--white);
    color: var(--brown-dark);
}
.sidebar__input:focus { outline: none; border-color: var(--teal); }
.sidebar__input::placeholder { color: var(--brown-muted); }
.sidebar__range-sep { color: var(--brown-muted); font-size: 14px; flex-shrink: 0; }
.sidebar__range-unit { color: var(--brown-muted); font-size: 13px; flex-shrink: 0; }

/* Styled checkboxes */
.sidebar__checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--brown-dark);
    cursor: pointer;
    padding: 3px 0;
}
.sidebar__check input { display: none; }
.sidebar__check span {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(121,85,72,0.2);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}
.sidebar__check:hover span { border-color: var(--teal); }
.sidebar__check input:checked + span {
    background: var(--teal);
    border-color: var(--teal);
}
.sidebar__check input:checked + span::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.sidebar__dynamic select {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc;
    border-radius: var(--radius); font-size: 16px; font-family: var(--font);
    margin-bottom: 12px; background: var(--white);
}

/* ====================== BREADCRUMBS ====================== */
.breadcrumbs ol { display: flex; gap: 8px; font-size: 14px; color: var(--brown-muted); margin: 16px 0; }
.breadcrumbs li::after { content: "→"; margin-left: 8px; color: var(--brown-muted); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--teal); }

/* ====================== PAGINATION ====================== */
.pagination { display: flex; gap: 6px; margin: 24px 0; justify-content: center; }
.pagination__link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid #ccc;
    border-radius: var(--radius); font-size: 16px; color: var(--brown-sec);
}
.pagination__link.active { background: var(--teal); color: var(--white); border-color: var(--teal); }
.pagination__link:hover { text-decoration: none; border-color: var(--teal); }

/* ====================== MISC ====================== */
/* Sort bar — count left, sort right */
.catalog-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(121,85,72,0.08);
}
.catalog-sort-bar__right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.catalog-sort-bar__btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--brown-sec);
    background: none;
    border: 1px solid rgba(121,85,72,0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.catalog-sort-bar__btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}
.catalog-sort-bar__btn.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}
.catalog-sort-bar__arrow { font-weight: 400; }
.catalog-sort-bar__filter-btn {
    display: none; /* shown on mobile */
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 6px 14px;
    border: 1px solid var(--teal);
    border-radius: 20px;
    background: none;
    color: var(--teal);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.catalog-sort-bar__filter-btn:hover {
    background: var(--teal);
    color: var(--white);
}
.catalog-sort-bar__filter-btn svg { flex-shrink: 0; }

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--teal);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 50;
}
.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top:hover {
    background: var(--teal-hover);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.scroll-top svg { display: block; }

.project-count { font-size: 16px; color: var(--brown-muted); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--brown-muted); font-size: 18px; }

/* ====================== PROJECT DETAIL PAGE ====================== */

/* 3-column top: photo | specs | price+CTA */
.proj-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 280px;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}

/* ====================== PROJECT GALLERY ====================== */
.proj-gallery { min-width: 0; }

.proj-gallery__main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card-img);
}
.proj-gallery__img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

/* Counter badge */
.proj-gallery__counter {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.55);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.proj-gallery__counter svg { stroke: var(--white); }

/* Arrows */
.proj-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    font-size: 24px;
    line-height: 1;
    color: var(--brown-dark);
    cursor: pointer;
    transition: all 0.15s;
    opacity: 0;
    z-index: 2;
}
.proj-gallery__main:hover .proj-gallery__arrow { opacity: 1; }
.proj-gallery__arrow:hover { background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.proj-gallery__arrow--prev { left: 10px; }
.proj-gallery__arrow--next { right: 10px; }

/* Thumbnails grid */
.proj-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 8px;
}
.proj-gallery__thumb {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--bg-card-img);
    padding: 0;
    position: relative;
    transition: border-color 0.15s, opacity 0.15s, transform 0.15s;
}
.proj-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.proj-gallery__thumb:hover {
    border-color: var(--brown-muted);
    transform: scale(1.04);
}
.proj-gallery__thumb.active {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
}

/* Badge on thumbnail (Plan) */
.proj-gallery__badge {
    position: absolute;
    bottom: 3px;
    left: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--teal);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

/* Placeholder (if no gallery) */
.proj-top__placeholder {
    width: 100%; aspect-ratio: 4/3; background: var(--bg-card-img);
    border-radius: var(--radius);
}

/* ====================== LIGHTBOX ====================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
}
.lightbox__img {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    z-index: 1;
    user-select: none;
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.lightbox__close:hover { opacity: 1; }

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--white);
    font-size: 48px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox__arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox__arrow--prev { left: 20px; }
.lightbox__arrow--next { right: 20px; }

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
}

/* Fav + Share overlay buttons */
.proj-top__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}
.proj-top__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    color: var(--brown-dark);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.proj-top__action:hover {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.proj-top__action svg { display: block; }

/* Fav active state */
.proj-top__fav.active {
    color: #e53935;
}
.proj-top__fav.active svg {
    fill: #e53935;
    stroke: #e53935;
}

/* Toast "Добавлено" */
.proj-top__toast {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--brown-dark);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.proj-top__toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Specs table */
.proj-spec { width: 100%; border-collapse: collapse; }
.proj-spec tr { border-bottom: 1px solid rgba(121,85,72,0.06); }
.proj-spec td {
    padding: 7px 0; font-size: 15px; vertical-align: top;
}
.proj-spec td:first-child { color: var(--brown-muted); padding-right: 12px; white-space: nowrap; }
.proj-spec td:last-child { font-weight: 600; color: var(--brown-dark); }

/* Price widget with tabs */
.proj-widget {
    background: var(--white); border: 1px solid rgba(121,85,72,0.12);
    border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.proj-widget__header {
    padding: 12px 16px 0; font-size: 14px; font-weight: 700;
    color: var(--brown-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.proj-widget__tabs {
    display: flex; padding: 8px 16px 0; gap: 4px;
}
.proj-widget__tab {
    flex: 1; padding: 8px 4px; font-size: 15px; font-weight: 700;
    font-family: var(--font); text-align: center; cursor: pointer;
    background: none; border: none; color: var(--brown-muted);
    border-bottom: 2px solid transparent; transition: all 0.15s;
}
.proj-widget__tab:hover { color: var(--teal); }
.proj-widget__tab.active {
    color: var(--teal); border-bottom-color: var(--teal);
}
.proj-widget__content { display: none; padding: 16px; }
.proj-widget__content.active { display: block; }

.proj-widget__total {
    font-size: 32px; font-weight: 700; color: var(--brown-dark);
    line-height: 1.1; margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(121,85,72,0.06);
}
.proj-widget__total span { font-size: 18px; font-weight: 400; color: var(--brown-muted); }

.proj-widget__items { display: flex; flex-direction: column; gap: 8px; }
.proj-widget__item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px;
}
.proj-widget__item span:first-child { color: var(--brown-sec); }
.proj-widget__item span:last-child { font-weight: 700; color: var(--brown-dark); }

/* Кнопка «?» — ссылка на комплектацию */
.proj-widget__hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--teal);
    border: 1.5px solid var(--teal);
    border-radius: 50%;
    text-decoration: none;
    margin-left: 4px;
    vertical-align: middle;
    transition: all 0.15s;
}
.proj-widget__hint:hover {
    background: var(--teal);
    color: var(--white);
    text-decoration: none;
}
.proj-widget__item--new .proj-widget__hint {
    color: var(--green);
    border-color: var(--green);
}
.proj-widget__item--new .proj-widget__hint:hover {
    background: var(--green);
    color: var(--white);
}

/* Подсветка секции при скролле из виджета */
.proj-info__section--highlight {
    animation: highlight-fade 1.5s ease;
}
@keyframes highlight-fade {
    0%, 20% { background: rgba(40,130,124, 0.1); }
    100% { background: transparent; }
}

/* Подсветка новых позиций при переключении пакета */
.proj-widget__item--new {
    background: rgba(104,159,56,0.08);
    margin: 0 -16px; padding: 6px 16px;
    border-radius: 4px;
}
.proj-widget__item--new span:first-child { color: var(--green); font-weight: 600; }
.proj-widget__item--new span:last-child { color: var(--green); }

/* CTA */
.proj-cta {
    background: var(--white); border: 1px solid rgba(121,85,72,0.1);
    border-radius: var(--radius); padding: 16px;
}
.proj-cta p { font-size: 14px; color: var(--brown-sec); margin-bottom: 10px; }
.proj-cta input {
    width: 100%; padding: 14px 16px; border: 1px solid rgba(121,85,72,0.15);
    border-radius: var(--radius); font-size: 18px; font-family: var(--font);
    margin-bottom: 8px; letter-spacing: 0.5px;
}
.proj-cta input:focus { outline: none; border-color: var(--teal); }
.proj-cta .btn { width: 100%; text-align: center; }
.proj-cta__or {
    text-align: center; font-size: 13px; color: var(--brown-muted);
    margin: 10px 0; position: relative;
}
.proj-cta__or::before, .proj-cta__or::after {
    content: ""; position: absolute; top: 50%; height: 1px;
    width: calc(50% - 20px); background: rgba(121,85,72,0.12);
}
.proj-cta__or::before { left: 0; }
.proj-cta__or::after { right: 0; }
.proj-cta__call-text {
    font-size: 13px; color: var(--brown-sec); text-align: center;
    margin-bottom: 4px; line-height: 1.4;
}
.proj-cta__phone-big {
    display: block; text-align: center;
    font-size: 20px; font-weight: 700; color: var(--brown-dark);
    letter-spacing: -0.3px;
}
.proj-cta__phone-big:hover { text-decoration: none; color: var(--teal); }

/* Perks — full width cards */
.proj-perks {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 28px;
}
.proj-perks__item {
    display: flex; align-items: center; gap: 12px;
    background: var(--white); border: 1px solid rgba(121,85,72,0.08);
    border-radius: var(--radius); padding: 16px 20px;
}
.proj-perks__icon { font-size: 24px; flex-shrink: 0; }
.proj-perks__text { display: flex; flex-direction: column; gap: 1px; }
.proj-perks__text strong { font-size: 16px; color: var(--brown-dark); }
.proj-perks__text span { font-size: 14px; color: var(--brown-muted); }

/* Project detail sections (open, no tabs) */
.proj-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
}
.proj-section h2 {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 3px solid var(--teal);
    display: flex;
    align-items: center;
    gap: 10px;
}
.proj-section h2::before {
    content: "";
    width: 5px;
    height: 28px;
    background: var(--teal);
    border-radius: 3px;
    flex-shrink: 0;
}
.proj-section > p { font-size: 16px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 10px; }

.proj-info__specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.proj-info__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px;
}
.proj-info__section {
    padding: 16px 0; border-bottom: 1px solid rgba(121,85,72,0.1);
}
.proj-info__section:last-child { border-bottom: none; }
.proj-info__section-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(121,85,72,0.15);
}
.proj-info__section-head h3 {
    font-size: 17px; font-weight: 700; color: var(--brown-dark); margin: 0;
}
.proj-info__section-price {
    font-size: 16px; font-weight: 700; color: var(--teal); white-space: nowrap;
}
.proj-info__section-badge {
    font-size: 12px; font-weight: 600; color: var(--white);
    background: var(--teal); padding: 2px 8px; border-radius: 10px;
    vertical-align: middle; margin-left: 6px;
}
.proj-info__section p { font-size: 15px; color: var(--brown-muted); line-height: 1.5; }
.proj-info__section h3 {
    font-size: 17px; font-weight: 700; color: var(--brown-dark); margin-bottom: 8px;
}

.proj-info__list {
    list-style: none; display: flex; flex-direction: column; gap: 4px;
}
.proj-info__list li {
    font-size: 15px; color: var(--brown-muted); line-height: 1.5;
    padding-left: 14px; position: relative;
}
.proj-info__list li::before {
    content: "–"; position: absolute; left: 0; color: var(--brown-muted);
}

/* Packages */
.proj-packages { margin-bottom: 28px; }
.proj-packages__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.proj-pkg {
    background: var(--white); border: 1px solid rgba(121,85,72,0.1);
    border-radius: var(--radius); padding: 24px; position: relative;
}
.proj-pkg--rec { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.proj-pkg__badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--teal); color: var(--white); font-size: 12px;
    font-weight: 700; padding: 3px 12px; border-radius: 10px; white-space: nowrap;
}
.proj-pkg__name { font-size: 18px; font-weight: 700; color: var(--brown-dark); margin-bottom: 6px; }
.proj-pkg__price { font-size: 20px; font-weight: 700; color: var(--teal); margin-bottom: 12px; }
.proj-pkg ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.proj-pkg li {
    font-size: 15px; color: var(--brown-sec); padding-left: 18px; position: relative;
}
.proj-pkg li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* CTA block */
.proj-cta-block {
    background: var(--bg-card-img); border-radius: var(--radius);
    padding: 36px; text-align: center; margin-bottom: 28px;
}
.proj-cta-block p { font-size: 16px; color: var(--brown-sec); margin-bottom: 16px; }
.proj-cta-block__actions { display: flex; align-items: center; justify-content: center; gap: 20px; }
.proj-cta-block__phone { font-size: 20px; font-weight: 700; color: var(--brown-dark); }
.proj-cta-block__phone:hover { text-decoration: none; color: var(--teal); }

/* Similar */
.proj-similar { margin-bottom: 40px; }

/* Responsive */
@media (max-width: 1024px) {
    .proj-top { grid-template-columns: 1fr 1fr; }
    .proj-top__side { grid-column: 1 / -1; }
    .proj-perks { grid-template-columns: repeat(2, 1fr); }
    .proj-info__specs-grid { grid-template-columns: 1fr; }
    .proj-info__grid { grid-template-columns: 1fr; }
    .proj-gallery__arrow { opacity: 1; width: 36px; height: 36px; font-size: 20px; }
    .proj-gallery__thumbs { grid-template-columns: repeat(5, 1fr); gap: 4px; }
}
@media (max-width: 768px) {
    .proj-top { grid-template-columns: 1fr; }
    .proj-perks { grid-template-columns: 1fr; }
    .proj-gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
    .proj-cta-block__actions { flex-direction: column; gap: 12px; }
}

/* ====================== CONTACTS PAGE ====================== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.contacts-block {
    display: flex; flex-direction: column; gap: 12px;
}
.contacts-item__label {
    font-size: 13px; color: var(--brown-muted); text-transform: uppercase;
    letter-spacing: 0.5px; font-weight: 700; margin-bottom: 2px;
}
.contacts-item__value { font-size: 16px; color: var(--brown-dark); }
.contacts-item__phone {
    font-size: 24px; font-weight: 700; color: var(--brown-dark);
}
.contacts-item__phone:hover { color: var(--teal); text-decoration: none; }

.contacts-form { max-width: 400px; }
.contacts-form form { display: flex; flex-direction: column; gap: 10px; }
.contacts-form__input, .contacts-form__textarea {
    width: 100%; padding: 12px 16px;
    border: 1px solid rgba(121,85,72,0.15); border-radius: var(--radius);
    font-size: 16px; font-family: var(--font); background: var(--white);
}
.contacts-form__input:focus, .contacts-form__textarea:focus {
    outline: none; border-color: var(--teal);
}
.contacts-form__textarea { resize: vertical; }

.contacts-map__frame {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(121,85,72,0.1);
}
.contacts-map__frame iframe { display: block; }

@media (max-width: 768px) {
    .contacts-grid { grid-template-columns: 1fr; }
    .contacts-map__frame iframe { height: 350px; }
}

/* ====================== SIP-PANELI PAGE ====================== */
.sip-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.sip-cols__text p { font-size: 16px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 10px; }
.sip-lead { font-size: 17px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 20px; }

/* Panel structure diagram */
.sip-structure {
    display: flex; flex-direction: column; gap: 0;
    border: 1px solid rgba(121,85,72,0.12); border-radius: var(--radius);
    overflow: hidden;
}
.sip-structure__layer {
    padding: 16px 20px; font-size: 14px; font-weight: 600; color: var(--brown-dark);
    background: var(--bg-card-bottom); text-align: center;
    border-bottom: 1px solid rgba(121,85,72,0.08);
}
.sip-structure__layer:last-child { border-bottom: none; }
.sip-structure__layer--core {
    padding: 28px 20px; background: var(--teal); color: var(--white); font-size: 15px;
}
.sip-structure__caption { font-size: 13px; color: var(--brown-muted); text-align: center; margin-top: 8px; }

/* Specs table */
.sip-table-wrap { overflow-x: auto; margin-bottom: 12px; }
.sip-table {
    width: 100%; border-collapse: collapse; font-size: 15px;
}
.sip-table th {
    text-align: left; padding: 10px 14px; font-weight: 700; color: var(--brown-dark);
    background: var(--bg-card-img); border-bottom: 2px solid rgba(121,85,72,0.12);
    white-space: nowrap;
}
.sip-table td {
    padding: 10px 14px; color: var(--brown-sec);
    border-bottom: 1px solid rgba(121,85,72,0.06);
}
.sip-table tr:hover td { background: rgba(40,130,124,0.03); }

/* Steps */
.sip-steps { display: flex; flex-direction: column; gap: 0; }
.sip-step {
    display: flex; gap: 16px; padding: 20px 0;
    border-bottom: 1px solid rgba(121,85,72,0.08);
}
.sip-step:last-child { border-bottom: none; }
.sip-step__num {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--teal); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.sip-step__text { flex: 1; }
.sip-step__text strong { font-size: 16px; color: var(--brown-dark); display: block; margin-bottom: 4px; }
.sip-step__text p { font-size: 15px; color: var(--brown-sec); line-height: 1.5; margin: 0; }
.sip-step__img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }

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

/* ====================== DOMOKOMPLEKTY PAGE ====================== */
.dk-intro { margin-bottom: 24px; }
.dk-intro__text p { font-size: 16px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 10px; }

.dk-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.dk-pkg {
    background: var(--white);
    border: 1px solid rgba(121,85,72,0.1);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
}
.dk-pkg--rec {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
}
.dk-pkg__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 10px;
    white-space: nowrap;
}
.dk-pkg__header { margin-bottom: 12px; }
.dk-pkg__header h3 { font-size: 20px; margin: 0 0 4px; }
.dk-pkg__price {
    font-size: 22px;
    font-weight: 700;
    color: var(--teal);
}
.dk-pkg__desc {
    font-size: 14px;
    color: var(--brown-sec);
    line-height: 1.5;
    margin-bottom: 16px;
}
.dk-pkg__list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dk-pkg__item {
    font-size: 14px;
    padding-left: 24px;
    position: relative;
    color: var(--brown-sec);
}
.dk-pkg__item::before {
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 14px;
}
.dk-pkg__item--yes { color: var(--brown-dark); }
.dk-pkg__item--yes::before { content: "✓"; color: var(--green); }
.dk-pkg__item--no { opacity: 0.45; }
.dk-pkg__item--no::before { content: "—"; color: var(--brown-muted); }

.dk-note { font-size: 14px; color: var(--brown-muted); }

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

/* ====================== REVIEWS ====================== */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review {
    background: var(--white);
    border: 1px solid rgba(121,85,72,0.08);
    border-radius: var(--radius);
    padding: 20px;
}
.review__header { margin-bottom: 10px; }
.review__header strong { font-size: 16px; color: var(--brown-dark); display: block; }
.review__meta { font-size: 14px; color: var(--brown-muted); }
.review p { font-size: 16px; color: var(--brown-sec); line-height: 1.5; }

/* ====================== SEO TEXT ====================== */
.seo-text { max-width: 800px; }
.seo-text p { font-size: 16px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 12px; }
.seo-text ul { margin: 8px 0 16px 20px; list-style: disc; }
.seo-text li { font-size: 16px; color: var(--brown-sec); line-height: 1.5; margin-bottom: 4px; }
.seo-text a { color: var(--teal); }

.related-categories { margin: 40px 0; padding: 30px 0; border-top: 1px solid rgba(121,85,72,0.12); }
.category-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-links__group ul { display: flex; flex-direction: column; gap: 6px; }
.category-links__group a { font-size: 16px; color: var(--teal); }

/* ====================== FOOTER ====================== */
.footer { background: var(--brown); color: var(--white); padding: 40px 0; }
.footer a { color: var(--white); }
.footer a:hover { opacity: 0.85; text-decoration: none; }

.footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer__heading { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.footer__list { display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.footer__phone { display: block; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.footer__address { font-size: 16px; opacity: 0.8; line-height: 1.4; }

.footer__socials { display: flex; gap: 12px; margin-top: 16px; }
.footer__social {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.footer__social:hover { color: #fff; }

.footer__brand { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.footer__logo { opacity: 0.9; }
.footer__brand-name { font-size: 16px; font-weight: 700; }
.footer__copy { font-size: 14px; opacity: 0.5; margin-top: 2px; }

/* ====================== HTMX ====================== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
    display: block; padding: 20px; text-align: center; color: var(--brown-muted);
}

/* Infinite scroll */
.infinite-scroll-sentinel {
    grid-column: 1 / -1;
    min-height: 1px;
}
.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    color: var(--brown-muted);
    font-size: 15px;
}
.infinite-scroll-loader::before {
    content: "";
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(40,130,124,0.2);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================== RESPONSIVE — TABLET & NAV COLLAPSE (1024px) ====================== */
@media (max-width: 1024px) {
    /* Hero */
    .hero__grid { grid-template-columns: 1fr; }
    .hero__image { order: -1; }
    h1 { font-size: 26px; }

    /* Header: switch to burger */
    .header__row { height: 56px; gap: 6px; }
    .header__logo img { width: 44px; height: 44px; }
    .header__slogan { display: none; }
    .header__actions { margin-left: auto; gap: 2px; }
    .header__action { width: 36px; height: 36px; }
    .header__action[href="/calculator/"] { display: flex; }
    .header__action svg { width: 20px; height: 20px; }
    .header__phone { font-size: 15px; }
    .header__phone-meta { display: none; }

    /* Slogan bar */
    .header__slogan-bar {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 5px 0;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--teal);
        border-top: 1px solid rgba(40,130,124,0.1);
    }
    .header__slogan-dot { opacity: 0.4; }

    /* Burger */
    .burger__btn { display: flex; order: 3; }

    /* Burger X animation */
    .burger__checkbox:checked ~ .burger__btn span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger__checkbox:checked ~ .burger__btn span:nth-child(2) { opacity: 0; }
    .burger__checkbox:checked ~ .burger__btn span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Dark overlay behind panel */
    .burger__checkbox:checked ~ .nav__overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 98;
    }

    /* Slide-in panel from RIGHT */
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--white);
        flex-direction: column;
        z-index: 99;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -4px 0 24px rgba(0,0,0,0.15);
        transform: translateX(100%);
        display: flex;
        padding: 20px 0 0;
    }
    .burger__checkbox:checked ~ .nav {
        transform: translateX(0);
        transition: transform 0.25s ease;
    }
    /* Transition on close only after first open */
    .nav.was-opened {
        transition: transform 0.25s ease;
    }

    /* Close button */
    .nav__close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 36px;
        line-height: 1;
        color: var(--brown-muted);
        cursor: pointer;
        border-radius: var(--radius);
        align-self: flex-end;
        margin: 0 16px 4px 0;
        transition: background 0.12s;
    }
    .nav__close:hover {
        background: rgba(121,85,72,0.06);
        color: var(--brown-dark);
    }

    /* Nav links */
    .nav__mobile-only { display: block; }
    .nav__desktop-only { display: none; }
    .nav__link {
        display: block;
        padding: 12px 28px;
        font-size: 17px;
        font-weight: 700;
        color: var(--brown-dark);
        border-radius: 0;
        border-left: 3px solid transparent;
        position: relative;
        transition: all 0.12s;
    }
    /* Subtle bottom separator */
    .nav__link::after {
        content: "";
        position: absolute;
        left: 28px;
        right: 28px;
        bottom: 0;
        height: 1px;
        background: rgba(121,85,72,0.08);
    }
    .nav__link:last-of-type::after { display: none; }

    .nav__link:hover,
    .nav__link:active {
        background: var(--teal-light);
        color: var(--teal);
        border-left-color: var(--teal);
        text-decoration: none;
    }

    /* Contact block at bottom */
    .nav__contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 20px 28px;
        margin-top: auto;
        border-top: 1px solid rgba(121,85,72,0.1);
        background: var(--bg-card-img);
    }
    .nav__contact-city {
        font-size: 14px;
        color: var(--brown-muted);
    }
    .nav__contact-phone {
        font-size: 20px;
        font-weight: 700;
        color: var(--brown-dark);
    }
    .nav__contact-phone:hover { text-decoration: none; }
    .nav__contact-hours {
        font-size: 14px;
        color: var(--brown-muted);
        margin-bottom: 12px;
    }
    .nav__contact-cta {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 16px;
        border-radius: var(--radius);
    }

    /* Catalog: hide sidebar, show toolbar */
    #sidebar-desktop { display: none; }
    .catalog-sort-bar {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    .catalog-sort-bar__right { width: 100%; }
    .catalog-sort-bar__btn { padding: 5px 10px; font-size: 13px; }
    .catalog-sort-bar__filter-btn { display: flex; }

    /* Grids — 2 columns on tablet */
    .catalog-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .benefits { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: repeat(2, 1fr); }

    /* Hero */
    .hero { padding: 24px 0 28px; }
    .hero__content h1 { font-size: 24px; }
    .hero__lead { font-size: 16px; }
    .hero__form { flex-direction: column; max-width: 100%; }
    .hero__input {
        border-right: 1px solid #ccc;
        border-radius: var(--radius);
        margin-bottom: 8px;
    }
    .hero__form .btn { border-radius: var(--radius); text-align: center; }

    /* Benefits bar */
    .benefits-bar__row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: auto;
        padding: 12px 0;
        gap: 0;
    }
    .benefits-bar__sep { display: none; }
    .benefits-bar__item {
        padding: 8px 12px;
        font-size: 14px;
        gap: 6px;
    }
    .benefits-bar__icon { width: 20px; height: 20px; }

    /* Grids */
    .projects-grid { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: 1fr; }
    .category-links { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }

    /* Sections */
    .section { padding: 24px 0; }
    h2 { font-size: 22px; }

    /* Choose cats */
    .choose-cats { flex-wrap: wrap; }
    .choose-cats__label { display: none; }
    .choose-cats a { font-size: 14px; padding: 5px 12px; }
}

/* ====================== RESPONSIVE — SMALL SCREENS ====================== */
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: 1fr; }
    .reviews { grid-template-columns: 1fr; }
    .category-links { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    h2 { font-size: 22px; }
    .hero__content h1 { font-size: 24px; }
    .catalog-intro { font-size: 14px; }
}

@media (max-width: 380px) {
    .header__phone { font-size: 15px; }
    .header__logo img { width: 38px; height: 38px; }
}

/* ====================== REVIEWS PAGE ====================== */

.reviews-intro {
    font-size: 17px;
    color: var(--brown-sec);
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 28px;
}

.reviews-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.reviews-summary__item {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.reviews-summary__num {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
}
.reviews-summary__label {
    display: block;
    font-size: 14px;
    color: var(--brown-muted);
    margin-top: 6px;
}

.reviews-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.review-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.review-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.review-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.review-card__meta {
    flex: 1;
    min-width: 0;
}
.review-card__author {
    display: block;
    font-weight: 700;
    color: var(--brown-dark);
    font-size: 16px;
}
.review-card__info {
    display: block;
    font-size: 13px;
    color: var(--brown-muted);
}
.review-card__info time { margin-left: 4px; }
.review-card__info time::before { content: '\00b7'; margin-right: 4px; }
.review-card__stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.review-card__text p {
    font-size: 15px;
    color: var(--brown-sec);
    line-height: 1.6;
    margin-bottom: 6px;
}
.review-card__text--long {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}
.review-card__text--long::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, var(--white));
}
.review-card__text--expanded {
    max-height: none;
}
.review-card__text--expanded::after {
    display: none;
}

.review-card__more {
    background: none;
    border: none;
    color: var(--teal);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    text-align: left;
    font-family: var(--font);
}
.review-card__more:hover { text-decoration: underline; }

.review-card__photos {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.review-card__photo {
    width: 100px;
    height: 75px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.review-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.review-card__photo:hover img { transform: scale(1.05); }

.review-card__video {
    margin-top: 14px;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}
.review-card__video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Reviews reasons */
.reviews-reasons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.reviews-reason {
    background: var(--teal-light);
    padding: 20px;
    border-radius: var(--radius);
}
.reviews-reason strong {
    display: block;
    color: var(--brown-dark);
    margin-bottom: 6px;
}
.reviews-reason p {
    font-size: 14px;
    color: var(--brown-sec);
    line-height: 1.5;
}

/* Lightbox for reviews — reuses .lightbox from project page (line ~957) */

/* Lead modal */
.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}
.lead-modal.open { display: flex; }
.lead-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.lead-modal__panel {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 36px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.lead-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--brown-muted);
    cursor: pointer;
    line-height: 1;
}
.lead-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 4px;
}
.lead-modal__subtitle {
    font-size: 14px;
    color: var(--brown-muted);
    margin-bottom: 20px;
}
.lead-modal__input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 16px;
    font-family: var(--font);
    margin-bottom: 12px;
    background: var(--bg-page);
}
.lead-modal__input:focus { outline: none; border-color: var(--teal); }
.lead-modal__submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    cursor: pointer;
}
.lead-modal__consent {
    font-size: 12px;
    color: var(--brown-muted);
    margin-top: 12px;
    text-align: center;
}
.lead-modal__consent a { color: var(--teal); }
.lead-modal__success {
    text-align: center;
    padding: 20px 0;
}
.lead-modal__success p {
    font-size: 16px;
    color: var(--brown-dark);
    margin-top: 12px;
}

/* Video scroll */
.video-scroll-wrap { position: relative; }
.video-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 22px;
    line-height: 1;
    color: var(--brown-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-scroll-arrow:hover { border-color: var(--teal); color: var(--teal); }
.video-scroll-arrow--left { left: -12px; }
.video-scroll-arrow--right { right: -12px; }
@media (max-width: 768px) {
    .video-scroll-arrow { display: none !important; }
}
.video-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.video-scroll::-webkit-scrollbar { height: 4px; }
.video-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.video-scroll__item {
    flex-shrink: 0;
    width: 240px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    background: none;
    scroll-snap-align: start;
}
.video-scroll__item img {
    width: 100%;
    height: 135px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.video-scroll__item:hover img { transform: scale(1.05); }
.video-scroll__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.video-scroll__item:hover .video-scroll__play { opacity: 1; }

@media (max-width: 768px) {
    .video-scroll__item { width: 200px; }
    .video-scroll__item img { height: 112px; }
}

/* Video modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.video-modal.open { display: flex; }
.video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
}
.video-modal__content {
    position: relative;
    width: 90vw;
    max-width: 800px;
    aspect-ratio: 16/9;
}
.video-modal__content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}
.video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

/* Works grid (portfolio) */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.work-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
}
.work-card__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.work-card__body { padding: 14px 16px; }
.work-card__name {
    font-size: 17px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 6px;
}
.work-card__specs {
    font-size: 14px;
    color: var(--brown-sec);
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}
.work-card__name--link {
    color: var(--teal);
    text-decoration: none;
    display: block;
}
.work-card__name--link:hover { text-decoration: underline; }
.work-card__dates {
    font-size: 13px;
    color: var(--brown-muted);
}
@media (max-width: 1024px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .works-grid { grid-template-columns: 1fr; } }

/* Certificates grid */
.cert-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.cert-grid__item {
    width: 140px;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.cert-grid__item:hover { box-shadow: var(--shadow); }
.cert-grid__item img {
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 640px) {
    .cert-grid__item { width: 100px; }
}

/* Article pages (info articles with sidebar) */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-bottom: 48px;
    align-items: start;
}
.article-content { min-width: 0; }
.article-lead {
    font-size: 18px;
    color: var(--brown-sec);
    line-height: 1.6;
    margin-bottom: 24px;
}
.article-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-top: 18px;
    margin-bottom: 8px;
}
.article-content p {
    font-size: 15px;
    color: var(--brown-sec);
    line-height: 1.6;
    margin-bottom: 10px;
}
.article-content a { color: var(--teal); }

/* Compare table */
.compare-table { overflow-x: auto; margin: 16px 0; }
.compare-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.compare-table th, .compare-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.compare-table th {
    background: var(--teal-light);
    font-weight: 700;
    color: var(--brown-dark);
    white-space: nowrap;
}
.compare-table td:first-child { font-weight: 600; color: var(--brown-dark); }
.compare-table tr:hover td { background: var(--teal-light); }
.table-note { font-size: 13px; color: var(--brown-muted); font-style: italic; }

/* Article sidebar */
.article-sidebar { position: sticky; top: 90px; }
.article-sidebar__block {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.article-sidebar__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 14px;
}
.article-sidebar__project {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}
.article-sidebar__project:last-of-type { border-bottom: none; }
.article-sidebar__project img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.article-sidebar__project strong {
    display: block;
    font-size: 14px;
    color: var(--brown-dark);
}
.article-sidebar__project span {
    font-size: 13px;
    color: var(--brown-muted);
}
.article-sidebar__project:hover strong { color: var(--teal); }
.article-sidebar__link {
    display: block;
    margin-top: 12px;
    color: var(--teal);
    font-size: 14px;
    text-decoration: none;
}
.article-sidebar__link:hover { text-decoration: underline; }

@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

/* Favorites */
.fav-empty {
    text-align: center;
    padding: 60px 20px;
}
.fav-empty__icon { margin-bottom: 20px; opacity: 0.4; }
.fav-empty__text {
    font-size: 20px;
    color: var(--brown-dark);
    margin-bottom: 8px;
}
.fav-empty__hint {
    font-size: 15px;
    color: var(--brown-muted);
    margin-bottom: 24px;
}
.fav-count {
    font-size: 15px;
    color: var(--brown-muted);
    margin-bottom: 16px;
}
.fav-count span { font-weight: 700; color: var(--brown-dark); }
#fav-grid { margin-bottom: 48px; }

/* FAQ */
.faq-list { max-width: 800px; }
.faq-item {
    border-bottom: 1px solid #eee;
}
.faq-item summary {
    padding: 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--brown-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::after {
    content: '+';
    font-size: 22px;
    color: var(--teal);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 12px;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: '−';
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
    font-size: 15px;
    color: var(--brown-sec);
    line-height: 1.6;
    padding-bottom: 16px;
}
.faq-item a { color: var(--teal); }

/* Policy page */
.policy-text { max-width: 800px; margin-bottom: 48px; }
.policy-text h2 { font-size: 18px; margin-top: 28px; margin-bottom: 10px; border: none; padding: 0; }
.policy-text h2::before { display: none; }
.policy-text p { font-size: 15px; color: var(--brown-sec); line-height: 1.6; margin-bottom: 10px; }

/* CTA */
.cta-block {
    background: var(--teal);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 48px;
}
.cta-block h2 { color: var(--white); margin-bottom: 12px; border: none; }
.cta-block h2::before { display: none; }
.cta-block p { font-size: 17px; opacity: 0.9; margin-bottom: 20px; }
.cta-block .btn--primary {
    background: var(--white);
    color: var(--teal);
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}
.cta-block .btn--primary:hover { opacity: 0.9; }

@media (max-width: 1024px) {
    .reviews-summary { grid-template-columns: repeat(2, 1fr); }
    .reviews-list { grid-template-columns: 1fr; }
    .reviews-reasons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .reviews-summary { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .reviews-summary__item { padding: 14px; }
    .reviews-summary__num { font-size: 28px; }
    .reviews-reasons { grid-template-columns: 1fr; }
    .cta-block { padding: 24px; }
    .review-card__photo { width: 80px; height: 60px; }
}

/* ====================== CALCULATOR PAGE ====================== */

.calc-intro {
    font-size: 17px;
    color: var(--brown-sec);
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 32px;
}

.calc-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
    align-items: start;
}

.calc-form {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 28px;
}
.calc-form__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 24px;
    border: none !important;
    padding: 0 !important;
}
.calc-form__title::before { display: none !important; }

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.calc-field label {
    display: block;
    font-size: 14px;
    color: var(--brown-muted);
    margin-bottom: 6px;
}
.calc-field--full { grid-column: 1 / -1; }

.calc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 16px;
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--brown-dark);
    transition: border-color 0.2s;
}
.calc-input:focus {
    outline: none;
    border-color: var(--teal);
}

/* Package radio buttons */
.calc-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.calc-pkg {
    cursor: pointer;
}
.calc-pkg input { display: none; }
.calc-pkg__box {
    display: block;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}
.calc-pkg input:checked + .calc-pkg__box {
    border-color: var(--teal);
    background: var(--teal-light);
}
.calc-pkg__name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--brown-dark);
    margin-bottom: 4px;
}
.calc-pkg__desc {
    font-size: 12px;
    color: var(--brown-muted);
    line-height: 1.3;
}

/* Result panel */
.calc-result {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 28px;
    position: sticky;
    top: 90px;
}
.calc-result__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 20px;
    border: none !important;
    padding: 0 !important;
}
.calc-result__title::before { display: none !important; }

.calc-result__area {
    font-size: 16px;
    color: var(--brown-sec);
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eee;
}
.calc-result__area span:last-of-type {
    font-weight: 700;
    color: var(--brown-dark);
    font-size: 22px;
}

.calc-result__lines {
    margin-bottom: 16px;
}
.calc-result__line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: var(--brown-sec);
    border-bottom: 1px dashed #eee;
}
.calc-result__line span:last-child {
    font-weight: 700;
    color: var(--brown-dark);
    white-space: nowrap;
}

.calc-result__total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--brown-dark);
    border-top: 2px solid var(--teal);
}
.calc-result__total span:last-child {
    font-size: 24px;
    color: var(--teal);
}

.calc-result__note {
    font-size: 13px;
    color: var(--brown-muted);
    line-height: 1.4;
    margin: 14px 0;
}

.calc-result__btn {
    display: block;
    text-align: center;
    background: var(--teal);
    color: var(--white);
    padding: 14px;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}
.calc-result__btn:hover { background: var(--teal-hover); }

/* Similar projects */
.calc-similar {
    margin-bottom: 48px;
}
.calc-similar h2 {
    margin-bottom: 20px;
}
.calc-similar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}
.calc-similar__link {
    color: var(--teal);
    font-size: 16px;
    text-decoration: none;
}
.calc-similar__link:hover { text-decoration: underline; }

@media (max-width: 1024px) {
    .calc-layout { grid-template-columns: 1fr; }
    .calc-result { position: static; }
    .calc-similar__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .calc-row { grid-template-columns: 1fr; }
    .calc-packages { grid-template-columns: 1fr; }
    .calc-similar__grid { grid-template-columns: 1fr; }
    .calc-form, .calc-result { padding: 18px; }
}
