/* --- Базовые переменные и сброс стилей --- */
:root {
	--bg-color: #e7e8e9;
	--bg-card: #ffffff;
	--panel-bg: #ffffff;
	--footer-bg: f8f9fa;
	--text-color: #212529;
	--text-muted: #6c757d;
	--text-footer: #333333;
	--primary-color: #007bff;
	--primary-hover: #0056b3;
	--border-color: #dee2e6;
	--transition: all 0.3s ease;
	--modal-bg: #ffffff;
	--input-bg: #ffffff;
	--input-border: #cccccc;
	--login-bg: #ededed;
	--btn-bg: #007bff;
	--btn-text: #ffffff;
	--overlay-bg: rgba(0, 0, 0, 0.5);
	--btn-bg-red: red;
	--btn-txt-red: white;
	--alert-error-bg: #ffebeb;
	--alert-error-text: #d9534f;
	--alert-success-bg: #e6f4ea;
	--alert-success-text: #257942;
	--card-bg: #f8f9fa;
	--card-border: #e2e8f0;
	--accent-color: #0066cc;
	--accent-hover: #1d4ed8;
	--link-color: #111111;
	--btn-hover: #ededed;
}

[data-theme="dark"] {
	--bg-color: #121212;
	--bg-card: #1e1e1e;
	--text-footer: #dadada;
	--panel-bg: #1e1e1e;
	--footer-bg: #1e1e1e;
	--login-bg: #1e1e1e;
	--text-color: #f8f9fa;
	--text-muted: #a0a0a0;
	--primary-color: #375a7f;
	--primary-hover: #2b4764;
	--border-color: #333333;
	--modal-bg: #2d2d2d;
	--input-bg: #3d3d3d;
	--input-border: #555555;
	--btn-bg: #3b82f6;
	--btn-text: #ffffff;
	--overlay-bg: rgba(0, 0, 0, 0.7);
	--btn-bg-red: red;
	--btn-txt-red: white;
	--alert-error-bg: #2c1616;
	--alert-error-text: #ff6b6b;
	--alert-success-bg: #14251a;
	--alert-success-text: #51b876;
	--card-bg: #1e1e1e;
	--card-border: #2d3748;
	--accent-color: #3b82f6;
	--link-color: #51b876;
	--btn-hover: #2e2e2e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	transition: var(--transition);
}

a {
	color: var(--link-color);
	text-decoration: none;
}

.Actual {
	width: 100%;
	text-align: center;
	padding: 10px;
	font-weight: bold;
	color: lime;
}

.mainlogo {
	height: 40px;
}

.reg-container {
	display: flex; 
	justify-content: center; 
	align-items: center;
}

.logo-window {
	width: 100%;
	text-align: center;
	padding: 10px 0;
}

.btn-red {
	background-color: var(--btn-bg-red);
	color: var(--btn-txt-red);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.hcontainer {
	width: 100%;
	margin: 0 auto;
	padding: 0 20px;
}


/* --- Шапка сайта и меню --- */
.site-header {
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

/* Десктопная навигация */
.nav-list {
    display: flex;
    list-style: none;
}

.nav-list > li {
    position: relative;
}

.nav-list a {
    display: block;
    padding: 23px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-list a:hover, .nav-list a.active {
    color: var(--primary-color);
}

/* Выпадающее подменю */
.submenu {
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--panel-bg);
	border: 1px solid var(--border-color);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	min-width: 300px;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: var(--transition);
}

.submenu a {
    padding: 12px 20px;
    font-size: 14px;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Кнопка смены темы --- */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

.theme-toggle .moon-icon { display: block; width: 20px; }
.theme-toggle .sun-icon { display: none; width: 20px; }

[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }

/* Кнопка мобильного меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* --- Главный баннер (Hero) --- */
.hero {
    background: linear-gradient(135deg, #0056b3, #002d5f);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero-container {
    max-width: 800px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background-color: #ffffff;
    color: #0056b3;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: var(--transition);
}

.btn:hover {
	background-color: var(--btn-hover);
	transform: translateY(-2px);
}

/* Стили модального окна */
.modal {
	display: none; 
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: var(--overlay-bg);
	justify-content: center;
	align-items: center;
}

.modal-content {
	background-color: var(--modal-bg);
	padding: 30px;
	border-radius: 8px;
	width: 100%;
	max-width: 400px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
	position: relative;
	box-sizing: border-box;
}

.close-btn {
	position: absolute;
	right: 20px;
	top: 15px;
	font-size: 28px;
	cursor: pointer;
	color: var(--text-color);
}

/* Элементы формы */
.input-group {
	margin-bottom: 15px;
}

.input-group label {
	display: block;
	margin-bottom: 5px;
}

.input-group input {
	width: 100%;
	padding: 10px;
	background-color: var(--input-bg);
	color: var(--text-color);
	border: 1px solid var(--input-border);
	border-radius: 4px;
	box-sizing: border-box;
}

.btn-submit {
	width: 100%;
	padding: 14px;
	background-color: var(--primary-color);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	margin-top: 10px;
}

.error-msg {
	color: #ff4d4d;
	margin-top: 10px;
	font-size: 14px;
	min-height: 20px;
}

/* --- Сетки и карточки (Преимущества и Новости) --- */
.advantages, .news {
    padding: 60px 0;
}

.news {
    background-color: var(--panel-bg);
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
	background-color: var(--panel-bg);
	border: 1px solid var(--border-color);
	padding: 30px;
	border-radius: 8px;
	transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.advantages .card {
    background-color: var(--panel-bg);
}

/* Стили карточек преимуществ */
.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.card p {
    color: var(--text-muted);
}

/* Стили карточек новостей */
.card-news {
    background-color: var(--bg-color);
}

.news-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}


.form-container {
	background-color: var(--bg-card);
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 420px;
}

h2 {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
}

/* Группы полей ввода */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-main);
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.alert {
	padding: 12px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 14px;
	text-align: center;
}

.alert.error {
	background-color: var(--alert-error-bg);
	color: var(--alert-error-text);
}

.alert.success {
	background-color: var(--alert-success-bg);
	color: var(--alert-success-text);
}

/* Дизайн справочников */
.data-container {
	height: 100vh;
	width: 100%;
	background: var(--bg-card);
	padding: 10px;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	padding: 20px;
}

.category-card {
	background-color: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 8px;
	padding: 16px;
	text-align: center;
	transition: transform 0.2s, background-color 0.3s;
}

.category-card:hover {
	transform: translateY(-4px);
	border-color: var(--accent-color);
}

.category-card a {
	color: var(--text-color);
	text-decoration: none;
	font-weight: bold;
}


/*======== Основные стили футера ========*/
.site-footer {
	background-color: var(--footer-bg);
	border-top: 1px solid var(--border-color);
	text-align: center;
	color: var(--text-footer);
	font-size: 14px;
	padding: 60px 0 20px 0;
	font-family: sans-serif;
}

/* Сетка для трех столбцов */
.footer-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	gap: 40px;
}

/* Общие стили для колонок */
.footer-column {
	flex: 1;
}

.footer-column h3 {
	font-size: 18px;
	margin-bottom: 20px;
	position: relative;
	font-weight: 600;
}

/* Левая колонка (Логотип) */
.footer-logo img {
	display: block;
	margin-bottom: 15px;
	width: 80%;
	margin: 0 auto;
}

.footer-tagline {
	font-size: 14px;
	color: var(--text-footer);
	line-height: 1.6;
}

/* Списки для ссылок и контактов */
.footer-links, .footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li, .footer-contacts li {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-footer);
}

/* Стили ссылок */
.footer-links a, .footer-contacts a {
    color: var(--text-footer);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover, .footer-contacts a:hover {
    color: #ffffff;
}

/* Нижняя панель с копирайтом */
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 20px 20px 0 20px;
    border-top: 1px solid #333333;
    text-align: center;
    font-size: 13px;
    color: #666666;
}

.modal-global {
	position: fixed;
	display: none;
	top: 0;
	left: 0;
	height: 100vh;
	width: 100%;
	z-index: 9999;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(15px);
	justify-content: center;
	align-items: center;
}

.modal-global-window {
	background: var(--bg-card);
	color: var(--text-color);
	padding: 15px;
	text-align: left;	
	border: 2px solid var(--border-color);
	max-width: 600px;
	width: 90%;
}

.modal-global-nav {
	width: 100%;
	text-align: center;
}

.btn-login {
	background: var(--bg-login);
	padding: 5px 10px;
	color: var(--texr-color);
}

.shopcard {
	position: relative;
}

.shopcount {
	position: absolute;
	bottom: 0;
	right: -5px;
	background: red;
	color: #fff;
	font-size: 11px;
	display: flex;
	font-weight: bold;
	justify-content: center;
	align-items: center; 
	padding: 2px 4px;

}

/* --- Мобильная адаптивность (Менее 992px) --- */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    /* Превращаем навигацию в мобильное выезжающее меню */
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--panel-bg);
        border-top: 1px solid var(--border-color);
        transition: left 0.4s ease;
        overflow-y: auto;
    }

    .main-nav.open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 20px;
    }

    .nav-list a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    /* Мобильное выпадающее подменю */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        display: none;
        padding-left: 20px;
        background-color: transparent;
        transform: none;
    }

    .has-submenu.submenu-open .submenu {
        display: block;
    }

    /* Анимация иконки бургер-меню */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Адаптивность сеток */
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero h1 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
	.footer-container {
		flex-direction: column;
		gap: 30px;
		text-align: center;
	}
    
	.footer-logo img {
		margin: 0 auto 15px auto;
	}
}

