/* ==========================================================
   PlanejêSP — Main CSS
   Estilos específicos do tema (complementa style.css)
========================================================== */

/* ── HEADER ── */
.site-header {
  background: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-top-bar { border-bottom: 1px solid rgba(255,255,255,0.06); }

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* Logo */
.logo-text {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-text::after {
  content: 'SP';
  color: var(--gold-light);
}

/* Custom logo override */
.custom-logo { height: 44px; width: auto; }

/* Nav */
.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav .current-menu-item > a,
.header-nav .current-page-ancestor > a { color: var(--white); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 12px; }

.search-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  padding: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.search-toggle:hover { color: var(--white); }

.header-cta {
  background: var(--gold);
  color: white !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background var(--transition);
  white-space: nowrap;
}

.header-cta:hover { background: var(--gold-light); }

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Category bar */
.category-bar { padding: 0; }

.cat-bar-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-bar-inner::-webkit-scrollbar { display: none; }

.cat-link {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 11px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.cat-link:hover,
.cat-link.active {
  color: var(--white);
  border-bottom-color: var(--gold-light);
}

/* Search overlay */
.search-overlay {
  background: var(--charcoal);
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.search-overlay[hidden] { display: none; }

.search-form-overlay {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-form-overlay input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
}

.search-form-overlay input::placeholder { color: rgba(255,255,255,0.35); }
.search-form-overlay input:focus { border-color: var(--gold); outline: none; }

.search-form-overlay button {
  background: var(--gold);
  border: none;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.search-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  padding: 8px;
}

/* ── HERO ── */
.hero-section {
  background: var(--charcoal);
  padding: 60px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.hero-eyebrow { margin-bottom: 14px; }

.hero-title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.18;
  margin-bottom: 18px;
}

.hero-title a { color: inherit; }
.hero-title a:hover { color: var(--gold-light); }

.hero-excerpt {
  color: rgba(255,255,255,0.55);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  font-size: 13px;
}

.hero-date, .hero-read-time { color: rgba(255,255,255,0.4); }

.hero-image {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image:hover img { transform: scale(1.03); }

/* ── BAIRROS SECTION ── */
.bairros-section { background: var(--charcoal); }

.bairros-section .section-head h2 { color: white; }

.bairro-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.bairro-card:hover {
  background: rgba(184,134,11,0.12);
  border-color: rgba(212,168,67,0.35);
  transform: translateY(-3px);
}

.bairro-icon { font-size: 26px; margin-bottom: 10px; }
.bairro-name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.bairro-count { font-size: 12px; color: rgba(255,255,255,0.35); flex: 1; }
.bairro-arrow { margin-top: 14px; color: var(--gold-light); font-size: 16px; }

.bairro-card--more .bairro-name { color: var(--gold-light); }

/* ── SINGLE POST ── */
.breadcrumb {
  font-size: 12px;
  color: var(--warm-grey);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb a { color: var(--gold); }
.breadcrumb a:hover { text-decoration: underline; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
  align-items: center;
  font-size: 13px;
  color: var(--warm-grey);
}

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

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

.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--warm-grey);
  flex-wrap: wrap;
}

.share-btn {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: opacity var(--transition);
}

.share-fb { background: #1877F2; color: white; }
.share-wa { background: #25D366; color: white; }
.share-pi { background: #E60023; color: white; }
.share-btn:hover { opacity: 0.85; }

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
}

.post-nav-prev, .post-nav-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-nav-next { text-align: right; }

.nav-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--warm-grey);
  font-weight: 600;
}

.nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.4;
}

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

.related-posts { margin: 40px 0 0; }
.related-title { font-size: 1.3rem; margin-bottom: 20px; }

/* ── ARCHIVE HEADER ── */
.archive-header {
  background: var(--charcoal);
  padding: 40px 0;
}

.archive-title {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 8px;
}

.archive-desc {
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  max-width: 600px;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
  font-weight: 600;
}

.skip-link:focus { top: 0; }

/* ── FOOTER ── */
.site-footer {
  background: var(--charcoal);
  padding: 52px 0 24px;
  color: rgba(255,255,255,0.45);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 24px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  color: var(--white);
  display: block;
  margin-bottom: 12px;
}

.footer-logo::after { content: 'SP'; color: var(--gold-light); }

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  margin-bottom: 18px;
}

.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }

.footer-socials a {
  background: rgba(255,255,255,0.07);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  transition: background var(--transition), color var(--transition);
}

.footer-socials a:hover {
  background: var(--gold);
  color: white;
}

.footer-col-title {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.4); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy { color: rgba(255,255,255,0.3); }
.footer-made { color: rgba(255,255,255,0.2); }

/* ── NO RESULTS / 404 ── */
.no-results {
  padding: 60px 0;
  text-align: center;
}

.no-results h2 { font-size: 1.5rem; margin-bottom: 10px; }
.no-results p { color: var(--warm-grey); margin-bottom: 24px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-image { aspect-ratio: 16/9; }
  .header-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
}

@media (max-width: 768px) {
  .hero-section { padding: 40px 0; }
  .header-top-inner { height: 60px; }
  .bairros-section .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .bairros-section .grid-4 { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 1.7rem; }
}

/* ── MOBILE MENU (aberto) ── */
.site-header.menu-open .primary-nav {
  display: block;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--charcoal);
  z-index: 300;
  padding: 24px;
  overflow-y: auto;
}

.site-header.menu-open .header-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-header.menu-open .header-nav a {
  padding: 16px 0;
  font-size: 18px;
  font-family: var(--font-serif);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
}

.site-header.menu-open .mobile-menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.site-header.menu-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .mobile-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
