/*
Theme Name: Cariconsult
Description: Custom theme for Cariconsult International Ltd. Recreates the original site design with native WordPress blocks – no page builder required.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: cariconsult
*/

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

p {
	margin: 0 0 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 25px 0 15px;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 10px 15px;
	background: #fff;
	color: var(--wp--preset--color--heading);
}

.skip-link:focus {
	left: 10px;
	top: 10px;
}

/* ---------- Header ---------- */

.site-header {
	position: relative;
	z-index: 100;
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-inner {
	display: flex;
	align-items: center;
	min-height: 100px;
	gap: 20px;
}

.site-logo {
	flex: 0 0 auto;
	margin-right: auto;
}

.site-logo img {
	display: block;
	width: auto;
	max-height: 85px;
}

.site-title {
	font-family: var(--wp--preset--font-family--lora);
	font-size: 22px;
	font-weight: 700;
	color: var(--wp--preset--color--heading);
}

.main-menu,
.main-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-menu {
	display: flex;
	align-items: center;
}

.main-menu > li {
	position: relative;
}

.main-menu > li > a {
	display: block;
	padding: 5px 17px;
	font-size: 13px;
	font-weight: 600;
	line-height: 40px;
	text-transform: uppercase;
	color: var(--wp--preset--color--heading);
}

.main-menu > li > a:hover,
.main-menu > li:focus-within > a,
.main-menu > li.current-menu-item > a,
.main-menu > li.is-active > a {
	color: var(--wp--preset--color--accent);
}

.main-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	padding: 12px 0;
	background: #fff;
	border-top: 2px solid var(--wp--preset--color--accent);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.main-menu > li:hover > .sub-menu,
.main-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.main-menu .sub-menu a {
	display: block;
	padding: 7px 25px;
	font-size: 14px;
	line-height: 24px;
	color: #000;
}

.main-menu .sub-menu a:hover,
.main-menu .sub-menu .current-menu-item > a {
	color: var(--wp--preset--color--accent);
}

.header-search {
	position: relative;
	margin-left: 25px;
}

.search-toggle,
.menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--heading);
	cursor: pointer;
}

.search-toggle:hover {
	color: var(--wp--preset--color--accent);
}

.header-search-form {
	position: absolute;
	top: calc(100% + 30px);
	right: 0;
	width: 320px;
	padding: 15px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-field,
.cariconsult-form input,
.cariconsult-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d6d9d8;
	border-radius: 3px;
	font: inherit;
	color: var(--wp--preset--color--heading);
	background: #fff;
}

.search-field:focus,
.cariconsult-form input:focus,
.cariconsult-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--button);
	outline-offset: -1px;
	border-color: transparent;
}

.search-submit {
	flex: 0 0 auto;
	border: 0;
	cursor: pointer;
}

.menu-toggle {
	display: none;
}

.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu-toggle-bar {
	position: relative;
}

.menu-toggle-bar::before,
.menu-toggle-bar::after {
	content: "";
	position: absolute;
	left: 0;
}

.menu-toggle-bar::before {
	top: -7px;
}

.menu-toggle-bar::after {
	top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar {
	background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991px) {
	.header-inner {
		flex-wrap: wrap;
		min-height: 80px;
		gap: 0;
	}

	.site-logo img {
		max-height: 60px;
	}

	.menu-toggle {
		display: flex;
		order: 3;
	}

	.header-search {
		order: 2;
		margin-left: 0;
	}

	.header-search-form {
		top: calc(100% + 20px);
		width: min(320px, calc(100vw - 30px));
	}

	.main-navigation {
		order: 4;
		flex: 0 0 100%;
		display: none;
		padding-bottom: 15px;
	}

	.main-navigation.is-open {
		display: block;
	}

	.main-menu {
		display: block;
		border-top: 1px solid #eee;
	}

	.main-menu > li > a {
		padding: 4px 0;
		border-bottom: 1px solid #f2f2f2;
	}

	.main-menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 8px 15px;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.main-menu .sub-menu a {
		padding: 6px 0;
	}
}

/* ---------- Page banner ---------- */

.page-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 324px;
	padding: 110px 15px;
	margin-bottom: 5%;
	background-color: #1e1e1e;
	background-image: url(assets/images/banner-default.jpg);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	text-align: center;
}

.page-banner-box {
	width: 100%;
	max-width: 500px;
	min-width: 0;
	padding: 15px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
}

.page-banner-title {
	margin: 0;
	padding-bottom: 13px;
	font-family: var(--wp--preset--font-family--lora);
	font-size: 28px;
	font-weight: 700;
	line-height: 35px;
	text-transform: uppercase;
	color: #fff;
}

.breadcrumb {
	font-size: 14px;
	line-height: 26px;
}

.breadcrumb a {
	color: #dcddde;
}

.breadcrumb a:hover {
	color: #fff;
}

.breadcrumb .sep {
	padding: 0 6px;
}

@media (max-width: 767px) {
	.page-banner {
		min-height: 0;
		padding: 60px 15px;
	}

	.page-banner-title {
		font-size: 22px;
		line-height: 28px;
	}
}

/* ---------- Content ---------- */

.entry-content {
	padding-bottom: 60px;
}

.entry-front .entry-content {
	padding-bottom: 0;
}

/* Keep normal content on the 1170px grid; let full-width sections stretch. */
.entry-content > :where(:not(.alignfull):not(.alignwide)) {
	max-width: 1200px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 15px;
	padding-right: 15px;
}

.entry-content > .alignfull {
	margin-left: 0;
	margin-right: 0;
}

.entry-content > * {
	margin-top: 0;
}

.entry-content > :where(.wp-block-group, .wp-block-columns, .wp-block-cover, .wp-block-image) {
	margin-bottom: 35px;
}

.entry-content > .alignfull {
	margin-bottom: 0;
}

.entry-content > .alignfull + :not(.alignfull) {
	margin-top: 35px;
}

.entry-content:has(> .alignfull:last-child) {
	padding-bottom: 0;
}

.entry-content .wp-block-columns {
	gap: 30px;
}

.entry-content .wp-block-column > .wp-block-columns {
	margin-bottom: 0;
}

.entry-content .wp-block-image {
	margin: 0 0 15px;
}

.entry-content .wp-block-image img {
	vertical-align: middle;
}

.wp-block-columns.are-vertically-aligned-center > .wp-block-column {
	align-self: center;
}

.entry-content .wp-block-column > :first-child {
	margin-top: 0;
}

.entry-content .wp-block-column > :last-child {
	margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 15px;
	padding-left: 20px;
}

.entry-content .wp-block-group.has-background {
	padding-top: 30px;
	padding-bottom: 30px;
}

.entry-meta {
	color: #8a9190;
	font-size: 13px;
}

/* Lora section heading with short rule beneath (e.g. "About Cariconsult"). */
.is-style-section-title {
	font-family: var(--wp--preset--font-family--lora) !important;
	font-size: 36px;
	line-height: 40px;
	font-weight: 700;
	color: #222;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.wp-block-separator.is-style-short {
	width: 50px;
	max-width: 50px;
	margin: 0 0 50px !important;
	border: 0;
	border-top: 2px solid #9d9d9d;
	opacity: 1;
}

.wp-block-separator.is-style-short.aligncenter {
	margin-left: auto !important;
	margin-right: auto !important;
}

.wp-block-button__link {
	font-weight: 400;
}

.wp-block-button.is-style-large .wp-block-button__link,
.has-large-buttons .wp-block-button__link {
	padding: 18px 25px;
	font-size: 16px;
}

/* ---------- Home page sections ---------- */

.cc-emergency {
	padding: 30px 15px;
	background: var(--wp--preset--color--primary);
	text-align: center;
}

.cc-emergency h1,
.cc-emergency h2 {
	margin: 0;
	color: #fff;
	font-size: 42px;
	font-weight: 900;
	line-height: 48px;
}

.cc-emergency a {
	color: #fff;
}

.cc-tagline {
	background: #eee;
}

.cc-tagline h3 {
	margin: 10px 0;
	text-align: center;
}

.cc-hero .wp-block-image,
.cc-hero.wp-block-image {
	margin: 0;
}

.cc-hero img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.cc-about {
	padding-top: 8%;
	padding-bottom: 8%;
}

.cc-about p {
	font-weight: 300;
	color: #444;
}

.entry-content .cc-services.wp-block-cover {
	min-height: 0;
	padding: 0;
	color: var(--wp--preset--color--text);
}

.cc-services .wp-block-cover__inner-container {
	width: 100%;
	color: inherit;
}

.cc-services h2,
.cc-services h4 {
	color: var(--wp--preset--color--heading);
}

.cc-services-inner {
	padding: 1px 11px 15px;
	background: rgba(244, 244, 244, 0.7);
}

.cc-services-inner > h2 {
	text-align: center;
	margin: 25px 0 15px;
}

.cc-services-inner .wp-block-columns {
	gap: 20px;
	align-items: stretch;
}

.cc-services-inner .wp-block-column {
	display: flex;
	flex-direction: column;
}

.cc-services-inner .wp-block-column .wp-block-buttons {
	margin-top: auto;
	padding-top: 18px;
}

.cc-services-inner h4 {
	margin: 0 0 15px;
}

@media (max-width: 781px) {
	.cc-services-inner .wp-block-column {
		padding-bottom: 20px;
	}
}

/* ---------- Team grids & profiles ---------- */

.team-row {
	margin-bottom: 40px;
}

.team-row .wp-block-column {
	text-align: center;
}

/* Size columns as if the row were full, so a lone person in the last row matches the rest. */
@media (min-width: 782px) {
	.team-row > .wp-block-column[style*="flex-basis:33.33%"] {
		flex: 0 0 calc((100% - 60px) / 3);
	}

	.team-row > .wp-block-column[style*="flex-basis:50%"] {
		flex: 0 0 calc((100% - 30px) / 2);
	}
}

.team-row .wp-block-image img {
	width: 380px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.team-row .wp-block-buttons {
	justify-content: center;
}

.team-row .wp-block-button {
	width: 100%;
	max-width: 380px;
}

.team-row .wp-block-button__link {
	display: block;
	width: 100%;
	padding: 8px 15px;
}

.contact-strip {
	background: var(--wp--preset--color--light);
}

.contact-strip h3 {
	margin: 0;
}

.contact-strip p {
	margin-bottom: 6px;
}

.profile-text p {
	margin-bottom: 8px;
}

.profile-text strong {
	display: inline-block;
	margin-top: 14px;
	color: var(--wp--preset--color--heading);
	letter-spacing: 0.02em;
}

.profile-text p:first-child strong {
	margin-top: 0;
}

@media (max-width: 781px) {
	.profile-text {
		max-width: 380px;
		margin: 0 auto;
		padding-top: 20px;
		border-top: 1px solid #eee;
	}
}

/* ---------- Contact page ---------- */

.cc-contact-panel {
	color: #fff;
}

.cc-contact-panel h2,
.cc-contact-panel h3,
.cc-contact-panel a {
	color: #fff;
}

.cc-contact-panel h2 {
	font-size: 30px;
	line-height: 38px;
}

.cc-contact-panel h3 {
	margin: 12px 0;
	font-size: 18px;
	line-height: 26px;
}

.cc-contact-panel p {
	margin-bottom: 6px;
	text-align: center;
}

.cc-offices {
	padding-top: 5%;
	padding-bottom: 5%;
}

.cc-offices h3 {
	text-align: center;
}

.cc-offices p {
	margin-bottom: 4px;
	text-align: center;
}

.cc-offices p strong {
	color: var(--wp--preset--color--heading);
}

.cc-offices .wp-block-columns + .wp-block-columns {
	margin-top: 30px;
}

/* ---------- FAQ (details blocks) ---------- */

.wp-block-details {
	margin: 0 0 10px;
	padding: 14px 18px;
	border: 1px solid #e5e7e7;
	border-radius: 4px;
}

.wp-block-details summary {
	font-weight: 600;
	color: var(--wp--preset--color--heading);
	cursor: pointer;
}

.wp-block-details[open] summary {
	margin-bottom: 10px;
}

/* ---------- Form ---------- */

.cariconsult-form form,
.cariconsult-form .form-notice {
	max-width: 640px;
}

.cariconsult-form .field {
	margin-bottom: 18px;
}

.cariconsult-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
	color: var(--wp--preset--color--heading);
}

.cariconsult-form .required {
	color: #c0392b;
}

.cariconsult-form .field-hp {
	position: absolute;
	left: -9999px;
}

.cariconsult-form button {
	padding: 14px 32px;
	border: 0;
	cursor: pointer;
	font: inherit;
}

.form-notice {
	padding: 12px 16px;
	border-radius: 4px;
}

.form-notice.is-success {
	background: #e7f5ec;
	color: #1e6b3a;
}

.form-notice.is-error {
	background: #fdecea;
	color: #a12b1f;
}

/* ---------- Post lists ---------- */

.post-summary {
	padding-bottom: 25px;
	margin-bottom: 25px;
	border-bottom: 1px solid #eee;
}

.post-summary-title {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 30px;
}

.post-list .search-form {
	max-width: 480px;
}

/* ---------- Footer ---------- */

.site-footer {
	padding: 30px 0;
	background: var(--wp--preset--color--footer);
}

.copyright {
	margin: 0;
	padding: 19px 15px;
	border: 1px solid #fff;
	color: #dedede;
	font-size: 14px;
	line-height: 24px;
	text-align: center;
}

.back-to-top {
	position: fixed;
	right: 25px;
	bottom: 25px;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #256dea;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	color: #fff;
	background: var(--wp--preset--color--accent);
}

/* ---------- Responsive helpers ---------- */

@media (max-width: 767px) {
	.hidden-mobile {
		display: none !important;
	}

	.cc-emergency h1,
	.cc-emergency h2 {
		font-size: 26px;
		line-height: 34px;
		margin: 10px 0;
	}

	.is-style-section-title {
		font-size: 28px;
		line-height: 34px;
	}

	h2 {
		font-size: 28px;
		line-height: 34px;
	}
}

@media (min-width: 768px) {
	.hidden-desktop {
		display: none !important;
	}
}
