/**
 * Home Hero Section – máx. 100vh, UI/UX profissional, otimizado SEO
 * @package GuiaSaude
 */

/* ---- Altura e viewport ---- */
.home-hero-section {
	--hero-padding-y: clamp(1.25rem, 4vh, 2.5rem);
	--hero-padding-x: 1rem;
	position: relative;
	background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-darker) 50%, var(--color-dark) 100%);
	color: var(--white);
	min-height: 100vh;
	max-height: 100vh;
	height: 100vh;
	height: 100dvh;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: env(safe-area-inset-top) var(--hero-padding-x) env(safe-area-inset-bottom);
	-webkit-overflow-scrolling: touch;
}

.home-hero-section .hero-background {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.home-hero-section .hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14, 25, 34, 0.4) 0%, rgba(14, 25, 34, 0.7) 100%);
	z-index: 2;
}

.home-hero-section .hero-shapes {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 1;
}

.home-hero-section .shape {
	position: absolute;
	border-radius: 50%;
	background: var(--color-light);
	opacity: 0.06;
	animation: hero-float 22s infinite ease-in-out;
}

.home-hero-section .shape-1 {
	width: min(400px, 50vw);
	height: min(400px, 50vw);
	top: -120px;
	right: -80px;
}

.home-hero-section .shape-2 {
	width: min(280px, 40vw);
	height: min(280px, 40vw);
	bottom: -80px;
	left: -80px;
	animation-delay: 6s;
}

.home-hero-section .shape-3 {
	width: min(160px, 25vw);
	height: min(160px, 25vw);
	top: 45%;
	left: 10%;
	animation-delay: 12s;
}

@keyframes hero-float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(20px, -20px) scale(1.05); }
	66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ---- Conteúdo centralizado em 100vh ---- */
.home-hero-section .hero-inner {
	position: relative;
	z-index: 3;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 0;
	padding: var(--hero-padding-y) 0;
}

.home-hero-section .hero-content-wrapper {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.25rem, 3vh, 2rem);
	align-items: center;
	max-width: 100%;
}

/* ---- Texto (header) ---- */
.home-hero-section .hero-text-content {
	max-width: 100%;
}

.home-hero-section .hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.35rem 0.75rem;
	background: rgba(213, 243, 243, 0.12);
	border: 1px solid rgba(213, 243, 243, 0.25);
	border-radius: 50px;
	color: var(--color-light);
	font-size: clamp(0.75rem, 1.8vw, 0.8125rem);
	font-weight: 600;
	margin-bottom: 0.6rem;
	backdrop-filter: blur(8px);
}

.home-hero-section .hero-badge svg {
	width: 16px;
	height: 16px;
	stroke: var(--color-medium);
}

.home-hero-section .hero-title {
	color: var(--white);
	font-size: clamp(1.75rem, 4.5vw, 2.35rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 0.5rem 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.home-hero-section .hero-description {
	color: rgba(213, 243, 243, 0.92);
	font-size: clamp(0.875rem, 2vw, 0.9375rem);
	line-height: 1.5;
	margin: 0 0 0.85rem 0;
	max-width: 32em;
}

.home-hero-section .hero-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin: 0 0 0.9rem 0;
	padding: 0;
	list-style: none;
}

.home-hero-section .hero-feature-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--color-light);
	font-size: clamp(0.75rem, 1.8vw, 0.8125rem);
}

.home-hero-section .hero-feature-item svg {
	width: 16px;
	height: 16px;
	stroke: var(--color-medium);
	flex-shrink: 0;
}

.home-hero-section .hero-search {
	max-width: 420px;
	margin-top: 0.5rem;
}

.home-hero-section .hero-search .search-form {
	display: flex;
	flex-direction: row;
	gap: 0.4rem;
	background: var(--white);
	border-radius: 50px;
	padding: 0.35rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.home-hero-section .hero-search .search-field {
	flex: 1;
	min-width: 0;
	padding: 0.6rem 1rem;
	font-size: 0.9375rem;
	border: none;
	background: transparent;
	border-radius: 50px;
	color: var(--color-darkest);
}

.home-hero-section .hero-search .search-field:focus {
	outline: none;
}

.home-hero-section .hero-search .search-submit {
	padding: 0.6rem 1.25rem;
	border-radius: 50px;
	background: var(--color-dark);
	color: var(--white);
	border: none;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

.home-hero-section .hero-search .search-submit:hover {
	background: var(--color-medium);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(115, 179, 205, 0.4);
}

.home-hero-section .hero-search .search-submit:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 2px;
}

/* ---- Cards ---- */
.home-hero-section .hero-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.75rem, 2vw, 1.25rem);
	align-items: stretch;
	width: 100%;
}

.home-hero-section .hero-card {
	background: var(--white);
	border-radius: 14px;
	padding: clamp(1rem, 2.5vw, 1.35rem);
	min-width: 0;
	text-decoration: none;
	color: var(--color-darkest);
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	border: 2px solid transparent;
	position: relative;
	overflow: hidden;
}

.home-hero-section .hero-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: var(--color-medium);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.home-hero-section .hero-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
	border-color: rgba(213, 243, 243, 0.4);
}

.home-hero-section .hero-card:hover::before {
	transform: scaleX(1);
}

.home-hero-section .hero-card:focus-visible {
	outline: 2px solid var(--color-medium);
	outline-offset: 2px;
}

.home-hero-section .hero-card-icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.65rem;
	transition: transform 0.3s ease;
}

.home-hero-section .hero-card-diseases .hero-card-icon {
	background: rgba(220, 53, 69, 0.1);
	color: #DC3545;
}

.home-hero-section .hero-card-exams .hero-card-icon {
	background: rgba(115, 179, 205, 0.12);
	color: var(--color-medium);
}

.home-hero-section .hero-card-specialties .hero-card-icon {
	background: rgba(40, 167, 69, 0.1);
	color: #28A745;
}

.home-hero-section .hero-card:hover .hero-card-icon {
	transform: scale(1.08);
}

.home-hero-section .hero-card-icon svg {
	width: 28px;
	height: 28px;
}

.home-hero-section .hero-card-title {
	font-size: clamp(1rem, 2.2vw, 1.15rem);
	font-weight: 700;
	color: var(--color-darkest);
	margin: 0 0 0.4rem 0;
	line-height: 1.3;
	transition: color 0.2s ease;
}

.home-hero-section .hero-card:hover .hero-card-title {
	color: var(--color-dark);
}

.home-hero-section .hero-card-description {
	color: var(--color-darker);
	font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
	line-height: 1.45;
	margin: 0 0 0.6rem 0;
	flex: 1;
	min-height: 2.9em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.home-hero-section .hero-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--color-dark);
	font-weight: 600;
	font-size: 0.8125rem;
	margin-top: auto;
	transition: color 0.2s ease, transform 0.2s ease;
}

.home-hero-section .hero-card:hover .hero-card-link {
	color: var(--color-medium);
}

.home-hero-section .hero-card-link svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.home-hero-section .hero-card:hover .hero-card-link svg {
	transform: translateX(2px);
}

/* ---- Desktop: duas colunas (texto | cards) para caber em 100vh ---- */
@media (min-width: 900px) {
	.home-hero-section .hero-content-wrapper {
		grid-template-columns: 1fr 1.15fr;
		gap: clamp(1.5rem, 3vw, 2.5rem);
		align-items: center;
	}

	.home-hero-section .hero-text-content {
		max-width: 28em;
	}

	.home-hero-section .hero-cards {
		gap: clamp(1rem, 2vw, 1.35rem);
	}
}

/* ---- Tablet ---- */
@media (max-width: 899px) {
	.home-hero-section .hero-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.9rem;
	}

	.home-hero-section .hero-card {
		padding: 1.1rem;
	}

	.home-hero-section .hero-card-icon {
		width: 42px;
		height: 42px;
		margin-bottom: 0.5rem;
	}

	.home-hero-section .hero-card-icon svg {
		width: 24px;
		height: 24px;
	}

	.home-hero-section .hero-card-description {
		min-height: 2.6em;
		font-size: 0.8rem;
	}
}

@media (max-width: 600px) {
	.home-hero-section .hero-cards {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.home-hero-section .hero-card {
		padding: 1.15rem;
	}

	.home-hero-section .hero-card-description {
		min-height: auto;
		-webkit-line-clamp: 2;
	}

	.home-hero-section .hero-search .search-form {
		flex-direction: column;
		padding: 0.4rem;
	}

	.home-hero-section .hero-search .search-submit {
		width: 100%;
	}
}

/* ---- Viewports muito baixos: permitir scroll suave ---- */
@media (max-height: 500px) {
	.home-hero-section {
		min-height: auto;
		height: auto;
		max-height: none;
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
	}
}
