/*
Theme Name: MedAgora
Theme URI: https://medagora.com.br
Author: MedAgora
Description: Tema para consulta médica online pelo WhatsApp. Página inicial pronta para anúncios no Google Ads, com páginas "Como funciona", "Perguntas frequentes" e "Política de privacidade". Edite marca, WhatsApp, preço e horário em Aparência > Personalizar > Dados da clínica.
Version: 1.0.0
Requires at least: 6.0
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: medagora
*/

:root {
	--mg-bg: #f6fcf8;
	--mg-fg: #03261b;
	--mg-card: #ffffff;
	--mg-primary: #00ab41;
	--mg-primary-fg: #f7fdf9;
	--mg-muted: #d4f8ed;
	--mg-muted-fg: #4b6058;
	--mg-accent: #abf8d6;
	--mg-accent-fg: #003221;
	--mg-border: #d3e2d9;
	--mg-cta: #ffce00;
	--mg-cta-fg: #03261b;
	--mg-deep: #003f8a;
	--mg-deep-fg: #ecf9ee;
	--mg-chat: #f0e7d6;
	--mg-chat-out: #a6f5a8;
	--mg-radius: 1rem;
	--mg-font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
	--mg-font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
	--mg-shadow-soft: 0 20px 50px -24px rgba(0, 63, 138, 0.35);
	--mg-shadow-cta: 0 10px 28px -10px rgba(255, 206, 0, 0.8), 0 2px 0 0 rgba(3, 38, 27, 0.25);
	--mg-gradient-hero:
		radial-gradient(60% 70% at 90% 10%, rgba(127, 233, 152, 0.8) 0%, transparent 70%),
		radial-gradient(50% 60% at 10% 90%, rgba(100, 239, 247, 0.7) 0%, transparent 70%),
		radial-gradient(40% 50% at 55% 40%, rgba(255, 231, 135, 0.6) 0%, transparent 70%),
		linear-gradient(135deg, #dcfef1 0%, #edf7d2 100%);
	--mg-gradient-deep: linear-gradient(135deg, #03409c 0%, #006b76 55%, #007c36 100%);
	--mg-gradient-accent: linear-gradient(135deg, #93f7c3 0%, #87f2f8 50%, #ffe787 100%);
}

/* Base */
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--mg-bg);
	color: var(--mg-fg);
	font-family: var(--mg-font-sans);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
	font-family: var(--mg-font-display);
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

.mg-container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.mg-narrow { max-width: 48rem; }
.mg-icon { display: inline-flex; width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.mg-icon svg { width: 100%; height: 100%; }
.mg-muted { color: var(--mg-muted-fg); }
.mg-lead { font-size: 1.125rem; color: var(--mg-muted-fg); max-width: 34rem; }
.mg-small { font-size: 0.75rem; color: var(--mg-muted-fg); }
.mg-stack > * + * { margin-top: 1.5rem; }
.mg-stack-sm > * + * { margin-top: 0.75rem; }
.mg-center { text-align: center; }

/* Botões */
.mg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
	transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.mg-btn-cta {
	height: 3.5rem; padding: 0 2rem; border-radius: 999px;
	background: var(--mg-cta); color: var(--mg-cta-fg);
	font-family: var(--mg-font-display); font-weight: 700; font-size: 1.0625rem;
	box-shadow: var(--mg-shadow-cta);
}
.mg-btn-cta:hover { transform: translateY(-2px); opacity: 0.93; }
.mg-btn-cta .mg-icon { width: 1.35rem; height: 1.35rem; }
.mg-btn-wa {
	height: 2.4rem; padding: 0 1rem; border-radius: 999px;
	background: var(--mg-primary); color: var(--mg-primary-fg);
	font-weight: 600; font-size: 0.875rem;
}
.mg-btn-wa:hover { opacity: 0.9; }
.mg-btn-wa .mg-icon { width: 1rem; height: 1rem; }
@media (max-width: 639px) { .mg-btn-cta { width: 100%; font-size: 1rem; padding: 0 1rem; } }

/* Cabeçalho */
.mg-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(246, 252, 248, 0.85);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(211, 226, 217, 0.6);
}
.admin-bar .mg-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mg-header { top: 46px; } }
.mg-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.mg-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.mg-logo-mark {
	display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.75rem;
	background: var(--mg-primary); color: var(--mg-primary-fg);
}
.mg-logo-mark .mg-icon { width: 1.25rem; height: 1.25rem; }
.mg-logo-text { font-family: var(--mg-font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.mg-logo img { max-height: 2.5rem; width: auto; }
.mg-nav { display: none; gap: 1.5rem; font-size: 0.875rem; font-weight: 500; }
.mg-nav a { text-decoration: none; color: var(--mg-muted-fg); transition: color 0.2s; }
.mg-nav a:hover, .mg-nav a.is-active { color: var(--mg-fg); }
@media (min-width: 768px) { .mg-nav { display: flex; } }
.mg-only-desktop { display: none; }
@media (min-width: 640px) { .mg-only-desktop { display: inline; } .mg-only-mobile { display: none; } }

/* Topo */
.mg-hero { background: var(--mg-gradient-hero); overflow: hidden; }
.mg-hero-grid { display: grid; gap: 2.5rem; align-items: center; padding-top: 2.5rem; }
.mg-hero-copy { padding-bottom: 1.5rem; }
.mg-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; font-weight: 600; }
.mg-pill {
	display: inline-flex; align-items: center; gap: 0.375rem;
	background: var(--mg-card); border-radius: 999px; padding: 0.375rem 0.75rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.mg-dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--mg-primary); animation: mg-blink 1.6s ease-in-out infinite; }
.mg-hero h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.05; }
.mg-highlight {
	white-space: nowrap; padding: 0 0.1em;
	background: linear-gradient(transparent 58%, rgba(255, 206, 0, 0.75) 58%);
}
.mg-hero-img img {
	width: 100%; max-width: 28rem; margin: 0 auto; aspect-ratio: 1 / 1; object-fit: cover;
	border-radius: 3rem 3rem 0 0; box-shadow: var(--mg-shadow-soft);
}
@media (min-width: 640px) { .mg-hero h1 { font-size: 3rem; } }
@media (min-width: 768px) {
	.mg-hero-grid { grid-template-columns: 1fr 1fr; padding-top: 4rem; }
	.mg-hero-copy { padding-bottom: 4rem; }
	.mg-hero-img { align-self: end; }
	.mg-hero-img img { max-width: none; }
}
@media (min-width: 1024px) { .mg-hero h1 { font-size: 3.75rem; } }

/* Faixa de confiança */
.mg-trust { background: var(--mg-card); border-top: 1px solid var(--mg-border); border-bottom: 1px solid var(--mg-border); }
.mg-trust-grid { display: grid; gap: 1.5rem; padding: 2rem 1rem; }
.mg-trust-item { display: flex; gap: 0.75rem; }
.mg-trust-item .mg-icon { width: 1.5rem; height: 1.5rem; color: var(--mg-primary); margin-top: 0.125rem; }
.mg-trust-item strong { display: block; font-weight: 600; }
.mg-trust-item span.mg-muted { font-size: 0.875rem; }
@media (min-width: 640px) { .mg-trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .mg-trust-grid { grid-template-columns: repeat(4, 1fr); } }

/* Seções */
.mg-section { padding: 4rem 0; }
@media (min-width: 768px) { .mg-section { padding: 6rem 0; } }
.mg-h2 { font-size: 1.875rem; font-weight: 800; }
@media (min-width: 640px) { .mg-h2 { font-size: 2.25rem; } }
.mg-h1-page { font-size: 2.25rem; font-weight: 800; }
@media (min-width: 640px) { .mg-h1-page { font-size: 3rem; } }

.mg-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .mg-split { grid-template-columns: 1fr 1fr; } }
.mg-rounded-img { width: 100%; border-radius: 1.5rem; object-fit: cover; box-shadow: var(--mg-shadow-soft); }

.mg-services { display: grid; gap: 0.75rem; }
.mg-services li {
	display: flex; align-items: center; gap: 0.75rem;
	background: var(--mg-muted); border-radius: 0.75rem; padding: 0.75rem 1rem; font-weight: 500;
}
.mg-services .mg-icon { color: var(--mg-primary); }

/* Como funciona (faixa escura) */
.mg-deep { background: var(--mg-gradient-deep); color: var(--mg-deep-fg); }
.mg-deep .mg-split { gap: 3rem; }
.mg-deep .mg-op { opacity: 0.85; }
.mg-deep .mg-link-light { font-size: 0.875rem; font-weight: 600; text-underline-offset: 4px; opacity: 0.9; }
.mg-order-1 { order: 1; }
.mg-order-2 { order: 2; }
@media (min-width: 768px) { .mg-md-order-1 { order: 1; } .mg-md-order-2 { order: 2; } }

/* Passos */
.mg-steps { display: grid; gap: 1rem; color: var(--mg-fg); }
.mg-step {
	display: flex; gap: 1rem; background: var(--mg-card); border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius); padding: 1.25rem; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.mg-step-icon {
	position: relative; display: grid; place-items: center; flex-shrink: 0;
	width: 3rem; height: 3rem; border-radius: 0.75rem; background: var(--mg-accent); color: var(--mg-accent-fg);
}
.mg-step-num {
	position: absolute; top: -0.5rem; right: -0.5rem; display: grid; place-items: center;
	width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--mg-cta); color: var(--mg-cta-fg);
	font-family: var(--mg-font-display); font-weight: 700; font-size: 0.75rem;
}
.mg-step h3 { font-size: 1.125rem; font-weight: 700; }
.mg-step p { margin-top: 0.25rem; font-size: 0.875rem; color: var(--mg-muted-fg); }
.mg-note {
	background: var(--mg-card); border: 1px solid var(--mg-border); border-radius: var(--mg-radius);
	padding: 1.25rem; font-size: 0.875rem; color: var(--mg-muted-fg);
}
.mg-note strong { display: block; color: var(--mg-fg); margin-bottom: 0.25rem; }

/* Celular com conversa */
.mg-phone {
	width: 100%; max-width: 340px; margin: 0 auto; border: 10px solid var(--mg-deep);
	border-radius: 2.5rem; background: var(--mg-deep); box-shadow: var(--mg-shadow-soft);
}
.mg-phone-screen { overflow: hidden; border-radius: 1.8rem; }
.mg-phone-top { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--mg-deep); color: var(--mg-deep-fg); }
.mg-avatar {
	display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px;
	background: var(--mg-primary); color: var(--mg-primary-fg); font-family: var(--mg-font-display); font-weight: 700; font-size: 0.875rem;
}
.mg-phone-top strong { display: block; font-size: 0.875rem; line-height: 1.2; }
.mg-phone-top small { display: block; font-size: 0.75rem; opacity: 0.7; }
@media (min-width: 768px) { .mg-sticky { position: sticky; top: 6rem; } }
.mg-chat {
	display: flex; flex-direction: column; gap: 0.5rem; min-height: 420px; padding: 0.75rem;
	background-color: var(--mg-chat);
	background-image: radial-gradient(rgba(0, 63, 138, 0.08) 1px, transparent 1px);
	background-size: 14px 14px;
}
.mg-msg {
	max-width: 85%; border-radius: 0.75rem; padding: 0.5rem 0.75rem; font-size: 13px; line-height: 1.35;
	color: var(--mg-fg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); animation: mg-pop 0.5s ease-out both;
}
.mg-msg-me { align-self: flex-end; background: var(--mg-chat-out); border-top-right-radius: 0; }
.mg-msg-them { align-self: flex-start; background: #fff; border-top-left-radius: 0; }
.mg-msg time { margin-left: 0.5rem; font-size: 10px; color: var(--mg-muted-fg); white-space: nowrap; }
.mg-msg time .mg-icon { width: 0.75rem; height: 0.75rem; color: var(--mg-primary); vertical-align: -2px; }
.mg-msg-link {
	display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; padding: 0.5rem 0.75rem;
	border-radius: 0.5rem; background: var(--mg-muted); font-size: 12px;
}
.mg-msg-link .mg-icon { color: var(--mg-primary); width: 1rem; height: 1rem; }
.mg-msg:nth-child(2) { animation-delay: 0.35s; }
.mg-msg:nth-child(3) { animation-delay: 0.7s; }
.mg-msg:nth-child(4) { animation-delay: 1.05s; }

/* Perguntas */
.mg-faq { margin-top: 2rem; }
.mg-faq details { border-bottom: 1px solid var(--mg-border); }
.mg-faq summary {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1rem 0; cursor: pointer; list-style: none; font-weight: 600; font-family: var(--mg-font-display);
}
.mg-faq summary::-webkit-details-marker { display: none; }
.mg-faq summary .mg-icon { width: 1rem; height: 1rem; transition: transform 0.2s; color: var(--mg-muted-fg); }
.mg-faq details[open] summary .mg-icon { transform: rotate(180deg); }
.mg-faq details p { padding-bottom: 1rem; color: var(--mg-muted-fg); }
.mg-link { color: var(--mg-primary); font-size: 0.875rem; font-weight: 600; text-underline-offset: 4px; }

/* Chamada final */
.mg-final { padding: 0 1rem 5rem; }
.mg-final-box {
	max-width: 56rem; margin: 0 auto; text-align: center; border-radius: 1.5rem;
	padding: 3rem 1.5rem; background: var(--mg-gradient-accent); box-shadow: var(--mg-shadow-soft);
}
.mg-final-box p { max-width: 36rem; margin: 0.75rem auto 0; color: var(--mg-muted-fg); }
.mg-final-box .mg-btn { margin-top: 2rem; }
@media (min-width: 640px) { .mg-final-box { padding: 3rem; } }

/* Páginas de texto (privacidade e páginas comuns) */
.mg-prose { color: var(--mg-muted-fg); }
.mg-prose > * + * { margin-top: 1.25rem; }
.mg-prose h2 { font-size: 1.5rem; font-weight: 700; color: var(--mg-fg); margin-top: 2rem; }
.mg-prose h3 { font-size: 1.25rem; font-weight: 700; color: var(--mg-fg); }
.mg-prose a { color: var(--mg-primary); }
.mg-prose ul { list-style: disc; padding-left: 1.25rem; }
.mg-prose ol { list-style: decimal; padding-left: 1.25rem; }

/* Rodapé */
.mg-footer { background: rgba(212, 248, 237, 0.6); border-top: 1px solid var(--mg-border); }
.mg-footer-grid { display: grid; gap: 2rem; padding: 3rem 1rem; font-size: 0.875rem; }
.mg-footer-grid h4 { font-family: var(--mg-font-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0; margin-bottom: 0.5rem; }
.mg-footer-grid li + li, .mg-footer-grid p + p { margin-top: 0.25rem; }
.mg-footer-grid a { text-decoration: none; color: var(--mg-muted-fg); }
.mg-footer-grid a:hover, .mg-footer-grid .mg-logo { color: var(--mg-fg); }
.mg-footer-bottom { border-top: 1px solid var(--mg-border); }
.mg-footer-bottom p { padding: 1.25rem 1rem; font-size: 0.75rem; color: var(--mg-muted-fg); }
@media (min-width: 768px) { .mg-footer-grid { grid-template-columns: repeat(3, 1fr); } }

/* Botão flutuante */
.mg-float {
	position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
	display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 999px;
	background: var(--mg-primary); color: var(--mg-primary-fg);
	box-shadow: var(--mg-shadow-soft); animation: mg-ring 1.8s ease-out infinite; transition: transform 0.2s;
}
.mg-float:hover { transform: scale(1.05); }
.mg-float .mg-icon { width: 1.75rem; height: 1.75rem; }

/* Animações */
@keyframes mg-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes mg-ring { 0% { box-shadow: 0 0 0 0 rgba(0, 171, 65, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(0, 171, 65, 0); } }
@keyframes mg-blink { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
