/**
 * Miro R Bouw — Custom Theme Styles
 *
 * Consolidates all custom styles previously scattered across template files.
 * Loaded via wp_enqueue_style('mrb-custom') in functions.php after all theme CSS,
 * so anything here can override theme defaults without needing !important.
 *
 * Organization:
 *   1. Homepage (index.php)
 *   2. Projects Listing page
 *   3. Single Project page
 *   4. Contact page
 *   5. Shared utilities
 */


/* =============================================================
   1. HOMEPAGE (index.php)
   ============================================================= */

/* Anchor link offset — accounts for the sticky header so section
   titles aren't hidden underneath when scrolling to anchors. */
#about,
#services {
	scroll-margin-top: 100px;
}


/* =============================================================
   2. PROJECTS LISTING PAGE (mrb-projects-template.php)
   ============================================================= */

.mrb-project-card {
	background: #fff;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mrb-project-card:hover {
	transform: translateY(-5px);
}

.mrb-project-card-image {
	aspect-ratio: 3 / 2;
}

.mrb-project-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mrb-project-card:hover .mrb-project-card-image img {
	transform: scale(1.08);
}

.mrb-project-card-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mrb-project-card:hover .mrb-project-card-overlay {
	opacity: 1;
}

/* Category filter pills */
.sort-source .nav-link {
	color: #777;
	padding: 0.6rem 1.5rem;
	border-radius: 0;
	letter-spacing: 0.5px;
	text-decoration: none;
}

.sort-source .nav-link:hover {
	color: #1a1a1a;
}

.sort-source .nav-link.active {
	background-color: #e8b341;
	color: #1a1a1a !important;
}

/* Pagination */
.mrb-pagination .page-link {
	min-width: 42px;
	margin: 0 3px;
	padding: 0.6rem 1rem;
	border: 1px solid #e0e0e0;
	border-radius: 0;
	color: #1a1a1a;
	text-align: center;
	transition: all 0.2s ease;
}

.mrb-pagination .page-link:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
	color: #1a1a1a;
}

.mrb-pagination .page-item.active .page-link {
	background-color: #e8b341;
	border-color: #e8b341;
	color: #1a1a1a;
	font-weight: 600;
}

.mrb-pagination .page-item.disabled .page-link {
	color: #aaa;
	cursor: default;
}


/* =============================================================
   3. SINGLE PROJECT PAGE (single-mrb_project.php)
   ============================================================= */

/* Featured image — sits in left column with the meta sidebar on the right.
   Constrains to a sensible hero size while preserving aspect ratio. */
.mrb-project-featured-image {
	width: 100%;
	height: 100%;
	min-height: 400px;
	max-height: 550px;
	overflow: hidden;
	border-radius: 4px;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mrb-project-featured-image img {
	width: 100%;
	height: 100%;
	min-height: 400px;
	max-height: 550px;
	object-fit: cover;
	display: block;
}

.mrb-project-featured-image.mrb-no-image {
	font-style: italic;
}

/* Project description content */
.mrb-project-content p {
	margin-bottom: 1.2em;
}

.mrb-project-content h2,
.mrb-project-content h3,
.mrb-project-content h4 {
	margin-top: 1.8em;
	margin-bottom: 0.8em;
	color: #1a1a1a;
	font-weight: 700;
}

/* Project gallery thumbnails */
.mrb-gallery-item {
	aspect-ratio: 4 / 3;
}

.mrb-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mrb-gallery-item:hover img {
	transform: scale(1.08);
}

.mrb-gallery-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mrb-gallery-item:hover .mrb-gallery-overlay {
	opacity: 1;
}


/* =============================================================
   4. CONTACT PAGE (page-kontakt.php)
   ============================================================= */

/* Contact Form 7 styling — matches the Porto theme */

.mrb-contact-form .wpcf7-form p {
	margin-bottom: 1.2rem;
}

.mrb-contact-form label {
	display: block;
	margin-bottom: 0.4rem;
	color: #1a1a1a;
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mrb-contact-form .wpcf7-form-control:not(.wpcf7-submit) {
	width: 100%;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 0;
	color: #333;
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

.mrb-contact-form .wpcf7-form-control:not(.wpcf7-submit):focus {
	border-color: #e8b341;
	outline: none;
	box-shadow: 0 0 0 3px rgba(232, 179, 65, 0.15);
}

.mrb-contact-form textarea.wpcf7-form-control {
	min-height: 150px;
	resize: vertical;
}

/* Submit button — gold default, dark on hover */
.mrb-contact-form .wpcf7-submit,
.mrb-contact-form input[type="submit"].wpcf7-form-control {
	width: auto !important;
	padding: 14px 36px !important;
	background-color: #e8b341 !important;
	color: #1a1a1a !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.mrb-contact-form .wpcf7-submit:hover,
.mrb-contact-form input[type="submit"].wpcf7-form-control:hover {
	background-color: #1a1a1a !important;
	color: #fff !important;
	transform: translateY(-2px);
}

/* Validation messages */
.mrb-contact-form .wpcf7-not-valid-tip {
	margin-top: 0.3rem;
	color: #d63638;
	font-size: 0.85rem;
}

.mrb-contact-form .wpcf7-response-output {
	margin-top: 1.5rem;
	padding: 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	font-size: 0.95rem;
}

.mrb-contact-form .wpcf7 form.sent .wpcf7-response-output {
	background: #ecfaee;
	border-color: #46b450;
	color: #1a3a1a;
}

.mrb-contact-form .wpcf7 form.invalid .wpcf7-response-output,
.mrb-contact-form .wpcf7 form.failed .wpcf7-response-output {
	background: #fdeded;
	border-color: #d63638;
	color: #5a1a1a;
}

.mrb-contact-form .wpcf7-spinner {
	margin-left: 12px;
}


/* =============================================================
   5. SHARED UTILITIES
   ============================================================= */

/* Reserve space for empty states (prevents layout shift) */
.mrb-empty-state {
	padding: 60px 20px;
	color: #999;
	font-size: 1.1rem;
	text-align: center;
}


/* =============================================================
   6. LANGUAGE SWITCHER (header)
   ============================================================= */

.mrb-language-switcher {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	list-style: none;
}

.mrb-language-switcher .list-inline-item {
	margin: 0;
}

.mrb-language-switcher .mrb-lang a {
	display: block;
	padding: 4px;
	border: 2px solid transparent;
	border-radius: 3px;
	transition: border-color 0.2s ease, opacity 0.2s ease;
	opacity: 0.55;
	line-height: 0;
}

.mrb-language-switcher .mrb-lang a:hover {
	opacity: 0.85;
}

.mrb-language-switcher .mrb-lang.active a {
	opacity: 1;
	border-color: #e8b341;
}

.mrb-language-switcher img {
	display: block;
	width: 24px;
	height: 18px;
	object-fit: cover;
	border-radius: 1px;
}


/* =============================================================
   7. SEARCH RESULTS (search.php)
   ============================================================= */

.mrb-search-result {
	transition: background-color 0.2s ease;
}

.mrb-search-result:hover {
	background-color: #fafafa;
}

.mrb-search-result-thumb {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mrb-search-result:hover .mrb-search-result-thumb {
	transform: scale(1.03);
}

.mrb-search-again-form .form-control {
	padding: 14px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 0;
	font-size: 1rem;
}

.mrb-search-again-form .form-control:focus {
	border-color: #e8b341;
	outline: none;
	box-shadow: 0 0 0 3px rgba(232, 179, 65, 0.15);
}

.mrb-search-again-form .btn {
	padding: 14px 24px;
	border-radius: 0;
	background-color: #e8b341;
	color: #1a1a1a;
	font-weight: 700;
	border: none;
}

.mrb-search-again-form .btn:hover {
	background-color: #1a1a1a;
	color: #fff;
}