/*
Theme Name: The Next Level Habits
Theme URI: https://thenextlevelhabits.com
Author: The Next Level Habits
Description: Tema editorial de reviews de suplementos e bem-estar, com CPT de Reviews (rating, prós/contras, CTA de afiliado), pronto para SEO e Google Ads landing pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tnlh
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --background: #faf8f2;
  --foreground: #14282a;
  --card: #ffffff;
  --card-foreground: #14282a;
  --primary: #1a4441;
  --primary-foreground: #faf8f2;
  --secondary: #e8f0ee;
  --secondary-foreground: #1a4441;
  --muted: #eaf0ee;
  --muted-foreground: #5b6b6a;
  --accent: #e2703f;
  --accent-foreground: #ffffff;
  --destructive: #c0392b;
  --border: #dde6e2;
  --radius: 0.6rem;
  --max-w: 1152px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, .font-display {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--primary);
  line-height: 1.15;
  margin: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .65rem 1.4rem;
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .15s ease, background-color .15s ease;
}
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-accent:hover { opacity: .9; }
.btn-outline { border-color: var(--border); background: var(--card); color: var(--primary); }
.btn-outline:hover { background: var(--secondary); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin: 0 0 .5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 248, 242, .92);
  backdrop-filter: blur(6px);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo { display: flex; align-items: center; gap: .6rem; }
.site-logo-mark {
  display: grid;
  place-items: center;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: .5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  flex-shrink: 0;
}
.site-logo-text { line-height: 1.1; }
.site-logo-name {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
}
.site-logo-sub {
  display: block;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--accent);
}

.primary-nav { display: none; align-items: center; gap: 1.5rem; }
.primary-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.primary-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(26, 68, 65, .8);
  transition: color .15s ease;
}
.primary-nav a:hover, .primary-nav .current-menu-item a { color: var(--accent); }

.header-search {
  display: none;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .4rem .9rem;
}
.header-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: .85rem;
  width: 9rem;
}
.header-search button { border: 0; background: transparent; cursor: pointer; display: flex; color: var(--muted-foreground); }

.menu-toggle {
  display: inline-flex;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: .5rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.25rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { margin-bottom: .5rem; }
.mobile-nav a { display: block; padding: .35rem 0; font-weight: 500; color: var(--primary); }

@media (min-width: 768px) {
  .primary-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}
@media (min-width: 1024px) {
  .header-search { display: flex; }
}

/* ==========================================================================
   Hero / Page header
   ========================================================================== */
.hero { padding: 4rem 0 5rem; text-align: center; }
.hero h1 {
  max-width: 46rem;
  margin: 1.5rem auto 0;
  font-size: 2.5rem;
  font-weight: 700;
}
.hero p.lead { max-width: 38rem; margin: 1.25rem auto 0; font-size: 1.1rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .hero h1 { font-size: 3.75rem; } }

.hero-search {
  max-width: 34rem;
  margin: 2rem auto 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.hero-search input { flex: 1; border: 0; background: transparent; outline: none; padding: .5rem .25rem .5rem .75rem; font-size: .9rem; }
.hero-search svg { margin-left: .75rem; flex-shrink: 0; color: var(--muted-foreground); }

.page-header {
  border-bottom: 1px solid var(--border);
  background: rgba(232,240,238,.4);
}
.page-header-inner { max-width: 900px; margin: 0 auto; padding: 3rem 1.25rem; }
.page-header h1 { font-size: 2rem; font-weight: 700; }
@media (min-width: 640px) { .page-header h1 { font-size: 2.5rem; } }
.page-header p.sub { margin-top: .75rem; font-size: 1.1rem; color: var(--muted-foreground); max-width: 40rem; }

.breadcrumbs { font-size: .85rem; color: var(--muted-foreground); margin-bottom: 1rem; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 .3rem; opacity: .6; }
.breadcrumbs .current { color: var(--primary); font-weight: 500; }

/* ==========================================================================
   Sections & grids
   ========================================================================== */
.section { padding: 3rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section h2 { font-size: 1.6rem; font-weight: 700; }
@media (min-width: 640px) { .section h2 { font-size: 1.9rem; } }
.section .view-all { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; font-weight: 600; color: var(--accent); }

.grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.section-muted { background: rgba(232,240,238,.4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .85rem;
  overflow: hidden;
}

.post-card { display: flex; flex-direction: column; transition: box-shadow .2s ease; }
.post-card:hover { box-shadow: 0 10px 25px rgba(20,40,42,.08); }
.post-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--secondary); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.post-card-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.post-card h3 { margin-top: .5rem; font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.post-card:hover h3 { color: var(--accent); }
.post-card p.excerpt { margin-top: .5rem; font-size: .88rem; color: var(--muted-foreground); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-foot { margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; }
.post-card-date { font-size: .75rem; color: var(--muted-foreground); }

.topic-card { padding: 1.25rem; display: block; }
.topic-card:hover { box-shadow: 0 8px 20px rgba(20,40,42,.07); }
.topic-card-row { display: flex; align-items: center; justify-content: space-between; }
.topic-card h3 { font-size: 1.05rem; font-weight: 600; }
.topic-card:hover h3 { color: var(--accent); }
.topic-card p { margin-top: .4rem; font-size: .85rem; color: var(--muted-foreground); }

/* stars */
.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars svg { width: 16px; height: 16px; }
.stars .filled { fill: var(--accent); stroke: var(--accent); }
.stars .empty { stroke: var(--muted-foreground); opacity: .4; }
.stars .val { margin-left: .35rem; font-size: .85rem; font-weight: 600; color: var(--primary); }

/* ==========================================================================
   Trust / newsletter
   ========================================================================== */
.trust-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-card { border: 1px solid var(--border); background: var(--card); border-radius: .85rem; padding: 1.5rem; }
.trust-icon { display: grid; place-items: center; height: 2.75rem; width: 2.75rem; border-radius: .6rem; background: rgba(26,68,65,.1); color: var(--primary); }
.trust-card h3 { margin-top: 1rem; font-size: 1.05rem; font-weight: 600; }
.trust-card p { margin-top: .5rem; font-size: .88rem; color: var(--muted-foreground); }

.newsletter-box {
  border-radius: 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 1.5rem;
  text-align: center;
}
.newsletter-box h2 { color: var(--primary-foreground); font-size: 1.7rem; }
.newsletter-box p { margin: .75rem auto 0; max-width: 34rem; opacity: .85; }
.newsletter-form { max-width: 28rem; margin: 1.5rem auto 0; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .newsletter-form { flex-direction: row; } }
.newsletter-form input { flex: 1; border: 0; border-radius: 999px; padding: .8rem 1.25rem; font-size: .9rem; outline: none; }
.newsletter-form button { border: 0; }

/* ==========================================================================
   Filters (reviews archive)
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter-pill {
  border-radius: 999px;
  padding: .4rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
}
.filter-pill:hover { background: var(--secondary); }
.filter-pill.is-active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ==========================================================================
   Single review
   ========================================================================== */
.review-article { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.review-meta { margin-top: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: .88rem; color: var(--muted-foreground); }

.disclosure-banner {
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  border: 1px solid rgba(226,112,63,.3);
  background: rgba(226,112,63,.06);
  border-radius: .6rem;
  padding: .8rem 1rem;
  font-size: .88rem;
  color: var(--primary);
}
.disclosure-banner a { text-decoration: underline; }

.rating-widget {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: .85rem;
  padding: 1.25rem;
}
.rating-widget .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }
.rating-widget .score { font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 700; color: var(--primary); }
.rating-widget .score small { font-size: 1.1rem; color: var(--muted-foreground); font-weight: 400; }

.toc {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  background: rgba(232,240,238,.4);
  border-radius: .85rem;
  padding: 1.25rem;
}
.toc .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }
.toc ol { margin: .75rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.toc li { margin-bottom: .4rem; }
.toc a:hover { color: var(--accent); }

.review-content { margin-top: 1.5rem; }
.review-content h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 .75rem; scroll-margin-top: 6rem; }
.review-content h3 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 .5rem; scroll-margin-top: 6rem; }
.review-content p { margin: .85rem 0; line-height: 1.75; color: #2c3d3c; }
.review-content ul, .review-content ol { padding-left: 1.4rem; margin: .85rem 0; line-height: 1.7; }
.review-content a { color: var(--accent); text-decoration: underline; }
.review-content img { border-radius: .6rem; margin: 1.25rem 0; }

.pros-cons { margin-top: 2rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons .card { padding: 1.25rem; }
.pros-cons h3 { font-size: 1.05rem; font-weight: 600; }
.pros-cons ul { list-style: none; margin: .75rem 0 0; padding: 0; font-size: .9rem; color: var(--muted-foreground); }
.pros-cons li { display: flex; gap: .5rem; margin-bottom: .4rem; }
.pros-cons .pro-mark { color: var(--accent); font-weight: 700; }
.pros-cons .con-mark { color: var(--destructive); font-weight: 700; }

.cta-block { margin-top: 2rem; text-align: center; }
.cta-block .btn { padding: .9rem 2rem; font-size: .95rem; }

.author-box { margin-top: 2.5rem; border: 1px solid var(--border); background: rgba(232,240,238,.4); border-radius: .85rem; padding: 1.5rem; }
.author-box h3 { font-size: 1.05rem; font-weight: 600; }
.author-box p { margin-top: .5rem; font-size: .9rem; color: var(--muted-foreground); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 5rem; border-top: 1px solid var(--border); background: var(--primary); color: var(--primary-foreground); }
.footer-grid { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.25rem; display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid .site-logo-name, .footer-grid .site-logo-sub { color: var(--primary-foreground); }
.footer-about p { margin-top: .75rem; font-size: .9rem; color: rgba(250,248,242,.7); max-width: 20rem; }
.footer-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(250,248,242,.6); margin-bottom: .75rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(250,248,242,.15); }
.footer-bottom-inner { max-width: var(--max-w); margin: 0 auto; padding: 1.1rem 1.25rem; font-size: .78rem; color: rgba(250,248,242,.6); display: flex; flex-direction: column; gap: .4rem; justify-content: space-between; }
@media (min-width: 640px) { .footer-bottom-inner { flex-direction: row; } }

/* ==========================================================================
   Cookie banner
   ========================================================================== */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; padding: .75rem; }
.cookie-banner-inner { max-width: 56rem; margin: 0 auto; border: 1px solid var(--border); background: var(--card); border-radius: .85rem; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 768px) { .cookie-banner-inner { flex-direction: row; align-items: center; } }
.cookie-banner p { flex: 1; font-size: .85rem; color: var(--muted-foreground); margin: 0; }
.cookie-banner a { color: var(--accent); text-decoration: underline; font-weight: 500; }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-actions button { border-radius: .5rem; padding: .5rem 1rem; font-size: .85rem; cursor: pointer; }
.cookie-decline { border: 1px solid var(--border); background: transparent; color: var(--primary); }
.cookie-accept { border: 0; background: var(--accent); color: #fff; font-weight: 600; }

/* ==========================================================================
   Misc / pagination / 404
   ========================================================================== */
.pagination { display: flex; gap: .5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { border: 1px solid var(--border); border-radius: .5rem; padding: .45rem .85rem; font-size: .85rem; }
.pagination .current { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

.empty-state { color: var(--muted-foreground); padding: 2rem 0; }

.page-content { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; font-size: 1rem; line-height: 1.75; }
.page-content h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.page-content p { margin: .85rem 0; color: #2c3d3c; }
.page-content ul { padding-left: 1.4rem; }


/* Claude edit: tighten logo-to-nav spacing on desktop, center header + logo on mobile */
@media (min-width: 768px) {
  .site-header-inner {
    justify-content: flex-start;
    gap: 2rem;
  }
  .header-search {
    margin-left: auto;
  }
}

@media (max-width: 767px) {
  .site-header-inner {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    justify-items: center;
    gap: 0;
  }
  .menu-toggle {
    grid-column: 1;
    justify-self: start;
  }
  .site-logo {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    margin: 0 auto;
  }
  .header-search {
    display: none;
  }
}
