/*
Theme Name: Imed Odonto
Theme URI: https://imedodonto.com.br/
Author: Agência Maximus
Description: Tema da clínica Imed Odonto (São Luís/MA). Recria a landing page original com estética verde-oliva, Playfair Display e Jost. Todo o conteúdo é editável em Aparência > Editor.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imed-odonto
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(section[id]) { scroll-margin-top: 80px; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-button__link { box-shadow: 0 8px 20px -10px rgba(46, 48, 22, .55); transition: transform .2s ease, background-color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); background-color: #3f4123; }

/* ---------- Header ---------- */
.imed-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(252, 250, 244, .9);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.admin-bar .imed-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .imed-header { top: 46px; } }
.imed-header__inner { padding-block: 12px; }
.imed-header .wp-block-site-logo img { width: 40px; height: auto; }
.imed-header .wp-block-navigation { font-size: .875rem; gap: 1.75rem; }
.imed-header .wp-block-navigation a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.imed-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
.imed-header .wp-block-button__link { padding: .7rem 1.5rem; font-size: .75rem; }
@media (max-width: 600px) { .imed-header .wp-block-buttons { display: none; } }

/* ---------- Seções ---------- */
.imed-section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.imed-section--muted { background: var(--wp--preset--color--muted); }
.imed-eyebrow {
	font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
	color: var(--wp--preset--color--accent); margin-bottom: .5rem !important;
}
.imed-title { margin-top: 0 !important; }
.is-layout-constrained > .imed-title {
	/* título alinhado à esquerda do conteúdo, mas com largura menor (como no site original) */
	max-width: min(600px, 100%);
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}
.imed-center { text-align: center; }
.imed-lead { color: var(--wp--preset--color--muted-text); }

/* ---------- Hero ---------- */
.imed-hero { padding-block: clamp(3rem, 7vw, 5.5rem); }
.imed-hero .wp-block-columns { align-items: center; gap: 3.5rem; }
.imed-badge {
	display: inline-block; font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
	color: var(--wp--preset--color--primary); background: var(--wp--preset--color--secondary);
	padding: .45rem .9rem; border-radius: 999px; margin-bottom: 1.25rem !important;
}
.imed-hero h1 { margin-top: 0; }
.imed-hero .imed-lead { max-width: 470px; font-size: .95rem; }
.imed-hero .wp-block-buttons { align-items: center; gap: 1.5rem; margin-top: 2rem; }
.imed-link-btn .wp-block-button__link {
	background: transparent !important; color: var(--wp--preset--color--contrast) !important; box-shadow: none;
	padding: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .875rem;
	display: inline-flex; align-items: center; gap: .45rem;
}
.imed-link-btn .wp-block-button__link::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--ico-pin) center/contain no-repeat; mask: var(--ico-pin) center/contain no-repeat; }
.imed-hero-media { position: relative; }
.imed-hero-media .wp-block-image img { border-radius: 24px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -30px rgba(42, 42, 25, .45); }
.imed-stat {
	position: absolute; left: -1.5rem; bottom: -1.5rem; max-width: 220px;
	background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding: 1rem 1.25rem;
	box-shadow: 0 20px 40px -20px rgba(42, 42, 25, .35);
}
.imed-stat > * { margin: 0 !important; }
.imed-stat__num { font-family: var(--wp--preset--font-family--heading); font-size: 1.75rem; line-height: 1.1; }
.imed-stat__txt { font-size: .75rem; color: var(--wp--preset--color--muted-text); line-height: 1.4; }
@media (max-width: 781px) { .imed-stat { left: 1rem; bottom: -1.25rem; } .imed-hero-media { margin-bottom: 1.5rem; } }

/* ---------- Listas com ícone ---------- */
.imed-checks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .8rem; color: var(--wp--preset--color--muted-text); margin-top: 2rem; }
.imed-checks--stack { flex-direction: column; font-size: .875rem; }
.imed-checks li, .imed-contact li { display: flex; align-items: flex-start; gap: .6rem; }
.imed-checks li::before, .imed-contact li::before {
	content: ""; flex: 0 0 16px; height: 16px; margin-top: .2em; background: var(--wp--preset--color--accent);
	-webkit-mask: var(--ico, var(--ico-check)) center/contain no-repeat; mask: var(--ico, var(--ico-check)) center/contain no-repeat;
}
.imed-contact { list-style: none; padding: 0; display: grid; gap: .9rem; font-size: .9rem; color: var(--wp--preset--color--muted-text); }
.imed-contact a { color: inherit; text-decoration: none; }
.imed-contact a:hover { color: var(--wp--preset--color--primary); }
.imed-contact li::before { flex-basis: 18px; height: 18px; }
.ico-pin { --ico: var(--ico-pin); }
.ico-phone { --ico: var(--ico-phone); }
.ico-mail { --ico: var(--ico-mail); }
.ico-insta { --ico: var(--ico-insta); }
.ico-clock { --ico: var(--ico-clock); }

/* ---------- Cards / grids ---------- */
.imed-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 3rem !important; }
.imed-grid-3 > * { margin: 0 !important; }
@media (max-width: 900px) { .imed-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .imed-grid-3 { grid-template-columns: 1fr; } }
.imed-card {
	background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px; padding: 1.75rem; transition: transform .25s ease, box-shadow .25s ease;
}
.imed-card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(42, 42, 25, .4); }
.imed-card > * { margin-block: 0; }
.imed-card > * + * { margin-top: .6rem !important; }
.imed-card h3 { font-size: 1.15rem; margin-top: 1.1rem !important; }
.imed-card p { font-size: .85rem; color: var(--wp--preset--color--muted-text); line-height: 1.6; }
.imed-icon { color: var(--wp--preset--color--accent); line-height: 0; }
.imed-icon svg { width: 26px; height: 26px; }

/* ---------- Resultados ---------- */
.imed-cases { gap: 2rem; margin-top: 3rem !important; }
.imed-case { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--border); border-radius: 18px; overflow: hidden; }
.imed-case > * { margin: 0 !important; }
.imed-case .wp-block-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.imed-case p { padding: 1rem 1.25rem; font-size: .85rem; color: var(--wp--preset--color--muted-text); }
.imed-section .wp-block-buttons.is-content-justification-center { margin-top: 2.5rem; }

/* ---------- Clínica ---------- */
.imed-clinic { gap: 3rem; align-items: center; }
.imed-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.imed-gallery > * { margin: 0 !important; }
.imed-gallery > :first-child { grid-column: 1 / -1; }
.imed-gallery img { width: 100%; border-radius: 16px; object-fit: cover; aspect-ratio: 16 / 9; display: block; }
.imed-gallery > :not(:first-child) img { aspect-ratio: 4 / 3; }

/* ---------- Depoimentos ---------- */
.imed-quote .imed-stars { color: var(--wp--preset--color--gold); letter-spacing: .15em; font-size: .95rem; }
.imed-quote p.imed-text { font-style: italic; font-size: .9rem; color: var(--wp--preset--color--contrast); }
.imed-quote p.imed-name { font-weight: 500; font-size: .8rem; color: var(--wp--preset--color--contrast); margin-top: 1.1rem !important; }

/* ---------- CTA escuro ---------- */
.imed-cta { background: radial-gradient(120% 140% at 50% 0%, #5c5e36 0%, #4e502c 45%, #3d3f21 100%); color: #f6f4ea; text-align: center; padding-block: clamp(3.5rem, 7vw, 5rem); }
.imed-cta h2 { color: #fff; }
.imed-cta p { color: rgba(246, 244, 234, .85); max-width: 560px; margin-inline: auto; font-size: .9rem; }
.imed-cta .wp-block-button__link { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--primary) !important; }

/* ---------- FAQ ---------- */
.imed-faq { max-width: 660px; margin: 2.5rem auto 0 !important; background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--border); border-radius: 18px; padding: .25rem 1.5rem; }
.imed-faq > * { margin: 0 !important; }
.imed-faq details { border-bottom: 1px solid var(--wp--preset--color--border); padding-block: 1.1rem; }
.imed-faq details:last-child { border-bottom: 0; }
.imed-faq summary { font-weight: 500; font-size: .95rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.imed-faq summary::-webkit-details-marker { display: none; }
.imed-faq summary::after { content: ""; flex: 0 0 14px; height: 14px; margin-top: .3em; background: var(--wp--preset--color--muted-text); -webkit-mask: var(--ico-chevron) center/contain no-repeat; mask: var(--ico-chevron) center/contain no-repeat; transition: transform .2s ease; }
.imed-faq details[open] summary::after { transform: rotate(180deg); }
.imed-faq details p { font-size: .875rem; color: var(--wp--preset--color--muted-text); margin-top: .75rem; }

/* ---------- Localização ---------- */
.imed-location { gap: 3rem; align-items: center; }
.imed-map iframe { width: 100%; height: 380px; border: 0; border-radius: 18px; display: block; box-shadow: 0 30px 60px -35px rgba(42, 42, 25, .45); }

/* ---------- Rodapé ---------- */
.imed-footer { border-top: 1px solid var(--wp--preset--color--border); padding-block: 3rem; text-align: center; font-size: .8rem; color: var(--wp--preset--color--muted-text); }
.imed-footer .wp-block-site-logo { display: flex; justify-content: center; }
.imed-footer .wp-block-site-logo img { width: 48px; height: auto; }
.imed-footer p { margin-block: .5rem; }
.imed-wa {
	position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
	background: #25d366; display: grid; place-items: center; color: #fff;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); animation: imed-pulse 2.4s infinite;
}
.imed-wa svg { width: 28px; height: 28px; }
@keyframes imed-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); } 70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.imed-hero .wp-block-columns { gap: 3rem; }
	.imed-cases, .imed-clinic, .imed-location { gap: 2rem; }
}

/* ---------- Animação de entrada ---------- */
.js-reveal .imed-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .imed-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal .imed-reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- Ícones (lucide, MIT) ---------- */
:root {
	--ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--ico-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-5.5 10.2-7.4 11.8a1 1 0 0 1-1.2 0C9.5 20.2 4 15 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	--ico-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
	--ico-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
	--ico-insta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cpath d='M17.5 6.5h.01'/%3E%3C/svg%3E");
	--ico-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
	--ico-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* No editor: botão do WhatsApp fica no fluxo para não cobrir o conteúdo */
.editor-styles-wrapper .imed-wa { position: static; margin: 0 auto 1.5rem; animation: none; }
.editor-styles-wrapper .imed-reveal { opacity: 1 !important; transform: none !important; }
