/*
Theme Name: Presuntinho
Theme URI: https://www.presuntinho.com
Author: Marcelo Gigliotti
Author URI: https://www.presuntinho.com
Description: Tema editorial para blog de viagem pessoal. Design sofisticado com paleta terrosa/âmbar, tipografia Playfair Display + Source Sans 3, layout responsivo com sidebar.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: presuntinho
Tags: blog, travel, one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, post-formats, responsive-layout, translation-ready
*/

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #2C2C2A;
  background: #F5F3EE;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #C17D3C; text-decoration: none; transition: color 0.2s; }
a:hover { color: #9A5E28; }
ul { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1A;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2rem; color: #3C3C3A; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 3px solid #C17D3C;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #FDF8F3;
  border-radius: 0 6px 6px 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #5C3A20;
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0;
}

@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#masthead {
  background: #1C1410;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(193,125,60,0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-branding .site-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #F5E6D0;
  letter-spacing: -0.5px;
}

.site-branding .site-title span { color: #C17D3C; }

.site-branding .site-description {
  font-size: 0.7rem;
  color: rgba(245,230,208,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -2px;
}

/* Primary Navigation */
#primary-navigation ul {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

#primary-navigation ul li a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,230,208,0.7);
  transition: color 0.2s;
}

#primary-navigation ul li a:hover,
#primary-navigation ul li.current-menu-item a {
  color: #C17D3C;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(245,230,208,0.3);
  color: #F5E6D0;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  #primary-navigation { display: none; width: 100%; }
  #primary-navigation.active { display: block; }
  #primary-navigation ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(245,230,208,0.1);
  }
  #primary-navigation ul li a {
    display: block;
    padding: 10px 1.5rem;
  }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 1rem 0; }
}

/* ============================================================
   HERO / FEATURED POST BANNER
   ============================================================ */
.hero-banner {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #1C1410;
}

.hero-banner .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.4s;
}

.hero-banner .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,10,5,0.95) 0%, rgba(20,10,5,0.4) 50%, transparent 100%);
}

.hero-banner .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
}

.hero-category {
  display: inline-block;
  background: #C17D3C;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 14px;
}

.hero-title em { color: #F5C886; font-style: italic; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}

.hero-meta .sep { width: 1px; height: 12px; background: rgba(255,255,255,0.25); }

@media (max-width: 600px) {
  .hero-banner { height: 380px; }
  .hero-banner .hero-content { padding: 1.5rem; }
}

/* ============================================================
   SECTION LABELS
   ============================================================ */
.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C17D3C;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #DDD8D0;
}

/* ============================================================
   POST CARDS (ARCHIVE / INDEX)
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

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

.post-card {
  background: #fff;
  border: 1px solid #E8E4DC;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44,28,16,0.1);
}

.post-card .post-thumbnail {
  display: block;
  height: 185px;
  overflow: hidden;
  background: #DDD8D0;
  position: relative;
}

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

.post-card:hover .post-thumbnail img { transform: scale(1.04); }

.post-card .post-thumbnail .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2C1810, #8B5E3C);
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: rgba(255,255,255,0.35);
}

.post-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #C17D3C;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

.post-card .post-body { padding: 1.1rem; }

.post-card .post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1C1C1A;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.post-card:hover .post-title { color: #C17D3C; }

.post-card .post-excerpt {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.65;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #999;
}

.post-card .post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ccc;
}

/* Featured card (wide) */
.post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 3fr;
}

.post-card-featured .post-thumbnail {
  height: auto;
  min-height: 220px;
}

@media (max-width: 600px) {
  .post-card-featured { grid-template-columns: 1fr; }
  .post-card-featured .post-thumbnail { height: 200px; }
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.single-post-header { margin-bottom: 2rem; }

.single-post-header .post-categories {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.single-post-header .post-categories a {
  background: #C17D3C;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
}

.single-post-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
  color: #1C1C1A;
}

.single-post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: #888;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E8E4DC;
}

.single-post-header .post-meta .sep { width: 1px; height: 12px; background: #DDD; }

.post-content { max-width: 680px; }

.post-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3C3C3A;
  margin-bottom: 1.4rem;
}

.post-content h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.post-content h3 { margin: 1.5rem 0 0.75rem; }

.post-content img {
  border-radius: 6px;
  margin: 1.5rem 0;
  width: 100%;
}

.post-content ul, .post-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
  color: #3C3C3A;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ============================================================
   POST NAVIGATION
   ============================================================ */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E8E4DC;
}

.post-navigation a {
  display: block;
  padding: 1rem;
  background: #fff;
  border: 1px solid #E8E4DC;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.post-navigation a:hover { border-color: #C17D3C; }

.post-navigation .nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C17D3C;
  margin-bottom: 4px;
}

.post-navigation .nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: #1C1C1A;
  line-height: 1.3;
}

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

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2rem 0;
}

.pagination .page-numbers {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #DDD8D0;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #666;
  background: #fff;
  transition: all 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: #C17D3C;
  border-color: #C17D3C;
  color: #fff;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { }

.sidebar .widget {
  background: #fff;
  border: 1px solid #E8E4DC;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar .widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1C1C1A;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #E8E4DC;
}

/* Recent posts widget */
.sidebar .widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid #F0EDE8;
  font-size: 0.85rem;
}

.sidebar .widget ul li:last-child { border-bottom: none; }

.sidebar .widget ul li a {
  color: #3C3C3A;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  transition: color 0.2s;
}

.sidebar .widget ul li a:hover { color: #C17D3C; }

/* Categories cloud */
.sidebar .widget.widget_categories ul li {
  display: inline-block;
  border: none;
  padding: 0;
}

.sidebar .widget.widget_categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.sidebar .widget.widget_categories ul li a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #DDD8D0;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  transition: all 0.2s;
}

.sidebar .widget.widget_categories ul li a:hover {
  background: #C17D3C;
  border-color: #C17D3C;
  color: #fff;
}

/* Search widget */
.sidebar .widget .search-form {
  display: flex;
  gap: 6px;
}

.sidebar .widget .search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #DDD8D0;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  background: #FAFAF8;
}

.sidebar .widget .search-field:focus { border-color: #C17D3C; }

.sidebar .widget .search-submit {
  background: #C17D3C;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
}

/* ============================================================
   NEWSLETTER WIDGET
   ============================================================ */
.newsletter-banner {
  background: linear-gradient(135deg, #2C1810, #5C3820);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.newsletter-banner h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #F5C886;
  margin-bottom: 6px;
}

.newsletter-banner p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
}

.newsletter-banner .nl-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-banner .nl-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.newsletter-banner .nl-input::placeholder { color: rgba(255,255,255,0.4); }

.newsletter-banner .nl-btn {
  background: #C17D3C;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .newsletter-banner .nl-form { flex-direction: column; }
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E8E4DC;
}

.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #1C1C1A;
}

.comment-list { margin-bottom: 2rem; }

.comment {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 1rem 0;
  border-bottom: 1px solid #F0EDE8;
}

.comment .avatar { border-radius: 50%; }

.comment .comment-author { font-size: 0.85rem; font-weight: 600; color: #1C1C1A; }
.comment .comment-date { font-size: 0.75rem; color: #999; margin-bottom: 6px; }
.comment .comment-content { font-size: 0.9rem; color: #444; line-height: 1.7; }

.comment-respond { margin-top: 1.5rem; }

.comment-respond .comment-reply-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.comment-respond .comment-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 5px;
  margin-top: 14px;
}

.comment-respond .comment-form input[type="text"],
.comment-respond .comment-form input[type="email"],
.comment-respond .comment-form input[type="url"],
.comment-respond .comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #DDD8D0;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #FAFAF8;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.comment-respond .comment-form input:focus,
.comment-respond .comment-form textarea:focus { border-color: #C17D3C; }

.comment-respond .comment-form textarea { min-height: 120px; resize: vertical; }

.comment-respond .comment-form .submit {
  background: #C17D3C;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1rem;
  transition: background 0.2s;
}

.comment-respond .comment-form .submit:hover { background: #9A5E28; }

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  background: #1C1410;
  border-top: 1px solid rgba(193,125,60,0.25);
  margin-top: 3rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem 0 2rem;
}

@media (max-width: 768px) {
  .footer-widgets { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 0 1.5rem; }
}

.footer-brand .footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #F5E6D0;
  margin-bottom: 8px;
}

.footer-brand .footer-logo span { color: #C17D3C; }

.footer-brand p {
  font-size: 0.82rem;
  color: rgba(245,230,208,0.5);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,230,208,0.4);
  margin-bottom: 12px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  font-size: 0.82rem;
  color: rgba(245,230,208,0.6);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #C17D3C; }

.footer-bottom {
  border-top: 1px solid rgba(245,230,208,0.08);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(245,230,208,0.3);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: #888; margin-top: 4px; font-style: italic; text-align: center; }

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C17D3C;
  transition: gap 0.2s;
}

.read-more-link:hover { gap: 8px; color: #9A5E28; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2rem; }
.tag-list a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #DDD8D0;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #666;
  transition: all 0.2s;
}
.tag-list a:hover { background: #C17D3C; border-color: #C17D3C; color: #fff; }
