/* ====== ПЕРЕМЕННЫЕ ====== */
:root {
    --primary-color: #0f172a; /* Темно-синий/графитовый */
    --accent-color: #2563eb;  /* Яркий синий для акцентов */
    --accent-hover: #1d4ed8;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
}

/* ====== СБРОС ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ====== ОСНОВНЫЕ КЛАССЫ ====== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section--alt {
    background-color: var(--bg-alt);
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.section__subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ====== SPA ЛОГИКА (Страницы) ====== */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== ШАПКА ====== */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo__icon {
    font-size: 1.5rem;
}

.logo__text {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.logo__subtext {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.nav__list {
    display: flex;
    gap: 30px;
}

.nav__link {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav__link:hover, .nav__link.active {
    color: var(--accent-color);
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

/* Бургер меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* ====== КНОПКИ ====== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--accent-color);
    color: white;
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn--secondary {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn--secondary:hover {
    background-color: var(--accent-color);
    color: white;
}

.btn--lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn--block {
    width: 100%;
    margin-bottom: 10px;
}

/* ====== HERO (Главная) ====== */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    /* 
       Альтернативный фон (раскомментируй и замени url):
       background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('images/domofon-bg.jpg');
       background-size: cover;
       background-position: center;
    */
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #cbd5e1;
}

.hero__actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====== СЕТКА ====== */
.grid {
    display: grid;
    gap: 30px;
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ====== КАРТОЧКИ УСЛУГ ====== */
.card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card__icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ====== ПРЕИМУЩЕСТВА ====== */
.feature {
    text-align: center;
    padding: 20px;
}

.feature h4 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature p {
    color: var(--text-muted);
}

/* ====== БЛОКИ УСЛУГ (Страница Услуги) ====== */
.service-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.service-block:last-child {
    border-bottom: none;
}

.service-block h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-block p {
    margin-bottom: 10px;
}

/* ====== ТАРИФЫ ====== */
.price-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.price-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.price-card--featured {
    border-color: var(--accent-color);
    border-width: 2px;
}

.price-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-card__title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.price-card__cost {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 30px;
}

.price-card__list {
    text-align: left;
    margin-bottom: 30px;
}

.price-card__list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.price-card__list li:last-child {
    border-bottom: none;
}

/* ====== CTA БЛОК ====== */
.cta-block {
    margin-top: 60px;
    background-color: var(--primary-color);
    color: white;
    padding: 50px;
    border-radius: var(--radius);
    text-align: center;
}

.cta-block h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-block p {
    margin-bottom: 30px;
    color: #cbd5e1;
}

/* ====== КОНТАКТЫ ====== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contacts-info h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contacts-info__item {
    margin-bottom: 10px;
}

.contacts-block {
    margin-top: 30px;
}

.contacts-block h4 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.contact-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent-hover);
}

.contacts-cta {
    background: var(--bg-alt);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contacts-cta h3 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

.text-muted {
    color: var(--text-muted);
}

/* ====== ОФЕРТА ====== */
.offer-container {
    max-width: 800px;
}

.offer-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.offer-content p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.offer-download {
    margin-top: 50px;
    text-align: center;
    padding: 40px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 2px dashed var(--border-color);
}

/* ====== ПОДВАЛ ====== */
.footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 60px 0 20px;
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer__info p {
    margin-bottom: 5px;
}

.footer__nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer__nav a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer__nav a:hover {
    color: white;
}

.footer__copyright {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ====== АДАПТИВНОСТЬ ====== */
@media (max-width: 992px) {
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero__title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border-color);
    }

    .nav.active {
        display: block;
    }

    .nav__list {
        flex-direction: column;
        gap: 0;
    }

    .nav__link {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav__link.active::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .grid--3, .contacts-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }

    .section__title {
        font-size: 2rem;
    }
    
    .hero {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .grid--4 {
        grid-template-columns: 1fr;
    }
    .hero__title {
        font-size: 2rem;
    }
    .hero__actions {
        flex-direction: column;
    }
    .hero__actions .btn {
        width: 100%;
    }
    .logo__text {
        font-size: 1rem;
    }
}