/**
 * Página de Especialidades – layout premium baseado no Portal Bem-Estar
 * UI/UX profissional, gradiente em tons de índigo/violeta
 */

.especialidades-page {
	--esp-primary: #4f46e5;
	--esp-primary-dark: #4338ca;
	--esp-hero-start: #4f46e5;
	--esp-hero-mid: #6366f1;
	--esp-hero-end: #7c3aed;
	background: #f8fafc;
	color: #0f172a;
}

/* Ajuste container genérico */
.especialidades-page .esp-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Hero centralizado para listagem */
.especialidades-page .esp-hero {
	position: relative;
	padding: 3rem 0 4rem;
	overflow: hidden;
}

.especialidades-page .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.96;
}

.especialidades-page .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");
}

.especialidades-page .esp-hero-shine {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 55%), radial-gradient(circle at bottom right, rgba(251, 252, 255, 0.25), transparent 55%);
	pointer-events: none;
}

.especialidades-page .esp-hero-inner {
	position: relative;
	z-index: 1;
}

.especialidades-page .esp-hero-content-center {
	max-width: 48rem;
	margin: 0 auto;
	text-align: center;
}

.especialidades-page .esp-hero-badges {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.especialidades-page .esp-badge-main {
	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;
	background: rgba(15, 23, 42, 0.25);
	backdrop-filter: blur(8px);
}

.especialidades-page .esp-badge-icon {
	width: 1rem;
	height: 1rem;
}

.especialidades-page .esp-hero-title {
	font-size: clamp(2rem, 3.1vw, 2.75rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
	text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.especialidades-page .esp-hero-desc {
	font-size: 1.05rem;
	color: rgba(255, 255, 255, 0.96);
	line-height: 1.7;
	margin: 0 0 1.5rem;
}

.especialidades-page .esp-hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.especialidades-page .esp-hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.3rem;
	border-radius: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.especialidades-page .esp-hero-btn svg {
	width: 1.2rem;
	height: 1.2rem;
}

.especialidades-page .esp-hero-btn-primary {
	background: #fff;
	color: var(--esp-primary-dark);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
}

.especialidades-page .esp-hero-btn-primary:hover {
	background: #eef2ff;
	transform: translateY(-1px);
	box-shadow: 0 6px 22px rgba(15, 23, 42, 0.32);
}

.especialidades-page .esp-hero-btn-outline {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.5);
}

.especialidades-page .esp-hero-btn-outline:hover {
	background: rgba(255, 255, 255, 0.22);
	border-color: #fff;
}

.especialidades-page .esp-hero-btn-ghost {
	background: transparent;
	color: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.especialidades-page .esp-hero-btn-ghost:hover {
	background: rgba(15, 23, 42, 0.16);
}

.especialidades-page .esp-hero-search-form {
	max-width: 32rem;
	margin: 0 auto 1.25rem;
}

.especialidades-page .esp-hero-search-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.9rem;
	border-radius: 0.75rem;
	background: rgba(15, 23, 42, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(10px);
}

.especialidades-page .esp-hero-search-wrap svg {
	width: 1rem;
	height: 1rem;
	color: rgba(255, 255, 255, 0.7);
}

.especialidades-page .esp-hero-search-input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	color: #fff;
	font-size: 0.9375rem;
}

.especialidades-page .esp-hero-search-input::placeholder {
	color: rgba(226, 232, 240, 0.85);
}

.especialidades-page .esp-hero-stats {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin-top: 0.5rem;
}

.especialidades-page .esp-hero-stat {
	text-align: center;
}

.especialidades-page .esp-hero-stat-value {
	font-size: 1.3rem;
	font-weight: 700;
	color: #eef2ff;
	margin-bottom: 0.1rem;
}

.especialidades-page .esp-hero-stat-label {
	font-size: 0.8rem;
	color: rgba(226, 232, 240, 0.9);
}

.especialidades-page .esp-hero-wave {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(to top, #f8fafc, transparent);
	pointer-events: none;
}

/* Helper section */
.esp-helper-section {
	padding: 2.5rem 0 2.75rem;
	background: #f1f5f9;
	border-bottom: 1px solid #e2e8f0;
}

.esp-helper-inner {
	display: grid;
	grid-template-columns: 2fr 1.1fr;
	gap: 2rem;
	align-items: center;
}

@media (max-width: 900px) {
	.esp-helper-inner {
		grid-template-columns: 1fr;
	}
}

.esp-helper-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0.5rem;
}

.esp-helper-desc {
	font-size: 0.98rem;
	color: #475569;
	line-height: 1.7;
	margin-bottom: 1rem;
}

.esp-helper-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.esp-helper-card {
	background: #fff;
	border-radius: 0.875rem;
	border: 1px solid #e2e8f0;
	box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.24);
	padding: 1.25rem 1.4rem;
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.esp-helper-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.3rem;
	height: 2.3rem;
	border-radius: 9999px;
	background: rgba(22, 163, 74, 0.1);
	color: #16a34a;
	flex-shrink: 0;
}

.esp-helper-card-text {
	font-size: 0.9rem;
	color: #334155;
	line-height: 1.7;
}

/* Grid section */
.esp-grid-section {
	padding: 2.75rem 0 3rem;
}

.esp-grid-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
	.esp-grid-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

.esp-grid-subtitle {
	font-size: 0.9rem;
	color: #64748b;
	margin: 0.25rem 0 0;
}

.esp-clear-filters {
	font-size: 0.85rem;
	font-weight: 600;
	color: #4b5563;
	text-decoration: none;
	border-radius: 9999px;
	border: 1px solid #e5e7eb;
	padding: 0.4rem 0.9rem;
	background: #f9fafb;
	transition: all 0.2s ease;
}

.esp-clear-filters:hover {
	background: #e5e7eb;
	border-color: #d1d5db;
	color: #111827;
}

.esp-letter-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0.75rem 0 1.25rem;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 1.5rem;
}

.esp-letter-pill {
	min-width: 2rem;
	text-align: center;
	padding: 0.25rem 0.5rem;
	border-radius: 9999px;
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	color: #4b5563;
	border: 1px solid transparent;
	background: #e5e7eb;
	transition: all 0.2s ease;
}

.esp-letter-pill:hover {
	background: #e0e7ff;
	color: #312e81;
}

.esp-letter-pill-active {
	background: #4f46e5;
	color: #fff;
	border-color: #4338ca;
	box-shadow: 0 1px 4px rgba(79, 70, 229, 0.45);
}

.esp-letter-pill-disabled {
	background: #f3f4f6;
	color: #9ca3af;
	cursor: default;
}

.esp-empty-state {
	text-align: center;
	padding: 3rem 1rem;
	background: #f9fafb;
	border-radius: 0.875rem;
	border: 1px dashed #e5e7eb;
}

.esp-empty-icon {
	width: 2.4rem;
	height: 2.4rem;
	margin-bottom: 0.75rem;
	color: #4b5563;
}

.esp-empty-state h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: #111827;
	margin-bottom: 0.35rem;
}

.esp-empty-state p {
	font-size: 0.9rem;
	color: #6b7280;
	margin-bottom: 0.75rem;
}

.esp-specialties-list {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.esp-letter-group {
	background: #fff;
	border-radius: 1rem;
	border: 1px solid #e2e8f0;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	padding: 1.2rem 1.4rem 1.1rem;
}

@media (min-width: 768px) {
	.esp-letter-group {
		padding: 1.25rem 1.6rem 1.25rem;
	}
}

.esp-letter-header {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-bottom: 0.9rem;
}

.esp-letter-circle {
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 9999px;
	background: #eef2ff;
	color: #3730a3;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
}

.esp-letter-title {
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.1rem;
}

.esp-letter-count {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
}

.esp-specialties-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
	margin-top: 0.4rem;
}

@media (min-width: 640px) {
	.esp-specialties-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.esp-specialties-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.esp-specialty-card {
	display: block;
	text-decoration: none;
	background: #f9fafb;
	border-radius: 0.9rem;
	border: 1px solid #e5e7eb;
	transition: all 0.18s ease;
}

.esp-specialty-card-inner {
	padding: 0.95rem 1rem;
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
}

.esp-specialty-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 0.7rem;
	background: rgba(79, 70, 229, 0.1);
	color: #4f46e5;
	flex-shrink: 0;
}

.esp-specialty-icon svg {
	width: 1.2rem;
	height: 1.2rem;
}

.esp-specialty-text {
	min-width: 0;
	flex: 1;
}

.esp-specialty-name {
	font-size: 0.94rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 0.2rem;
}

.esp-specialty-desc {
	font-size: 0.82rem;
	color: #6b7280;
	line-height: 1.55;
	margin: 0 0 0.4rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.esp-specialty-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: #4f46e5;
}

.esp-specialty-link svg {
	width: 0.9rem;
	height: 0.9rem;
}

.esp-specialty-card:hover {
	background: #ffffff;
	border-color: #c7d2fe;
	box-shadow: 0 10px 28px -12px rgba(79, 70, 229, 0.55);
	transform: translateY(-1px);
}

.esp-specialty-card:hover .esp-specialty-name {
	color: #312e81;
}

/* Educação + FAQ */
.esp-edu-section {
	padding: 3rem 0 2.75rem;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
}

.esp-edu-inner {
	max-width: 960px;
	margin: 0 auto;
}

.esp-edu-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #0f172a;
	text-align: center;
	margin-bottom: 0.75rem;
}

.esp-edu-intro {
	font-size: 0.96rem;
	color: #4b5563;
	text-align: center;
	max-width: 640px;
	margin: 0 auto 1.75rem;
}

.esp-edu-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.2rem;
}

@media (min-width: 768px) {
	.esp-edu-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.esp-edu-card {
	background: #fff;
	border-radius: 0.9rem;
	border: 1px solid #e5e7eb;
	padding: 1.3rem 1.4rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.esp-edu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 0.7rem;
	background: rgba(79, 70, 229, 0.1);
	color: #4f46e5;
	margin-bottom: 0.6rem;
}

.esp-edu-card h3 {
	font-size: 0.98rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 0.3rem;
}

.esp-edu-card p {
	font-size: 0.86rem;
	color: #4b5563;
	line-height: 1.6;
	margin: 0;
}

.esp-faq-section {
	padding: 2.75rem 0 2.75rem;
	background: #ffffff;
}

.esp-faq-inner {
	max-width: 900px;
	margin: 0 auto;
}

.esp-faq-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-top: 1.5rem;
}

@media (min-width: 768px) {
	.esp-faq-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.esp-faq-item {
	border-radius: 0.9rem;
	border: 1px solid #e5e7eb;
	padding: 1.1rem 1.2rem;
	background: #f9fafb;
}

.esp-faq-item h3 {
	font-size: 0.95rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 0.4rem;
}

.esp-faq-item p {
	font-size: 0.84rem;
	color: #4b5563;
	line-height: 1.6;
	margin: 0;
}

/* Aviso legal (reutiliza .esp-legal base da taxonomy) */
.esp-legal-section {
	padding: 2rem 0 3rem;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.esp-legal {
	display: flex;
	gap: 0.8rem;
	padding: 1.2rem 1.3rem;
	background: #eff6ff;
	border-radius: 0.9rem;
	border: 1px solid #bfdbfe;
	font-size: 0.86rem;
	color: #1e3a8a;
	line-height: 1.7;
}

.esp-legal-icon {
	flex-shrink: 0;
	color: #1d4ed8;
}

.esp-legal-icon svg {
	width: 1.2rem;
	height: 1.2rem;
}

/* Scroll to top reaproveita classe base de taxonomy */
.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);
}

