/*
Theme Name: Portal Viajar
Theme URI: https://portalviajar.com.br
Author: Portal Viajar
Description: Tema editorial de viagens do Portal Viajar — verde folha, azul oceano e areia, com tipografia Fraunces + Plus Jakarta Sans.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: portal-viajar
*/

:root {
  --pv-bg: #fdfcf9;
  --pv-card: #ffffff;
  --pv-ink: #262626;
  --pv-muted: #6b7280;
  --pv-border: #e7e2d8;
  --pv-cream: #f4efe6;
  --pv-sand: #ffcc83;
  --pv-sand-soft: #fdf3e3;
  --pv-green: #10893e;
  --pv-green-light: #0ec650;
  --pv-green-deep: #0b5f2c;
  --pv-blue: #0078d7;
  --pv-sky: #19a6ed;
  --pv-ocean-deep: #0b3a63;
  --pv-radius: 14px;
  --pv-shadow: 0 1px 2px rgba(0,0,0,.05), 0 14px 30px -20px rgba(0,0,0,.35);
  --pv-shadow-lift: 0 2px 6px rgba(0,0,0,.07), 0 26px 50px -26px rgba(0,0,0,.4);
}

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

body {
  margin: 0;
  background: var(--pv-bg);
  color: var(--pv-ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pv-green); text-decoration: none; }
a:hover { color: var(--pv-green-deep); }

h1, h2, h3, h4 {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--pv-ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

.pv-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.pv-narrow { max-width: 760px; margin: 0 auto; }

/* ---------- Header ---------- */
.pv-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,252,249,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pv-border);
}
body.admin-bar .pv-header { top: 32px; }
.pv-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.pv-logo img { height: 48px; width: auto; max-width: 190px; object-fit: contain; }
.pv-logo .custom-logo-link { display: block; }
.pv-logo-text { font-family: "Fraunces", serif; font-size: 24px; font-weight: 700; color: var(--pv-ink); }
.pv-nav { display: flex; align-items: center; gap: 26px; }
.pv-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.pv-nav a { font-size: 15px; font-weight: 500; color: rgba(38,38,38,.78); }
.pv-nav a:hover, .pv-nav .current-menu-item > a { color: var(--pv-green); }
.pv-nav li.pv-cta > a, .pv-nav ul > li:last-child.menu-item-cta > a {
  background: var(--pv-green); color: #fff; padding: 9px 18px; border-radius: 999px; font-weight: 600;
}
.pv-nav li.pv-cta > a:hover { background: var(--pv-green-deep); color: #fff; }
.pv-burger { display: none; background: none; border: 1px solid var(--pv-border); border-radius: 10px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; color: var(--pv-ink); }
@media (max-width: 900px) {
  .pv-nav { display: none; }
  .pv-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 76px; background: var(--pv-bg); border-bottom: 1px solid var(--pv-border); padding: 12px 20px 20px; }
  .pv-nav.is-open ul { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .pv-nav.is-open a { display: block; padding: 10px 4px; font-size: 16px; }
  .pv-burger { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Hero / destaque ---------- */
.pv-hero { padding: 44px 0 8px; }
.pv-hero-card {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0;
  background: var(--pv-card); border: 1px solid var(--pv-border);
  border-radius: 22px; overflow: hidden; box-shadow: var(--pv-shadow-lift);
}
.pv-hero-media { min-height: 340px; background: var(--pv-cream); }
.pv-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.pv-hero-body { padding: 38px; display: flex; flex-direction: column; justify-content: center; }
.pv-hero-body h2 { font-size: clamp(28px, 3.2vw, 40px); }
@media (max-width: 860px) { .pv-hero-card { grid-template-columns: 1fr; } .pv-hero-body { padding: 26px; } }

.pv-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--pv-green); margin-bottom: 12px; }

.pv-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--pv-sand-soft); color: var(--pv-green-deep); border: 1px solid var(--pv-sand);
  padding: 5px 12px; border-radius: 999px;
}
.pv-meta { font-size: 14px; color: var(--pv-muted); }
.pv-excerpt { color: #4b5563; }

/* ---------- Grid de artigos ---------- */
.pv-section { padding: 46px 0; }
.pv-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.pv-section-head h2 { font-size: 28px; margin: 0; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .pv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pv-grid { grid-template-columns: 1fr; } }

.pv-card {
  background: var(--pv-card); border: 1px solid var(--pv-border); border-radius: var(--pv-radius);
  overflow: hidden; box-shadow: var(--pv-shadow); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pv-card:hover { transform: translateY(-3px); box-shadow: var(--pv-shadow-lift); }
.pv-card-media { aspect-ratio: 16 / 10; background: var(--pv-cream); }
.pv-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pv-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pv-card-body h3 { font-size: 21px; margin: 0; }
.pv-card-body h3 a { color: var(--pv-ink); }
.pv-card-body h3 a:hover { color: var(--pv-green); }

/* ---------- Caminhos da página inicial ---------- */
.pv-paths { border-bottom: 1px solid var(--pv-border); padding: 50px 0 56px; }
.pv-paths h2 { font-size: 32px; margin-bottom: 4px; }
.pv-paths-intro { color: #4b5563; margin: 0; }
.pv-paths-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.pv-path-card {
  min-height: 216px; padding: 24px; border: 1px solid var(--pv-border); border-radius: 12px;
  background: var(--pv-card); color: var(--pv-ink); display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pv-path-card:hover { color: var(--pv-ink); border-color: var(--pv-green-light); transform: translateY(-2px); box-shadow: var(--pv-shadow); }
.pv-path-card h3 { color: var(--pv-green); font-size: 20px; margin: 0 0 8px; }
.pv-path-card p { color: #4b5563; font-size: 15px; line-height: 1.65; margin: 0 0 16px; }
.pv-path-card span { margin-top: auto; color: var(--pv-ink); font-size: 14px; font-weight: 500; }
.pv-path-card:hover span { color: var(--pv-green); }
@media (max-width: 900px) { .pv-paths-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pv-paths-grid { grid-template-columns: 1fr; } .pv-path-card { min-height: auto; } }

/* ---------- Artigo ---------- */
.pv-article-header { padding: 44px 0 22px; }
.pv-article-header h1 { font-size: clamp(30px, 4.2vw, 48px); }
.pv-article-cover { border-radius: 20px; overflow: hidden; box-shadow: var(--pv-shadow-lift); margin: 8px 0 34px; }
.pv-article-cover img { width: 100%; max-height: 560px; object-fit: cover; }

.pv-content { font-size: 18.5px; line-height: 1.8; color: #33383f; }
.pv-content > * + * { margin-top: 1.15em; }
.pv-content h2 { font-size: 30px; margin-top: 1.8em; }
.pv-content h3 { font-size: 23px; margin-top: 1.5em; }
.pv-content ul, .pv-content ol { padding-left: 1.3em; }
.pv-content li + li { margin-top: .4em; }
.pv-content li::marker { color: var(--pv-green); }
.pv-content blockquote {
  margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--pv-green);
  background: var(--pv-sand-soft); border-radius: 0 12px 12px 0; font-style: italic; color: #3d4147;
}
.pv-content img, .pv-content figure img { border-radius: 14px; }
.pv-content figcaption { font-size: 14px; color: var(--pv-muted); text-align: center; margin-top: .5em; }
.pv-content a { text-decoration: underline; text-underline-offset: 3px; }
.pv-content table { width: 100%; border-collapse: collapse; }
.pv-content th, .pv-content td { border: 1px solid var(--pv-border); padding: 10px 12px; }

.pv-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px; }
.pv-tags a { font-size: 13px; background: var(--pv-cream); border: 1px solid var(--pv-border); border-radius: 999px; padding: 5px 12px; color: var(--pv-ink); }

/* ---------- Comentários ---------- */
.pv-comments { margin: 52px 0 0; padding: 32px 0 10px; border-top: 1px solid var(--pv-border); }
.pv-comments h2, .pv-comments h3 { font-size: 24px; }
.pv-comments ol.comment-list { list-style: none; margin: 0; padding: 0; }
.pv-comments ol.comment-list ol.children { list-style: none; padding-left: 24px; }
.pv-comments li.comment { background: var(--pv-card); border: 1px solid var(--pv-border); border-radius: var(--pv-radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--pv-shadow); }
.pv-comments .comment-author img { border-radius: 999px; float: left; margin-right: 12px; }
.pv-comments .comment-author .fn { font-weight: 700; font-style: normal; }
.pv-comments .comment-metadata, .pv-comments .says { font-size: 13px; color: var(--pv-muted); }
.pv-comments .comment-metadata a { color: var(--pv-muted); }
.pv-comments .reply a { font-size: 14px; font-weight: 600; }
.comment-respond { background: var(--pv-cream); border: 1px solid var(--pv-border); border-radius: 18px; padding: 24px; margin-top: 26px; }
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea,
.pv-search input[type="search"], .widget input[type="search"], .pv-newsletter input[type="email"] {
  width: 100%; border: 1px solid var(--pv-border); border-radius: 10px; padding: 11px 14px;
  font: inherit; font-size: 16px; background: #fff; color: var(--pv-ink);
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form p { margin: 0 0 14px; }
.pv-btn, .comment-form input[type="submit"], .pv-newsletter button, .wp-block-search__button {
  display: inline-block; background: var(--pv-green); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 700; font-size: 15px;
}
.pv-btn:hover, .comment-form input[type="submit"]:hover, .pv-newsletter button:hover { background: var(--pv-green-deep); color: #fff; }
.pv-btn-ghost { background: transparent; color: var(--pv-ink); border: 1px solid var(--pv-border); }
.pv-btn-ghost:hover { background: var(--pv-cream); color: var(--pv-green-deep); }
.comment-notes, .comment-form-cookies-consent label { font-size: 13.5px; font-weight: 400; color: var(--pv-muted); }

/* ---------- Newsletter ---------- */
.pv-newsletter {
  background: linear-gradient(135deg, var(--pv-ocean-deep), var(--pv-blue));
  color: #fff; border-radius: 22px; padding: 40px; margin: 46px 0; text-align: center;
}
.pv-newsletter h2 { color: #fff; font-size: 30px; }
.pv-newsletter p { color: rgba(255,255,255,.85); max-width: 520px; margin: 0 auto 20px; }
.pv-newsletter form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.pv-newsletter input[type="email"] { flex: 1 1 220px; }
.pv-newsletter button { background: var(--pv-sand); color: #3a2a10; }
.pv-newsletter button:hover { background: #ffdca6; color: #3a2a10; }

/* ---------- Paginação ---------- */
.pv-pagination { margin: 34px 0; display: flex; justify-content: center; }
.pv-pagination .page-numbers {
  display: inline-block; min-width: 40px; text-align: center; padding: 8px 12px; margin: 0 4px;
  border: 1px solid var(--pv-border); border-radius: 10px; background: #fff; color: var(--pv-ink); font-weight: 600;
}
.pv-pagination .page-numbers.current, .pv-pagination .page-numbers:hover { background: var(--pv-green); border-color: var(--pv-green); color: #fff; }

/* ---------- Footer ---------- */
.pv-footer { background: var(--pv-cream); color: var(--pv-muted); margin-top: 60px; padding: 48px 0 28px; border-top: 1px solid var(--pv-border); }
.pv-footer a { color: var(--pv-muted); }
.pv-footer a:hover { color: var(--pv-green); }
.pv-footer h3 { color: var(--pv-ink); font-size: 18px; }
.pv-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .pv-footer-grid { grid-template-columns: 1fr; } }
.pv-footer ul { list-style: none; margin: 0; padding: 0; }
.pv-footer li { margin-bottom: 8px; }
.pv-footer-logo img { height: 42px; width: auto; }
.pv-footer-bottom { border-top: 1px solid var(--pv-border); margin-top: 34px; padding-top: 18px; font-size: 14px; text-align: center; }

/* ---------- Utilidades WP ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.alignleft { float: left; margin: 0 22px 18px 0; }
.alignright { float: right; margin: 0 0 18px 22px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.sticky, .gallery-caption, .bypostauthor { }
.pv-empty { padding: 60px 0; text-align: center; color: var(--pv-muted); }

/* Destaques secundários da capa */
.pv-featured-grid { display: grid; gap: 22px; margin-top: 24px; grid-template-columns: repeat(6, 1fr); }
.pv-featured-grid > .pv-card { grid-column: span 2; }
.pv-featured-5 > .pv-card:nth-child(1),
.pv-featured-5 > .pv-card:nth-child(2) { grid-column: span 3; }
.pv-featured-4 > .pv-card { grid-column: span 3; }
.pv-featured-2 > .pv-card { grid-column: span 3; }
.pv-featured-1 > .pv-card { grid-column: span 6; }
.pv-featured-5 > .pv-card:nth-child(1) .pv-card-body h3,
.pv-featured-5 > .pv-card:nth-child(2) .pv-card-body h3 { font-size: 24px; }
@media (max-width: 980px) {
  .pv-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .pv-featured-grid > .pv-card,
  .pv-featured-5 > .pv-card:nth-child(1),
  .pv-featured-5 > .pv-card:nth-child(2),
  .pv-featured-4 > .pv-card,
  .pv-featured-2 > .pv-card,
  .pv-featured-1 > .pv-card { grid-column: span 1; }
}
@media (max-width: 640px) {
  .pv-featured-grid { grid-template-columns: 1fr; gap: 18px; }
}
