/*
Theme Name: PinhoSat Blog
Theme URI: https://pinhosat.com.br
Author: PinhoSat
Author URI: https://pinhosat.com.br
Description: Tema personalizado do blog PinhoSat — Proteção e Gestão de Frotas. Design system integrado com a LP principal, otimizado para SEO e performance.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pinhosat
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ══════════════════════════════════════
   DESIGN TOKENS (PinhoSat Design System)
   ══════════════════════════════════════ */
:root {
  /* Navy palette */
  --navy-900: #0F1923;
  --navy-800: #1A2332;
  --navy-700: #243044;
  --navy-600: #2F3E56;
  /* Gold palette */
  --gold-500: #C9A84C;
  --gold-400: #D4B85E;
  --gold-300: #E0C870;
  --gold-200: #EBD99B;
  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #ADB5BD;
  --gray-500: #6C757D;
  --gray-600: #495057;
  --gray-700: #343A40;
  --gray-800: #212529;
  /* Status */
  --green-500: #2D8B4E;
  --red-500: #CC3333;
  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  /* Spacing */
  --container: 1120px;
  --gap: 24px;
  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-500); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold-300); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.site-header {
  background: var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(201,168,76,.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-brand img {
  height: 32px;
  width: auto;
}

.site-brand__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
}

.site-brand__text span {
  color: var(--gold-500);
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin-top: -4px;
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s var(--ease);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.current { color: var(--gold-400); }

.nav-cta {
  background: var(--gold-500) !important;
  color: var(--navy-900) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px !important;
  letter-spacing: .02em;
  transition: background .2s var(--ease);
}

.nav-cta:hover { background: var(--gold-400) !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: .3s var(--ease);
}

/* ══════════════════════════════════════
   BLOG HEADER (compact, content-first)
   ══════════════════════════════════════ */
.blog-header {
  background: var(--navy-900);
  padding: 32px 0 24px;
  border-bottom: 1px solid rgba(201,168,76,.1);
}

.blog-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.blog-header__text h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
}

.blog-header__text p {
  font-size: 14px;
  color: var(--gray-500);
}

.blog-header__text .gold { color: var(--gold-500); }

.blog-header__search { flex-shrink: 0; }
.blog-header__search .search-form { gap: 6px; }
.blog-header__search input[type="search"] {
  background: var(--navy-800);
  border-color: var(--navy-600);
  color: var(--white);
  padding: 8px 14px;
  font-size: 13px;
  width: 220px;
}
.blog-header__search input[type="search"]::placeholder { color: var(--gray-500); }
.blog-header__search input[type="search"]:focus { border-color: var(--gold-500); }
.blog-header__search button {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
}

/* Category pills */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--navy-800);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .2s var(--ease);
}

.cat-pill:hover {
  color: var(--white);
  border-color: var(--navy-600);
}

.cat-pill--active {
  background: rgba(201,168,76,.15);
  color: var(--gold-400);
  border-color: rgba(201,168,76,.3);
}

.cat-pill__count {
  font-size: 11px;
  background: rgba(255,255,255,.08);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--gray-500);
}

.cat-pill--active .cat-pill__count {
  background: rgba(201,168,76,.2);
  color: var(--gold-400);
}

/* ══════════════════════════════════════
   FEATURED POST (latest article)
   ══════════════════════════════════════ */
.featured-post {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: box-shadow .3s var(--ease);
}

.featured-post:hover {
  box-shadow: 0 8px 32px rgba(15,25,35,.08);
}

.featured-post__link {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  text-decoration: none;
  color: inherit;
}

.featured-post__thumb {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  min-height: 300px;
}

.featured-post__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-post__placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}

.featured-post__placeholder svg {
  stroke: var(--gold-500);
  opacity: .25;
}

.featured-post__body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  margin: 12px 0;
  transition: color .2s var(--ease);
}

.featured-post:hover .featured-post__title {
  color: var(--gold-500);
}

.featured-post__excerpt {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-post__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

/* Grid section label */
.posts-grid-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.posts-grid-label h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}

.posts-grid-label__line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Category/Archive header (reuses compact style) */
.archive-header {
  background: var(--navy-900);
  padding: 32px 0 24px;
  border-bottom: 1px solid rgba(201,168,76,.1);
}

.archive-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.archive-header p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ══════════════════════════════════════
   POST GRID
   ══════════════════════════════════════ */
.posts-section {
  padding: 40px 0 80px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* Card */
.post-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,25,35,.1);
}

.post-card a { text-decoration: none; color: inherit; }

.post-card__thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}

.post-card__thumb-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__thumb-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: var(--gold-500);
  opacity: .4;
}

.post-card__body { padding: 20px; }

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--gray-500);
}

.post-card__cat {
  background: rgba(201,168,76,.12);
  color: var(--gold-500);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
  margin-bottom: 8px;
  transition: color .2s var(--ease);
}

.post-card:hover .post-card__title { color: var(--gold-500); }

.post-card__excerpt {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-500);
}

.post-card__read-more svg {
  width: 14px;
  height: 14px;
  transition: transform .2s var(--ease);
}

.post-card:hover .post-card__read-more svg { transform: translateX(4px); }

/* ══════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════ */
.single-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}

.single-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(201,168,76,.06) 0%, transparent 60%);
  pointer-events: none;
}

.single-hero__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.single-hero__cat {
  display: inline-block;
  background: rgba(201,168,76,.15);
  color: var(--gold-400);
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}

.single-hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
}

.single-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--gray-400);
}

.single-hero__meta svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold-500);
  vertical-align: -2px;
  margin-right: 4px;
}

/* Article content */
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold-200);
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-800);
  margin: 32px 0 12px;
}

.article-content p { margin-bottom: 16px; }

.article-content ul, .article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li { margin-bottom: 8px; }

.article-content img {
  border-radius: 8px;
  margin: 24px 0;
}

.article-content blockquote {
  border-left: 4px solid var(--gold-500);
  background: var(--gray-50);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray-600);
}

.article-content a {
  color: var(--gold-500);
  text-decoration: underline;
  text-decoration-color: rgba(201,168,76,.3);
  text-underline-offset: 3px;
}

.article-content a:hover { text-decoration-color: var(--gold-500); }

/* Featured image */
.single-featured-img {
  max-width: 900px;
  margin: -32px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.single-featured-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15,25,35,.15);
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.article-tags a {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.article-tags a:hover { background: var(--gold-200); color: var(--navy-900); }

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 24px;
  margin-top: 40px;
}

.author-box__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-800);
  flex-shrink: 0;
}

.author-box__name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-900);
  font-size: 15px;
}

.author-box__bio {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* Related posts */
.related-posts {
  padding: 56px 0 80px;
  background: var(--gray-50);
}

.related-posts h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 24px;
}

.related-posts .posts-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ══════════════════════════════════════
   SIDEBAR (optional)
   ══════════════════════════════════════ */
.sidebar-widget {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold-200);
}

/* ══════════════════════════════════════
   CTA BANNER (inline)
   ══════════════════════════════════════ */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 56px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  position: relative;
}

.cta-banner p {
  color: var(--gray-400);
  font-size: 15px;
  margin-bottom: 20px;
  position: relative;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s var(--ease), transform .2s var(--ease);
  position: relative;
}

.btn-gold:hover {
  background: var(--gold-400);
  color: var(--navy-900);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s var(--ease);
}

.pagination a {
  background: var(--gray-100);
  color: var(--gray-600);
}

.pagination a:hover {
  background: var(--gold-200);
  color: var(--navy-900);
}

.pagination .current {
  background: var(--navy-900);
  color: var(--white);
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  background: var(--navy-900);
  padding: 48px 0 24px;
  border-top: 1px solid rgba(201,168,76,.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand img { height: 28px; margin-bottom: 12px; }

.footer-brand p {
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--gray-400);
  font-size: 14px;
  padding: 4px 0;
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--gray-500);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  transition: background .2s var(--ease);
}

.footer-social a:hover { background: rgba(201,168,76,.2); }

.footer-social svg {
  width: 16px;
  height: 16px;
  stroke: var(--gray-400);
}

/* ══════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════ */
.breadcrumbs {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 16px;
  position: relative;
}

.breadcrumbs a { color: var(--gold-400); text-decoration: none; }
.breadcrumbs a:hover { color: var(--white); }
.breadcrumbs .sep { margin: 0 6px; opacity: .5; }

/* ══════════════════════════════════════
   SEARCH
   ══════════════════════════════════════ */
.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s var(--ease);
}

.search-form input[type="search"]:focus { border-color: var(--gold-500); }

.search-form button {
  background: var(--navy-900);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s var(--ease);
}

.search-form button:hover { background: var(--navy-700); }

/* ══════════════════════════════════════
   404
   ══════════════════════════════════════ */
.error-404 {
  text-align: center;
  padding: 80px 24px;
}

.error-404 h1 {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
  color: var(--navy-900);
}

.error-404 p { color: var(--gray-500); font-size: 18px; margin: 12px 0 24px; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .blog-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .blog-header__search { width: 100%; }
  .blog-header__search input[type="search"] { width: 100%; }

  .category-pills { gap: 6px; }
  .cat-pill { padding: 5px 10px; font-size: 12px; }

  .featured-post__link {
    grid-template-columns: 1fr;
  }

  .featured-post__thumb { min-height: 200px; }
  .featured-post__placeholder { min-height: 200px; }
  .featured-post__body { padding: 20px; }
  .featured-post__title { font-size: 20px; }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .main-nav { display: none; }
  .main-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,.06);
    gap: 16px;
  }

  .menu-toggle { display: block; }

  .single-hero h1 { font-size: 28px; }

  .related-posts .posts-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner { padding: 28px 20px; }
  .cta-banner h3 { font-size: 20px; }
}

@media (max-width: 480px) {
  .article-content { padding: 32px 16px 64px; }
  .featured-post__body { padding: 16px; }
}

/* ══════════════════════════════════════
   WORDPRESS SPECIFIC
   ══════════════════════════════════════ */
.alignwide { max-width: 900px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 24px; }
.alignright { float: right; margin-left: 24px; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--gray-500); text-align: center; margin-top: 8px; }

.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
