/*
Theme Name: Sabores do Mundo
Theme URI: https://saberesddomundo.com.br
Author: Sabores do Mundo
Author URI: https://saberesddomundo.com.br
Description: Tema para blog de receitas típicas do mundo com versão original e versão brasileira. Cada postagem traz o prato autêntico e sua adaptação com ingredientes brasileiros.
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: sabores-do-mundo
Tags: food, recipes, blog, international, two-column, custom-colors
*/

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

:root {
  --cream:        #FDF6EC;
  --terra:        #C4621D;
  --terra-dark:   #8B3E0D;
  --terra-light:  #F0D5BC;
  --verde:        #2D6A4F;
  --verde-light:  #D8F0E4;
  --text-dark:    #1A1208;
  --text-mid:     #5C4A30;
  --text-muted:   #9E8060;
  --border:       rgba(196,98,29,0.18);
  --white:        #ffffff;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --shadow:       0 2px 16px rgba(0,0,0,0.07);
}

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

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--terra-dark); }

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

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =============================================
   LAYOUT GERAL
   ============================================= */
.site-wrapper { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

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

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

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--terra);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.header-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
.header-flag {
  font-size: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 8px;
  line-height: 1;
}

.site-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}
.site-title em { font-style: italic; color: #FAD8B0; }
.site-title a { color: #fff; }
.site-title a:hover { color: #FAD8B0; }

.site-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.72);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-navigation {
  background: var(--terra-dark);
}

.main-navigation .site-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 0;
}

.main-navigation ul li a {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  padding: 0.75rem 1.1rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Lato', sans-serif;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a {
  color: #FAD8B0;
  border-bottom-color: #FAD8B0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-family: 'Lato', sans-serif;
}

@media (max-width: 640px) {
  .menu-toggle { display: block; }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .main-navigation ul.toggled { display: flex; }
  .main-navigation ul li a { border-bottom: none; border-top: 1px solid rgba(255,255,255,0.08); }
}

/* =============================================
   SECTION LABELS
   ============================================= */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Lato', sans-serif;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--terra-light);
}

/* =============================================
   TAGS (original / versão BR)
   ============================================= */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.04em;
}
.tag-original { background: #F0D5BC; color: #7A3A08; }
.tag-br       { background: #D8F0E4; color: #1A5C38; }

/* =============================================
   FEATURED POST
   ============================================= */
.featured-post {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.featured-post:hover { transform: translateY(-3px); }

.featured-post .post-thumbnail {
  height: 260px;
  background: linear-gradient(135deg, #C4621D 0%, #8B3E0D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.featured-post .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-post .post-thumbnail .no-image-emoji {
  font-size: 90px;
  opacity: 0.9;
}

.post-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  font-family: 'Lato', sans-serif;
}

.featured-post .post-body { padding: 1.75rem; }

.post-country {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.4rem;
  font-family: 'Lato', sans-serif;
}

.featured-post .post-title { font-size: 1.6rem; margin-bottom: 0.6rem; }
.featured-post .post-title a { color: var(--text-dark); }
.featured-post .post-title a:hover { color: var(--terra); }

.post-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.1rem; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terra);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: gap 0.2s, color 0.2s;
}
.read-more:hover { gap: 10px; color: var(--terra-dark); }
.read-more::after { content: '→'; }

/* =============================================
   POSTS GRID
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2rem;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); }

.post-card .post-thumbnail {
  height: 140px;
  background: linear-gradient(135deg, #C4621D 0%, #8B3E0D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card .post-thumbnail .no-image-emoji { font-size: 50px; }

.post-card .post-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card .post-country { font-size: 0.65rem; margin-bottom: 0.25rem; }
.post-card .post-title { font-size: 1rem; margin-bottom: 0.4rem; }
.post-card .post-title a { color: var(--text-dark); }
.post-card .post-title a:hover { color: var(--terra); }
.post-card .post-excerpt { font-size: 0.8rem; margin-bottom: 0.6rem; flex: 1; }
.post-card .tag { font-size: 0.62rem; padding: 2px 7px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1.5rem 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: 0.5px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  transition: all 0.2s;
}
.pagination a:hover { background: var(--terra); color: #fff; border-color: var(--terra); }
.pagination .current { background: var(--terra); color: #fff; border-color: var(--terra); }

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.single-post-header .post-thumbnail {
  height: 320px;
  background: linear-gradient(135deg, #C4621D 0%, #8B3E0D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.single-post-header .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.single-post-header .no-image-emoji { font-size: 100px; }
.single-post-header .post-body { padding: 2rem; }
.single-post-header .post-title { font-size: 2rem; margin-bottom: 0.6rem; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Lato', sans-serif;
}
.post-meta span { display: flex; align-items: center; gap: 4px; }

/* Recipe version boxes */
.recipe-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 640px) { .recipe-versions { grid-template-columns: 1fr; } }

.recipe-version-box {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 0.5px solid var(--border);
}
.recipe-version-box.original { background: #FFF8F2; border-color: #E8C4A0; }
.recipe-version-box.brasileira { background: #F2FBF6; border-color: #A0D8B8; }

.recipe-version-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-family: 'Lato', sans-serif;
}
.original .recipe-version-label { color: #7A3A08; }
.brasileira .recipe-version-label { color: #1A5C38; }

.recipe-version-box h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.recipe-version-box p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

/* Post content */
.post-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-content h2 { font-size: 1.4rem; margin: 1.75rem 0 0.75rem; color: var(--terra-dark); }
.post-content h3 { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; }
.post-content ul, .post-content ol { margin: 0.75rem 0 0.75rem 1.5rem; }
.post-content li { margin-bottom: 0.3rem; }
.post-content blockquote {
  border-left: 3px solid var(--terra);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: #FFF8F2;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-mid);
}
.post-content img { border-radius: var(--radius-md); margin: 1rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
.post-content th { background: var(--terra); color: #fff; padding: 0.6rem 0.8rem; text-align: left; font-family: 'Lato', sans-serif; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.post-content td { padding: 0.6rem 0.8rem; border-bottom: 0.5px solid var(--border); }
.post-content tr:nth-child(even) td { background: #FDF6EC; }

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

.widget {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 0.5px solid var(--terra-light);
  font-family: 'Lato', sans-serif;
}

.widget-about {
  background: var(--verde);
  border-color: transparent;
  text-align: center;
}
.widget-about .about-icon { font-size: 40px; margin-bottom: 0.75rem; }
.widget-about .widget-title { color: rgba(255,255,255,0.75); border-bottom-color: rgba(255,255,255,0.15); }
.widget-about p { font-size: 0.82rem; color: rgba(255,255,255,0.82); line-height: 1.65; }

/* Recent posts in sidebar */
.sidebar-post-item {
  display: flex;
  gap: 10px;
  padding: 0.6rem 0;
  border-bottom: 0.5px solid var(--border);
  align-items: flex-start;
}
.sidebar-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #C4621D, #8B3E0D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-post-info { flex: 1; }
.sidebar-post-info .post-country { font-size: 0.62rem; margin-bottom: 0.15rem; }
.sidebar-post-info a { font-family: 'Playfair Display', serif; font-size: 0.85rem; color: var(--text-dark); line-height: 1.3; display: block; }
.sidebar-post-info a:hover { color: var(--terra); }

/* Countries tag cloud */
.country-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-mid);
  background: var(--cream);
  border-radius: 20px;
  padding: 4px 10px;
  border: 0.5px solid var(--border);
  transition: all 0.2s;
  font-family: 'Lato', sans-serif;
}
.country-pill:hover { background: var(--terra-light); border-color: var(--terra); color: var(--terra-dark); }

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-box {
  text-align: center;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--terra); }
.stat-label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: 'Lato', sans-serif; }

/* Search */
.search-form { display: flex; gap: 6px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--cream);
  color: var(--text-dark);
  font-family: 'Lato', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.search-form input[type="search"]:focus { border-color: var(--terra); }
.search-form button {
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  transition: background 0.2s;
}
.search-form button:hover { background: var(--terra-dark); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--terra-dark);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.25rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-brand .footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-brand .footer-title em { font-style: italic; color: #FAD8B0; }
.footer-brand p { font-size: 0.83rem; line-height: 1.65; }

.footer-col h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-col ul li a:hover { color: #FAD8B0; }

.footer-bottom {
  border-top: 0.5px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #FAD8B0; }

/* =============================================
   CATEGORY ARCHIVE HEADER
   ============================================= */
.archive-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.archive-header .archive-title { font-size: 1.6rem; margin-bottom: 0.3rem; }
.archive-header .archive-desc { font-size: 0.88rem; color: var(--text-muted); }

/* =============================================
   404
   ============================================= */
.not-found-page {
  text-align: center;
  padding: 4rem 2rem;
}
.not-found-page .not-found-emoji { font-size: 80px; margin-bottom: 1rem; }
.not-found-page h1 { font-size: 2.5rem; color: var(--terra); margin-bottom: 0.5rem; }
.not-found-page p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* =============================================
   COMMENTS
   ============================================= */
.comments-area {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.comments-title { font-size: 1.2rem; margin-bottom: 1.5rem; }
.comment-body { padding: 1rem; border: 0.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.comment-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem; font-family: 'Lato', sans-serif; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--cream);
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--terra); }
.comment-form .submit {
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.2s;
}
.comment-form .submit:hover { background: var(--terra-dark); }

/* =============================================
   BACK TO TOP
   ============================================= */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 100;
  transition: background 0.2s, transform 0.2s;
}
#back-to-top.visible { display: flex; }
#back-to-top:hover { background: var(--terra-dark); transform: translateY(-2px); }

/* =============================================
   ADMIN BAR FIX
   ============================================= */
.admin-bar .main-navigation { top: 32px; }
