/* Общие сбросы и переменные */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Светлая тема (переменные) */
body.light-mode {
    --bg-dark: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent: #e3a15e;
    --accent-dark: #c68a4a;
    --border-color: #dee2e6;
    --border-accent: rgba(227, 161, 94, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Тёмная тема (переменные) */
body.dark-mode {
    --bg-dark: #0f1215;
    --bg-card: #1a1e24;
    --bg-card-hover: #252b33;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c5;
    --text-muted: #8f9aa7;
    --accent: #e3a15e;
    --accent-dark: #c68a4a;
    --border-color: #2c353e;
    --border-accent: rgba(227, 161, 94, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Типографика */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    letter-spacing: -0.02em;
}
h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}
h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* Акцентный цвет */
.accent-text {
    color: var(--accent);
}

/* Кнопки */
.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(227, 161, 94, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:hover {
    background: #f5b87b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(227, 161, 94, 0.4);
    color: var(--bg-dark);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: translateY(-3px);
}
.btn-large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

/* Хедер */
header {
    background: rgba(var(--bg-dark-rgb), 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-accent);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}
/* Для поддержки rgba из переменной нужно задать rgb значения, но для простоты оставим так */
header {
    background-color: rgba(15, 18, 21, 0.85);
}
body.light-mode header {
    background-color: rgba(248, 249, 250, 0.85);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    height: 48px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}
.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.logo-text span {
    color: var(--accent);
}
.nav-links {
    display: flex;
    gap: 40px;
    font-weight: 500;
}
.nav-links a:hover {
    color: var(--accent);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}
.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent);
    margin: 5px 0;
    transition: 0.3s;
}
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.2rem;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.theme-toggle:hover {
    background: var(--bg-card-hover);
}
.theme-toggle .fa-sun {
    display: none;
}
.theme-toggle .fa-moon {
    display: block;
}
body.light-mode .theme-toggle .fa-sun {
    display: block;
}
body.light-mode .theme-toggle .fa-moon {
    display: none;
}

/* Карусель */
.carousel-section {
    margin-top: 0;
    width: 100%;
    overflow: hidden;
}
.hero-carousel {
    width: 100%;
    height: 500px;
}
.hero-carousel .swiper-slide {
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-carousel .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}
.slide-content {
    position: relative;
    color: white;
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}
.slide-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}
.slide-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}
.hero-carousel .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}
.hero-carousel .swiper-pagination-bullet-active {
    background: var(--accent);
    opacity: 1;
}
.hero-carousel .swiper-button-prev,
.hero-carousel .swiper-button-next {
    color: white;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background 0.3s;
}
.hero-carousel .swiper-button-prev:hover,
.hero-carousel .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.6);
}
.hero-carousel .swiper-button-prev:after,
.hero-carousel .swiper-button-next:after {
    font-size: 1.5rem;
}

/* Hero секция */
.hero {
    padding: 80px 0 100px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero p {
    font-size: 1.2rem;
    margin: 20px 0 30px;
    max-width: 90%;
}
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.hero-decor {
    background: var(--bg-card);
    border-radius: 60px;
    padding: 40px;
    border: 1px solid var(--border-accent);
    text-align: center;
}
.hero-decor i {
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 20px;
}
.hero-decor p {
    margin-bottom: 0;
}

/* Преимущества */
.features {
    padding: 80px 0;
    background: var(--bg-card);
    border-radius: 60px 60px 0 0;
    transition: background 0.3s ease;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--bg-card-hover);
    padding: 32px 24px;
    border-radius: 32px;
    transition: 0.2s;
    border: 1px solid var(--border-accent);
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}
.feature-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}
.feature-card h3 {
    margin-bottom: 12px;
}

/* Продукция */
.products {
    padding: 100px 0;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.product-card {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}
.product-card:hover {
    border-color: var(--accent);
}
.product-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    display: block;
}
.product-list {
    list-style: none;
    margin: 20px 0 25px;
}
.product-list li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-secondary);
}
.product-list li:last-child {
    border: none;
}
.article-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 20px;
}
.article-link i {
    transition: transform 0.2s;
}
.article-link:hover i {
    transform: translateX(5px);
}

/* Полезные статьи */
.articles {
    padding: 80px 0;
    background: var(--bg-card);
    border-radius: 60px 60px 0 0;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.article-card {
    background: var(--bg-card-hover);
    border-radius: 32px;
    padding: 32px;
}
.article-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.article-tag {
    display: inline-block;
    background: rgba(227, 161, 94, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* CTA секция */
.cta-block {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(145deg, #1e2a2f 0%, var(--bg-dark) 100%);
    transition: background 0.3s ease;
}
body.light-mode .cta-block {
    background: linear-gradient(145deg, #e9ecef 0%, #f8f9fa 100%);
}
.cta-block h2 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.cta-text {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}
.cta-contacts {
    margin-top: 20px;
    font-size: 1.1rem;
}
.cta-messengers {
    font-size: 0.9rem;
}
.cta-messengers i {
    font-size: 1.5rem;
    margin: 0 5px;
    vertical-align: middle;
}
.cta-messengers .fa-whatsapp { color: #25D366; }
.cta-messengers .fa-telegram { color: #24A1DE; }

/* Контакты */
.contacts {
    padding: 60px 0;
}
.contacts-card {
    background: var(--bg-card);
    border-radius: 40px;
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}
.contacts-info {
    flex: 1;
    min-width: 250px;
}
.contacts-map {
    flex: 1;
    min-width: 250px;
    height: 250px; /* фиксируем высоту */
}
}
.map-placeholder {
    background: var(--bg-card-hover);
    height: 200px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Футер */
footer {
    padding: 50px 0 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-logo span {
    color: var(--accent);
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin: 8px 0;
}
.footer-col a:hover {
    color: var(--accent);
}
.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
.social-links a {
    background: var(--bg-card-hover);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.social-links a:hover {
    background: var(--accent);
    color: var(--bg-dark);
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--bg-card-hover);
}

/* Модальное окно с улучшенной анимацией */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: var(--bg-card);
    margin: auto;
    padding: 40px;
    border-radius: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid var(--border-accent);
    transform: scale(0.9) translateY(-30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
}
.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.modal-close {
    position: absolute;
    right: 25px;
    top: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--accent);
}
.modal-content h3 {
    margin-bottom: 10px;
}
.modal-content p {
    margin-bottom: 25px;
}
#callbackForm input,
#callbackForm textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: border 0.2s, background 0.3s ease;
}
#callbackForm input:focus,
#callbackForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}
#callbackForm textarea {
    min-height: 100px;
    resize: vertical;
}
#callbackForm button {
    width: 100%;
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-stats {
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        padding: 30px;
        border-bottom: 1px solid var(--border-color);
        backdrop-filter: blur(12px);
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .header-actions .btn-outline {
        display: none;
    }
    .hero-carousel {
        height: 300px;
    }
    .slide-content h2 {
        font-size: 2rem;
    }
}
@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .contacts-card {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 600px) {
    .logo-img {
        height: 36px;
    }
    .logo-text {
        font-size: 1.4rem;
    }
}
/* Плавающий виджет заказа звонка */
.callback-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}
.callback-widget-button {
    background: var(--accent);
    border: none;
    border-radius: 60px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--bg-dark);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(227, 161, 94, 0.4);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.callback-widget-button i {
    font-size: 1.2rem;
}
.callback-widget-button:hover {
    background: #f5b87b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(227, 161, 94, 0.5);
}
@media (max-width: 600px) {
    .callback-widget {
        bottom: 20px;
        right: 20px;
    }
    .callback-widget-button {
        padding: 14px;
        border-radius: 50%;
    }
    .callback-widget-button span {
        display: none;
    }
    .callback-widget-button i {
        font-size: 1.5rem;
        margin: 0;
    }
}
/* Чекбокс согласия с политикой */
.policy-checkbox {
    margin: 25px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.policy-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
}

.policy-checkbox label {
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    flex: 1;
}

.policy-link {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.2s;
    font-weight: 500;
}

.policy-link:hover {
    color: #f5b87b;
}

/* Модальное окно политики */
.policy-modal-content {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.policy-text {
    overflow-y: auto;
    padding: 20px;
    margin: 20px 0;
    background: var(--bg-dark);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-height: 400px;
}

.policy-text p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.policy-close-btn {
    width: 100%;
    margin-top: 10px;
}

/* Подсветка ошибки для чекбокса */
.policy-checkbox.error {
    padding: 8px;
    border: 2px solid red;
    border-radius: 12px;
    background-color: rgba(255, 0, 0, 0.05);
}
@media (max-width: 480px) {
    .policy-checkbox {
        gap: 12px;
        font-size: 0.9rem;
    }
    .policy-checkbox input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
}