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

:root {
    --blue:       #0288d1;
    --blue-dark:  #01579b;
    --blue-light: #e1f5fe;
    --blue-text:  #0277bd;
    --text:       #1f1f1f;
    --text-light: #666;
    --bg:         #ffffff;
    --bg-gray:    #f7f7f7;
    --border:     #e0e0e0;
    --radius:     8px;
    --radius-lg:  12px;
    --header-h:   64px;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Open Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 18px;
    line-height: 28px;
    overflow-x: hidden;
    padding-top: var(--header-h);
}
h1, h2, h3, h4 { font-family: 'Ubuntu', sans-serif; font-weight: 700; color: var(--text); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.accent { color: var(--blue); }

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--blue);
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.header__brand {
    font-family: 'Ubuntu', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.header__nav { display: flex; gap: 20px; margin-right: auto; }
.header__nav a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color .2s;
}
.header__nav a:hover { color: #fff; text-decoration: underline; }
.header__link { font-size: 16px; font-weight: 700; color: #fff; text-decoration: none; }
.header__link:hover { opacity: .8; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--white { background: #fff; color: var(--blue); width: 100%; }
.btn--white:hover { background: rgba(255,255,255,.9); }

/* ===== HERO ===== */
.hero { padding: 50px 0 60px; }
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero__badge {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue-text);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero__title { font-size: 36px; font-weight: 700; line-height: 1.25; margin-bottom: 16px; }
.hero__subtitle { font-size: 18px; color: var(--text-light); line-height: 28px; margin-bottom: 28px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__right { border-radius: var(--radius-lg); overflow: hidden; }
.hero__media-main { border-radius: var(--radius-lg); overflow: hidden; min-height: 350px; }
.hero__media-main video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section--gray { background: var(--bg-gray); }
.section__title { font-size: 30px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.section__subtitle { text-align: center; color: var(--text-light); font-size: 18px; margin-bottom: 40px; }

/* ===== CATALOG ===== */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.catalog__card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.catalog__card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.08); transform: translateY(-3px); }
.catalog__media { width: 100%; height: 200px; overflow: hidden; background: var(--bg-gray); background-size: cover; background-position: center; }
.catalog__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog__media--icon { display: flex; align-items: center; justify-content: center; font-size: 64px; background: var(--blue-light); }
.catalog__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.catalog__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.catalog__types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { background: var(--blue-light); color: var(--blue-text); padding: 3px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.catalog__desc { color: var(--text-light); font-size: 15px; line-height: 24px; margin-bottom: 8px; }
.catalog__packs { font-size: 14px; color: #999; margin-bottom: 16px; }

/* Кнопка в каталоге — на всю ширину, прижата к низу */
.catalog__body .btn { width: 100%; margin-top: auto; }

/* ===== GALLERY ===== */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; max-width: 1000px; margin: 0 auto; }
.gallery__item { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 260px; background: var(--bg-gray); }
.gallery__item--wide { grid-row: span 2; min-height: 400px; }
.gallery__item img, .gallery__item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__label { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 14px; font-weight: 600; }

/* ===== CALCULATOR ===== */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 900px; margin: 0 auto; }
.calc__field { margin-bottom: 18px; }
.calc__field label { display: block; font-size: 14px; color: var(--text-light); margin-bottom: 6px; font-weight: 600; }
.calc__field select, .calc__field input { width: 100%; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 16px; }
.calc__field select:focus, .calc__field input:focus { outline: none; border-color: var(--blue); }
.calc__results { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.calc__row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.calc__row--accent { border-bottom: 2px solid var(--blue); }
.calc__row--year { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); border-bottom: none; }
.calc__label { font-size: 15px; color: var(--text-light); }
.calc__value { font-size: 18px; font-weight: 700; }
.calc__value--accent { color: var(--blue); }
.calc__value--accent-big { font-size: 26px; color: var(--blue); }
.calc__download { margin-top: 20px; width: 100%; }

/* ===== ADVANTAGES ===== */
.advantages { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.advantage__card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: box-shadow 0.2s; }
.advantage__card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.advantage__icon { font-size: 40px; margin-bottom: 14px; }
.advantage__card h3 { font-size: 18px; margin-bottom: 6px; }
.advantage__card p { color: var(--text-light); font-size: 15px; line-height: 24px; }

/* ===== QUALITY ===== */
.quality { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.quality__item { text-align: center; padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.quality__icon { font-size: 48px; margin-bottom: 14px; }
.quality__item h3 { font-size: 18px; margin-bottom: 6px; }
.quality__item p { color: var(--text-light); font-size: 15px; line-height: 24px; }

/* ===== CONDITIONS ===== */
.conditions { max-width: 700px; margin: 0 auto; }
.conditions__row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.conditions__label { font-size: 16px; color: var(--text-light); }
.conditions__value { font-size: 16px; font-weight: 700; }

/* ===== TURNKEY ===== */
.turnkey {
    max-width: 900px;
    margin: 0 auto;
}
.turnkey__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
.turnkey__item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.turnkey__icon {
    font-size: 36px;
    flex-shrink: 0;
}
.turnkey__item h3 {
    font-size: 17px;
    margin-bottom: 4px;
}
.turnkey__item p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 24px;
}
.turnkey__cta {
    text-align: center;
    background: var(--blue-light);
    border: 1px solid var(--blue);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.turnkey__cta h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.turnkey__cta p {
    color: var(--text-light);
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .turnkey__list { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
.footer { padding: 50px 0 25px; background: var(--blue); color: #fff; }
.footer__title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 8px; color: #fff; }
.footer__subtitle { text-align: center; color: rgba(255,255,255,.8); margin-bottom: 24px; }
.footer__form { max-width: 500px; margin: 0 auto 28px; display: flex; flex-direction: column; gap: 12px; }
.form__row { display: flex; gap: 12px; }
.footer__form input, .footer__form textarea { flex: 1; padding: 12px 16px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius); color: #fff; font-family: inherit; font-size: 16px; resize: none; }
.footer__form input::placeholder, .footer__form textarea::placeholder { color: rgba(255,255,255,.6); }
.footer__form input:focus, .footer__form textarea:focus { outline: none; border-color: #fff; }
.footer__contacts { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer__contact { color: rgba(255,255,255,.9); text-decoration: none; font-size: 16px; }
.footer__contact:hover { color: #fff; }
.footer__copy { text-align: center; color: rgba(255,255,255,.5); font-size: 14px; }

/* ===== MODALS ===== */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; }
.modal__content { background: #fff; border-radius: var(--radius-lg); padding: 36px; max-width: 440px; width: 100%; position: relative; }
.modal__content--small { text-align: center; }
.modal__close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: #999; font-size: 22px; cursor: pointer; }
.modal__close:hover { color: var(--text); }
.modal__content h3 { font-size: 22px; margin-bottom: 8px; }
.modal__content p { color: var(--text-light); margin-bottom: 20px; }
.modal__product { color: var(--blue) !important; font-weight: 700; }
.modal__content form { display: flex; flex-direction: column; gap: 12px; }
.modal__content input { padding: 12px 16px; background: var(--bg-gray); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 16px; }
.modal__content input:focus { outline: none; border-color: var(--blue); }
.modal__content button { width: 100%; }
.modal__check { font-size: 56px; margin-bottom: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero__right { display: none; }
}
@media (max-width: 768px) {
    .calc { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    body { font-size: 16px; line-height: 26px; }
    .hero__title { font-size: 26px; }
    .section__title { font-size: 22px; }
    .hero__cta { flex-direction: column; }
    .hero__cta .btn { width: 100%; }
    .form__row { flex-direction: column; }
    .gallery { grid-template-columns: 1fr; }
    .gallery__item--wide { grid-row: auto; min-height: 260px; }
    .header__nav { display: none; }
    .header__brand { margin-right: auto; }
}
