/* ===== Fleet Grid ===== */
.mim-fleet,
.mim-vessel {
	--mim-accent: #c9a24b;
	--mim-card: #2f2f35;
	--mim-text: #ffffff;
	--mim-muted: #8d8d95;
	--mim-line: #46464d;
	--mim-badge: #10d98f;
	--mim-soft: #c8c8ce;
	--mim-head: #141a28;
	--mim-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	color: var(--mim-text);
}

.mim-fleet *,
.mim-vessel * {
	box-sizing: border-box;
}

/* --- Filter bar --- */
.mim-fleet__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 40px;
}

.mim-fleet__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mim-fleet__tab {
	font-family: var(--mim-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 12px 16px;
	background: transparent;
	color: var(--mim-text);
	border: 1px solid var(--mim-line);
	border-radius: 0;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.mim-fleet__tab:hover {
	border-color: var(--mim-accent);
	background: transparent;
	color: var(--mim-text);
}

.mim-fleet__tab.is-active,
.mim-fleet__tab.is-active:hover {
	background: var(--mim-accent);
	border-color: var(--mim-accent);
	color: #1f1f23;
}

.mim-fleet__tab:focus-visible,
.mim-fleet__doc:focus-visible,
.mim-fleet__details:focus-visible,
.mim-fleet__title a:focus-visible {
	outline: 2px solid var(--mim-accent);
	outline-offset: 2px;
}

.mim-fleet__counter {
	font-family: var(--mim-mono);
	font-size: 13px;
	color: var(--mim-muted);
}

/* --- Grid & card --- */
.mim-fleet__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
}

.mim-fleet__card {
	display: flex;
	flex-direction: column;
	padding: 28px;
	background: var(--mim-card);
}

.mim-fleet__card[hidden] {
	display: none;
}

.mim-fleet__media {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.mim-fleet__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mim-fleet__badge {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: #07140f;
	border: 2px solid var(--mim-badge);
	color: #fff;
	font-family: var(--mim-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.mim-fleet__badge::before {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--mim-badge);
}

/* --- Head --- */
.mim-fleet__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
}

.mim-fleet__title {
	margin: 0;
	font-size: 36px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--mim-text);
}

.mim-fleet__title a {
	color: inherit;
	text-decoration: none;
}

.mim-fleet__number {
	font-size: 24px;
	color: var(--mim-accent);
	opacity: 0.55;
}

.mim-fleet__meta {
	position: relative;
	margin: 10px 0 0;
	padding-bottom: 14px;
	font-family: var(--mim-mono);
	font-size: 14px;
	color: var(--mim-muted);
}

.mim-fleet__meta::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 1px;
	background: var(--mim-accent);
}

/* --- Specs --- */
.mim-fleet__specs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 24px;
	margin: 20px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--mim-line);
}

.mim-fleet__spec {
	margin: 0;
}

.mim-fleet__spec-label {
	margin: 0 0 6px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mim-accent);
}

.mim-fleet__spec-value {
	margin: 0;
	font-size: 17px;
	line-height: 1.45;
	color: var(--mim-text);
}

/* --- Footer --- */
.mim-fleet__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--mim-line);
}

/* specs растягиваются, прижимая футер к низу при разной высоте карточек */
.mim-fleet__card .mim-fleet__specs {
	flex: 1 0 auto;
	align-content: start;
	margin-bottom: 24px;
}

.mim-fleet__docs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mim-fleet__doc {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid var(--mim-line);
	color: var(--mim-text);
	font-family: var(--mim-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}

.mim-fleet__doc:hover {
	border-color: var(--mim-accent);
	color: var(--mim-accent);
}

.mim-fleet__details {
	color: var(--mim-accent);
	font-size: 14px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
}

.mim-fleet__details:hover {
	color: var(--mim-text);
}

.mim-fleet__empty {
	color: var(--mim-muted);
}

@media (max-width: 767px) {
	.mim-fleet__card {
		padding: 18px;
	}
	.mim-fleet__title {
		font-size: 28px;
	}
	.mim-fleet__specs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ===== Single vessel page ===== */
.mim-vessel {
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 20px 80px;
}

.mim-vessel__back {
	display: inline-block;
	margin-bottom: 24px;
	color: var(--mim-accent);
	font-size: 14px;
	text-decoration: none;
}

.mim-vessel__kicker {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mim-accent);
}

.mim-vessel__title {
	margin: 0;
	font-size: clamp(40px, 6vw, 72px);
	line-height: 1;
	text-transform: uppercase;
	color: var(--mim-text);
}

.mim-vessel__meta {
	margin: 16px 0 0;
	font-size: 15px;
	color: var(--mim-text);
	opacity: 0.85;
}

.mim-vessel__layout {
	display: grid;
	grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
	gap: 40px;
	margin-top: 48px;
	align-items: start;
}

.mim-vessel__side {
	position: sticky;
	top: 32px;
	padding-left: 32px;
	border-left: 1px solid var(--mim-line);
}

.mim-vessel__side .mim-fleet__specs {
	grid-template-columns: 1fr;
	margin: 0;
	padding-top: 0;
	border-top: 0;
}

.mim-vessel__docs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 32px;
}

.mim-vessel__content {
	margin-top: 40px;
	line-height: 1.7;
}

.mim-vessel__content .wp-block-heading{
	font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
}

.mim-vessel__content .wp-block-heading:not(:first-child){
	margin-top: 30px;
}

.mim-vessel__content .wp-block-heading h3{
	font-size: 20px;
}

/* ===== Gallery ===== */
.mim-gal__stage {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1c1c20;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.mim-gal__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s;
}

.mim-gal__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.mim-gal__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: zoom-in;
}

.mim-gal__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	background: rgba(24, 26, 30, 0.88);
	color: #fff;
	border: 0;
	border-radius: 0;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.mim-gal__nav:hover {
	background: var(--mim-accent);
	color: #1f1f23;
}

.mim-gal__nav--prev { left: 12px; }
.mim-gal__nav--next { right: 12px; }

.mim-gal__caption,
.mim-gal__zoom {
	position: absolute;
	bottom: 14px;
	z-index: 2;
	padding: 10px 14px;
	background: rgba(24, 26, 30, 0.88);
	color: #fff;
	font-size: 14px;
	line-height: 1.2;
}

.mim-gal__caption {
	left: 14px;
	max-width: calc(100% - 150px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mim-gal__zoom {
	right: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 0;
	cursor: pointer;
}

.mim-gal__zoom:hover {
	background: var(--mim-accent);
	color: #1f1f23;
}

.mim-gal__stage .mim-fleet__badge {
	z-index: 2;
}

.mim-gal__thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin-top: 16px;
}

.mim-gal__thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #1c1c20;
	border: 2px solid transparent;
	border-radius: 0;
	opacity: 0.8;
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}

.mim-gal__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mim-gal__thumb:hover {
	opacity: 1;
}

.mim-gal__thumb.is-active {
	border-color: var(--mim-accent);
	opacity: 1;
}

.mim-gal__thumb--more::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(15, 15, 18, 0.68);
}

.mim-gal__more {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mim-gal__more strong {
	font-size: 22px;
	color: var(--mim-accent);
}

.mim-gal__nav:focus-visible,
.mim-gal__zoom:focus-visible,
.mim-gal__thumb:focus-visible {
	outline: 2px solid var(--mim-accent);
	outline-offset: 2px;
}

/* ===== Lightbox ===== */
.mim-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 12, 0.95);
}

.mim-lb[hidden] {
	display: none;
}

.mim-lb__figure {
	margin: 0;
	max-width: 90vw;
	text-align: center;
}

.mim-lb__img {
	display: block;
	max-width: 90vw;
	max-height: 80vh;
	margin: 0 auto;
	object-fit: contain;
}

.mim-lb__caption {
	margin-top: 14px;
	color: #d7d7dc;
	font-size: 14px;
}

.mim-lb__close,
.mim-lb__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.mim-lb__close:hover,
.mim-lb__nav:hover {
	background: var(--mim-accent, #c9a24b);
	color: #1f1f23;
}

.mim-lb__close {
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	font-size: 30px;
}

.mim-lb__nav {
	top: 50%;
	width: 48px;
	height: 48px;
	transform: translateY(-50%);
	font-size: 32px;
}

.mim-lb__nav--prev { left: 20px; }
.mim-lb__nav--next { right: 20px; }

@media (max-width: 1024px) {
	.mim-vessel__layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.mim-vessel__side {
		position: static;
		padding: 24px 0 0;
		border-left: 0;
		border-top: 1px solid var(--mim-line);
	}
	.mim-vessel__side .mim-fleet__specs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.mim-gal__thumbs {
		gap: 6px;
	}
	.mim-gal__caption {
		display: none;
	}
	.mim-gal__more strong {
		font-size: 16px;
	}
	.mim-gal__more span {
		font-size: 10px;
	}
	.mim-lb__nav--prev { left: 8px; }
	.mim-lb__nav--next { right: 8px; }
}

/* ===== Vessel highlights row ===== */
.mim-vessel__highlights {
	display: flex;
	gap: 24px;
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid var(--mim-line);
}

.mim-vessel__hl {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
}

.mim-vessel__hl--crane {
	flex-grow: 1.8;
}

.mim-vessel__hl-icon {
	display: block;
	margin: 0 auto 10px;
	color: var(--mim-accent);
}

.mim-vessel__hl-label {
	margin: 0 0 6px;
	font-family: var(--mim-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mim-muted);
}

.mim-vessel__hl-value {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--mim-text);
}

@media (max-width: 767px) {
	.mim-vessel__highlights {
		flex-wrap: wrap;
		gap: 24px 16px;
	}
	.mim-vessel__hl,
	.mim-vessel__hl--crane {
		flex: 1 1 calc(50% - 8px);
	}
}

/* ===== Gallery: video ===== */
.mim-gal__poster {
	position: absolute;
	inset: 0;
	background: #111;
}

.mim-gal__poster img,
.mim-gal__vid {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
}

.mim-gal__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin: 0;
	padding: 0 0 0 4px;
	transform: translate(-50%, -50%);
	background: rgba(24, 26, 30, 0.85);
	color: var(--mim-accent);
	border: 2px solid var(--mim-accent);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.mim-gal__play:hover {
	background: var(--mim-accent);
	color: #1f1f23;
}

.mim-gal__play svg {
	width: 30px;
	height: 30px;
}

.mim-gal__slide.is-playing .mim-gal__play,
.mim-gal__slide.is-playing .mim-gal__poster img {
	display: none;
}

.mim-gal__slide.is-playing .mim-gal__poster {
	background: #000;
}

/* подпись и Zoom не должны перекрывать панель управления плеера */
.mim-gal__stage.is-video .mim-gal__caption,
.mim-gal__stage.is-video .mim-gal__zoom {
	display: none;
}

.mim-gal__thumb video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.mim-gal__thumb-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding-left: 2px;
	transform: translate(-50%, -50%);
	background: rgba(24, 26, 30, 0.85);
	color: var(--mim-accent);
	border: 1.5px solid var(--mim-accent);
	border-radius: 50%;
}

.mim-gal__thumb-play svg {
	width: 14px;
	height: 14px;
}

/* ===== Detailed description card ===== */
.mim-vessel__desc {
	margin-top: 40px;
	background: var(--mim-card);
	border: 1px solid var(--mim-line);
}

.mim-vessel__desc-head {
	margin: 0;
	padding: 22px 28px;
	background: var(--mim-head);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.mim-vessel__desc-body {
	padding: 24px 28px 28px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--mim-soft);
}

.mim-vessel__desc-body p {
	margin: 0 0 12px;
	color: var(--mim-soft);
}

.mim-vessel__desc-body > :last-child {
	margin-bottom: 0;
}

.mim-vessel__desc-body strong,
.mim-vessel__desc-body b {
	color: var(--mim-text);
	font-weight: 700;
}

@media (max-width: 767px) {
	.mim-gal__play {
		width: 60px;
		height: 60px;
	}
	.mim-vessel__desc-head {
		padding: 18px 20px;
		font-size: 19px;
	}
	.mim-vessel__desc-body {
		padding: 20px;
		font-size: 15px;
	}
}
