/* UtilityHub Pro - Frontend Styles */

:root {
	--uhp-primary: #007cba;
	--uhp-secondary: #0073aa;
	--uhp-text: #333;
	--uhp-bg: #f5f5f5;
	--uhp-border: #ddd;
	--uhp-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--uhp-spacing: 1rem;
}

/* Tools Container */
.uhp-tools-container {
	margin: 40px 0;
}

.uhp-tools-header {
	text-align: center;
	margin-bottom: 40px;
}

.uhp-tools-header h2 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	color: var(--uhp-text);
}

.uhp-tools-header p {
	font-size: 1.1rem;
	color: #666;
}

/* Controls */
.uhp-tools-controls {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 30px;
	align-items: center;
}

.uhp-search {
	width: 100%;
	max-width: 500px;
}

.uhp-search-input {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid var(--uhp-border);
	border-radius: 6px;
	font-size: 1rem;
	transition: border-color 0.3s;
}

.uhp-search-input:focus {
	outline: none;
	border-color: var(--uhp-primary);
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Filter Buttons */
.uhp-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.uhp-filter-btn,
.uhp-filter-all {
	padding: 10px 20px;
	border: 2px solid var(--uhp-border);
	background: white;
	border-radius: 25px;
	cursor: pointer;
	font-size: 0.95rem;
	transition: all 0.3s;
	color: var(--uhp-text);
}

.uhp-filter-btn:hover,
.uhp-filter-all:hover {
	border-color: var(--uhp-primary);
	color: var(--uhp-primary);
}

.uhp-filter-btn.active,
.uhp-filter-all.active {
	background: var(--uhp-primary);
	color: white;
	border-color: var(--uhp-primary);
}

/* Tools Grid */
.uhp-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
	margin-bottom: 40px;
}

@media (max-width: 768px) {
	.uhp-tools-grid {
		grid-template-columns: 1fr;
	}
}

/* Tool Card */
.uhp-tool-card {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--uhp-shadow);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.uhp-tool-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.uhp-card-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: var(--uhp-bg);
}

.uhp-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.uhp-tool-card:hover .uhp-card-image img {
	transform: scale(1.05);
}

.uhp-card-content {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.uhp-card-content h3 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: 1.2rem;
	color: var(--uhp-text);
}

.uhp-card-content h3 a {
	color: var(--uhp-text);
	text-decoration: none;
	transition: color 0.3s;
}

.uhp-card-content h3 a:hover {
	color: var(--uhp-primary);
}

.uhp-card-excerpt {
	color: #666;
	margin-bottom: 15px;
	flex: 1;
	line-height: 1.5;
}

.uhp-card-rating {
	margin-bottom: 15px;
}

.uhp-stars {
	color: #ffc107;
	font-size: 0.9rem;
}

.uhp-card-link {
	color: var(--uhp-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s;
}

.uhp-card-link:hover {
	color: var(--uhp-secondary);
}

/* Hero Section */
.uhp-hero {
	background-size: cover;
	background-position: center;
	padding: 100px 20px;
	text-align: center;
	color: white;
	position: relative;
	margin-bottom: 40px;
	border-radius: 8px;
	overflow: hidden;
}

.uhp-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1;
}

.uhp-hero-content {
	position: relative;
	z-index: 2;
}

.uhp-hero h1 {
	font-size: 2.5rem;
	margin-bottom: 15px;
}

.uhp-hero p {
	font-size: 1.2rem;
	margin-bottom: 25px;
}

.uhp-cta-button {
	padding: 12px 40px;
	background: var(--uhp-primary);
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
}

.uhp-cta-button:hover {
	background: var(--uhp-secondary);
}

/* Calculator */
.uhp-calculator {
	background: white;
	border-radius: 8px;
	padding: 30px;
	box-shadow: var(--uhp-shadow);
	margin: 30px 0;
}

.uhp-calculator-header {
	margin-bottom: 25px;
	border-bottom: 2px solid var(--uhp-border);
	padding-bottom: 15px;
}

.uhp-calculator-header h2 {
	margin: 0;
	color: var(--uhp-text);
}

.uhp-calculator-inputs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 25px;
}

.uhp-input-group {
	display: flex;
	flex-direction: column;
}

.uhp-input-group label {
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--uhp-text);
}

.uhp-unit {
	font-size: 0.85rem;
	color: #666;
	font-weight: normal;
}

.uhp-calculator-input {
	padding: 10px 12px;
	border: 1px solid var(--uhp-border);
	border-radius: 4px;
	font-size: 1rem;
	transition: border-color 0.3s;
}

.uhp-calculator-input:focus {
	outline: none;
	border-color: var(--uhp-primary);
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.uhp-calculate-button {
	width: 100%;
	padding: 12px;
	background: var(--uhp-primary);
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
	margin-bottom: 25px;
}

.uhp-calculate-button:hover {
	background: var(--uhp-secondary);
}

.uhp-calculator-result {
	background: #e8f5e9;
	border-left: 4px solid #4caf50;
	padding: 20px;
	border-radius: 4px;
}

.uhp-result-value {
	font-size: 2rem;
	font-weight: bold;
	color: #2e7d32;
	margin-bottom: 10px;
}

/* FAQs */
.uhp-faqs {
	margin: 40px 0;
}

.uhp-faqs h2 {
	margin-bottom: 25px;
	color: var(--uhp-text);
}

.uhp-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.uhp-faq-item {
	background: white;
	border: 1px solid var(--uhp-border);
	border-radius: 6px;
	overflow: hidden;
}

.uhp-faq-question {
	width: 100%;
	padding: 15px;
	background: #f9f9f9;
	border: none;
	text-align: left;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background 0.3s;
}

.uhp-faq-question:hover {
	background: var(--uhp-bg);
}

.uhp-faq-toggle {
	font-size: 1.5rem;
	transition: transform 0.3s;
}

.uhp-faq-item.active .uhp-faq-toggle {
	transform: rotate(45deg);
}

.uhp-faq-answer {
	padding: 15px;
	border-top: 1px solid var(--uhp-border);
	line-height: 1.6;
}

/* Related Tools */
.uhp-related-tools {
	margin: 40px 0;
}

.uhp-related-tools h2 {
	margin-bottom: 25px;
	color: var(--uhp-text);
}

/* Pagination */
.uhp-pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 40px 0;
}

.uhp-pagination a,
.uhp-pagination span {
	padding: 8px 12px;
	border: 1px solid var(--uhp-border);
	border-radius: 4px;
	text-decoration: none;
	color: var(--uhp-text);
	transition: all 0.3s;
}

.uhp-pagination a:hover {
	background: var(--uhp-primary);
	color: white;
	border-color: var(--uhp-primary);
}

.uhp-pagination .current {
	background: var(--uhp-primary);
	color: white;
	border-color: var(--uhp-primary);
}

/* Responsive */
@media (max-width: 768px) {
	.uhp-tools-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}

	.uhp-calculator-inputs {
		grid-template-columns: 1fr;
	}

	.uhp-hero h1 {
		font-size: 1.8rem;
	}

	.uhp-hero p {
		font-size: 1rem;
	}
}

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

.uhp-tool-card {
	animation: slideIn 0.3s ease-out;
}

/* Print Styles */
@media print {
	.uhp-tools-controls,
	.uhp-pagination,
	.uhp-calculate-button {
		display: none;
	}

	.uhp-tool-card {
		box-shadow: none;
		border: 1px solid #ddd;
		page-break-inside: avoid;
	}
}
.uhp-search-terms {
	margin-top: 2rem;
	font-size: .875rem;
	line-height: 1.6;
	color: #59636e;
	overflow-wrap: anywhere;
}
.uhp-catalog-tabs { display:flex; flex-wrap:wrap; gap:.65rem; justify-content:center; margin:1.5rem 0 2rem; }
.uhp-catalog-tab { border:1px solid #0b83bd; border-radius:999px; background:#fff; color:#086b9a; padding:.65rem 1rem; cursor:pointer; }
.uhp-catalog-tab.active, .uhp-catalog-tab:hover { background:#0b83bd; color:#fff; }
.uhp-catalog-group { margin:2.5rem 0; }
.uhp-catalog-group > h3 { font-size:1.75rem; margin-bottom:1rem; }
.uhp-card-image { display:block; aspect-ratio:16/9; background:#eef2f5; overflow:hidden; }
.uhp-card-image img { width:100%; height:100%; object-fit:cover; }
.uhp-tool-meta-description { font-size:1.1rem; line-height:1.7; padding:1rem 1.25rem; background:#f5f8fa; border-left:4px solid #0b83bd; }
.uhp-how-to, .uhp-related-tools, .uhp-faqs { margin-top:2.25rem; }
.uhp-related-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.75rem; padding:0; list-style:none; }
.uhp-related-list a { display:block; padding:.85rem 1rem; border:1px solid #d9e0e5; border-radius:8px; text-decoration:none; }
.uhp-generated-cover { display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#e9f7ff,#d8ecff); }
.uhp-generated-cover span { font-size:4rem; filter:drop-shadow(0 8px 12px rgba(0,0,0,.12)); }
.uhp-converter-page { max-width:960px; margin:0 auto; }
.uhp-converter-hero { text-align:center; padding:2.5rem 1.5rem; background:linear-gradient(135deg,#eef9ff,#e3efff); border-radius:18px; margin:1.25rem 0 2rem; }
.uhp-converter-icon { font-size:5rem; }
.uhp-converter-workspace { min-height:220px; border:1px solid #d6e0e7; border-radius:14px; padding:1.5rem; margin:2rem 0; background:#fff; }
.uhp-back-link { display:inline-block; margin-bottom:1rem; }
.uhp-converter-form { display:grid; grid-template-columns:minmax(150px,1fr) minmax(140px,1fr) auto minmax(140px,1fr); gap:1rem; align-items:end; }
.uhp-converter-form label { display:grid; gap:.4rem; font-weight:600; }
.uhp-converter-form input,.uhp-converter-form select { width:100%; padding:.8rem; border:1px solid #bbc9d3; border-radius:7px; background:#fff; }
.uhp-swap-units { padding:.8rem 1rem; border:0; border-radius:8px; background:#0b83bd; color:#fff; font-size:1.25rem; cursor:pointer; }
.uhp-live-result { margin-top:1.25rem; padding:1.25rem; border-radius:10px; background:#eaf7ef; color:#164d2b; font-size:1.5rem; font-weight:700; }
.uhp-tool-unavailable { padding:1rem; border-left:4px solid #b45309; background:#fff7ed; }
@media(max-width:700px){.uhp-converter-form{grid-template-columns:1fr}.uhp-swap-units{width:100%}}
.uhp-tool-featured-image { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:14px; margin:0 0 1.5rem; }
.uhp-numeric-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; margin-bottom:1rem; }
.uhp-numeric-fields label,.uhp-converter-workspace>label { display:grid; gap:.4rem; font-weight:600; margin:.6rem 0; }
.uhp-numeric-fields input,.uhp-converter-workspace input,.uhp-converter-workspace textarea { padding:.8rem; border:1px solid #b9c7d2; border-radius:7px; }
.uhp-run-tool,.uhp-copy-result { border:0; border-radius:8px; padding:.8rem 1.2rem; background:#087fb8; color:#fff; cursor:pointer; margin:.5rem .5rem .5rem 0; }
.uhp-text-result { white-space:pre-wrap; overflow:auto; padding:1rem; background:#f3f7fa; border-radius:8px; }
.uhp-image-canvas { display:block; max-width:100%; height:auto; margin-top:1rem; }
.uhp-assumption-note,.uhp-legal-note { padding:1rem; border-left:4px solid #d97706; background:#fff8e8; }
.uhp-property-result { margin-top:1rem; overflow:auto; }
.uhp-property-result table { width:100%; border-collapse:collapse; }
.uhp-property-result th,.uhp-property-result td { padding:.75rem; border-bottom:1px solid #dce4e9; text-align:left; }
.uhp-property-result tr:nth-last-child(3) { font-size:1.08em; background:#eaf7ef; }
.uhp-converter-workspace select { padding:.8rem; border:1px solid #b9c7d2; border-radius:7px; background:#fff; }
.uhp-professional-result { margin-top:1.25rem; }
.uhp-result-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:.75rem; }
.uhp-result-grid>div { display:flex; flex-direction:column; gap:.25rem; padding:1rem; border:1px solid #d8e3ea; border-radius:10px; background:#f8fbfd; }
.uhp-result-grid span { color:#52616b; font-size:.9rem; }
.uhp-result-grid strong { color:#163f57; font-size:1.15rem; overflow-wrap:anywhere; }
.uhp-result-table-wrap { overflow:auto; margin-top:1rem; }
.uhp-result-table-wrap table { width:100%; border-collapse:collapse; min-width:620px; }
.uhp-result-table-wrap th,.uhp-result-table-wrap td { padding:.7rem; border-bottom:1px solid #d8e3ea; text-align:right; }
.uhp-result-table-wrap th:first-child,.uhp-result-table-wrap td:first-child { text-align:left; }
.uhp-result-note { margin-top:1rem; padding:1rem; background:#fff8e8; border-left:4px solid #d97706; }
.uhp-error { padding:1rem; border-left:4px solid #b91c1c; background:#fff1f2; color:#7f1d1d; }
.uhp-tool-introduction { margin:2rem 0; }
