/* --- Base --- */
* { box-sizing: border-box; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	padding-top: 70px;
	background: #f8fafc;
	color: #1e293b;
	line-height: 1.6;
}

a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; text-decoration: none; }

.main-content { padding-bottom: 2rem; min-height: calc(100vh - 300px); }

/* --- Navbar --- */
.navbar {
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	padding: 0.5rem 1rem;
}

.navbar-brand {
	font-weight: 700;
	font-size: 1.1rem;
	color: #0f172a !important;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #fff;
	border-radius: 8px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: -0.5px;
}

.nav-link {
	color: #475569 !important;
	font-weight: 500;
	font-size: 0.9rem;
	padding: 0.5rem 0.75rem !important;
	transition: color 0.15s;
}
.nav-link:hover { color: #2563eb !important; }

.nav-divider {
	width: 1px;
	background: #e2e8f0;
	margin: 0.25rem 0.5rem;
	align-self: stretch;
}

.navbar .dropdown-menu {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.1);
	padding: 0.5rem 0;
	min-width: 10rem;
}
.navbar .dropdown-item {
	font-size: 0.9rem;
	font-weight: 500;
	color: #475569;
	padding: 0.45rem 1.25rem;
}
.navbar .dropdown-item:hover {
	background: #eff6ff;
	color: #2563eb;
}
.navbar .dropdown-toggle::after {
	margin-left: 0.3rem;
	vertical-align: 0.15em;
}
.dropdown-external {
	font-size: 0.75rem;
	opacity: 0.5;
	margin-left: 0.2rem;
}

/* --- Hero --- */
.hero-section {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #ffffff;
	border-radius: 16px;
	padding: 3rem 2rem;
	margin: 1.5rem 0;
	text-align: center;
}

.hero-title {
	font-size: 2.25rem;
	font-weight: 800;
	margin-bottom: 1rem;
}

.hero-text {
	font-size: 1.05rem;
	opacity: 0.9;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.7;
}

/* --- Unit Cards --- */
.unit-grid { margin-top: 1rem; }

.unit-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
	height: 100%;
}
.unit-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}

.unit-card-header {
	padding: 1rem 1.25rem 0;
}

.unit-card-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0;
}
.unit-card-title a { color: #0f172a; }
.unit-card-title a:hover { color: #2563eb; }

.unit-card-body { padding: 0.75rem 1.25rem 1.25rem; }

.unit-card-description {
	color: #64748b;
	font-size: 0.875rem;
	margin-bottom: 0.75rem;
	line-height: 1.5;
}

.unit-card-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.unit-link {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	background: #eff6ff;
	color: #2563eb;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}
.unit-link:hover { background: #2563eb; color: #fff; }

/* --- Calculator Card --- */
.calculator-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.calculator-actions { margin-top: 0.5rem; }

.intro-content {
	display: flex;
	align-items: center;
	height: 100%;
}
.intro-content p {
	color: #475569;
	font-size: 0.95rem;
	line-height: 1.8;
}

/* --- Result Card --- */
.result-card {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	border-radius: 12px;
	padding: 2px;
}

.result-card-inner {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	border-radius: 10px;
	padding: 1.5rem 2rem;
	color: #ffffff;
	text-align: center;
}

.result-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.result-detail {
	font-size: 0.95rem;
	opacity: 0.9;
}

/* --- Info Cards --- */
.info-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem;
}

.info-card h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #eff6ff;
}

.info-card p {
	color: #475569;
	font-size: 0.92rem;
	line-height: 1.7;
}

/* --- Breadcrumbs --- */
.convert-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.breadcrumb-label {
	font-weight: 600;
	color: #475569;
	font-size: 0.875rem;
	margin-right: 0.25rem;
}

.breadcrumb-pill {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	background: #f1f5f9;
	color: #475569;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}
.breadcrumb-pill:hover { background: #2563eb; color: #fff; }

/* --- Section Headings --- */
.section-heading {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 1rem;
}

/* --- Tables --- */
.table-container {
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	margin-bottom: 1.5rem;
}

.table-container .table { margin-bottom: 0; }

.table thead th {
	background: #f8fafc;
	border-bottom: 2px solid #e2e8f0;
	color: #475569;
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0.875rem 1rem;
}

.table td {
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	vertical-align: middle;
}

/* --- Values Grid --- */
.values-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.value-badge {
	display: inline-block;
	padding: 0.35rem 0.75rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #475569;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 500;
	transition: all 0.15s;
}
.value-badge:hover {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

/* --- Share Link --- */
.share-link .form-control {
	border-radius: 8px 0 0 8px;
	border-color: #e2e8f0;
}
.share-link .btn-copy {
	border-radius: 0 8px 8px 0;
}

/* --- SEO Content --- */
.seo-content {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 2rem;
}
.seo-content h2 {
	font-size: 1.3rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 1rem;
}
.seo-content p {
	color: #475569;
	line-height: 1.8;
	font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
	background: linear-gradient(180deg, #0f172a 0%, #1a2744 100%);
	color: #94a3b8;
	padding: 3.5rem 0 1.5rem;
	margin-top: 3rem;
}

.site-footer h5 {
	color: #f8fafc;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 1.25rem;
	position: relative;
	padding-bottom: 0.75rem;
}
.site-footer h5::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 28px;
	height: 2px;
	background: linear-gradient(90deg, #2563eb, #7c3aed);
	border-radius: 2px;
}

.footer-col { margin-bottom: 1.5rem; }

.footer-about {
	color: #94a3b8;
	font-size: 0.875rem;
	line-height: 1.7;
	margin-bottom: 1rem;
}

.footer-donate {
	display: inline-block;
	padding: 0.4rem 1rem;
	background: rgba(220, 38, 38, 0.12);
	color: #f87171 !important;
	border: 1px solid rgba(220, 38, 38, 0.25);
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	transition: all 0.2s;
}
.footer-donate:hover {
	background: rgba(220, 38, 38, 0.25);
	color: #fca5a5 !important;
	text-decoration: none;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links li { margin-bottom: 0.4rem; }

.footer-links a {
	color: #94a3b8;
	font-size: 0.85rem;
	transition: color 0.15s, padding-left 0.15s;
}
.footer-links a:hover { color: #60a5fa; padding-left: 3px; }

.footer-links-2col {
	columns: 2;
	column-gap: 1rem;
}

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.06);
	margin-top: 2rem;
	padding-top: 1.25rem;
	text-align: center;
	font-size: 0.8rem;
}
.footer-bottom a { color: #60a5fa; }

/* --- Buttons --- */
.btn-primary {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	border: none;
	border-radius: 8px;
	font-weight: 600;
	padding: 0.5rem 1.25rem;
}
.btn-primary:hover {
	background: linear-gradient(135deg, #1d4ed8, #6d28d9);
}

.btn-outline-primary {
	border-color: #2563eb;
	color: #2563eb;
	border-radius: 8px;
	font-weight: 500;
}
.btn-outline-primary:hover {
	background: #2563eb;
	color: #fff;
}

.btn-outline-secondary {
	border-radius: 8px;
}

/* --- Donate Link --- */
.donate-link { color: #dc2626 !important; }
.donate-link:hover { color: #b91c1c !important; background-color: #fef2f2 !important; }
#heart-icon { display: inline-block; animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

/* --- Contact Card --- */
.contact-card {
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	padding: 2rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.contact-card .form-control {
	border-radius: 8px;
	border-color: #e2e8f0;
	padding: 0.625rem 0.875rem;
}
.contact-card .form-control:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}
.contact-card .control-label {
	font-weight: 600;
	color: #334155;
	font-size: 0.9rem;
}

/* --- Hero Small --- */
.hero-sm { padding: 2rem 2rem; }
.hero-sm .hero-title { font-size: 1.75rem; }

/* --- Category SEO --- */
.category-seo {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
	margin-bottom: 1rem;
}
.category-seo h2 {
	font-size: 1.3rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 1rem;
}
.category-seo h3 {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1e293b;
	margin-top: 1.25rem;
	margin-bottom: 0.5rem;
}
.category-seo p, .category-seo li {
	color: #475569;
	line-height: 1.8;
	font-size: 0.95rem;
}
.category-seo ul {
	padding-left: 1.25rem;
}

/* --- Error Pages --- */
.error-page {
	text-align: center;
	padding: 4rem 1rem;
	max-width: 560px;
	margin: 0 auto;
}
.error-code {
	font-size: 8rem;
	font-weight: 800;
	line-height: 1;
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 0.5rem;
}
.error-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0.75rem;
}
.error-text {
	color: #64748b;
	font-size: 1.05rem;
	line-height: 1.7;
	margin-bottom: 2rem;
}
.error-actions {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 2.5rem;
}
.error-suggestions {
	border-top: 1px solid #e2e8f0;
	padding-top: 2rem;
}
.error-suggestions p {
	color: #64748b;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}
.error-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}
.error-link {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	background: #eff6ff;
	color: #2563eb;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}
.error-link:hover { background: #2563eb; color: #fff; }

/* --- Responsive --- */
@media (max-width: 768px) {
	.hero-section { padding: 2rem 1.25rem; }
	.hero-title { font-size: 1.75rem; }
	.result-title { font-size: 1.15rem; }
	.error-code { font-size: 5rem; }
	.error-title { font-size: 1.35rem; }
}
