/*
Theme Name: GM Flooring Blog
Theme URI: https://gmflooringpa.com/blog/
Author: ROI Digital Marketing USA
Author URI: https://roimktusa.com/
Description: Tema leve do blog da GM Flooring LLC. Mesmo visual, menu e rodapé do site principal (gmflooringpa.com), para o blog parecer parte do site. Compatível com Rank Math / Yoast.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: gm-blog
*/

:root {
  --cream: #f7f3ec;
  --paper: #fbf9f5;
  --sand: #e9e1d4;
  --stone: #8a8178;
  --oak: #a9784a;
  --walnut: #5b3e2b;
  --ink: #1b1c1a;
  --charcoal: #262724;
  --logo: #151715;
  --gm: #f5e644;
  --gm-deep: #e3d22e;
  --muted: rgba(27, 28, 26, 0.68);
  --radius: 18px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--walnut); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 16px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--gm); color: var(--ink); padding: 12px 20px; border-radius: 999px; font-weight: 600; }

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 46rem; }

/* Topo */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(21, 23, 21, 0.96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; max-width: 88rem; }
.brand img { display: block; width: 150px; height: auto; }
.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 16px; border-radius: 999px; color: rgba(255, 255, 255, 0.8); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--gm); text-decoration-thickness: 2px; text-underline-offset: 10px; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.phone { color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.phone:hover { color: var(--gm); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 24px; border-radius: 999px; background: var(--gm); color: var(--ink) !important; font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background-color 0.2s; }
.btn:hover { background: var(--gm-deep); }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff !important; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .nav, .phone { display: none; }
  .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--logo); padding: 12px 20px 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .nav.open a { font-family: var(--serif); font-size: 22px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0; }
}
@media (max-width: 520px) { .header-cta .btn { display: none; } .brand img { width: 128px; } }

/* Cabeçalho do blog */
.blog-hero { padding: 56px 0 40px; background: var(--cream); border-bottom: 1px solid rgba(27, 28, 26, 0.06); }
.eyebrow { display: inline-flex; gap: 8px; color: var(--oak); font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
.page-title { margin: 12px 0 0; font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem); }
.page-title em, .accent { font-style: italic; color: var(--walnut); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 40rem; }
.crumbs { font-size: 13px; font-weight: 500; color: rgba(27, 28, 26, 0.5); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Lista de posts */
.posts { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding: 32px 0 64px; }
.card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: #fff; outline: 1px solid rgba(27, 28, 26, 0.06); text-decoration: none; color: inherit; transition: transform 0.25s; }
.card:hover { transform: translateY(-4px); }
.card-media { aspect-ratio: 16 / 10; background: var(--logo); overflow: hidden; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ph { width: 140px; height: auto; object-fit: contain; opacity: 0.9; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.meta { color: var(--oak); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.card h2 { margin: 8px 0 6px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.more { margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--walnut); }
.pagination { display: flex; gap: 8px; justify-content: center; padding-bottom: 64px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; outline: 1px solid rgba(27, 28, 26, 0.08); }
.pagination .current { background: var(--ink); color: #fff; }

/* Post */
.article { background: #fff; padding: 40px 0 64px; }
.article-head { padding: 48px 0 24px; }
.article-head .meta { margin-top: 14px; display: block; }
.featured { margin: 0 auto 32px; max-width: 60rem; border-radius: 22px; overflow: hidden; }
.entry { font-size: 1.06rem; }
.entry h2 { font-size: 1.8rem; margin: 2em 0 0.5em; }
.entry h3 { font-size: 1.35rem; margin: 1.6em 0 0.4em; }
.entry p, .entry ul, .entry ol { margin: 0 0 1.2em; }
.entry li { margin-bottom: 0.4em; }
.entry blockquote { margin: 1.5em 0; padding: 18px 24px; border-left: 4px solid var(--gm-deep); background: var(--cream); border-radius: 0 14px 14px 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95rem; }
.entry th, .entry td { padding: 10px 12px; border-bottom: 1px solid var(--sand); text-align: left; }
.entry th { background: var(--cream); }
.entry img { border-radius: 14px; }
.entry a { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--gm-deep); }

/* Caixa de orçamento no fim do post (conversão + links internos) */
.cta-box { position: relative; overflow: hidden; margin: 48px 0 0; padding: 36px; border-radius: 24px; background: var(--logo); color: rgba(255, 255, 255, 0.78); }
.cta-box h2 { color: #fff; margin: 0 0 8px; font-size: 1.9rem; }
.cta-box h2 em { color: var(--gm); }
.cta-box p { margin: 0 0 20px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.related { margin-top: 40px; }
.related h2 { font-size: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(27, 28, 26, 0.15); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.chips a:hover { border-color: var(--oak); color: var(--walnut); }

/* Rodapé */
.site-footer { background: var(--logo); color: rgba(255, 255, 255, 0.68); padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-family: var(--sans); color: rgba(255, 255, 255, 0.45); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gm); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.45); }

/* Barra fixa no celular */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 76px; }
  .mobile-bar { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(21, 23, 21, 0.95); backdrop-filter: blur(12px); border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .mobile-bar a { display: grid; place-items: center; min-height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
  .mobile-bar a.primary { background: var(--gm); border-color: var(--gm); color: var(--ink); }
}

/* Blocos do editor */
.alignwide { max-width: 60rem; margin-left: auto; margin-right: auto; }
.wp-block-image figcaption, .wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
