/**
 * Taxonomy Especialidade - Single specialty term page
 * Layout premium, indigo/violet theme, UI/UX profissional
 */

.tax-especialidade-single {
	--esp-primary: #4f46e5;
	--esp-primary-dark: #4338ca;
	--esp-hero-start: #4f46e5;
	--esp-hero-mid: #6366f1;
	--esp-hero-end: #7c3aed;
}

/* Breadcrumb */
.esp-breadcrumb-bar {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.esp-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.esp-breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #334155;
	padding: 0.75rem 0;
	flex-wrap: wrap;
}

.esp-breadcrumb a {
	color: #475569;
	text-decoration: none;
	transition: color 0.2s;
}

.esp-breadcrumb a:hover {
	color: var(--esp-primary);
}

.esp-breadcrumb-current {
	color: #0f172a;
	font-weight: 600;
}

.esp-breadcrumb-sep {
	width: 0.875rem;
	height: 0.875rem;
	flex-shrink: 0;
	color: #94a3b8;
}

.esp-breadcrumb svg {
	width: 0.875rem;
	height: 0.875rem;
	flex-shrink: 0;
	color: #94a3b8;
}

/* Hero */
.esp-hero {
	position: relative;
	padding: 2.5rem 0 3.5rem;
	overflow: hidden;
}

.esp-hero-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--esp-hero-start) 0%, var(--esp-hero-mid) 50%, var(--esp-hero-end) 100%);
	opacity: 0.95;
}

.esp-hero-pattern {
	position: absolute;
	inset: 0;
	opacity: 0.08;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4z' fill='%23ffffff' fill-opacity='1'/%3E%3C/svg%3E");
}

.esp-hero-shine {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
	pointer-events: none;
}

.esp-hero-inner {
	position: relative;
	z-index: 1;
}

.esp-hero-content {
	max-width: 48rem;
}

.esp-hero-badges {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}

.esp-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.875rem;
	border-radius: 9999px;
	font-size: 0.8125rem;
	font-weight: 600;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
	backdrop-filter: blur(6px);
}

.esp-badge-icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.esp-hero-title {
	font-size: 2rem;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
	.esp-hero-title { font-size: 2.5rem; }
}

@media (min-width: 1024px) {
	.esp-hero-title { font-size: 3rem; }
}

.esp-hero-desc {
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, 0.95);
	line-height: 1.7;
	margin: 0 0 1.5rem;
}

.esp-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.esp-hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border-radius: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.esp-hero-btn svg {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.esp-hero-btn-primary {
	background: #fff;
	color: var(--esp-primary-dark);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.esp-hero-btn-primary:hover {
	background: #f5f3ff;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.esp-hero-btn-outline {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.5);
}

.esp-hero-btn-outline:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: #fff;
}

.esp-hero-btn-ghost {
	background: transparent;
	color: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.esp-hero-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.1);
}

.esp-hero-btn-count {
	background: var(--esp-primary);
	color: #fff;
	padding: 0.15rem 0.5rem;
	border-radius: 9999px;
	font-size: 0.75rem;
}

.esp-hero-wave {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3rem;
	background: linear-gradient(to top, #fff, transparent);
	pointer-events: none;
}

/* Main layout */
.esp-main-wrap {
	display: grid;
	grid-template-columns: 1fr;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
	gap: 0;
}

@media (min-width: 1024px) {
	.esp-main-wrap {
		grid-template-columns: 1fr 300px;
		gap: 3rem;
		align-items: start;
	}
}

.esp-content-col {
	min-width: 0;
}

.esp-content-inner {
	max-width: 720px;
}

.scroll-mt-28 {
	scroll-margin-top: 7rem;
}

/* Sections */
.esp-section {
	margin-bottom: 2.5rem;
}

.esp-section-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.esp-section-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: rgba(79, 70, 229, 0.12);
	border-radius: 0.5rem;
	color: var(--esp-primary);
	flex-shrink: 0;
}

.esp-section-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.esp-section-icon-warning {
	background: rgba(245, 158, 11, 0.12);
	color: #d97706;
}

.esp-section-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

@media (min-width: 768px) {
	.esp-section-title { font-size: 1.375rem; }
}

/* Cards */
.esp-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.esp-card-padding,
.esp-card-prose {
	padding: 1.5rem;
}

@media (min-width: 640px) {
	.esp-card-padding,
	.esp-card-prose { padding: 1.75rem; }
}

.esp-prose {
	font-size: 1rem;
	line-height: 1.75;
	color: #334155;
}

.esp-prose p {
	margin: 0 0 1rem;
}

.esp-prose p:last-child {
	margin-bottom: 0;
}

/* Lists */
.esp-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.esp-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.5rem 0;
	font-size: 0.9375rem;
	color: #475569;
	line-height: 1.5;
	border-bottom: 1px solid #f1f5f9;
}

.esp-list li:last-child {
	border-bottom: none;
}

.esp-list-icon {
	color: #10b981;
	flex-shrink: 0;
	margin-top: 0.2rem;
}

.esp-list-icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.esp-list-bullet {
	list-style: disc;
	padding-left: 1.5rem;
}

.esp-list-bullet li {
	border: none;
	padding: 0.25rem 0;
}

.esp-section-cta {
	margin-top: 1rem;
}

.esp-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--esp-primary);
	text-decoration: none;
}

.esp-link-btn:hover {
	text-decoration: underline;
}

.esp-link-btn svg {
	width: 1.125rem;
	height: 1.125rem;
}

/* Doenças grid */
.esp-doencas-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 640px) {
	.esp-doencas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.esp-doencas-grid { grid-template-columns: repeat(3, 1fr); }
}

.esp-doenca-card {
	display: block;
	text-decoration: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	overflow: hidden;
	transition: all 0.2s ease;
}

.esp-doenca-card:hover {
	border-color: var(--esp-primary);
	box-shadow: 0 8px 25px -5px rgba(79, 70, 229, 0.15);
}

.esp-doenca-card-inner {
	padding: 1.25rem;
}

.esp-doenca-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: rgba(79, 70, 229, 0.12);
	border-radius: 0.5rem;
	color: var(--esp-primary);
	margin-bottom: 0.75rem;
}

.esp-doenca-card-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.esp-doenca-card-badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: 0.375rem;
	margin-bottom: 0.5rem;
}

.esp-doenca-card-title {
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.esp-doenca-card:hover .esp-doenca-card-title {
	color: var(--esp-primary);
}

.esp-doenca-card-excerpt {
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.5;
	margin: 0 0 0.75rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.esp-doenca-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--esp-primary);
}

.esp-section-footer {
	margin-top: 1rem;
	text-align: center;
}

.esp-browse-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #fff;
	background: var(--esp-primary);
	border: 2px solid var(--esp-primary);
	border-radius: 0.5rem;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
	transition: all 0.2s ease;
}

.esp-browse-link:hover {
	background: var(--esp-primary-dark);
	border-color: var(--esp-primary-dark);
	color: #fff;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
	transform: translateY(-1px);
}

.esp-browse-link svg {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
}

/* Legal */
.esp-legal {
	display: flex;
	gap: 1rem;
	padding: 1.25rem;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	margin-top: 2rem;
	font-size: 0.875rem;
	color: #475569;
	line-height: 1.6;
}

.esp-legal-icon {
	flex-shrink: 0;
	color: #64748b;
}

.esp-legal-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

/* Sidebar */
.esp-sidebar {
	display: none;
}

@media (min-width: 1024px) {
	.esp-sidebar {
		display: block;
		position: sticky;
		top: 6rem;
	}
}

.esp-sidebar-inner {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.esp-toc-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.75rem;
}

.esp-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.esp-toc-item {
	margin: 0;
}

.esp-toc-link {
	display: block;
	padding: 0.4rem 0;
	font-size: 0.8125rem;
	color: #475569;
	text-decoration: none;
	border-bottom: 1px solid #f1f5f9;
	transition: color 0.2s;
}

.esp-toc-link:hover {
	color: var(--esp-primary);
}

.esp-sidebar-links {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.esp-sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--esp-primary);
	text-decoration: none;
}

.esp-sidebar-link:hover {
	text-decoration: underline;
}

.esp-sidebar-link svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

/* Related section */
.esp-related-section {
	background: linear-gradient(180deg, #eef2ff 0%, #fff 100%);
	border-top: 1px solid #c7d2fe;
	padding: 3rem 0 4rem;
}

.esp-related-header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.esp-related-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	background: rgba(79, 70, 229, 0.15);
	border-radius: 0.75rem;
	color: var(--esp-primary);
	flex-shrink: 0;
}

.esp-related-icon svg {
	width: 1.5rem;
	height: 1.5rem;
}

.esp-related-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.25rem;
}

.esp-related-desc {
	font-size: 0.9375rem;
	color: #64748b;
	margin: 0;
}

.esp-related-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 640px) {
	.esp-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.esp-related-grid { grid-template-columns: repeat(4, 1fr); }
}

.esp-related-card {
	display: block;
	text-decoration: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	overflow: hidden;
	transition: all 0.2s ease;
}

.esp-related-card:hover {
	border-color: var(--esp-primary);
	box-shadow: 0 8px 25px -5px rgba(79, 70, 229, 0.12);
}

.esp-related-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: #f8fafc;
	border-radius: 0.5rem;
	color: var(--esp-primary);
	margin-bottom: 0.75rem;
}

.esp-related-card-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.esp-related-card-title {
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.esp-related-card:hover .esp-related-card-title {
	color: var(--esp-primary);
}

.esp-related-card-excerpt {
	font-size: 0.8125rem;
	color: #64748b;
	line-height: 1.5;
	margin: 0 0 0.75rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.esp-related-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--esp-primary);
}

.esp-related-footer {
	margin-top: 1.5rem;
	text-align: center;
}

/* CTA section */
.esp-cta-section {
	padding: 2rem 0 3rem;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.esp-cta-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 1rem;
	text-align: center;
}

.esp-cta-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

@media (min-width: 640px) {
	.esp-cta-grid { grid-template-columns: repeat(4, 1fr); }
}

.esp-cta-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.5rem;
	text-decoration: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	transition: all 0.2s ease;
}

.esp-cta-card:hover {
	border-color: var(--esp-primary);
	box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.esp-cta-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: rgba(79, 70, 229, 0.12);
	border-radius: 0.5rem;
	color: var(--esp-primary);
}

.esp-cta-card-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.esp-cta-card-label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #334155;
}

.esp-cta-card:hover .esp-cta-card-label {
	color: var(--esp-primary);
}

/* Scroll to top */
.esp-scroll-top {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 50;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--esp-primary);
	color: #fff;
	border: none;
	border-radius: 9999px;
	box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
	cursor: pointer;
	transition: all 0.2s ease;
}

.esp-scroll-top:hover {
	background: var(--esp-primary-dark);
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}
