/*
Theme Name: AMA PETS
Theme URI: https://ama-pets.com
Author: AMA PETS
Description: Tema de blocos moderno e vibrante para blogs de pets: hero ilustrado, categorias em cards, post em destaque, grade de artigos, barra de progresso de leitura e tipografia arredondada.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ama-pets
Tags: blog, block-patterns, full-site-editing, custom-colors, one-column, grid-layout
*/

:root {
	--ap-radius-s: 12px;
	--ap-radius-m: 20px;
	--ap-radius-l: 32px;
	--ap-shadow: 0 2px 6px rgba(30,27,46,.05), 0 12px 32px -12px rgba(30,27,46,.16);
	--ap-shadow-hover: 0 4px 10px rgba(30,27,46,.06), 0 26px 50px -18px rgba(255,107,74,.45);
	--ap-coral: var(--wp--preset--color--primary);
	--ap-ink: var(--wp--preset--color--contrast);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { border-radius: inherit; }
::selection { background: var(--wp--preset--color--accent); color: var(--ap-ink); }

.wp-site-blocks > * { margin-block-start: 0; }
.ap-main { margin-block-start: 0 !important; padding-bottom: var(--wp--preset--spacing--60); }
.ap-main > * + * { margin-block-start: var(--wp--preset--spacing--60); }
.ap-muted, .ap-muted p { color: var(--wp--preset--color--muted); }

/* ---------- Header ---------- */
.ap-site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,248,241,.82);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid rgba(30,27,46,.06);
}
.admin-bar .ap-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ap-site-header { top: 46px; } }
.ap-header { padding-block: .9rem; }
.ap-brand { gap: .6rem !important; align-items: center; }
.ap-logo-mark { display: inline-flex; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.ap-logo-mark svg { display: block; filter: drop-shadow(0 6px 12px rgba(255,107,74,.35)); }
.ap-brand:hover .ap-logo-mark { transform: rotate(-10deg) scale(1.06); }
.ap-header-right { gap: 1rem !important; align-items: center; }
.ap-nav .wp-block-navigation-item__content {
	padding: .45rem .85rem; border-radius: 999px;
	color: var(--ap-ink); transition: background .2s, color .2s;
}
.ap-nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--peach); color: var(--wp--preset--color--primary-dark); }
.ap-nav .wp-block-navigation__container { gap: .15rem; }
.ap-search .wp-block-search__button {
	background: var(--wp--preset--color--surface); color: var(--ap-ink);
	border: 1px solid rgba(30,27,46,.1); border-radius: 999px; padding: .55rem; box-shadow: var(--ap-shadow);
}
.ap-search .wp-block-search__input { border-radius: 999px; border: 1px solid rgba(30,27,46,.15); padding: .5rem 1rem; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base) !important; padding: 2rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; font-family: var(--wp--preset--font-family--heading); }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; box-shadow: 0 10px 24px -10px rgba(255,107,74,.7); }
.wp-element-button:hover, .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--ap-ink); border: 2px solid var(--ap-ink); box-shadow: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--ap-ink); color: #fff; }

/* ---------- Hero ---------- */
.ap-hero {
	position: relative; overflow: hidden;
	padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(32,178,166,.16) 0%, transparent 60%),
		radial-gradient(50% 70% at 0% 100%, rgba(255,209,102,.28) 0%, transparent 60%),
		var(--wp--preset--color--base);
}
.ap-hero-cols { gap: clamp(2rem, 5vw, 4rem) !important; }
.ap-eyebrow {
	display: inline-block; margin: 0 0 1rem;
	background: var(--wp--preset--color--surface); color: var(--wp--preset--color--primary-dark);
	font-weight: 800; font-size: .9rem; letter-spacing: .02em;
	padding: .45rem 1rem; border-radius: 999px; box-shadow: var(--ap-shadow);
}
.ap-hero-title { font-size: clamp(2.5rem, 5.6vw, 4.4rem) !important; line-height: 1.04 !important; margin: 0 !important; }
.ap-hl { position: relative; color: var(--wp--preset--color--primary); white-space: nowrap; }
.ap-hl::after {
	content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .32em; z-index: -1;
	background: var(--wp--preset--color--accent); border-radius: 999px; transform: rotate(-1.5deg);
}
.ap-hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--wp--preset--color--muted); max-width: 34rem; margin-top: 1.25rem !important; }
.ap-hero-btns { margin-top: 2rem !important; gap: .75rem; }

.ap-hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 520px; margin-inline: auto; }
.ap-blob {
	position: absolute; inset: 6%;
	background: var(--wp--preset--gradient--sunset);
	border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%;
	animation: ap-morph 12s ease-in-out infinite;
	box-shadow: 0 40px 80px -30px rgba(255,79,123,.55);
}
.ap-ring {
	position: absolute; inset: 0; border: 2px dashed rgba(30,27,46,.14); border-radius: 50%;
	animation: ap-spin 60s linear infinite;
}
.ap-big { position: absolute; line-height: 1; filter: drop-shadow(0 18px 24px rgba(30,27,46,.25)); }
.ap-big--dog { font-size: clamp(7rem, 15vw, 11rem); left: 14%; top: 22%; animation: ap-bob 5s ease-in-out infinite; }
.ap-big--cat { font-size: clamp(4.5rem, 9vw, 7rem); right: 12%; bottom: 14%; animation: ap-bob 6s ease-in-out -2s infinite; }
.ap-float {
	position: absolute; background: #fff; color: var(--ap-ink);
	font-weight: 800; font-size: .95rem; padding: .7rem 1.05rem; border-radius: 16px;
	box-shadow: var(--ap-shadow); white-space: nowrap;
	animation: ap-bob 7s ease-in-out infinite;
}
.ap-float--1 { top: 6%; right: 2%; animation-delay: -1s; }
.ap-float--2 { bottom: 10%; left: 0; animation-delay: -3s; }
.ap-float--3 { top: 48%; right: -4%; animation-delay: -5s; background: var(--ap-ink); color: #fff; }
.ap-paw { position: absolute; font-size: 1.6rem; opacity: .5; }
.ap-paw--1 { top: 2%; left: 8%; transform: rotate(-20deg); }
.ap-paw--2 { bottom: 0; right: 30%; transform: rotate(15deg); }

@keyframes ap-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ap-spin { to { transform: rotate(360deg); } }
@keyframes ap-morph {
	0%,100% { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; }
	50% { border-radius: 42% 58% 45% 55% / 58% 42% 58% 42%; }
}
@media (prefers-reduced-motion: reduce) { .ap-blob, .ap-ring, .ap-big, .ap-float { animation: none !important; } }

/* ---------- Sections ---------- */
.ap-section h2 { margin-bottom: 1.5rem; }
.ap-section-head { margin-bottom: 1.5rem; gap: .5rem 2rem; }
.ap-section-head h2, .ap-section-head p { margin: 0 !important; }

/* Category cards */
.ap-cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.ap-cat {
	position: relative; display: flex; flex-direction: column; gap: .35rem;
	padding: 1.4rem 1.25rem 1.25rem; border-radius: var(--ap-radius-m);
	color: var(--ap-ink) !important; text-decoration: none;
	transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
	overflow: hidden;
}
.ap-cat--peach { background: var(--wp--preset--color--peach); }
.ap-cat--lilac { background: var(--wp--preset--color--lilac); }
.ap-cat--mint  { background: var(--wp--preset--color--mint); }
.ap-cat--sun   { background: #FFF1CC; }
.ap-cat:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--ap-shadow); }
.ap-cat-emoji {
	font-size: 2.2rem; width: 3.6rem; height: 3.6rem; display: grid; place-items: center;
	background: #fff; border-radius: 16px; box-shadow: var(--ap-shadow); margin-bottom: .6rem;
	transition: transform .3s;
}
.ap-cat:hover .ap-cat-emoji { transform: scale(1.12) rotate(8deg); }
.ap-cat-name { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.2rem; }
.ap-cat-desc { font-size: .88rem; color: var(--wp--preset--color--muted); line-height: 1.4; }
.ap-cat-arrow {
	position: absolute; top: 1.1rem; right: 1.1rem; font-weight: 800;
	opacity: 0; transform: translateX(-6px); transition: .25s;
}
.ap-cat:hover .ap-cat-arrow { opacity: 1; transform: none; }
@media (max-width: 1100px) { .ap-cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .ap-cats { grid-template-columns: repeat(2, 1fr); } }

/* Pills */
.ap-pill { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.ap-pill a {
	background: var(--wp--preset--color--peach); color: var(--wp--preset--color--primary-dark);
	padding: .3rem .75rem; border-radius: 999px; transition: background .2s, color .2s;
}
.ap-pill a:hover { background: var(--wp--preset--color--primary); color: #fff; }
.ap-pill .wp-block-post-terms__separator { display: none; }
.ap-pill.has-text-align-center { justify-content: center; }

/* Featured */
.ap-featured-card {
	background: var(--wp--preset--color--surface); border-radius: var(--ap-radius-l);
	padding: clamp(.75rem, 1.5vw, 1rem); box-shadow: var(--ap-shadow); gap: clamp(1.5rem, 4vw, 3rem) !important;
	transition: box-shadow .3s;
}
.ap-featured-card:hover { box-shadow: var(--ap-shadow-hover); }
.ap-featured-card > .wp-block-column:last-child { padding: 1rem clamp(0rem, 2vw, 1.5rem) 1rem 0; }
.ap-featured-img { border-radius: calc(var(--ap-radius-l) - 8px); overflow: hidden; margin: 0; }
.ap-featured-img img { transition: transform .6s ease; }
.ap-featured-card:hover .ap-featured-img img { transform: scale(1.04); }
.ap-featured-title { font-size: clamp(1.7rem, 3vw, 2.5rem) !important; margin-top: 1rem !important; }
.ap-featured-excerpt { color: var(--wp--preset--color--muted); }
.ap-featured-excerpt .wp-block-post-excerpt__more-link { font-weight: 800; color: var(--wp--preset--color--primary-dark); }

/* Grid cards */
.ap-grid .wp-block-post-template { gap: clamp(1.25rem, 2.5vw, 2rem) !important; }
.ap-card {
	height: 100%; gap: 0 !important; align-items: stretch !important;
	background: var(--wp--preset--color--surface); border-radius: var(--ap-radius-m);
	overflow: hidden; box-shadow: var(--ap-shadow);
	transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s;
}
.ap-card:hover { transform: translateY(-6px); box-shadow: var(--ap-shadow-hover); }
.ap-card-img { margin: 0 !important; overflow: hidden; background: var(--wp--preset--gradient--sky); }
.ap-card-img img { transition: transform .6s ease; }
.ap-card:hover .ap-card-img img { transform: scale(1.06); }
.ap-card-body { padding: 1.25rem 1.4rem 1.4rem; gap: .6rem !important; flex: 1; align-items: flex-start !important; }
.ap-card-title { font-size: 1.3rem !important; margin: 0 !important; line-height: 1.25 !important; }
.ap-card-title a { background-image: linear-gradient(var(--wp--preset--color--accent), var(--wp--preset--color--accent)); background-size: 0 .35em; background-position: 0 88%; background-repeat: no-repeat; transition: background-size .35s; }
.ap-card:hover .ap-card-title a { background-size: 100% .35em; }
.ap-card-excerpt { margin: 0 !important; color: var(--wp--preset--color--muted); font-size: .95rem; line-height: 1.55; }
.ap-card-excerpt p { margin: 0; }
.ap-card-date { font-size: .82rem; font-weight: 700; color: var(--wp--preset--color--muted); margin-top: auto !important; }
.ap-empty {
	text-align: center; padding: 3rem 1rem; border: 2px dashed rgba(30,27,46,.15);
	border-radius: var(--ap-radius-m); color: var(--wp--preset--color--muted); font-weight: 700;
}
@media (max-width: 1000px) { .ap-grid .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; } }
@media (max-width: 640px)  { .ap-grid .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0,1fr) !important; } }

/* Pagination */
.ap-pagination { margin-top: 2.5rem !important; gap: .4rem; font-weight: 800; }
.ap-pagination .page-numbers, .ap-pagination a {
	display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .9rem;
	border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--ap-ink); box-shadow: var(--ap-shadow);
}
.ap-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: #fff; }

/* CTA */
.ap-cta {
	position: relative; overflow: hidden; color: #fff;
	background: var(--wp--preset--gradient--sunset);
	border-radius: var(--ap-radius-l); padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 4vw, 3rem);
	box-shadow: 0 40px 80px -40px rgba(255,79,123,.8);
}
.ap-cta::before, .ap-cta::after {
	content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
}
.ap-cta::before { width: 320px; height: 320px; left: -90px; top: -120px; }
.ap-cta::after { width: 220px; height: 220px; right: -60px; bottom: -80px; }
.ap-cta h2, .ap-cta p { color: #fff; position: relative; z-index: 1; }
.ap-cta p { font-size: 1.15rem; opacity: .95; }
.ap-cta .wp-block-buttons { position: relative; z-index: 1; }
.ap-cta-deco { position: absolute; right: 6%; top: 12%; font-size: 4rem; transform: rotate(12deg); opacity: .9; z-index: 1; }
.ap-btn-light .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary-dark); box-shadow: 0 12px 24px -10px rgba(30,27,46,.4); }
.ap-btn-light .wp-block-button__link:hover { background: var(--ap-ink); color: #fff; }
@media (max-width: 700px) { .ap-cta-deco { display: none; } }

/* ---------- Page hero (archives/search/404) ---------- */
.ap-page-hero {
	padding-block: clamp(3rem, 6vw, 5rem);
	background: var(--wp--preset--gradient--sky);
	border-bottom-left-radius: var(--ap-radius-l); border-bottom-right-radius: var(--ap-radius-l);
}
.ap-page-hero h1 { margin: 0; }
.ap-search-big { max-width: 560px; margin-inline: auto !important; }
.ap-search-big .wp-block-search__inside-wrapper { background: #fff; border-radius: 999px; padding: .35rem; box-shadow: var(--ap-shadow); border: 0; }
.ap-search-big .wp-block-search__input { border: 0; background: transparent; padding-inline: 1.1rem; }
.ap-search-big .wp-block-search__button { border-radius: 999px; margin: 0; }
.ap-404-emoji { font-size: 6rem; text-align: center; animation: ap-bob 4s ease-in-out infinite; }

/* ---------- Single ---------- */
.ap-article-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.ap-article-title { font-size: clamp(2.2rem, 5vw, 3.6rem) !important; line-height: 1.08 !important; margin-top: 1rem !important; }
.ap-meta { gap: .5rem 1.25rem !important; color: var(--wp--preset--color--muted); font-weight: 700; font-size: .95rem; align-items: center; }
.ap-meta > * { margin: 0 !important; }
.ap-meta .wp-block-post-author { align-items: center; }
.ap-meta .wp-block-post-author__avatar img { border-radius: 50%; }
.ap-meta .wp-block-post-author__name { font-weight: 800; color: var(--ap-ink); }
.ap-readtime { background: var(--wp--preset--color--mint); color: #0F766E; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; }
.ap-article-img { border-radius: var(--ap-radius-l); overflow: hidden; box-shadow: var(--ap-shadow); }
.ap-article { font-size: 1.125rem; }
.ap-article > p:first-of-type::first-letter {
	float: left; font-family: var(--wp--preset--font-family--heading); font-weight: 700;
	font-size: 3.6em; line-height: .9; margin: .08em .12em 0 0; color: var(--wp--preset--color--primary);
}
.ap-article h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.5rem; }
.ap-article h3 { font-size: 1.4rem; margin-top: 2rem; }
.ap-article a { text-decoration: underline; text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: .2em; text-underline-offset: .15em; }
.ap-article img { border-radius: var(--ap-radius-m); }
.ap-article ul li::marker { content: "🐾  "; font-size: .8em; }
.ap-article blockquote, .ap-article .wp-block-quote {
	background: var(--wp--preset--color--peach); border-radius: var(--ap-radius-m); padding: 1.5rem 1.75rem;
}
.ap-article-foot { margin-top: 3rem !important; }
.ap-tags a { background: var(--wp--preset--color--lilac); color: var(--ap-ink); padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.ap-tags .wp-block-post-terms__separator { opacity: 0; }
.ap-author-box {
	background: var(--wp--preset--color--surface); border-radius: var(--ap-radius-m); padding: 1.5rem; box-shadow: var(--ap-shadow);
	gap: 1.1rem !important; margin-top: 2rem !important;
}
.ap-author-box img { border-radius: 50%; }
.ap-author-box .wp-block-group { gap: .25rem !important; }
.ap-author-name { font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; font-weight: 600; }
.ap-article-foot .post-navigation-link-previous, .ap-article-foot .post-navigation-link-next {
	display: block; background: var(--wp--preset--color--surface); padding: 1rem 1.25rem; border-radius: var(--ap-radius-s);
	box-shadow: var(--ap-shadow); font-weight: 800; margin-top: 1rem;
}
.ap-article-foot .post-navigation-link-next { text-align: right; }
.ap-related { margin-top: var(--wp--preset--spacing--60) !important; }
.ap-comments { margin-top: var(--wp--preset--spacing--50) !important; }
.ap-comment { gap: 1rem !important; background: var(--wp--preset--color--surface); padding: 1.25rem; border-radius: var(--ap-radius-m); margin-bottom: 1rem; box-shadow: var(--ap-shadow); }
.ap-comment img { border-radius: 50%; }
.ap-comments textarea, .ap-comments input[type=text], .ap-comments input[type=email], .ap-comments input[type=url] {
	border: 1px solid rgba(30,27,46,.15); border-radius: var(--ap-radius-s); padding: .8rem 1rem; background: #fff; width: 100%;
}
.ap-comments input[type=submit] { background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 999px; padding: .85rem 1.6rem; font-weight: 700; cursor: pointer; }

/* Reading progress */
.ap-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 100000; pointer-events: none; }
.ap-progress span { display: block; height: 100%; width: 0; background: var(--wp--preset--gradient--sunset); border-radius: 0 4px 4px 0; transition: width .1s linear; }

/* ---------- Footer ---------- */
.ap-footer {
	margin-top: var(--wp--preset--spacing--60);
	background: var(--ap-ink); color: rgba(255,255,255,.72);
	padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem;
	border-top-left-radius: var(--ap-radius-l); border-top-right-radius: var(--ap-radius-l);
}
.ap-footer .wp-block-site-title a, .ap-footer h4 { color: #fff; }
.ap-footer h4 { font-size: 1.05rem; margin-bottom: 1rem; }
.ap-footer-cols { gap: 2rem !important; }
.ap-footer-about { max-width: 26rem; font-size: .95rem; }
.ap-footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ap-footer-links a { color: rgba(255,255,255,.72); transition: color .2s, padding .2s; }
.ap-footer-links a:hover { color: var(--wp--preset--color--accent); padding-left: .25rem; }
.ap-footer-search .wp-block-search__input { border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; padding: .6rem 1rem; }
.ap-footer-search .wp-block-search__button { border-radius: 999px; }
.ap-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem !important; padding-top: 1.5rem; font-size: .82rem; gap: .5rem 2rem; }
.ap-footer-bottom p { margin: 0; }

@media (max-width: 781px) {
	.ap-hero-cols > .wp-block-column:last-child { order: -1; }
	.ap-hero-art { max-width: 340px; }
	.ap-float--3 { right: 0; }
	.ap-featured-card > .wp-block-column:last-child { padding: 0 1rem 1rem; }
}
