/* -------------------- RESET & GLOBAL -------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----- ТЕМЫ (светлая / тёмная / авто) ----- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.02);
    --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    --gold: #c6a43f;
    --gold-dark: #a8882f;
    --gold-light: #e0c068;
    --primary: #1e3a5f;
    --primary-dark: #0f2b44;
    --success: #2e7d64;
    --danger: #e53e3e;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body.dark-theme {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-elevated: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: #334155;
    --border-medium: #475569;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.25);
    --primary: #3b6e9e;
    --primary-dark: #2c5a82;
}

/* Авто-тема (системные предпочтения) */
@media (prefers-color-scheme: dark) {
    body.auto-theme {
        --bg-primary: #0a0f1a;
        --bg-secondary: #111827;
        --bg-elevated: #1e293b;
        --bg-glass: rgba(15, 23, 42, 0.8);
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-light: #334155;
        --border-medium: #475569;
        --primary: #3b6e9e;
        --primary-dark: #2c5a82;
    }
    body.auto-theme {
        background: var(--bg-primary);
        color: var(--text-primary);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.2s ease, color 0.2s ease;
    font-weight: 400;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ----- ПРЕЛОАДЕР ----- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}
.loader-gold {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ----- HEADER (современный, с бургером) ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    min-height: 100px;
    overflow-x: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo img {
    width: 250px;
    height: auto;
}
.logo span {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    gap: 24px;
    flex-wrap: nowrap;
}
.main-nav a {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }

.header-contacts {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}
.phone-link {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold);
}

.theme-toggle {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 40px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}
.theme-icon {
    font-size: 1.4rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.theme-toggle:hover .theme-icon {
    transform: rotate(15deg);
}
.dark-theme .theme-toggle {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.burger span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ----- КНОПКИ (единая высота и выравнивание) ----- */
.btn,
button[type="submit"],
input[type="submit"],
.add-to-compare,
.thumb-nav,
.nav-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--gold);
    color: #0f172a;
    border: none;
}
.btn-primary:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}
.btn-secondary:hover {
    background: rgba(198,164,63,0.1);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}
.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(198,164,63,0.1);
}

/* ----- HERO СЕКЦИЯ ----- */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 24px 0 32px;
}
.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.hero-image-wrapper {
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
}

/* ----- 3D-КОНТЕЙНЕР ----- */
.hero-3d {
    perspective: 1000px;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}
.container-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotateContainer 15s infinite linear;
}
.container-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(198,164,63,0.15);
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(198,164,63,0.3);
    backdrop-filter: blur(8px);
    border-radius: 12px;
}
.front  { transform: translateZ(100px); background: url('/static/images/font.webp') center/cover; }
.back   { transform: rotateY(180deg) translateZ(100px); background: url('/static/images/font_1.webp') center/cover; } /* не видимый*/
.left   { transform: rotateY(-90deg) translateZ(100px); background: url('/static/images/font_2.webp') center/cover; }
.right  { transform: rotateY(90deg) translateZ(100px); background: url('/static/images/font_3.webp') center/cover; }
.top    { transform: rotateX(90deg) translateZ(100px); background: url('/static/images/font_4.webp') center/cover; }
.bottom { transform: rotateX(-90deg) translateZ(100px); background: url('/static/images/font_5.webp') center/cover; }

@keyframes rotateContainer {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to   { transform: rotateX(360deg) rotateY(360deg); }
}

/* ----- СЕКЦИИ, СЕТКИ, КАРТОЧКИ ----- */
.section {
    padding: 100px 0;
}
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.gold {
    color: var(--gold);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}
/* Карточки проектов */
.card img {
    width: 100%;
    height: auto;
    display: block;
}


.card-body {
    flex: 1;
    padding: 20px;
}
.card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-body .price {
    font-weight: 700;
    color: var(--gold);
    font-size: 1.3rem;
    margin: 16px 0;
}
.card-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}
.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold);
    color: #0f172a;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

/* ----- ГАЛЕРЕЯ ПОРТФОЛИО ----- */
.main-image-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.main-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: default;
}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: background 0.3s ease;
    z-index: 10;
}
.nav-btn:hover { background: var(--gold); }
.prev-main { left: 10px; }
.next-main { right: 10px; }

.thumbnails-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}
.thumbnails-container {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
}
.thumbnails-track {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}
.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.7;
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumbnail-item:hover {
    opacity: 1;
    transform: scale(1.05);
}
.thumbnail-item.active {
    border-color: var(--gold);
    opacity: 1;
    transform: scale(1.05);
}
.thumb-nav {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.thumb-nav:hover {
    background: var(--gold);
    border-color: var(--gold-dark);
    color: white;
}
.gallery-counter {
    text-align: center;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ----- ПРЕИМУЩЕСТВА (benefits) ----- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.benefit-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.benefit-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow-lg);
}
.benefit-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}
.benefit-icon i {
    transition: transform 0.3s ease;
}
.benefit-card:hover .benefit-icon i {
    transform: scale(1.1);
}
.benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.benefit-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.dark-theme .benefit-card {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}
.dark-theme .benefit-card:hover {
    border-color: var(--gold);
}

/* ----- СЧЁТЧИКИ (counter) ----- */
.counters-section {
    background: var(--bg-soft);
    padding: 60px 0;
}
.counters-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.counter-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}
.counter-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
    line-height: 1;
}
.counter-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- ПАРАЛЛАКС ----- */
.parallax {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}
.parallax .container {
    position: relative;
    z-index: 2;
}
.parallax h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
}
.parallax p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
    }
}

/* ----- КАЛЬКУЛЯТОР ----- */
.calculator-form {
    width: 100%;
}
.calculator-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: sticky;
    top: 100px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.total-price-box {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    margin: 20px 0;
    padding: 15px;
    background: rgba(198, 164, 63, 0.1);
    border-radius: var(--radius-md);
}
.price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px;
}
.summary-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.options-group {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
}
.options-group h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}
.option-label:hover {
    background: rgba(198, 164, 63, 0.1);
}
.zone-block {
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
}
.zone-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    font-weight: 500;
}

/* ----- РАДИОКНОПКИ ----- */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.radio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 40px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.radio-btn:hover {
    border-color: var(--gold);
    background: rgba(198,164,63,0.1);
}
.radio-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.radio-btn span {
    font-weight: 500;
}
.radio-btn.active {
    background: var(--gold);
    border-color: var(--gold-dark);
    color: #0f172a;
}

/* ----- КАСТОМНЫЙ ЧЕКБОКС (согласие) ----- */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 20px 0;
    position: relative;
    user-select: none;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkmark {
    position: relative;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--gold);
}
.custom-checkbox input:checked ~ .checkmark {
    background: var(--gold);
    border-color: var(--gold-dark);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-secondary);
}
.checkbox-text a {
    color: var(--gold);
    text-decoration: underline;
}

/* ----- ФИЛЬТРЫ (filter-box) ----- */
.filter-group {
    margin-bottom: 20px;
}
.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}
.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
    transition: 0.2s;
}
.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--gold);
    outline: none;
}
.filter-box button {
    width: 100%;
}

/* ----- ФОРМА ЛИДА (lead_form) ----- */
.lead-form .form-group {
    margin-bottom: 20px;
}
.lead-form input,
.lead-form textarea,
.lead-form select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    transition: 0.2s;
}
.lead-form input:focus,
.lead-form textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(198,164,63,0.2);
}
.lead-form button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

/* ----- БЛОКИ ДЕЙСТВИЙ (action-cards, consult-form, calc-block) ----- */
.action-cards {
    padding: 60px 0;
    background: var(--bg-soft);
}
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.action-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 35px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
    border: 1px solid var(--border-light);
}
.action-card i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
}
.action-card h3 {
    margin-bottom: 10px;
}

.consult-form, .calc-block {
    background: var(--bg-elevated);
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.calc-block .btn {
    margin-top: 15px;
}

/* ----- ТЁМНАЯ ТЕМА ДЛЯ ПОЛЕЙ ВВОДА ----- */
.dark-theme input,
.dark-theme select,
.dark-theme textarea,
.dark-theme .filter-box select,
.dark-theme .filter-box input {
    background-color: #2d2d2d !important;
    color: #f0f0f0 !important;
    border-color: #555 !important;
}
.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
    color: #aaa !important;
}
.dark-theme .filter-box label {
    color: #ddd !important;
}
.dark-theme .filter-group select,
.dark-theme .filter-group input {
    background-color: #2d2d2d;
    color: #fff;
}

/* Футер – современный и удобный */
.site-footer {
    background: #0f1a24;  /* тёмный фон для контраста */
    color: #e2e8f0;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gold);
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-list a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-list a:hover {
    color: var(--gold);
    transform: translateX(3px);
}
.footer-list i {
    width: 24px;
    color: var(--gold);
    font-size: 1rem;
}

.footer-brand p {
    margin-bottom: 12px;
    line-height: 1.5;
}
.footer-guarantee {
    margin-top: 15px;
    font-size: 0.9rem;
}
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.2s;
}
.footer-social a:hover {
    background: var(--gold);
    color: #0f172a;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
}
.footer-bottom a {
    color: #cbd5e1;
}
.footer-bottom a:hover {
    color: var(--gold);
}

/* Адаптив */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-list li {
        margin-bottom: 15px;
    }
}

/* ----- КАСТОМНЫЙ КУРСОР ----- */
/* @media (min-width: 1025px) {
    body, a, button, .btn, input, select, textarea, [role="button"] {
        cursor: none !important;
    }
} */
/* @media (max-width: 1024px) {
    #customCursor {
        display: none !important;
    }
    body, a, button, .btn {
        cursor: auto !important;
    }
} */
/* #customCursor {
    color: #c6a43f;
    font-size: 14px;       /* уменьшили */
    /* font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: none;      /* убрали тень */
 /* }    */  
/* .interactive-cursor {
    transform: scale(1.2) !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(198,164,63,0.8) !important;
} */

/* ----- АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ----- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- ПУСТОЕ СОСТОЯНИЕ (empty-state) ----- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
}
.empty-state i {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 20px;
    opacity: 0.6;
}
.empty-state p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.empty-state .text-muted {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ----- АДАПТИВ (общие медиазапросы) ----- */
@media (max-width: 1200px) {
    .header-top {
        gap: 20px;
        padding: 0 20px;
    }
    .main-nav {
        gap: 24px;
    }
    .main-nav a {
        font-size: 14px;
    }
    .btn-primary {
        padding: 8px 16px;
        font-size: 13px;
    }
}
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-grid { gap: 40px; }
}
@media (max-width: 768px) {
    .logo img { height: 45px; }
    .burger { display: flex; }
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
        transition: 0.3s;
        gap: 28px;
        z-index: 99;
    }
    .main-nav.open { left: 0; }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .header-contacts .btn-primary { display: none; }
    .constructor { padding: 24px; }
    .config-group { grid-template-columns: 1fr; }
    .hero-3d {
        width: 200px;
        height: 200px;
    }
    .container-face {
        width: 140px;
        height: 140px;
    }
    .front  { transform: translateZ(70px); }
    .back   { transform: rotateY(180deg) translateZ(70px); }
    .left   { transform: rotateY(-90deg) translateZ(70px); }
    .right  { transform: rotateY(90deg) translateZ(70px); }
    .top    { transform: rotateX(90deg) translateZ(70px); }
    .bottom { transform: rotateX(-90deg) translateZ(70px); }
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .benefit-card {
        padding: 20px;
        text-align: left;
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }
    .benefit-icon {
        font-size: 2.2rem;
        margin-bottom: 0;
    }
    .benefit-card h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    .calculator-summary {
        position: static;
        margin-top: 30px;
    }
    .total-price-box {
        font-size: 1.8rem;
    }
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-ghost, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    .filter-group select,
    .filter-group input {
        padding: 10px;
        font-size: 14px;
    }
    .thumbnail-item {
        width: 60px;
        height: 45px;
    }
    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}
/* Изображение детальной страницы проекта */
.detail-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

/* Для планшетов и мобильных – ограничиваем максимальную ширину */
@media (max-width: 768px) {
    .detail-main-image {
        max-width: 100%;
        margin: 0 auto 15px;
    }
    .project-detail-grid {
        gap: 30px;
    }
}
.inline-form-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 30px;
}
.inline-form-box h3 {
    text-align: center;
    margin-bottom: 20px;
}
.lead-form button[type="submit"] {
    width: 100%;
}
/* Форма в правой колонке (как в project_list) */
.inline-form-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 30px;
}
.inline-form-box h3 {
    text-align: center;
    margin-bottom: 20px;
}
.lead-form .form-group {
    margin-bottom: 20px;
}
.lead-form input,
.lead-form textarea,
.lead-form select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}
.lead-form button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}
/* Сетка двух колонок */
.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 768px) {
    .two-cols {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Полное описание проекта в правой колонке */
.full-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.full-description h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Форма (единый стиль с project_list) */
.inline-form-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 30px;
}
.inline-form-box h3 {
    text-align: center;
    margin-bottom: 20px;
}
.lead-form button[type="submit"] {
    width: 100%;
}

/* Фильтры и сортировка */
.filter-group {
    margin-bottom: 20px;
}
.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
}



/* Убираем дублирующий .sort-bar, если он остался */
.sort-bar {
    display: none; /* или удалите из шаблона */
}

/* Панель фильтров – горизонтальная или блочная, но не колонка */
.filters-bar {
    margin-bottom: 40px;
    background: var(--bg-soft);
    padding: 20px;
    border-radius: var(--radius-md);
}
.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}
.filter-group label {
    font-weight: 500;
    font-size: 14px;
}
.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
}
.filters-form button {
    align-self: flex-end;
    margin-bottom: 0;
}

/* Плавающая кнопка MAXX (левый нижний угол) */
.maxx-float-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.maxx-float-button:hover {
    transform: scale(1.05);
}

.maxx-float-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gold);
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: background 0.2s;
}

.maxx-float-link:hover {
    background: var(--gold-dark);
    color: #0f172a;
}

.maxx-float-icon {
    width: 32px;
    height: 32px;
    background: url('/static/icons/Max_logo.svg') center/contain no-repeat;
    display: inline-block;
}

.maxx-float-text {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Адаптация для тёмной темы */
.dark-theme .maxx-float-icon {
    background-image: url('/static/icons/Max_logo_black.svg');
}

@media (prefers-color-scheme: dark) {
    .maxx-float-icon {
        background-image: url('/static/icons/Max_logo_black.svg');
    }
}

/* На мобильных текст можно чуть уменьшить */
@media (max-width: 480px) {
    .maxx-float-text {
        font-size: 0.8rem;
    }
    .maxx-float-link {
        padding: 8px 14px;
    }
}

/* Секция карготектура */
.cargotexture-section {
    padding: 80px 0;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    position: relative;
    overflow: hidden;
}
.cargotexture-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 150%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(198,164,63,0.03), transparent);
    pointer-events: none;
}
.cargotexture-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    z-index: 2;
}
.cargotexture-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.cargotexture-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
.gold {
    color: var(--gold);
}
.cargotexture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.cargotexture-item {
    background: var(--bg-soft);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    transition: transform 0.3s;
}
.cargotexture-item:hover {
    transform: translateY(-5px);
}
.cargotexture-item i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    display: inline-block;
}
.cargotexture-item p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}
.cargotexture-quote {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 30px auto 20px;
    padding: 20px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}
.cargotexture-brand {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--gold);
    margin-top: 20px;
    text-transform: uppercase;
}
@media (max-width: 768px) {
    .cargotexture-section {
        padding: 50px 0;
    }
    .cargotexture-card {
        padding: 30px 20px;
    }
    .cargotexture-title {
        font-size: 1.6rem;
    }
    .cargotexture-grid {
        gap: 20px;
    }
    .cargotexture-quote {
        font-size: 1rem;
    }
    .cargotexture-brand {
        font-size: 1.4rem;
    }
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

/* Кастомный чекбокс с большой областью клика */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 15px 0;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-checkbox .checkmark {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    flex-shrink: 0;
}
.custom-checkbox input:checked ~ .checkmark {
    background: var(--gold);
    border-color: var(--gold-dark);
}
.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    margin: 10px 0;
}
/* Устанавливаем базовый размер шрифта для мобильных */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* базовый размер */
    }
    /* Увеличиваем мелкие элементы */
    .specs li,
    .spec-list li,
    .card-body p,
    .benefit-card p,
    .footer-list li,
    .filter-group label,
    .radio-btn span,
    .option-label span,
    .price-note,
    .summary-footer {
        font-size: 14px !important;
    }
    /* Кнопки и ссылки */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        font-size: 14px !important;
        min-height: 44px; /* увеличиваем кликабельную область */
    }
    /* Заголовки */
    h1, h2, h3, h4 {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }
}
/* Пагинация — единый стиль с кнопками */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 18px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.pagination a:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(198, 164, 63, 0.1);
    transform: translateY(-2px);
}

.pagination .current-page {
    background: var(--gold);
    color: #0f172a;
    border-color: var(--gold-dark);
    pointer-events: none;
}

@media (max-width: 768px) {
    .pagination a,
    .pagination .current-page {
        min-height: 36px;
        min-width: 36px;
        padding: 0 12px;
        font-size: 14px;
    }
}
/* Блок преимуществ (улучшенный) */
.benefit-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: var(--shadow-xl);
}

.benefit-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(198, 164, 63, 0.15), rgba(198, 164, 63, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.benefit-card:hover .benefit-icon-wrapper {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(198, 164, 63, 0.3);
}

.benefit-icon {
    font-size: 2.2rem;
    color: var(--gold);
    transition: all 0.4s ease;
}

.benefit-card:hover .benefit-icon {
    color: #fff;
    transform: scale(1.1);
}

.benefit-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Анимация появления (используется fade-up из main.js) */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Тёмная тема */
.dark-theme .benefit-card {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.dark-theme .benefit-card:hover {
    border-color: var(--gold);
}

.dark-theme .benefit-icon-wrapper {
    background: linear-gradient(135deg, rgba(198, 164, 63, 0.2), rgba(198, 164, 63, 0.05));
}

.dark-theme .benefit-card:hover .benefit-icon-wrapper {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

/* Переопределяем @font-face для Font Awesome с font-display: swap */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/webfonts/fa-brands-400.woff2') format('woff2');
}