/*
 * author Alex
 * 09.07.2026
 *
 * Styles for public carrier pages: /carriers/ list and /carriers/{slug}/ detail.
 * Sizes, colors and fonts match figma mockups (nodes 3122-17948, 3122-18019).
 */

/* ---------- shared ---------- */

.cp-page,
.cp-tiles,
.cp-list-title,
.cp-pagination {
	font-family: 'Roboto Condensed', Arial, sans-serif;
}

.cp-rating {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
	white-space: nowrap;
}
.cp-rating svg {
	flex-shrink: 0;
}

.cp-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 24px;
	border: 1px solid rgba(59, 67, 149, 0.25);
	border-radius: 5px;
	background: #fff;
	color: #3b4395;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .2s;
}
.cp-more-btn:hover {
	border-color: #3b4395;
	color: #3b4395;
	text-decoration: none;
}

.cp-section-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 20px;
	color: #000;
}

/* ---------- list page ---------- */

.cp-list-title {
	font-size: 28px;
	font-weight: 700;
	margin: 10px 0 20px;
	color: #000;
}

.cp-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* tile per figma: white card, radius 10, soft shadow, no border */
.cp-tile {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cp-tile-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 140px;
	padding: 20px;
}
.cp-tile-logo img {
	max-width: 160px;
	max-height: 100px;
	object-fit: contain;
}

.cp-logo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background: #eef1f6;
	color: #8a93a5;
	font-size: 36px;
	font-weight: 700;
}

/* bottom row: name + rating stacked at left, button at right, bottom aligned */
.cp-tile-bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding: 15px;
	margin-top: auto;
}
.cp-tile-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.cp-tile-name {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
	text-decoration: none;
	word-break: break-word;
}
.cp-tile-name:hover {
	color: #72971F;
	text-decoration: none;
}

/* Contacts button per figma: 80x32, radius 5, blue bordered */
.cp-contacts-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 80px;
	height: 32px;
	padding: 0 10px;
	border: 1px solid rgba(59, 67, 149, 0.25);
	border-radius: 5px;
	color: #3b4395;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	flex-shrink: 0;
	transition: border-color .2s;
}
.cp-contacts-btn:hover {
	border-color: #3b4395;
	color: #3b4395;
	text-decoration: none;
}

/* pagination */

.cp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin: 30px 0;
}
.cp-pages {
	display: flex;
	align-items: center;
	gap: 8px;
}
.cp-page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	border-radius: 6px;
	color: #000;
	font-size: 16px;
	text-decoration: none;
}
.cp-page-num:hover {
	background: #eef1f6;
	text-decoration: none;
}
.cp-page-num--active {
	background: #94C11F;
	color: #fff;
	font-weight: 700;
}
.cp-page-dots {
	color: #8a93a5;
	padding: 0 4px;
}
.cp-page-nav {
	color: #3b4395;
	font-size: 16px;
	text-decoration: none;
}
.cp-page-nav:hover {
	color: #3b4395;
	text-decoration: none;
}
.cp-page-nav--disabled {
	color: #b3bac6;
	cursor: default;
}

/* ---------- carrier detail page ---------- */

/* h1 + rating: bottom aligned row per figma, title 40 bold */
.cp-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin: 5px 0 15px;
}
.cp-head-title {
	font-size: 40px;
	font-weight: 700;
	line-height: normal;
	margin: 0;
	color: #000;
}
.cp-head-rating .cp-rating {
	font-size: 16px;
}
.cp-head-rating .cp-rating svg {
	width: 20px;
	height: 19px;
}

.cp-about {
	display: flex;
	gap: 40px;
	align-items: center;
	margin-bottom: 20px;
}
.cp-about-logo {
	flex: 0 0 360px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	padding: 20px;
	border: 1px solid #cfcfcf;
	border-radius: 10px;
	background: #fff;
}
.cp-about-logo img {
	max-width: 160px;
	max-height: 100px;
	object-fit: contain;
}
.cp-about-text {
	font-size: 16px;
	line-height: 1.5;
	color: #000;
}

.cp-anchors {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}
.cp-anchor-btn {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 20px;
	border: 1px solid #cfcfcf;
	border-radius: 5px;
	color: #000;
	font-size: 16px;
	line-height: 1.5;
	text-decoration: none;
	transition: border-color .2s, color .2s;
}
.cp-anchor-btn:hover {
	border-color: #94C11F;
	color: #72971F;
	text-decoration: none;
}

.cp-section {
	margin-top: 30px;
	scroll-margin-top: 80px;
}

/* trips */

.cp-trips-more {
	text-align: center;
	margin-top: 20px;
}
.cp-buy-btn {
	display: inline-block;
	text-align: center;
	text-decoration: none;
}
.cp-buy-btn:hover {
	text-decoration: none;
	color: #fff;
}
.cp-trip .tc-carrier-info .cp-rating {
	margin-left: 6px;
}

/* reviews */

.cp-reviews-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}
.cp-reviews-nav {
	display: flex;
	gap: 10px;
}
.cp-reviews-prev,
.cp-reviews-next {
	width: 40px;
	height: 40px;
	border: 1px solid #cfcfcf;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color .2s;
}
.cp-reviews-prev:hover,
.cp-reviews-next:hover {
	border-color: #94C11F;
}

.cp-reviews-swiper {
	overflow: hidden;
	width: 100%;
}

/* review card per figma: 277.5x321, border #cfcfcf, radius 10, padding 20.
   slide width set here (swiper runs with slidesPerView auto): 4 per row on desktop.
   fixed height so all frames are equal regardless of text length */
.cp-review,
.cp-reviews-swiper .swiper-slide.cp-review {
	background: #fff;
	border: 1px solid #cfcfcf;
	border-radius: 10px;
	padding: 20px;
	width: calc((100% - 60px) / 4);
	height: 321px !important;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: hidden;
	flex-shrink: 0;
}
.cp-review-date {
	font-size: 14px;
	line-height: 1.5;
	color: #a6a6a6;
}
.cp-review-author {
	font-size: 16px;
	font-weight: 700;
	line-height: normal;
	color: #000;
	margin-top: 2px;
}
.cp-review-rating {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
	margin-top: 2px;
}
.cp-review-text {
	font-size: 14px;
	line-height: 1.5;
	color: #000;
	display: -webkit-box;
	-webkit-line-clamp: 10;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* "view all" button: same width as one review card, aligned under the last card */
.cp-reviews-all {
	display: flex;
	justify-content: flex-end;
	margin-top: 20px;
}
.cp-reviews-all .cp-more-btn {
	width: calc((100% - 60px) / 4);
	padding: 0;
}

/* contacts per figma: row card radius 15, icon box 50x50 green-tinted */
.cp-contacts {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cp-contact-row {
	display: flex;
	align-items: center;
	gap: 20px;
	background: #fff;
	border: 1px solid #cfcfcf;
	border-radius: 15px;
	padding: 20px;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
}
.cp-contact-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 10px;
	background: rgba(148, 193, 31, 0.07);
	flex-shrink: 0;
}
.cp-contact-value a {
	color: #333;
	text-decoration: none;
}
.cp-contact-value a:hover {
	color: #72971F;
}

/* faq per figma: card radius 10 border #cfcfcf padding 20, question 24 regular,
   answer 16, chevron 24. collapsed by default, arrow points down when closed */
.cp-faq {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.cp-faq-item {
	background: #fff;
	border: 1px solid #cfcfcf;
	border-radius: 10px;
	padding: 20px;
}
.cp-faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.5;
	color: #000;
	cursor: pointer;
	list-style: none;
}
.cp-faq-question::-webkit-details-marker {
	display: none;
}
.cp-faq-question-text {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
}
.cp-faq-arrow {
	display: inline-flex;
	flex-shrink: 0;
	transition: transform .2s;
	transform: rotate(180deg); /* closed: chevron points down */
}
.cp-faq-item[open] .cp-faq-arrow {
	transform: rotate(0deg); /* open: chevron points up */
}
.cp-faq-answer {
	font-size: 16px;
	line-height: 1.5;
	color: #000;
	padding-top: 20px;
}

/* ---------- responsive ---------- */

@media (max-width: 991px) {
	.cp-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	.cp-review,
	.cp-reviews-swiper .swiper-slide.cp-review {
		width: calc((100% - 20px) / 2);
	}
	.cp-reviews-all .cp-more-btn {
		width: calc((100% - 20px) / 2);
	}
	.cp-head-title {
		font-size: 32px;
	}
}

@media (max-width: 767px) {
	.cp-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
	.cp-about {
		flex-direction: column;
		gap: 20px;
		align-items: stretch;
	}
	.cp-about-logo {
		flex: none;
		width: 100%;
	}
	.cp-anchors {
		gap: 8px;
	}
	.cp-anchor-btn {
		height: 36px;
		padding: 0 14px;
		font-size: 14px;
	}
	.cp-faq-question {
		font-size: 18px;
	}
	.cp-review,
	.cp-reviews-swiper .swiper-slide.cp-review {
		width: 100%;
		height: 300px !important;
	}
}

@media (max-width: 520px) {
	.cp-tiles {
		grid-template-columns: 1fr;
	}
	.cp-pagination {
		gap: 10px;
		flex-wrap: wrap;
	}
	.cp-reviews-all .cp-more-btn {
		width: 100%;
	}
	.cp-head-title {
		font-size: 26px;
	}
}
