/*
Theme Name: Ideal Guia da Água
Theme URI: https://blog.idealpurificadores.com.br/
Author: Ideal Purificadores
Description: Tema do blog da Ideal Purificadores no formato "Guia da Água": topo com foto e busca por dúvidas, temas em botões, perguntas mais buscadas, artigos em cards e faixa "Hábito do mês". Textos e foto do topo editáveis em Aparência > Personalizar > Guia da Água.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: iga
*/

:root {
	--ink: #10262f;
	--muted: #47606a;
	--accent: #0b6a7d;
	--accent-dark: #084f5e;
	--mint: #8fe0ee;
	--ground: #f7f6f2;
	--card: #ffffff;
	--line: #e5e2d8;
	--line-soft: #eeebe3;
	--tint: #e6f3f5;
	--radius: 20px;
	--wrap: 1200px;
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
	outline: 3px solid var(--mint);
	outline-offset: 2px;
}

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

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100;
	background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 40px; }
.wrap-medium { width: 100%; max-width: 1000px; margin-inline: auto; padding-inline: 40px; }
.wrap-narrow { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: 24px; }

.section { padding-block: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.section-title { margin: 0 0 18px; font-size: 26px; line-height: 1.2; font-weight: 800; }

.kicker {
	display: inline-block;
	font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--accent);
}
a.kicker:hover { text-decoration: underline; }
.meta { font-size: 14px; color: var(--muted); }

/* ---------- Cabeçalho ---------- */
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.site-header--solid { background: var(--ink); }
.site-header--over { position: relative; z-index: 2; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand:hover { color: #fff; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand__logo { width: 44px; height: 44px; object-fit: contain; border-radius: 12px; background: #ffffff; padding: 3px; flex: none; }
.brand__name { font-size: 20px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.brand__sub { font-weight: 500; }

.nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 26px; }
.nav .menu a { color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav--desk { display: flex; align-items: center; gap: 26px; }
.btn-outline {
	display: inline-flex; align-items: center; min-height: 44px;
	border: 1.5px solid rgba(255, 255, 255, 0.6); border-radius: 22px; padding: 0 18px;
	color: #fff; font-size: 15px; font-weight: 600;
}
.btn-outline:hover { color: #fff; background: rgba(255, 255, 255, 0.12); text-decoration: none; }

.nav-mobile { display: none; position: relative; flex: none; }
.nav-mobile > summary {
	list-style: none; cursor: pointer;
	width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, 0.5);
	display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary span { width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.nav--mob {
	position: absolute; right: 0; top: 58px; z-index: 20;
	min-width: 240px; background: var(--ink); border-radius: 16px; padding: 18px;
	box-shadow: 0 18px 40px rgba(9, 30, 38, 0.35);
	display: flex; flex-direction: column; align-items: stretch; gap: 14px;
}
.nav--mob .menu { flex-direction: column; align-items: flex-start; gap: 14px; }

/* ---------- Topo com foto ---------- */
.hero { position: relative; min-height: 600px; overflow: hidden; background: var(--ink); color: #fff; display: flex; flex-direction: column; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: rgba(9, 30, 38, 0.62); }
.hero__body {
	position: relative; z-index: 1; flex: 1;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 20px; text-align: center; padding-block: 40px 72px;
}
.hero__title { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; font-weight: 800; max-width: 860px; }
.hero__text { margin: 0; font-size: 19px; line-height: 1.55; color: #dcecf0; max-width: 680px; }
.hero__questions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.hero__questions a {
	display: inline-flex; min-height: 44px; align-items: center;
	background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 22px; padding: 8px 16px; font-size: 15px; color: #fff;
}
.hero__questions a:hover { background: rgba(255, 255, 255, 0.24); color: #fff; text-decoration: none; }

/* ---------- Busca ---------- */
.iga-busca {
	width: 100%; max-width: 720px;
	display: flex; align-items: center; gap: 10px;
	background: #fff; border: 1.5px solid #d6e6eb; border-radius: 32px; padding: 6px 6px 6px 22px;
	color: var(--muted);
}
.iga-busca__icon { flex: none; }
.iga-busca__input {
	flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
	font: inherit; font-size: 17px; color: var(--ink); padding: 10px 0;
}
.iga-busca__btn {
	flex: none; height: 48px; padding: 0 26px; border: 0; border-radius: 24px;
	background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.iga-busca__btn:hover { background: var(--accent-dark); }

/* ---------- Temas ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 26px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
	display: inline-flex; align-items: center; min-height: 44px;
	background: #fff; color: var(--ink); border: 1px solid #ddd9cc; border-radius: 22px;
	padding: 0 20px; font-size: 15px; font-weight: 600;
}
.chip:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------- Destaque + perguntas ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.lead__feature .card__link { gap: 14px; }
.lead__img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: var(--radius); display: block; }
.lead__title { font-size: 30px; line-height: 1.2; font-weight: 800; color: var(--ink); }
.lead__excerpt { font-size: 17px; line-height: 1.55; color: var(--muted); }

.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.faq__title { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__item:last-child { border-bottom: 0; }
.faq__item summary {
	list-style: none; cursor: pointer; padding: 16px 32px 16px 0; position: relative;
	font-size: 17px; font-weight: 700; line-height: 1.4;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
	content: "+"; position: absolute; right: 0; top: 12px;
	font-size: 24px; font-weight: 500; color: var(--accent);
}
.faq__item[open] summary::after { content: "–"; }
.faq__item p { margin: -4px 0 16px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.faq__item p a { font-weight: 700; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card__link { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.card__link:hover { color: var(--ink); text-decoration: none; }
.card__link:hover .card__title, .card__link:hover .lead__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card__img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; border-radius: 18px; display: block; margin-bottom: 4px; }
.thumb-fallback { display: flex; align-items: center; justify-content: center; background: var(--tint); }
.lead__img.thumb-fallback { aspect-ratio: 16 / 9; }
.card__title { font-size: 20px; line-height: 1.3; font-weight: 800; }

/* ---------- Hábito do mês ---------- */
.habito {
	width: auto;
	margin-block: 24px 48px;
	background: var(--ink); color: #e6f2f5; border-radius: 28px;
	padding: 44px 48px !important;
	display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px;
	max-width: calc(var(--wrap) - 80px);
}
.habito__label { margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
.habito h2 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 800; color: #fff; }
.habito__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.habito__list li { display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.5; }
.habito__n { font-size: 28px; font-weight: 800; color: var(--mint); }

/* ---------- Lista "Mais artigos" ---------- */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: 180px minmax(0, 1fr) 150px; gap: 24px; align-items: center; padding: 18px 0; color: var(--ink); }
.list a:hover { text-decoration: none; }
.list a:hover .list__title { text-decoration: underline; }
.list__cat { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.list__title { font-size: 18px; font-weight: 700; line-height: 1.35; }
.list__meta { font-size: 14px; color: var(--muted); text-align: right; }
.more__all { font-weight: 700; }

/* ---------- Cabeçalho de páginas internas ---------- */
.page-head { padding-block: 48px 8px; }
.page-head h1 { margin: 6px 0 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); }
.page-head__desc { max-width: 760px; color: var(--muted); font-size: 17px; }
.page-head__desc p { margin: 0 0 8px; }
.page-head__search { margin-top: 22px; }
.empty { color: var(--muted); font-size: 17px; }

/* ---------- Post ---------- */
.post__head { padding-top: 44px; display: flex; flex-direction: column; gap: 12px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.post__title { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; font-weight: 800; }
.post__head .meta { margin: 0; }
.post__cover { margin-block: 28px 8px; }
.post__img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 24px; display: block; }

.entry-content { padding-block: 24px 8px; font-size: 18px; line-height: 1.75; color: #1c3440; }
.entry-content > * { margin-block: 0 1.1em; }
.entry-content h2 { margin-top: 1.8em; font-size: 28px; line-height: 1.25; font-weight: 800; color: var(--ink); }
.entry-content h3 { margin-top: 1.5em; font-size: 22px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.entry-content h4 { margin-top: 1.4em; font-size: 19px; font-weight: 800; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.45em; }
.entry-content img { border-radius: 16px; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content blockquote {
	margin-inline: 0; padding: 18px 24px; background: var(--tint); border-radius: 16px;
	font-size: 19px; color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; border-radius: 14px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--tint); font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.entry-content .aligncenter { margin-inline: auto; display: block; }
.entry-content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.2em; }
.entry-content .wp-block-image.size-medium img { width: auto; }
.page-links { font-weight: 700; }

.duvida {
	margin-block: 24px 16px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.duvida h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.duvida p { margin: 0; color: var(--muted); font-size: 16px; max-width: 460px; }
.btn {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 24px;
	background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.related { padding-block: 32px 48px; }
.comments-wrap { padding-bottom: 48px; }

/* Textos longos (e-mails, links) não empurram a tela */
.entry-content p, .entry-content li, .entry-content a { overflow-wrap: anywhere; }
.entry-content th, .entry-content td, .entry-content th *, .entry-content td * { overflow-wrap: normal; word-break: normal; }

/* ---------- Botões de compartilhar (plugin WP Socializer) ---------- */
.entry-content .wp-socializer { margin-block: 28px 8px; }
.entry-content .wp-socializer .socializer a,
.entry-content .wp-socializer .socializer a:hover {
	background-color: var(--accent) !important;
	color: #ffffff !important;
	text-decoration: none;
}
.entry-content .wp-socializer .socializer a:hover { background-color: var(--accent-dark) !important; }

/* ---------- Paginação ---------- */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
	border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 700;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Rodapé ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 36px 20px; flex-wrap: wrap; }
.site-footer__about { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 560px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; font-weight: 700; }
.site-footer__base { padding-block: 0 32px; font-size: 13px; color: var(--muted); }

/* ---------- Comentários ---------- */
.comment-list { list-style: none; padding: 0; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
	width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.comment-respond .submit { font: inherit; font-weight: 700; border: 0; border-radius: 24px; background: var(--accent); color: #fff; padding: 12px 24px; cursor: pointer; }

/* ---------- Telas menores ---------- */
@media (max-width: 1024px) {
	.lead { grid-template-columns: minmax(0, 1fr); }
	.habito { grid-template-columns: minmax(0, 1fr); margin-inline: 24px; }
	.list a { grid-template-columns: minmax(0, 1fr); gap: 4px; }
	.list__meta { text-align: left; }
}

@media (max-width: 860px) {
	.nav--desk { display: none; }
	.nav-mobile { display: block; }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
	.habito__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.wrap, .wrap-medium { padding-inline: 18px; }
	.wrap-narrow { padding-inline: 18px; }
	.site-header__inner { min-height: 72px; }
	.brand__sub { display: none; }
	.brand__name { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
	.brand__logo { width: 40px; height: 40px; }
	.hero { min-height: 540px; }
	.hero__text { font-size: 17px; }
	.iga-busca { padding-left: 16px; }
	.iga-busca__btn { padding: 0 18px; }
	.chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 20px; }
	.chip { flex: none; }
	.grid-3 { grid-template-columns: minmax(0, 1fr); }
	.lead__title { font-size: 25px; }
	.habito { padding: 32px 24px !important; margin-inline: 18px; border-radius: 22px; }
	.habito h2 { font-size: 26px; }
	.entry-content { font-size: 17px; }
	.entry-content h2 { font-size: 24px; }
	.entry-content .wp-block-table { margin-inline: -18px; padding-inline: 18px; }
	.entry-content table { display: block; max-width: 100%; overflow-x: auto; font-size: 15px; }
	.entry-content th, .entry-content td { min-width: 130px; }
	.post__img { border-radius: 16px; }
	.post__cover { padding-inline: 18px; }
	.duvida { padding: 22px; }
}

@media (max-width: 380px) {
	.brand__name { font-size: 15px; }
	.brand { gap: 8px; }
}
