/* ============================================ */
/* БЛОК: ОСТАЛЬНЫЕ СТИЛИ                        */
/* (основной контент, аутентификация, ошибки,  */
/*  главная страница и др.)                    */
/* ============================================ */

/* ----- Основные стили ----- */

/* ===== Основной контент под шапкой ===== */
.main {
	padding-top: 80px;
}

.hero {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.hero__title {
	font-family: var(--font-main);
	font-weight: 800;
	color: var(--text);
	/* ExtraBold */
	font-style: italic;
	line-height: 1.3;
	font-size: clamp(22px, 3.2vw, 40px);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	margin-bottom: 1.5rem;
}

/* Unified style for section headings that should sit at the same visual level
   as the main hero title (Акции, Цены). Use the same Montserrat italic weight
   to keep visual consistency. Slightly smaller line-height and similar spacing. */
.hero__subtitle,
.prices__title {
	font-family: var(--font-main);
	font-weight: 800;
	/* ExtraBold; falls back to 600 if not available */
	font-style: italic;
	line-height: 1.25;
	font-size: clamp(20px, 3vw, 38px);
	color: var(--text);
	margin: 1rem 0 1.25rem;
}

/* Make sure prices section is centered like the hero block */
.prices {
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem 1.5rem 2rem;
	text-align: center;
}

/* Плакат/прайс под заголовком Цены */
.prices__poster {
	margin-top: 1rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.prices__image {
	width: clamp(360px, 45vw, 540px);
	height: auto;
	display: block;
	margin: 0.5rem auto;
	border-radius: 8px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

/* Модальное окно для просмотра изображения fullscreen */
.image-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	z-index: 2000;
	padding: 20px;
}

.image-modal.is-open {
	display: flex;
}

.image-modal__img {
	max-width: 95vw;
	max-height: 95vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 12px 50px rgba(0, 0, 0, 0.7);
}

.image-modal__close {
	position: absolute;
	top: 18px;
	right: 18px;
	color: #fff;
	background: transparent;
	border: none;
	font-size: 28px;
	cursor: pointer;
}

/* ===== AUTHENTICATION STYLES ===== */

.auth-page {
	min-height: calc(100vh - 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.auth-container {
	width: 100%;
	max-width: 500px;
}

.auth-card {
	background: var(--panel-bg);
	backdrop-filter: blur(10px);
	border-radius: 16px;
	padding: 2.5rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--glass);
}

.auth-header {
	text-align: center;
	margin-bottom: 2rem;
}

.auth-title {
	font-size: 2rem;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 0.5rem;
}

.auth-subtitle {
	color: var(--muted);
	font-size: 1rem;
	margin: 0;
}

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-label {
	font-weight: 500;
	color: var(--text);
	font-size: 0.9rem;
}

.form-input {
	padding: 0.75rem 1rem;
	border: 1px solid var(--glass-2);
	border-radius: 8px;
	background: var(--glass);
	color: var(--text);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(255, 179, 3, 0.1);
}

.form-input::placeholder {
	color: var(--muted);
}

.password-input-container {
	position: relative;
}

.password-toggle {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	font-size: 1.2rem;
	padding: 0.25rem;
	transition: color 0.2s ease;
}

.password-toggle:hover {
	color: var(--text);
}

.form-hint {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 0.25rem;
}

.form-error {
	color: #ff6b6b;
	font-size: 0.8rem;
	min-height: 1rem;
	margin-top: 0.25rem;
}

.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 1rem 0;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--muted);
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	margin: 0;
}

.forgot-password {
	color: var(--accent);
	text-decoration: none;
	font-size: 0.9rem;
}

.forgot-password:hover {
	text-decoration: underline;
}

.btn-auth {
	width: 100%;
	padding: 0.875rem 1.5rem;
	background: var(--accent);
	color: #000;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

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

.btn-auth:active {
	transform: translateY(0);
}

.btn-auth:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn-loader {
	width: 16px;
	height: 16px;
	border: 2px solid #000;
	border-top: 2px solid transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.form-links {
	text-align: center;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--glass-2);
}

.auth-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
}

.auth-link:hover {
	text-decoration: underline;
}

.auth-alert {
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.alert-success {
	background: rgba(110, 231, 183, 0.1);
	border: 1px solid rgba(110, 231, 183, 0.3);
	color: #6ee7b7;
}

.alert-error {
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid rgba(255, 107, 107, 0.3);
	color: #ff6b6b;
}

.alert-info {
	background: rgba(255, 179, 3, 0.1);
	border: 1px solid rgba(255, 179, 3, 0.3);
	color: var(--accent);
}

/* Password strength indicator */
.strength-container {
	margin-top: 0.5rem;
}

.strength-bar {
	height: 4px;
	border-radius: 2px;
	background: var(--glass-2);
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.strength-fill {
	height: 100%;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak {
	background: #ff6b6b;
	width: 33%;
}

.strength-medium {
	background: #ffa500;
	width: 66%;
}

.strength-good {
	background: var(--accent);
	width: 100%;
}

.strength-strong {
	background: #6ee7b7;
	width: 100%;
}

.strength-label {
	font-size: 0.8rem;
	color: var(--muted);
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ ФОРМ (дополнительные/дублирующие) ===== */
.auth-page {
	min-height: calc(100vh - 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 100px 20px;
}

.auth-container {
	/* background: white; */
	border-radius: 20px;
	padding: 40px;
	width: 100%;
	max-width: 700px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
	text-align: center;
	margin-bottom: 30px;
}

.auth-title {
	font-size: 28px;
	font-weight: 800;
	color: var(--text);
	margin-bottom: 10px;
}

.auth-subtitle {
	color: var(--text-gray);
	font-size: 16px;
}

.auth-form {
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--text-gray);
	;
}

.form-input {
	width: 100%;
	padding: 12px 16px;
	color: var(--text);
	border-radius: 10px;
	font-size: 16px;
	transition: all 0.3s;
}

.form-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input-container {
	position: relative;
}

.password-toggle {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-gray);
}

.form-error {
	color: #e74c3c;
	font-size: 14px;
	margin-top: 5px;
	min-height: 20px;
}

.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	color: #666;
}

.checkbox-label input {
	margin-right: 8px;
}

.forgot-password {
	color: #667eea;
	text-decoration: none;
	font-size: 14px;
}

.forgot-password:hover {
	text-decoration: underline;
}

.btn-auth {
	width: 100%;
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 20px;
	background: #667eea;
	color: white;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.3s;
}

.btn-auth:hover {
	background: #764ba2;
}

.form-links {
	text-align: center;
	color: #666;
}

.auth-link {
	color: #667eea;
	text-decoration: none;
	font-weight: 600;
}

.auth-link:hover {
	text-decoration: underline;
}

.auth-alert {
	padding: 12px;
	border-radius: 8px;
	margin-top: 20px;
	display: none;
}

.alert-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.alert-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* ===== СТИЛИ ИЗ REGISTER (добавляем в общие) ===== */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 0;
}

.form-hint {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

.password-strength {
	margin-top: 10px;
}

.strength-bar {
	height: 4px;
	background: #e1e5e9;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 5px;
}

.strength-bar::after {
	content: '';
	display: block;
	height: 100%;
	width: 0%;
	background: #e74c3c;
	transition: width 0.3s, background 0.3s;
}

.strength-label {
	font-size: 12px;
	color: #666;
}

.strength-label span {
	font-weight: 600;
}

/* Цвета для сложности пароля */
.strength-weak::after {
	width: 25%;
	background: #e74c3c;
}

.strength-medium::after {
	width: 50%;
	background: #f39c12;
}

.strength-good::after {
	width: 75%;
	background: #3498db;
}

.strength-strong::after {
	width: 100%;
	background: #2ecc71;
}

/* ===== ERROR PAGES ===== */
.error-page {
	min-height: calc(100vh - 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.error-container {
	background: white;
	border-radius: 20px;
	padding: 60px 40px;
	text-align: center;
	max-width: 500px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.error-code {
	font-size: 120px;
	font-weight: 800;
	color: #667eea;
	line-height: 1;
	margin-bottom: 20px;
}

.error-title {
	font-size: 32px;
	color: #333;
	margin-bottom: 20px;
}

.error-message {
	color: #666;
	font-size: 18px;
	margin-bottom: 40px;
	line-height: 1.6;
}

.error-actions {
	display: flex;
	gap: 20px;
	justify-content: center;
}

/* Стили для главной страницы */
.main-page {
	width: 100%;
	min-height: 100vh;
	background: var(--main-gr-bg);
	padding-top: 80px;
}

.main-page .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.main-page .hero {
	margin-top: 0;
	/* padding: 6rem 1.5rem 4rem; */
	text-align: center;
	/* background: linear-gradient(135deg, rgba(39, 74, 233, 0.1) 0%, rgba(112, 38, 185, 0.1) 100%); */
	/* border-bottom: 1px solid rgba(255, 255, 255, 0.05); */
}

.main-page .hero__title {
	font-family: var(--font-main);
	font-weight: 800;
	font-style: italic;
	font-size: clamp(2rem, 5vw, 3.5rem);
	color: var(--text);
	margin-bottom: 1rem;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1.2;
}

.main-page .hero__subtitle {
	font-size: 1.3rem;
	color: var(--text-gray);
	margin-bottom: 0;
	font-weight: 400;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* .features {
	padding: 4rem 0;
} */

.section-title {
	font-family: var(--font-main);
	font-weight: 800;
	font-style: italic;
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	color: var(--text);
	text-align: center;
	margin-bottom: 1rem;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.section-subtitle {
	font-size: 1.1rem;
	color: var(--text-gray);
	text-align: center;
	margin-bottom: 3rem;
	font-weight: 400;
}

.features-grid {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
	margin-top: 3rem;
}

.feature-card {
	background: var(--panel-bg);
	backdrop-filter: blur(10px);
	border-radius: 20px;
	padding: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.05);
	text-align: center;
	transition: all 0.3s ease;
}

.feature-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.feature-icon {
	font-size: 3rem;
	color: #667eea;
	margin-bottom: 1rem;
}

.feature-card h3 {
	font-size: 1.3rem;
	color: var(--text);
	margin-bottom: 1rem;
	font-weight: 600;
}

.feature-card p {
	color: var(--text-gray);
	line-height: 1.6;
	font-size: 1rem;
}

.promo-slider {
	padding: 4rem 0;
	/* background: rgba(255, 255, 255, 0.02); */
}

/* .prices-section {
	padding: 4rem 0;
} */

.prices-cta {
	text-align: center;
	margin-top: 2rem;
}

.news-preview {
	padding: 4rem 0;
}

.news-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-top: 3rem;
}

.news-loading {
	text-align: center;
	padding: 3rem;
	color: var(--text-gray);
	font-size: 1.1rem;
	grid-column: 1 / -1;
}

.news-cta {
	text-align: center;
	margin-top: 3rem;
}

.btn-primary,
.btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.875rem 2rem;
	border-radius: 12px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	transition: all 0.3s ease;
	cursor: pointer;
	border: none;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-2px);
}

/* Стили для карточек новостей на главной */
.news-card {
	background: var(--panel-bg);
	backdrop-filter: blur(10px);
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.05);
	transition: all 0.3s ease;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.news-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.news-card-image {
	height: 200px;
	overflow: hidden;
}

.news-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
	transform: scale(1.05);
}

.news-card-content {
	padding: 1.5rem;
}

.news-card-title {
	margin: 0 0 1rem 0;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.4;
}

.news-card-title a {
	color: var(--text);
	text-decoration: none;
	transition: color 0.3s ease;
}

.news-card-title a:hover {
	color: #667eea;
}

.news-card-excerpt {
	color: var(--text-gray);
	line-height: 1.6;
	margin-bottom: 1rem;
	font-size: 0.95rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85rem;
	color: var(--text-gray);
}

.news-card-date,
.news-card-views {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

/* ----- Адаптивные стили для остального ----- */

@media (max-width: 768px) {
	.auth-card {
		padding: 2rem 1.5rem;
	}

	.auth-title {
		font-size: 1.75rem;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.form-options {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	.auth-page {
		padding: 1rem;
	}

	.auth-card {
		padding: 1.5rem 1rem;
	}

	.auth-title {
		font-size: 1.5rem;
	}

	.form-input {
		padding: 0.625rem 0.875rem;
	}
}

@media (max-width: 768px) {
	.auth-container {
		padding: 30px 20px;
		max-width: 90%;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.auth-page {
		padding: 50px 20px;
	}
}

@media (max-width: 480px) {
	.auth-container {
		padding: 25px 15px;
	}

	.auth-title {
		font-size: 24px;
	}

	.auth-subtitle {
		font-size: 14px;
	}
}

@media (max-width: 576px) {
	.error-actions {
		flex-direction: column;
	}

	.error-code {
		font-size: 80px;
	}
}

@media (max-width: 768px) {
	.features-grid {
		grid-template-columns: 1fr;
	}

	.news-preview-grid {
		grid-template-columns: 1fr;
	}

	.feature-card {
		padding: 1.5rem;
	}

	/* .main-page .hero {
		padding: 4rem 1.5rem 3rem;
	} */

	.main-page .hero__title {
		font-size: clamp(1.8rem, 6vw, 3rem);
	}

	.main-page .hero__subtitle {
		font-size: 1.1rem;
	}

	.main-page .container {
		max-width: 95%;
		padding: 0 1rem;
	}

	.features-grid {
		gap: 1.5rem;
	}

	.news-preview-grid {
		gap: 1.5rem;
	}
}

/* Увеличим отступ контента, чтобы не перекрывать фиксированный top */
.main {
	padding-top: 80px;
	/* увеличено */
}