/* ==========================================================================
   More Carrot - Custom Styles
   ========================================================================== */

/* ---------- Global ---------- */
:root {
	--mc-orange: #E8882F;
	--mc-orange-hover: #c67020;
	--mc-dark: #333333;
	--mc-gray: #999999;
	--mc-light-gray: #c0c0c0;
	--mc-bg-gray: #f5f5f5;
	--mc-footer-bg: #9e9e9e;
	--mc-white: #ffffff;
	--mc-section-gap: clamp(60px, 8vw, 120px);
}

* {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-top: 88px;
}

/* WP admin bar is 32px desktop, 46px mobile — offset header below it */
.admin-bar .site-header {
	top: 32px;
}

/* ---------- Header / Navbar ---------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: var(--mc-white);
	padding: 16px 35px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wp-block-site-logo {
	flex-shrink: 0;
	line-height: 0;
}

.wp-block-site-logo a {
	display: block;
}

.wp-block-site-logo img,
.wp-block-site-logo svg,
.custom-logo,
.site-logo svg,
.site-logo img {
	height: 56px !important;
	width: auto !important;
	display: block !important;
	max-width: none !important;
}

/* Hamburger menu button */
.menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--mc-dark);
	transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.is-active span {
	background: var(--mc-white);
}

.menu-toggle.is-active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* Full-screen navigation overlay */
.nav-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #363636;
	z-index: 99;
	display: none;
	flex-direction: row;
	padding: 180px 52px 45px;
	gap: 80px;
}

.nav-overlay.is-open {
	display: flex;
}

/* When overlay is open, keep hamburger visible on top */
.nav-overlay.is-open ~ .menu-toggle,
.site-header .menu-toggle {
	z-index: 101;
	position: relative;
}

.site-header.nav-open .menu-toggle span {
	background: var(--mc-white);
}

.nav-overlay .nav-contact-info {
	color: rgba(255,255,255,0.6);
	font-size: 0.9rem;
	line-height: 2.2;
	min-width: 200px;
}

.nav-overlay .nav-contact-info .region-label {
	color: var(--mc-white);
	font-weight: 500;
	display: block;
}

.nav-overlay .nav-contact-info a {
	color: rgba(255,255,255,0.6);
	text-decoration: none;
}

.nav-overlay .nav-contact-info a:hover {
	color: var(--mc-orange);
}

.nav-overlay .nav-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nav-overlay .nav-menu li {
	margin-bottom: 8px;
}

.nav-overlay .nav-menu a {
	font-size: 1.4rem;
	font-weight: 300;
	color: var(--mc-white);
	text-decoration: none;
	transition: color 0.2s;
}

.nav-overlay .nav-menu a:hover {
	color: var(--mc-orange);
}

/* ---------- Hero Section ---------- */
.hero-section {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 35px;
	position: relative;
}

.hero-tagline {
	font-size: clamp(3rem, 7vw, 6rem);
	font-weight: 300;
	color: var(--mc-light-gray);
	line-height: 1.1;
	margin: 0 0 60px;
	animation: fadeInUp 0.8s ease-out;
}

.hero-cta-block {
	max-width: 400px;
}

.hero-cta-block h2 {
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 500;
	color: var(--mc-dark);
	line-height: 1.4;
	margin: 0 0 16px;
}

.hero-cta-block p {
	color: var(--mc-gray);
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0 0 16px;
}

.hero-cta-block .more-link {
	color: var(--mc-gray);
	text-decoration: none;
	font-size: 0.9rem;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.hero-cta-block .more-link:hover {
	color: var(--mc-orange);
}

/* Bottom bar fixed to viewport bottom, not hero bottom */
.hero-bottom-bar {
	position: fixed;
	bottom: 24px;
	left: 35px;
	right: 35px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75rem;
	color: var(--mc-gray);
	z-index: 10;
	pointer-events: none;
}

.hero-bottom-bar a,
.hero-bottom-bar span {
	pointer-events: auto;
}

.hero-bottom-bar .scroll-hint {
	color: var(--mc-orange);
}

/* ---------- Section Layout ---------- */
.mc-section {
	padding: var(--mc-section-gap) 35px;
}

.mc-section-title {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 300;
	color: var(--mc-light-gray);
	margin: 0 0 48px;
}

/* ---------- Services Cards ---------- */
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

.service-card {
	background: #f8f8f8;
	border-radius: 0;
	padding: 40px;
	display: flex;
	flex-direction: column;
	min-height: 300px;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s;
}

.service-card:hover {
	background: #f0f0f0;
}

.service-card h3 {
	font-size: 1.35rem;
	font-weight: 400;
	color: var(--mc-dark);
	margin: 0 0 16px;
}

.service-card p {
	color: var(--mc-gray);
	font-size: 0.9rem;
	line-height: 1.6;
	flex: 1;
}

.service-card .card-arrow {
	align-self: flex-end;
	color: var(--mc-orange);
	font-size: 1.5rem;
	margin-top: 24px;
}

/* ---------- Case Studies Carousel ---------- */
.case-studies-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 48px;
}

.case-studies-header .see-all {
	color: var(--mc-orange);
	text-decoration: none;
	font-size: 0.85rem;
}

/* Legacy grid (homepage fallback) */
.case-studies-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 48px;
}

/* ---------- Carousel ---------- */
.mc-carousel {
	overflow: hidden;
}

/* Force flex on the track regardless of other classes (e.g. .case-studies-grid, .testimonials-grid) */
.mc-carousel-track,
.mc-carousel .carousel-track {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 24px;
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

/* Card sizing is set by JS inline styles — CSS just prevents shrinking */
.mc-carousel-track > *,
.mc-carousel .carousel-track > * {
	flex-shrink: 0;
	min-width: 0;
}

.case-study-card {
	display: flex;
	gap: 24px;
	text-decoration: none;
	color: inherit;
}

.case-study-card img {
	width: 180px;
	height: auto;
	object-fit: contain;
	flex-shrink: 0;
}

.case-study-card .card-content {
	flex: 1;
}

.case-study-card .label {
	font-size: 0.8rem;
	color: var(--mc-orange);
	margin: 0 0 8px;
}

.case-study-card h3 {
	font-size: 1.5rem;
	font-weight: 500;
	color: var(--mc-dark);
	margin: 0 0 12px;
}

.case-study-card p {
	color: var(--mc-gray);
	font-size: 0.9rem;
	line-height: 1.5;
}

.carousel-nav {
	display: flex;
	justify-content: center;
	gap: 32px;
	margin-top: 40px;
}

.carousel-nav button {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 2rem;
	line-height: 1;
	color: var(--mc-light-gray);
	transition: color 0.2s;
	padding: 4px 8px;
}

.carousel-nav button:not(:disabled):hover,
.carousel-nav button.is-active {
	color: var(--mc-orange);
}

.carousel-nav button:disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------- Testimonials ---------- */
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.testimonial-card {
	background: var(--mc-bg-gray);
	border-radius: 12px;
	padding: 40px;
}

.testimonial-card blockquote {
	margin: 0 0 24px;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--mc-dark);
	font-style: normal;
}

.testimonial-card .author-name {
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--mc-dark);
	margin: 0 0 4px;
}

.testimonial-card .author-title {
	font-size: 0.85rem;
	color: var(--mc-orange);
	line-height: 1.4;
}

/* ---------- About Us Section ---------- */
.about-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 32px;
}

.about-item h3 {
	color: var(--mc-orange);
	font-size: 1.3rem;
	font-weight: 500;
	margin: 0 0 12px;
}

.about-item p {
	color: var(--mc-gray);
	font-size: 0.9rem;
	line-height: 1.6;
}

/* ---------- Team Grid ---------- */
.team-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.team-member {
	text-align: left;
}

.team-member .photo-wrapper {
	background: #e8e8e8;
	border-radius: 0;
	overflow: hidden;
	margin-bottom: 16px;
	aspect-ratio: 1;
}

.team-member .photo-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
}

.team-member h3 {
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--mc-dark);
	margin: 0 0 4px;
}

.team-member .role {
	color: var(--mc-orange);
	font-size: 0.9rem;
	margin: 0 0 12px;
}

.team-member ul {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
}

.team-member ul li {
	font-size: 0.85rem;
	color: var(--mc-gray);
	line-height: 1.5;
	padding: 2px 0;
}

.team-member .more-link {
	color: var(--mc-gray);
	text-decoration: none;
	font-size: 0.85rem;
}

/* ---------- Memberships ---------- */
.memberships-section {
	display: flex;
	align-items: center;
	gap: 24px;
}

.memberships-section img {
	height: 48px;
	width: auto;
	opacity: 0.5;
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--mc-footer-bg);
	color: var(--mc-white);
	padding: 64px 35px 32px;
}

.footer-cta {
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 400;
	line-height: 1.6;
	margin: 0 0 48px;
}

.footer-contacts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 32px;
	margin-bottom: 48px;
}

.footer-contact .region {
	font-weight: 700;
	margin: 0 0 4px;
}

.footer-contact p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
}

.footer-contact a {
	color: var(--mc-white);
	text-decoration: none;
}

.footer-contact a:hover {
	text-decoration: underline;
}

.footer-addresses {
	font-size: 0.85rem;
	line-height: 1.6;
	opacity: 0.8;
	margin-bottom: 24px;
}

.footer-bottom {
	font-size: 0.8rem;
	opacity: 0.7;
}

.footer-bottom a {
	color: var(--mc-white);
}

/* ---------- Service Detail Pages ---------- */
body.service-detail-page {
	background: var(--mc-bg-gray);
}

.service-detail {
	padding: 60px 35px 80px;
}

.service-detail .back-link {
	color: var(--mc-orange);
	text-decoration: none;
	font-size: 0.85rem;
	display: inline-block;
	margin-bottom: 48px;
	transition: color 0.2s;
}

.service-detail .back-link:hover {
	color: var(--mc-orange-hover);
}

.service-detail h1 {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 300;
	color: var(--mc-light-gray);
	margin: 0 0 48px;
	line-height: 1.2;
}

.service-detail h2 {
	font-size: clamp(1.25rem, 2.5vw, 1.75rem);
	font-weight: 300;
	color: var(--mc-light-gray);
	margin: 0 0 16px;
}

.service-detail p {
	color: var(--mc-gray);
	font-size: 0.95rem;
	line-height: 1.7;
	max-width: 800px;
	margin: 0 0 48px;
}

.service-detail a:not(.back-link) {
	color: var(--mc-orange);
	text-decoration: none;
}

.service-detail a:not(.back-link):hover {
	text-decoration: underline;
}

/* ---------- Page Header ---------- */
.page-header {
	padding: 80px 40px 40px;
}

.page-header h1 {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 300;
	color: var(--mc-light-gray);
}

/* ---------- Case Study Single ---------- */
.case-study-single .back-link {
	color: var(--mc-gray);
	text-decoration: none;
	font-size: 0.85rem;
	margin-bottom: 16px;
	display: inline-block;
}

.case-study-single .label {
	color: var(--mc-orange);
	font-size: 0.85rem;
}

.case-study-single h1 {
	color: var(--mc-dark);
	font-weight: 500;
}

.case-study-single .content-body {
	max-width: 800px;
}

.case-study-single .content-body p {
	color: var(--mc-dark);
	line-height: 1.7;
}

.case-study-single .content-body ul {
	padding-left: 0;
	list-style: none;
}

.case-study-single .content-body ul li {
	padding: 6px 0 6px 20px;
	position: relative;
	line-height: 1.6;
}

.case-study-single .content-body ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	width: 8px;
	height: 8px;
	background: var(--mc-orange);
	border-radius: 50%;
}

/* ---------- Blog / News ---------- */
.blog-filters {
	margin-bottom: 32px;
}

.blog-filters select {
	border: 1px solid #ddd;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 0.9rem;
	border-radius: 6px;
	background: var(--mc-white);
}

.blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 32px;
}

.blog-card {
	text-decoration: none;
	color: inherit;
	display: block;
}

.blog-card h3 {
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--mc-dark);
	margin: 0 0 8px;
}

.blog-card .category-label {
	color: var(--mc-orange);
	font-size: 0.8rem;
}

.blog-card p {
	color: var(--mc-gray);
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ---------- Contact Page ---------- */
.contact-content {
	max-width: 600px;
}

.contact-content h1 {
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	font-weight: 500;
	color: var(--mc-dark);
	line-height: 1.4;
}

.contact-info-block {
	margin-top: 48px;
}

.contact-info-block .contact-item {
	margin-bottom: 32px;
}

.contact-info-block .region {
	font-weight: 700;
	color: var(--mc-dark);
}

.contact-info-block p {
	color: var(--mc-dark);
	line-height: 1.6;
}

.contact-info-block a {
	color: var(--mc-dark);
	text-decoration: none;
}

.contact-info-block a:hover {
	color: var(--mc-orange);
}

/* ---------- Pagination ---------- */
.pagination {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 48px;
}

.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	text-decoration: none;
	color: var(--mc-dark);
	font-size: 0.9rem;
}

.pagination .current {
	color: var(--mc-orange);
	font-weight: 700;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeInUp 0.6s ease-out both;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.team-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.case-studies-grid {
		grid-template-columns: 1fr;
	}

	.testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Carousel sizing handled by JS on resize */
}

@media (max-width: 768px) {
	.site-header {
		padding: 12px 20px;
	}

	body {
		padding-top: 64px;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.admin-bar body,
	body.admin-bar {
		padding-top: 110px;
	}

	.hero-section {
		padding: 0 20px;
		min-height: 100vh;
	}

	.hero-bottom-bar {
		left: 20px;
		right: 20px;
	}

	.admin-bar .hero-bottom-bar {
		bottom: 24px;
	}

	.mc-section {
		padding: var(--mc-section-gap) 20px;
	}

	.services-grid {
		grid-template-columns: 1fr;
	}

	.case-studies-grid {
		grid-template-columns: 1fr;
	}

	.case-study-card {
		flex-direction: column;
	}

	.case-study-card img {
		width: 100%;
		max-width: 200px;
	}

	.testimonials-grid {
		grid-template-columns: 1fr;
	}

	.service-detail {
		padding: 40px 20px 60px;
	}

	/* Carousel sizing handled by JS on resize */

	.team-grid {
		grid-template-columns: 1fr;
	}

	.footer-contacts {
		grid-template-columns: 1fr;
	}

	.site-footer {
		padding: 40px 20px 24px;
	}
}
