:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --accent: #FF6F00;
    --accent-light: #FF8F00;
    --bg: #F5F7F5;       /* Светло-серый фон */
    --white: #FFFFFF;    /* Белый фон */
    --text: #333333;
    --text-light: #757575;
    --border: #E0E0E0;
    --success: #4CAF50;
    --error: #D32F2F;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --container: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER ==================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo__img {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.logo__subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

.nav {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav__link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--primary);
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.phone {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

/* Кнопка звонка (мобильная) */
.phone-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6F00 0%, #FF8F00 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.phone-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

.phone-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 111, 0, 0.6);
}

.phone-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.burger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--white);
}

.btn--secondary:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn--full {
    width: 100%;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    padding: 100px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: url('images/hero-bg.png') center/cover;
    z-index: -2;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero__title span {
    color: #FFD54F;
}

.hero__subtitle {
    font-size: 1.3rem;
    margin-bottom: 32px;
    opacity: 0.95;
    line-height: 1.6;
}

.hero__features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.hero__feature .icon {
    width: 28px;
    height: 28px;
    background: #FFD54F;
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.product-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.product-image__main {
    width: 100%;
    height: auto;
    display: block;
}

.product-image__badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    padding: 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.product-image__badge span:first-child {
    color: var(--primary);
}

/* ==================== SECTIONS GENERAL ==================== */
.section {
    padding: 80px 0;
}

.section__title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text);
}

.section__subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 48px;
}

/* ==================== MATERIALS (БЕЛЫЙ ФОН) ==================== */
.materials {
    background: var(--white);
}

.materials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.material-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    transition: transform 0.3s;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.material-card--best {
    border-color: var(--primary);
    border-width: 3px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.material-card--worst {
    opacity: 0.9;
}

.material-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.material-card__badge--bad {
    background: var(--error);
}

.material-card__header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.material-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.material-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.material-price {
    color: var(--text-light);
    font-size: 0.95rem;
}

.material-list {
    list-style: none;
    margin-bottom: 24px;
}

.material-list__item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.material-list__item:last-child {
    border-bottom: none;
}

.material-list__item.good, .check { color: var(--success); }
.material-list__item.bad, .cross { color: var(--error); }
.material-list__item.neutral, .circle { color: #FF9800; }

.check, .cross, .circle {
    font-weight: 700;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.material-card__conclusion {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    border-left: 4px solid var(--primary);
    text-align: center;
    margin-top: 20px;
}

.material-card__conclusion--bad {
    border-left-color: var(--error);
}

/* ==================== VIDEO SECTION (СЕРЫЙ ФОН) ==================== */
.video-section {
    background: var(--bg);
}

.video-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    aspect-ratio: 16/9;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    background-image: url('images/video-preview.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s;
    pointer-events: none;
}

.video-placeholder:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.video-placeholder__content {
    position: relative;
    z-index: 3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    margin-bottom: 16px;
    z-index: 3;
}

.play-btn:hover {
    transform: scale(1.08);
}

.video-placeholder p {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.video-placeholder span {
    font-size: 0.9rem;
    color: #e0e0e0;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
    position: relative;
    z-index: 1;
}

.video-player::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.6);
}

.video-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-feature {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
}

.video-feature:hover {
    transform: translateX(5px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #212121;
    font-weight: 700;
}

.feature-content p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* ==================== GALLERY / MODEL SHOWCASE (БЕЛЫЙ ФОН) ==================== */
.model-showcase {
    background: var(--white);
}

.model-showcase__wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.model-gallery {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.gallery-main {
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
}

.gallery-main__img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s;
}

@media (min-width: 969px) {
    .gallery-main {
        max-height: 500px;
    }
    .gallery-main__img {
        max-height: 500px;
        object-fit: contain;
    }
}

.zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 10;
    color: #333;
}

.zoom-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumb {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
}

.thumb:hover, .thumb.active {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: contain;
}

.thumb span {
    display: block;
    padding: 6px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    transition: transform 0.3s;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav-bottom {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.lightbox-nav-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.model-specs {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.model-specs h3 {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--white);
    border-radius: var(--radius);
}

.spec-label {
    color: var(--text-light);
}

.spec-value {
    font-weight: 600;
}

.model-features-list h4 {
    margin-bottom: 16px;
}

.model-features-list ul {
    list-style: none;
}

.model-features-list li {
    padding: 8px 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== MODELS (СЕРЫЙ ФОН) ==================== */
.models {
    background: var(--bg);
}

.models__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.model-card {
    background: var(--bg); /* Карточка на сером фоне может иметь белый фон или оставаться серой с рамкой */
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--white); /* При наведении становится белой */
}

.model-card--popular {
    border-color: var(--primary);
    border-width: 3px;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.model-card__icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.model-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.model-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.model-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.model-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.model-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.model-features li:last-child {
    border-bottom: none;
}

/* ==================== CALCULATOR (БЕЛЫЙ ФОН) ==================== */
.calculator {
    background: var(--white);
}

.calculator__wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.calculator__form, .calculator__result {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border); /* Добавил рамку, чтобы выделялось на белом фоне секции */
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio, .checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.radio:hover, .checkbox:hover {
    border-color: var(--primary);
}

.radio input, .checkbox input {
    display: none;
}

.radio input:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.checkbox {
    position: relative;
    padding-left: 48px;
}

.checkmark {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-text {
    display: flex;
    flex-direction: column;
}

.checkbox-text small {
    font-size: 0.85rem;
    color: var(--text-light);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
}

.result-block {
    margin-bottom: 24px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.result-row.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid var(--primary);
    margin-top: 10px;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.result-row .price {
    font-size: 1.8rem;
    color: var(--primary);
}

.result-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 16px;
    line-height: 1.8;
}

/* ==================== CONTACTS (СЕРЫЙ ФОН) ==================== */
.contacts {
    background: var(--bg);
}

.contacts__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contacts__info h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contacts__info > p {
    color: var(--text-light);
    margin-bottom: 32px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

.messengers {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.messenger-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.3);
}

.messenger-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.messenger-btn svg {
    width: 28px;
    height: 28px;
    display: block;
}

.messenger-telegram { background: #ffffff; }
.messenger-telegram:hover { background: #0099e6; }

.messenger-viber { background: #ffffff; }
.messenger-viber:hover { background: #8574f5; }

.messenger-whatsapp { background: #ffffff; }
.messenger-whatsapp:hover { background: #128C7E; }

.contact-form {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.privacy-checkbox input {
    margin-top: 3px;
    width: auto;
}

.privacy-checkbox a {
    color: var(--primary);
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 16px;
}

/* ==================== FOOTER ==================== */
.footer {
    position: relative;
    color: white;
    padding: 60px 0 24px;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)), url('images/footer-bg.png') center/cover;
}

.footer__bg { display: none; }

.footer__content, .footer__bottom {
    position: relative;
    z-index: 2;
}

.footer__content {
    text-align: center;
    margin-bottom: 24px;
}

.footer__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer__content > p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.footer__contacts {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer__contacts a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer__contacts a:hover { opacity: 1; }

.footer__bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==================== MODALS & NOTIFICATIONS ==================== */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.modal-close:hover {
    background: var(--border);
    transform: rotate(90deg);
}

.modal-content h3 { margin-bottom: 16px; color: var(--text); font-size: 1.5rem; }
.modal-content p { color: var(--text-light); margin-bottom: 24px; line-height: 1.6; }
.modal-content form { display: flex; flex-direction: column; gap: 16px; }

.modal-content input[type="text"], .modal-content input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.modal-content input:focus { outline: none; border-color: var(--primary); }
.modal-content .btn { margin-top: 8px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }

.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    text-align: center;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    animation: notificationSlide 0.3s forwards;
}

@keyframes notificationSlide { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.notification__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.notification__icon--success { background: #E8F5E9; color: #4CAF50; }
.notification__icon--error { background: #FFEBEE; color: #F44336; }

.notification__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.notification__text { color: var(--text-light); margin-bottom: 24px; line-height: 1.6; }

.notification__btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.notification__btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    animation: fadeIn 0.3s;
}

/* ==================== TELEGRAM CHAT WIDGET ==================== */
#tg-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

#tg-chat-toggle {
    position: relative;
    width: auto;
    height: auto;
    padding: 12px 20px 12px 15px;
    border-radius: 30px;
    background: #0088cc;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 2;
}

#tg-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.6);
}

#tg-chat-toggle svg { width: 24px; height: 24px; flex-shrink: 0; }

.chat-label {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.chat-pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    background: #0088cc;
    z-index: -1;
    animation: chatPulse 2s infinite;
    opacity: 0.7;
}

@keyframes chatPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
}

.tg-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.tg-chat-window.active { display: flex; }

.tg-chat-header {
    background: #0088cc;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#tg-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.tg-chat-body {
    flex: 1;
    padding: 15px;
    background: #f5f5f5;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
}

.tg-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tg-message.bot {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #333;
}

.tg-message.user {
    background: #0088cc;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.tg-chat-form {
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tg-chat-form input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

.tg-chat-form input:focus { border-color: #0088cc; }

.tg-chat-form button {
    background: #0088cc;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.tg-chat-form button:hover { background: #0077b5; }

.tg-chat-privacy {
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    line-height: 1.3;
    margin-top: 5px;
}

.tg-chat-privacy a {
    color: #0088cc;
    text-decoration: none;
    border-bottom: 1px dotted #0088cc;
}

.tg-chat-privacy a:hover {
    color: #006699;
    border-bottom-color: #006699;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border);
    }
    .nav.active { display: flex; }
    .burger { display: block; }

    .hero__container, .materials__grid, .video-wrapper, 
    .model-showcase__wrapper, .calculator__wrapper, 
    .models__grid, .contacts__wrapper {
        grid-template-columns: 1fr;
    }
    .hero__container { gap: 40px; }
    .hero__title { font-size: 2.2rem; }
    .materials__grid, .models__grid { gap: 16px; }
    .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .video-wrapper { grid-template-columns: 1fr; gap: 30px; }
    .video-features { flex-direction: column; }
    .video-feature { padding: 16px; }
    .lightbox-close { top: 10px; right: 10px; font-size: 2rem; }
    .lightbox-img { max-height: 70vh; }
    .lightbox-nav-btn { padding: 10px 20px; font-size: 0.9rem; }
}

@media (max-width: 640px) {
    .header__container { padding: 10px 16px; }
    .logo__img { height: 35px; }
    .logo__title { font-size: 1rem; }
    .logo__subtitle { font-size: 0.65rem; }
    .phone { display: none; }
    .phone-btn { display: flex; }
    .burger { display: block; font-size: 1.5rem; }
    .hero__buttons { flex-direction: column; }
    .messengers { justify-content: center; gap: 12px; }
    .messenger-btn { width: 50px; height: 50px; }
    .messenger-btn svg { width: 24px; height: 24px; }
    .hero__title { font-size: 1.8rem; }
    .hero__subtitle { font-size: 1.1rem; }
    .section__title { font-size: 1.8rem; }
    .gallery-thumbs { grid-template-columns: repeat(2, 1fr); }
    .footer__contacts { flex-direction: column; gap: 12px; }
    .modal-content { padding: 24px; }
}

@media (max-width: 480px) {
    /* Кнопка чата */
    #tg-chat-toggle {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        right: 15px;
    }
    
    .chat-label { display: none; }
    #tg-chat-toggle svg { width: 30px; height: 30px; }
    .chat-pulse-ring { border-radius: 50%; }
    
    /* --- ОКНО ЧАТА ДЛЯ МОБИЛЬНЫХ --- */
    .tg-chat-window {
        position: fixed;
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
        width: 92%; /* Чуть шире */
        max-width: 360px;
        height: 75vh; /* Увеличили высоту до 75% экрана */
        max-height: 550px; /* И максимум 550px */
        border-radius: 16px;
        z-index: 10000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Тень для объема */
    }

    .tg-chat-header {
        padding: 15px;
        border-radius: 16px 16px 0 0;
    }
    
    #tg-chat-close {
        font-size: 1.8rem;
        line-height: 1;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
    }
    
    /* Тело чата с правильными отступами */
    .tg-chat-body {
/* Тело чата с правильными отступами */
.tg-chat-body {
    padding: 25px 15px 15px;
    gap: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
    }
    
    /* Сообщения */
    .tg-message {
        padding: 12px 16px;
        font-size: 0.95rem; /* Чуть крупнее шрифт */
        line-height: 1.5;
    }
    
    .tg-message.bot {
        margin-bottom: 5px;
        margin-top: 10px;
    }
    
    /* Форма ввода */
    .tg-chat-form {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .tg-chat-form input {
        padding: 12px;
        font-size: 16px;
    }
    
    .tg-chat-form button {
        padding: 14px;
        font-size: 1rem;
    }
}