/*
Theme Name: PlanejêSP
Theme URI: https://moveisplanejadossp.com
Author: PlanejêSP Editorial
Author URI: https://moveisplanejadossp.com
Description: Tema editorial para blog de móveis planejados e decoração em São Paulo. Desenvolvido especificamente para SEO local e monetização via anúncios.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: planejesptheme
Tags: blog, news, magazine, seo, custom-menu, featured-images, footer-widgets, post-formats, theme-options, threaded-comments, translation-ready
*/

/* =========================================================
   BASE RESET & TOKENS
========================================================= */
:root {
  --charcoal:   #1C1C1E;
  --gold:       #B8860B;
  --gold-light: #D4A843;
  --cream:      #F7F3EE;
  --warm-grey:  #8C8375;
  --divider:    #E8E0D5;
  --white:      #FFFFFF;
  --text:       #2D2D2D;
  --radius:     10px;
  --shadow:     0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.14);
  --max-width:  1140px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); }
ul, ol { list-style: none; }

/* =========================================================
   TYPOGRAPHY
========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; font-family: var(--font-sans); }

p { margin-bottom: 1rem; color: #3a3a3a; }

/* =========================================================
   LAYOUT UTILITIES
========================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad { padding: 56px 0; }
.section-pad-sm { padding: 40px 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* =========================================================
   SECTION HEADERS
========================================================= */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--charcoal);
}

.section-head h2 {
  font-size: 1.5rem;
}

.section-head .see-all {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

.section-head .see-all:hover { text-decoration: underline; }

/* =========================================================
   ARTICLE CARD
========================================================= */
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--divider);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.article-card .thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #ddd;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .thumb img { transform: scale(1.04); }

.article-card .card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-cat {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--charcoal);
  margin-bottom: 8px;
  flex: 1;
}

.card-title:hover { color: var(--gold); }

.card-excerpt {
  font-size: 13px;
  color: var(--warm-grey);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.card-date { font-size: 12px; color: #b0a89e; }

.card-read {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-read:hover { text-decoration: underline; }

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--divider);
}

.widget-title {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--charcoal);
}

/* Popular Posts */
.popular-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}

.popular-item:last-child { border-bottom: none; }

.popular-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  color: var(--divider);
  line-height: 1;
  min-width: 32px;
}

.popular-meta .popular-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.popular-meta .popular-title:hover { color: var(--gold); }
.popular-meta .popular-cat { font-size: 11px; color: var(--gold); font-weight: 600; }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud a {
  background: var(--cream);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--charcoal);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.tag-cloud a:hover {
  background: var(--gold);
  color: white;
}

/* Ad Widget */
.ad-widget {
  background: var(--charcoal);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: white;
}

.ad-widget .ad-eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 10px;
}

.ad-widget h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.ad-widget p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
}

.ad-widget .btn-gold {
  display: inline-block;
  background: var(--gold);
  color: white;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-widget .btn-gold:hover { background: var(--gold-light); }

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: white;
}

.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: white;
}

.btn-dark {
  background: var(--charcoal);
  color: white;
}

.btn-dark:hover { opacity: 0.85; }

/* =========================================================
   BADGES & PILLS
========================================================= */
.badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-gold { background: var(--gold); color: white; }
.badge-dark { background: var(--charcoal); color: white; }
.badge-cream { background: var(--cream); color: var(--charcoal); }

/* =========================================================
   PAGINATION
========================================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--divider);
  background: var(--white);
  color: var(--charcoal);
  transition: all var(--transition);
}

.pagination a:hover,
.pagination .current {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

/* =========================================================
   SINGLE POST
========================================================= */
.post-header { margin-bottom: 36px; }

.post-cats { margin-bottom: 14px; }

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--warm-grey);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-meta span { display: flex; align-items: center; gap: 4px; }

.post-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  aspect-ratio: 16/9;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article content styles */
.entry-content { font-size: 16px; line-height: 1.8; color: #333; }

.entry-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--charcoal);
}

.entry-content h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--charcoal);
}

.entry-content p { margin-bottom: 1.2rem; }

.entry-content ul, .entry-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  margin: 1.5rem 0;
  background: #FFF9EE;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.entry-content strong { color: var(--charcoal); }

.entry-content a { color: var(--gold); text-decoration: underline; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 14px;
}

.entry-content th {
  background: var(--charcoal);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
}

.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:nth-child(even) td { background: var(--cream); }

/* =========================================================
   FORMS
========================================================= */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--charcoal); }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

textarea { resize: vertical; min-height: 120px; }

/* =========================================================
   NEWSLETTER SECTION
========================================================= */
.newsletter-section {
  background: var(--gold);
  padding: 52px 0;
  text-align: center;
}

.newsletter-section h2 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.newsletter-section p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  border: none;
  border-radius: 8px;
}

.newsletter-form button {
  background: var(--charcoal);
  color: white;
  padding: 11px 22px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.newsletter-form button:hover { opacity: 0.85; }

/* =========================================================
   SCREEN READER
========================================================= */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
  .section-pad { padding: 40px 0; }
  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}
