/*
Theme Name: Uralnebo Block
Theme URI: https://uralnebo.ru
Description: Блочная тема для проекта «Небо над Родиной». Повторяет шаблон статей Impreza.
Version: 0.3.0
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: uralnebo
*/

/* ---------- каркас ---------- */

.urb-header {
	background-image: linear-gradient(180deg, #F3F6FF 0%, #CAC2FF 100%);
}

.urb-header .wp-block-image img,
.urb-header__logo img {
	max-height: 48px;
	width: auto;
}

.urb-nav .wp-block-navigation-item__content {
	font-weight: 400;
}

.urb-nav a:hover {
	color: #1602FF;
}

/* ---------- верх статьи ---------- */

.urb-article-head {
	background-image: url(/wp-content/uploads/2023/12/article-bg.png);
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
	padding-top: 1rem;
}

.urb-article-top {
	padding-bottom: 1rem;
}

.urb-article-top__row {
	margin-bottom: 1rem;
}

.urb-article-top__logo img {
	max-height: 58px;
	width: auto;
}

.urb-article-top__grant img {
	max-height: 50px;
	width: auto;
}

.urb-article-top__title {
	color: #1602FF;
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1.3;
	margin: 1rem 0 0.25rem;
}

.urb-article-top__subtitle {
	font-size: 1rem;
	line-height: 1.3;
	text-transform: uppercase;
	margin: 0;
}

.urb-article-top__line {
	margin: 1rem 0;
	border-color: #000;
}

.urb-article-top__actions {
	font-size: 1.125rem;
}

.urb-article-top__actions p {
	margin: 0;
}

.urb-article-top__actions a {
	color: #000;
}

/* ---------- hero статьи ---------- */

.urb-hero {
	min-height: 380px;
	max-height: 560px;
	justify-content: flex-end;
}

.urb-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.85) 100%);
	pointer-events: none;
}

.urb-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
	padding-bottom: 2.5rem;
}

.urb-hero__title {
	font-size: clamp(1.75rem, 1rem + 3.2vw, 3.5rem);
	line-height: 1.25;
	text-transform: uppercase;
	color: #000;
	margin: 0 0 0.5rem;
}

.urb-hero__kicker {
	display: block;
	text-align: center;
	text-transform: uppercase;
	font-size: 0.875rem;
	letter-spacing: 0.04em;
}

/* ---------- служебная строка под hero ---------- */

.urb-backnext {
	font-size: 1.125rem;
	border-top: 1px solid #000;
	padding-top: 1rem;
	margin-bottom: 1.5rem;
}

.urb-next,
.urb-prev {
	color: #000;
}

/* ---------- контент статьи ---------- */

.urb-content {
	font-size: 1.5rem;
	line-height: 1.5;
}

.urb-content h2 {
	color: #46445D;
}

.urb-content p,
.urb-content ul,
.urb-content ol {
	margin-bottom: 1.5rem;
}

.urb-content img {
	height: auto;
	max-width: 100%;
}

.wp-caption,
.wp-block-image {
	max-width: 100%;
}

.wp-caption-text,
.wp-element-caption {
	color: #333399;
	font-style: italic;
	font-size: 0.75rem;
	line-height: 1.4;
}

/* цитата */

.article-quote {
	font-size: clamp(0.95rem, 0.8rem + 0.8vw, 1.25rem);
	line-height: 1.5;
	font-weight: 300;
	margin: 0 0 1.5rem 1rem;
	border-left: 1px solid #000;
	background: #F3F6FF;
	padding: 0.75rem 0.75rem 0.75rem 1.5rem;
}

/* перебивка: картинка с подписью */

.perebivka {
	position: relative;
	overflow: hidden;
	margin: 0 0 1.5rem;
	max-height: 180px;
}

.perebivka img {
	display: block;
	width: 100%;
	max-height: 180px;
	object-fit: cover;
}

.perebivka .w-image-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1rem;
	font-size: clamp(1.2rem, 1rem + 2vw, 3rem);
	line-height: 1.1;
	text-transform: uppercase;
	color: #000;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
}

/* цифры */

.info-one {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-bottom: 1.5rem;
	padding: 0 4rem;
	background: #F3F6FF;
	border-radius: 8px;
}

.info-two {
	margin-bottom: 1.5rem;
	background: #F3F6FF;
	border-radius: 8px;
}

.info-one-two {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding: 0 4rem;
}

.info-border {
	border-bottom: 1px solid #000;
	margin-bottom: 10px;
}

.number {
	flex: 0 0 50%;
	font-size: clamp(2.5rem, 2rem + 3vw, 6.25rem);
	font-weight: 700;
	line-height: 1.5;
	color: #1602FF;
}

.number-text {
	font-size: 1.5rem;
	line-height: 1.5;
	text-transform: uppercase;
}

.info-one-white {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 160px;
	margin-bottom: 1rem;
	padding: 0 1rem;
	background: #fff;
	border-radius: 8px;
}

.info-one-white .number {
	flex-basis: 35%;
	font-size: 2.625rem;
	line-height: 1.3;
	text-align: center;
}

@media (max-width: 600px) {
	.info-one,
	.info-one-two,
	.info-one-white {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0;
		padding: 1rem;
	}

	.number,
	.info-one-white .number {
		flex-basis: auto;
		font-size: 3.5rem;
		line-height: 1.1;
		text-align: center;
		padding-bottom: 0.5rem;
	}

	.info-one-white .number {
		font-size: 2.625rem;
	}

	.number-text {
		font-size: 1.125rem;
		text-align: center;
	}

	.perebivka,
	.perebivka img {
		max-height: 80px;
	}
}

/* галерея вместо RoyalSlider */

.urb-gallery {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	-webkit-overflow-scrolling: touch;
}

.urb-gallery figure {
	flex: 0 0 min(88%, 900px);
	margin: 0;
	scroll-snap-align: start;
}

.urb-gallery img {
	display: block;
	width: 100%;
	height: auto;
}

.urb-gallery figcaption {
	font-size: 0.75rem;
	color: #333399;
	font-style: italic;
	margin-top: 0.4rem;
}

/* видео */

.urb-video {
	position: relative;
	margin-bottom: 1.5rem;
	box-shadow: 0 10px 75px -12px rgba(30, 25, 85, 0.5);
}

.urb-video iframe,
.urb-video embed,
.urb-video object {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

/* бегущая строка */

.urb-marquee {
	overflow: hidden;
	white-space: nowrap;
	background: #1602FF;
	color: #fff;
	padding: 0.35rem 0;
	font-size: 0.875rem;
	line-height: 1.3;
}

.urb-marquee span {
	display: inline-block;
	padding-left: 100%;
	animation: urb-marquee 40s linear infinite;
}

@keyframes urb-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}

/* подзаголовок статьи «Европа-Азия» */

.urb-ea__subtitle {
	text-align: center;
	text-transform: uppercase;
	font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.25rem);
	line-height: 1.3;
	margin: 0.75rem 0 0;
}

.urb-ea__winners {
	margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
	.urb-marquee span { animation: none; padding-left: 0; }
}

/* ---------- метаданные статьи ---------- */

.urb-meta {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 2rem;
	border-top: 1px solid #000;
	padding-top: 1.5rem;
	margin: 2rem 0 3rem;
	font-size: 1rem;
}

.urb-meta__row {
	margin-bottom: 0.5rem;
}

.urb-meta__label {
	color: #000;
}

.urb-meta__stats {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
}

.urb-meta__right {
	text-align: right;
}

.urb-meta__date {
	color: #1602FF;
	margin-bottom: 0.75rem;
}

.urb-meta__next,
.urb-meta__back {
	margin-bottom: 0.5rem;
}

.urb-meta__next a,
.urb-meta__back a {
	color: #000;
}

@media (max-width: 600px) {
	.urb-meta {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.urb-meta__right {
		text-align: left;
	}
}

/* ---------- подвал ---------- */

.urb-footer {
	background-image: linear-gradient(180deg, #000000 0%, #6658FF 100%);
	color: #fff;
}

.urb-footer a {
	color: #fff;
	text-decoration: underline;
}

.urb-footer .wp-block-button__link {
	text-decoration: none;
}

/* ---------- сетки записей ---------- */

.urb-card {
	position: relative;
	overflow: hidden;
	background: #333;
	display: block;
	text-decoration: none;
	color: #fff;
}

.urb-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.urb-card:hover img {
	transform: scale(1.06);
}

.urb-card__title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 15% 7% 7%;
	font-size: 1.5rem;
	line-height: 1.3;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
}
