/* ==========================================================
   CEMITÉRIO VILA MARIANA — Estilos principais do tema
   ========================================================== */

:root {
	--sage: #9A4A5D;
	--sage-dark: #6B2638;
	--sage-light: #F3E3E8;
	--cream: #F8EEF1;
	--off-white: #FCF9FA;
	--beige: #E4CDD4;
	--warm-gray: #76646A;
	--dark-gray: #3F3035;

	--font-heading: 'Playfair Display', Georgia, serif;
	--font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--hero-overlay: 0.45;
	--emergency-overlay: 0.55;

	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 24px;
	--shadow-soft: 0 10px 30px rgba(70, 68, 63, 0.06);
	--transition: 0.25s ease;
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 21px; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-weight: 300;
	font-size: 21px;
	line-height: 1.7;
	color: var(--dark-gray);
	background-color: var(--off-white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
	color: var(--sage-dark);
	text-decoration: none;
	transition: color var(--transition);
}
a:hover { color: var(--dark-gray); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; background: none; border: none; }

.container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.section { padding: 88px 0; }

.text-center { text-align: center; }

/* ---------- Acessibilidade ---------- */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -60px;
	left: 10px;
	background: var(--sage-dark);
	color: #fff;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	z-index: 9999;
	transition: top var(--transition);
}
.skip-link:focus {
	top: 10px;
	color: #fff;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--sage-dark);
	outline-offset: 3px;
}

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
	font-family: var(--font-heading);
	color: var(--dark-gray);
	margin: 0 0 16px;
	line-height: 1.25;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }

.section-title {
	font-size: clamp(1.9rem, 3.4vw, 2.6rem);
	color: var(--sage-dark);
	font-weight: 600;
}

.section-subtitle {
	font-size: 1.05rem;
	color: var(--warm-gray);
	max-width: 640px;
	margin: 0 auto 48px;
}
.section-subtitle.text-center { margin-left: auto; margin-right: auto; }

.service-title {
	font-size: 1.5rem;
	color: var(--sage-dark);
	font-weight: 600;
}

p { color: var(--dark-gray); }

/* ---------- Botões ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 500;
	transition: all var(--transition);
	white-space: nowrap;
}

.btn-primary {
	background-color: var(--sage-dark);
	color: #fff;
}
.btn-primary:hover { background-color: var(--dark-gray); color: #fff; }

.btn-outline {
	background-color: transparent;
	color: var(--sage-dark);
	border: 1.5px solid var(--sage-dark);
}
.btn-outline:hover { background-color: var(--sage-dark); color: #fff; }

.btn-whatsapp {
	background-color: var(--sage-dark);
	color: #fff;
}
.btn-whatsapp:hover { background-color: var(--sage); color: #fff; }
.btn-whatsapp, .btn-whatsapp span, .btn-whatsapp svg { color: #fff !important; }
.btn-whatsapp .icon-whatsapp,
.btn-whatsapp svg { width: 18px; height: 18px; }

.btn-small { padding: 10px 20px; font-size: 0.85rem; }
.btn-large { padding: 18px 36px; font-size: 1.05rem; }

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background-color: rgba(252, 251, 248, 0.96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--beige);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.site-branding img { max-height: 90px; width: auto; height: auto; }

.site-title-link {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sage-dark);
}

.primary-navigation ul {
	display: flex;
	align-items: center;
	gap: 32px;
}

.primary-navigation a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--dark-gray);
	position: relative;
}
.primary-navigation a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -6px;
	width: 0;
	height: 2px;
	background-color: var(--sage-dark);
	transition: width var(--transition);
}
.primary-navigation a:hover::after,
.primary-navigation a:focus::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.btn-header-whatsapp { padding: 10px 20px; font-size: 0.85rem; }
.btn-header-whatsapp .btn-label { display: inline; }

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
}
.menu-toggle-bar {
	width: 24px;
	height: 2px;
	background-color: var(--dark-gray);
	transition: all var(--transition);
}
.menu-toggle.is-active .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: 82vh;
	display: flex;
	align-items: center;
	background-color: var(--sage-light);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(66,23,34,var(--hero-overlay)) 0%, rgba(66,23,34,calc(var(--hero-overlay) + 0.15)) 100%);
}

.hero-inner {
	position: relative;
	z-index: 2;
	max-width: 720px;
	color: #fff;
}

.hero-title {
	color: #fff;
	margin-bottom: 20px;
}

.hero-subtitle {
	color: rgba(255,255,255,0.92);
	font-size: 1.2rem;
	font-weight: 300;
	margin-bottom: 36px;
	max-width: 560px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Seção de acolhimento ---------- */
.welcome-section { background-color: var(--cream); text-align: center; }
.welcome-inner { max-width: 720px; margin: 0 auto; }
.welcome-text { font-size: 1.1rem; margin-bottom: 32px; color: var(--dark-gray); }

/* ---------- Serviços ---------- */
.services-section { background-color: var(--off-white); }

.services-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	margin-top: 16px;
}

.service-card {
	background-color: var(--off-white);
	border: 1px solid var(--beige);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(66, 23, 34, 0.1);
}
.service-card.is-alt { background-color: var(--cream); }

.service-image { aspect-ratio: 4 / 3; overflow: hidden; position: relative; background: var(--beige); }
.service-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-card:hover .service-image img { transform: scale(1.045); }
.service-number { position: absolute; z-index: 2; top: 16px; left: 16px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(107,38,56,.94); color: #fff; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; box-shadow: 0 8px 20px rgba(66,23,34,.18); }

.service-content { padding: 30px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }

.service-icon { color: var(--sage-dark); width: 46px; height: 46px; display: inline-block; }
.service-icon svg { width: 46px; height: 46px; }

.service-description { color: var(--warm-gray); flex-grow: 1; }

.service-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Banner de emergência (óbito) ---------- */
.emergency-banner {
	position: relative;
	width: 100%;
	min-height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--sage-dark);
	background-size: cover;
	background-position: center;
	text-align: center;
}

.emergency-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(70, 68, 63, var(--emergency-overlay));
}

.emergency-inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 60px 24px; }

.emergency-title {
	color: #fff;
	font-size: clamp(2rem, 4.5vw, 3rem);
	margin-bottom: 12px;
}
.emergency-title { text-shadow: 0 2px 10px rgba(0,0,0,0.25); }

.emergency-subtitle {
	color: rgba(255,255,255,0.92);
	font-size: 1.15rem;
	margin-bottom: 32px;
}

.emergency-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ---------- Orientação / Documentação ---------- */
.orientation-section { background-color: var(--cream); }

.orientation-steps {
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.orientation-step {
	display: flex;
	align-items: center;
	gap: 20px;
	background-color: var(--off-white);
	border-radius: var(--radius-md);
	padding: 20px 24px;
	box-shadow: var(--shadow-soft);
}

.step-number {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--sage-dark);
	color: #fff;
	border-radius: 50%;
	font-family: var(--font-heading);
	font-weight: 700;
}

.step-text { font-weight: 500; }

.orientation-disclaimer {
	max-width: 760px;
	margin: 28px auto 0;
	font-size: 0.9rem;
	color: var(--warm-gray);
	text-align: center;
	font-style: italic;
}

.documentation-section { background-color: var(--off-white); text-align: center; }
.documentation-text { max-width: 700px; margin: 0 auto 32px; color: var(--dark-gray); }

/* ---------- Sobre ---------- */
.about-section { background-color: var(--sage-light); }

.about-inner {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 56px;
	align-items: center;
}

.about-content p { color: var(--dark-gray); margin-bottom: 16px; }

.about-image img {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

/* ---------- FAQ ---------- */
.faq-section { background-color: var(--cream); }

.faq-accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.faq-item {
	background-color: var(--off-white);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-soft);
	overflow: hidden;
}

.faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	text-align: left;
	font-size: 1.02rem;
	font-weight: 500;
	color: var(--dark-gray);
}

.faq-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--sage-dark); transition: transform var(--transition); }
.faq-icon svg { width: 20px; height: 20px; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }

.faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height var(--transition), padding var(--transition);
	padding: 0 24px;
}
.faq-answer p { color: var(--warm-gray); padding-bottom: 20px; margin: 0; }
.faq-item.is-open .faq-answer { max-height: 400px; }

/* ---------- Contato ---------- */
.contact-section { background-color: var(--sage-dark); }
.contact-section .section-title { color: #fff; }
.contact-section .section-subtitle { color: rgba(255,255,255,0.8); }

.contact-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
	margin-bottom: 40px;
}

.contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-size: 1.02rem;
}
.contact-item a { color: #fff; }
.contact-item a:hover { color: var(--sage-light); }
.contact-item svg { width: 20px; height: 20px; color: var(--sage-light); }

.contact-actions { display: flex; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background-color: var(--dark-gray); color: var(--beige); }

.footer-inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 40px;
	padding: 72px 24px 48px;
}

.footer-widget-title {
	color: #fff;
	font-size: 1.1rem;
	margin-bottom: 18px;
}

.footer-column p,
.footer-column a { color: var(--beige); }
.footer-column a:hover { color: #fff; }

.footer-links ul,
.footer-services ul { display: flex; flex-direction: column; gap: 10px; }

.social-links { display: flex; gap: 14px; margin-top: 16px; }
.social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.25);
	color: var(--beige);
}
.social-links a:hover { background-color: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.social-links svg { width: 18px; height: 18px; }

.footer-phone a { font-size: 1.15rem; font-weight: 600; color: #fff; }

.btn-footer-whatsapp { margin-top: 12px; }

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.12);
	padding: 24px;
	text-align: center;
	font-size: 0.85rem;
	color: rgba(255,255,255,0.6);
}
.footer-bottom p { margin: 4px 0; color: inherit; }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 58px;
	height: 58px;
	background-color: var(--sage-dark);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0,0,0,0.2);
	z-index: 600;
	transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ---------- Páginas internas / posts ---------- */
.content-area { padding: 72px 24px; }
.page-title { color: var(--sage-dark); }
.page-thumbnail { margin-bottom: 32px; border-radius: var(--radius-lg); overflow: hidden; }
.page-body { max-width: 780px; margin: 0 auto; }
.post-meta { color: var(--warm-gray); font-size: 0.9rem; margin-bottom: 24px; }

.posts-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.post-summary { background-color: var(--off-white); border: 1px solid var(--beige); border-radius: var(--radius-md); overflow: hidden; }
.post-summary .post-thumbnail img { aspect-ratio: 4/3; object-fit: cover; }
.post-title { padding: 20px 20px 0; font-size: 1.2rem; }
.post-excerpt { padding: 12px 20px 20px; color: var(--warm-gray); }

.error-404-content { text-align: center; max-width: 640px; margin: 0 auto; padding: 100px 24px; }
.error-404-actions { display: flex; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- Identidade visual ---------- */
.section-kicker {
	display: inline-block;
	margin-bottom: 10px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sage);
}

/* ---------- Galeria: Um espaço de respeito e memória ---------- */
.ambientes-section { background: var(--off-white); }
.ambientes-heading { max-width: 760px; margin: 0 auto 44px; }
.ambientes-grid {
	display: grid;
	grid-template-columns: 1.35fr .85fr .85fr;
	grid-template-rows: 250px 250px;
	gap: 18px;
}
.gallery-card {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--beige);
	box-shadow: var(--shadow-soft);
}
.gallery-card--large { grid-row: 1 / 3; }
.gallery-card--wide { grid-column: 2 / 4; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s ease; }
.gallery-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(55,20,30,.62) 100%); pointer-events: none; }
.gallery-card:hover img { transform: scale(1.055); filter: saturate(.95); }
.gallery-card figcaption { position: absolute; left: 22px; bottom: 18px; z-index: 2; color: #fff; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ambientes-note { margin: 22px 0 0; text-align: center; color: var(--warm-gray); font-size: .84rem; }

/* ---------- Largura global segura ---------- */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
.site-header, .site-main, .site-footer { width: 100%; max-width: 100%; }

/* ==========================================================
   RESPONSIVO
   ========================================================== */

@media (max-width: 960px) {
	.about-inner { grid-template-columns: 1fr; }
	.about-image { order: -1; }
}

@media (max-width: 880px) {
	.services-grid { grid-template-columns: 1fr; }
	.ambientes-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px 220px; }
	.gallery-card--large { grid-row: auto; grid-column: 1 / 3; }
	.gallery-card--wide { grid-column: 1 / 3; }
	.primary-navigation {
		position: fixed;
		top: 0;
		right: -100%;
		width: min(320px, 85%);
		height: 100vh;
		background-color: var(--off-white);
		box-shadow: -10px 0 30px rgba(0,0,0,0.1);
		padding: 100px 32px 32px;
		transition: right var(--transition);
		z-index: 400;
	}
	.primary-navigation.is-open { right: 0; }
	.primary-navigation ul { flex-direction: column; align-items: flex-start; gap: 24px; }

	.menu-toggle { display: flex; }

	.btn-header-whatsapp .btn-label { display: none; }
	.btn-header-whatsapp { padding: 10px; border-radius: 50%; }
	.btn-header-whatsapp svg { margin: 0; }

	.hero { min-height: 70vh; text-align: center; }
	.hero-inner { margin: 0 auto; }
	.hero-actions { justify-content: center; }

	.emergency-banner { min-height: auto; padding: 60px 0; }

	.section { padding: 64px 0; }
}

@media (max-width: 600px) {
	.container { padding: 0 18px; }
	.site-branding img { max-height: 72px; }
	.ambientes-grid { grid-template-columns: 1fr; grid-template-rows: repeat(5, 220px); }
	.gallery-card--large, .gallery-card--wide { grid-column: auto; }
	h1 { font-size: 2.2rem; }
	.section-title { font-size: 1.7rem; }
	.contact-grid { flex-direction: column; gap: 20px; align-items: center; }
	.whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
	.footer-inner { padding: 56px 20px 32px; }
}

/* ---------- Estados via JS ---------- */
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(70,68,63,0.08); }
body.menu-open { overflow: hidden; }

/* WhatsApp flutuante */
.whatsapp-float { background-color: var(--sage-dark); color: #fff; animation: cvm-whatsapp-pulse 2.2s ease-in-out infinite; }
.whatsapp-float svg { color: #fff; fill: currentColor; }
@keyframes cvm-whatsapp-pulse { 0%,100% { box-shadow: 0 8px 24px rgba(0,0,0,.20), 0 0 0 0 rgba(107,38,56,.28); } 50% { box-shadow: 0 8px 24px rgba(0,0,0,.20), 0 0 0 10px rgba(107,38,56,0); } }
@media (prefers-reduced-motion: reduce) { .whatsapp-float { animation: none; } .service-card:hover .service-image img, .gallery-card:hover img { transform: none; } }
