/*
 * com_handwerker - Frontend (WFG-Stil)
 */

:root {
	--hwk-primary: #E11D24;
	--hwk-primary-dark: #B0151B;
	--hwk-primary-darker: #8B1015;
	--hwk-primary-soft: #FDEAEB;
	--hwk-text: #2c3e50;
	--hwk-muted: #6b7785;
	--hwk-bg: #F5F6F7;
	--hwk-card-bg: #ffffff;
	--hwk-border: #e6e9ec;
	--hwk-shadow: 0 2px 12px rgba(176, 21, 27, 0.10);
	--hwk-shadow-hover: 0 6px 20px rgba(176, 21, 27, 0.20);
	--hwk-radius: 4px;
	--hwk-radius-lg: 8px;
}

/* ===== Buttons ===== */

.hwk-btn-primary,
.hwk-btn {
	background: var(--hwk-primary);
	color: #fff !important;
	border: 0;
	padding: 8px 18px;
	border-radius: var(--hwk-radius);
	font-size: 0.9rem;
	cursor: pointer;
	text-decoration: none !important;
	display: inline-block;
	transition: background 0.15s ease;
	letter-spacing: 0.3px;
	line-height: 1.45;
}

.hwk-btn-primary:hover,
.hwk-btn:hover {
	background: var(--hwk-primary-dark);
	color: #fff !important;
}

.hwk-btn-outline {
	background: transparent;
	color: var(--hwk-primary-dark) !important;
	border: 1px solid var(--hwk-primary);
}

.hwk-btn-outline:hover {
	background: var(--hwk-primary);
	color: #fff !important;
}

.hwk-btn-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.hwk-back-bar {
	margin-bottom: 16px;
}

.hwk-back-bar-bottom {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--hwk-border);
	margin-bottom: 0;
}

/* ===== List Page ===== */

.com-handwerker-list {
	padding: 16px 0;
}

.com-handwerker-list .hwk-page-header {
	text-align: center;
	margin-bottom: 28px;
}

.com-handwerker-list .hwk-page-title {
	font-size: 1.6rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--hwk-primary);
	font-weight: 600;
	margin: 0 0 6px;
}

.com-handwerker-list .hwk-page-subtitle {
	color: var(--hwk-muted);
	font-size: 0.95rem;
	margin: 0;
}

.com-handwerker-list .handwerker-filter {
	background: var(--hwk-card-bg);
	border: 1px solid var(--hwk-border);
	border-radius: var(--hwk-radius-lg);
	padding: 16px 20px;
	margin-bottom: 20px;
	box-shadow: var(--hwk-shadow);
}

.com-handwerker-list .handwerker-filter .form-control,
.com-handwerker-list .handwerker-filter .form-select {
	border-radius: var(--hwk-radius);
	border-color: var(--hwk-border);
	font-size: 0.95rem;
}

.com-handwerker-list .handwerker-filter .form-control:focus,
.com-handwerker-list .handwerker-filter .form-select:focus {
	border-color: var(--hwk-primary);
	box-shadow: 0 0 0 0.2rem rgba(225, 29, 36, 0.18);
}

.com-handwerker-list .hwk-results-count {
	color: var(--hwk-muted);
	font-size: 0.9rem;
	margin-bottom: 14px;
	padding: 0 4px;
}

/* DIV-Tabelle */
.hwk-table {
	background: var(--hwk-card-bg);
	border: 1px solid var(--hwk-border);
	border-radius: var(--hwk-radius-lg);
	overflow: hidden;
	box-shadow: var(--hwk-shadow);
}

.hwk-table-head,
.hwk-table-row {
	display: grid;
	grid-template-columns: 80px minmax(0, 2.4fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 50px;
	gap: 12px;
	align-items: center;
	padding: 12px 16px;
}

.hwk-table-head {
	background: var(--hwk-primary-soft);
	border-bottom: 2px solid var(--hwk-primary);
}

.hwk-th {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--hwk-primary-dark);
}

.hwk-sort {
	color: var(--hwk-primary-dark);
	text-decoration: none;
	display: inline-block;
	padding: 4px 0;
}

.hwk-sort:hover {
	color: var(--hwk-primary-darker);
	text-decoration: underline;
}

.hwk-sort.active {
	color: var(--hwk-primary-darker);
	font-weight: 800;
}

.hwk-table-row {
	border-bottom: 1px solid var(--hwk-border);
	color: var(--hwk-text);
	text-decoration: none;
	transition: background 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
}

.hwk-table-row:last-child {
	border-bottom: 0;
}

.hwk-table-row:hover {
	background: var(--hwk-primary-soft);
	color: var(--hwk-text);
	text-decoration: none;
}

.hwk-td {
	font-size: 0.92rem;
	min-width: 0;
}

.hwk-col-logo {
	display: flex;
	justify-content: center;
	align-items: center;
}

.hwk-col-logo img {
	max-width: 64px;
	max-height: 48px;
	object-fit: contain;
}

.hwk-logo-placeholder {
	display: inline-flex;
	width: 48px;
	height: 48px;
	align-items: center;
	justify-content: center;
	color: var(--hwk-primary);
	font-size: 1.5rem;
	background: var(--hwk-primary-soft);
	border-radius: var(--hwk-radius);
	opacity: 0.6;
}

.hwk-firma-name {
	font-weight: 700;
	color: var(--hwk-text);
	letter-spacing: 0.3px;
	text-transform: uppercase;
	font-size: 0.95rem;
	line-height: 1.3;
}

.hwk-firma-teaser {
	font-size: 0.82rem;
	color: var(--hwk-muted);
	margin-top: 3px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hwk-gewerk-badge {
	display: inline-block;
	background: var(--hwk-primary);
	color: #fff;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	font-weight: 600;
	white-space: nowrap;
}

.hwk-row-arrow {
	color: var(--hwk-primary);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
}

.hwk-table-row:hover .hwk-row-arrow {
	color: var(--hwk-primary-darker);
	transform: translateX(2px);
}

.com-handwerker-list .pagination-wrap {
	margin-top: 24px;
	display: flex;
	justify-content: center;
}

.com-handwerker-list .pagination .page-link {
	color: var(--hwk-primary-dark);
	border-color: var(--hwk-border);
}

.com-handwerker-list .pagination .page-item.active .page-link {
	background-color: var(--hwk-primary);
	border-color: var(--hwk-primary);
	color: #fff;
}

/* ===== Detail Page ===== */

.com-handwerker-detail {
	padding: 16px 0;
}

.com-handwerker-detail .handwerker-card {
	background: transparent;
	border: 0;
	padding: 0;
	border-radius: 0;
}

.com-handwerker-detail .handwerker-hero {
	background: linear-gradient(135deg, #ffffff 0%, var(--hwk-primary-soft) 100%);
	border-radius: var(--hwk-radius-lg);
	padding: 32px;
	box-shadow: var(--hwk-shadow);
	display: flex;
	gap: 28px;
	align-items: center;
	margin-bottom: 24px;
}

.com-handwerker-detail .handwerker-logo-large {
	flex-shrink: 0;
	background: #fff;
	border-radius: var(--hwk-radius-lg);
	padding: 16px;
	box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.com-handwerker-detail .handwerker-logo-large img {
	display: block;
	max-width: 180px;
	max-height: 160px;
	object-fit: contain;
}

.com-handwerker-detail .handwerker-title-wrap {
	flex: 1;
}

.com-handwerker-detail .handwerker-gewerk {
	display: inline-block;
	background: var(--hwk-primary);
	color: #fff;
	padding: 4px 14px;
	border-radius: 14px;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
}

.com-handwerker-detail .handwerker-title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--hwk-text);
	letter-spacing: 0.5px;
	margin: 0 0 8px;
}

.com-handwerker-detail .handwerker-teaser-large {
	color: var(--hwk-muted);
	font-size: 1.05rem;
	margin: 0;
	line-height: 1.5;
}

/* Section card */
.com-handwerker-detail .hwk-section {
	background: #fff;
	border-radius: var(--hwk-radius-lg);
	padding: 28px;
	box-shadow: var(--hwk-shadow);
	margin-bottom: 22px;
	border: 1px solid var(--hwk-border);
}

.com-handwerker-detail .hwk-section-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--hwk-primary);
	letter-spacing: 2px;
	text-transform: uppercase;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--hwk-primary-soft);
}

.com-handwerker-detail .handwerker-description {
	color: var(--hwk-text);
	line-height: 1.7;
	font-size: 1rem;
}

/* Map */
.com-handwerker-detail .hwk-map {
	height: 380px;
	border: 1px solid var(--hwk-border);
	border-radius: var(--hwk-radius-lg);
	overflow: hidden;
	margin-bottom: 16px;
}

.com-handwerker-detail .hwk-route-box {
	background: var(--hwk-primary-soft);
	border-radius: var(--hwk-radius-lg);
	padding: 18px 20px;
	margin-top: 16px;
}

.com-handwerker-detail .hwk-route-box h3 {
	color: var(--hwk-primary-dark);
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 12px;
}

/* Contact card */
.com-handwerker-detail .handwerker-contact {
	background: #fff;
	border-radius: var(--hwk-radius-lg);
	box-shadow: var(--hwk-shadow);
	border: 0;
}

.com-handwerker-detail .handwerker-contact .card-body {
	padding: 28px;
}

.com-handwerker-detail .handwerker-contact .card-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--hwk-primary);
	letter-spacing: 2px;
	text-transform: uppercase;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--hwk-primary-soft);
}

.com-handwerker-detail .handwerker-contact .hwk-row {
	margin-bottom: 14px;
}

.com-handwerker-detail .handwerker-contact .hwk-label {
	font-weight: 600;
	display: block;
	color: var(--hwk-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 2px;
}

.com-handwerker-detail .handwerker-contact a {
	color: var(--hwk-primary-dark);
	text-decoration: none;
	word-break: break-word;
}

.com-handwerker-detail .handwerker-contact a:hover {
	text-decoration: underline;
}

.com-handwerker-detail .handwerker-contact address {
	margin-bottom: 0;
	font-style: normal;
	color: var(--hwk-text);
	line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
	.hwk-table-head,
	.hwk-table-row {
		grid-template-columns: 60px minmax(0, 2fr) minmax(0, 1fr) 30px;
	}
	.hwk-th.hwk-col-name,
	.hwk-th.hwk-col-ort,
	.hwk-td.hwk-col-name,
	.hwk-td.hwk-col-ort {
		display: none;
	}
}

@media (max-width: 600px) {
	.hwk-table-head {
		display: none;
	}
	.hwk-table-row {
		display: block;
		padding: 14px 16px;
	}
	.hwk-td {
		display: block;
	}
	.hwk-col-logo {
		justify-content: flex-start;
		margin-bottom: 8px;
	}
	.hwk-col-name,
	.hwk-col-ort {
		display: block !important;
		font-size: 0.85rem;
		color: var(--hwk-muted);
		margin-top: 4px;
	}
	.hwk-col-name::before,
	.hwk-col-ort::before {
		content: attr(data-label) ': ';
		font-weight: 600;
		text-transform: uppercase;
		font-size: 0.7rem;
		letter-spacing: 1px;
		display: inline;
	}
	.hwk-col-action {
		display: none;
	}
	.com-handwerker-detail .handwerker-hero {
		flex-direction: column;
		text-align: center;
		padding: 24px 18px;
	}
	.com-handwerker-detail .handwerker-title {
		font-size: 1.5rem;
	}
}

/* ================================================================== */
/* Selbst-Registrierung: Button                                       */
/* ================================================================== */
.hwk-register-wrap {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--hwk-border, #e0e0e0);
	text-align: center;
}

.hwk-btn-register {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	background: transparent;
	border: 2px solid var(--hwk-primary, #0055a4);
	border-radius: 8px;
	color: var(--hwk-primary, #0055a4);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
}
.hwk-btn-register:hover,
.hwk-btn-register:focus {
	background: var(--hwk-primary, #0055a4);
	color: #fff;
	outline: none;
}

/* ================================================================== */
/* Registrierungs-Modal                                               */
/* ================================================================== */

/* Header: Primärfarbe mit weißem Text */
.hwk-register-modal .modal-header {
	background: var(--hwk-primary, #0055a4);
	color: #fff !important;
	border-bottom: none;
	padding: 1.1rem 1.5rem;
	border-radius: 12px 12px 0 0;
}
.hwk-register-modal .modal-title,
.hwk-register-modal .modal-header .modal-title,
.hwk-register-modal .modal-header span[class*="icon-"] {
	color: #fff !important;
	font-weight: 700;
	font-size: 1.1rem;
}
.hwk-register-modal .btn-close {
	filter: invert(1) grayscale(1);
	opacity: 0.85;
}

/* Modal-Content: weicher Schatten, leicht abgerundet */
.hwk-register-modal.modal-content {
	border: none;
	border-radius: 12px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.18);
	overflow: hidden;
}

/* Modal-Body: etwas mehr Padding */
.hwk-register-modal .modal-body {
	padding: 1.5rem;
	background: #f8f9fb;
}

/* Footer */
.hwk-register-modal .modal-footer {
	background: #fff;
	border-top: 1px solid #e9ecef;
	padding: 1rem 1.5rem;
	gap: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Formular-Sektionen                                                  */
/* ------------------------------------------------------------------ */
.hwk-reg-section {
	background: #fff;
	border: 1px solid #e4e8ee;
	border-radius: 10px;
	padding: 1.1rem 1.2rem 0.8rem;
	margin-bottom: 1rem;
}
.hwk-reg-section:last-of-type {
	margin-bottom: 0;
}

.hwk-reg-legend {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--hwk-primary, #0055a4);
	padding: 0 6px;
	margin-bottom: 0.9rem;
	width: auto;
	float: none;
	background: #fff;
	border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Formularfelder: abgerundet                                          */
/* ------------------------------------------------------------------ */
.hwk-register-modal .form-control,
.hwk-register-modal .form-select {
	border-radius: 8px;
	border: 1px solid #ced4da;
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
	transition: border-color 0.15s, box-shadow 0.15s;
	background: #fff;
}
.hwk-register-modal .form-control:focus,
.hwk-register-modal .form-select:focus {
	border-color: var(--hwk-primary, #0055a4);
	box-shadow: 0 0 0 3px rgba(0,85,164,0.12);
	outline: none;
}
.hwk-register-modal .form-label {
	font-size: 0.82rem;
	font-weight: 600;
	color: #444;
	margin-bottom: 0.3rem;
}
.hwk-register-modal .form-text {
	font-size: 0.76rem;
	color: #888;
}
.hwk-register-modal .form-check-input {
	border-radius: 4px;
	border: 1.5px solid #ced4da;
	width: 1.1em;
	height: 1.1em;
	margin-top: 0.2em;
}
.hwk-register-modal .form-check-input:checked {
	background-color: var(--hwk-primary, #0055a4);
	border-color:     var(--hwk-primary, #0055a4);
}
.hwk-register-modal .form-check-input:focus {
	box-shadow: 0 0 0 3px rgba(0,85,164,0.15);
}

/* ------------------------------------------------------------------ */
/* Pflichtfeld-Markierung & Hinweise                                   */
/* ------------------------------------------------------------------ */
.hwk-required {
	color: #dc3545;
	margin-left: 2px;
}
.hwk-required-note {
	margin-top: 0.75rem;
	margin-bottom: 0;
	font-size: 0.78rem;
	color: #888;
}

/* ------------------------------------------------------------------ */
/* Datenschutz-Box                                                     */
/* ------------------------------------------------------------------ */
.hwk-dsgvo-section {
	background: #eef4ff;
	border-color: #c0d4f0;
	border-radius: 10px;
}
.hwk-dsgvo-section .form-check-label {
	font-size: 0.85rem;
	line-height: 1.55;
	color: #333;
}

/* ------------------------------------------------------------------ */
/* CAPTCHA                                                             */
/* ------------------------------------------------------------------ */
.hwk-captcha-section {
	padding: 0.8rem 1.2rem;
	border-radius: 10px;
}

/* ------------------------------------------------------------------ */
/* Absende-Button                                                      */
/* ------------------------------------------------------------------ */
.hwk-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--hwk-primary, #0055a4);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0.55rem 1.4rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
}
.hwk-btn-primary:hover,
.hwk-btn-primary:focus {
	background: #003d7a;
	box-shadow: 0 2px 8px rgba(0,85,164,0.25);
	color: #fff;
	outline: none;
}

/* Spinner während des Sendens */
@keyframes hwk-spin {
	to { transform: rotate(360deg); }
}
.icon-spinner::before {
	content: '\27F3';
	display: inline-block;
	animation: hwk-spin 1s linear infinite;
}



/* Langbeschreibung: großes Memo-Feld */
.hwk-lang-textarea {
    min-height: 220px;
    resize: vertical;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================================================== */
/* Rich-Text-Editor (Langbeschreibung im Registrierungsformular)      */
/* ================================================================== */
.hwk-editor-wrap {
	border: 1px solid #ced4da;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.hwk-editor-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	padding: 6px 10px;
	background: #f1f3f5;
	border-bottom: 1px solid #dee2e6;
}

.hwk-ed-btn {
	padding: 4px 10px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: transparent;
	cursor: pointer;
	font-size: 0.85rem;
	line-height: 1.4;
	color: #495057;
	transition: background 0.15s, border-color 0.15s;
	user-select: none;
}
.hwk-ed-btn:hover {
	background: #e9ecef;
	border-color: #ced4da;
}
.hwk-ed-btn.hwk-ed-active {
	background: var(--hwk-primary, #0055a4);
	border-color: var(--hwk-primary, #0055a4);
	color: #fff;
}

.hwk-ed-sep {
	display: inline-block;
	width: 1px;
	height: 20px;
	background: #ced4da;
	margin: 0 4px;
}

/* Großes, komfortables Editierfeld */
.hwk-editor-content {
	min-height: 280px;
	max-height: 520px;
	overflow-y: auto;
	padding: 12px 14px;
	border: none;
	border-radius: 0;
	outline: none;
	line-height: 1.7;
	font-size: 0.92rem;
}

/* form-control-Überschreibung aufheben */
.hwk-editor-wrap .hwk-editor-content.form-control {
	border: none;
	box-shadow: none;
}

/* Fokusrahmen am äußeren Wrapper */
.hwk-editor-wrap:focus-within {
	border-color: var(--hwk-primary, #0055a4);
	box-shadow: 0 0 0 3px rgba(0,85,164,0.12);
}

.hwk-editor-content ul,
.hwk-editor-content ol {
	padding-left: 1.5em;
	margin: 0.4em 0;
}
