/*!
Theme Name: Brasil do Trecho
Theme URI: https://www.brasildotrecho.com.br
Description: Tema WordPress profissional para notícias e conteúdo sobre transportes e logística. Otimizado para SEO e performance, com suporte a 12 postagens por página.
Version: 4.0.0
Author: Brasil do Trecho
Author URI: https://www.brasildotrecho.com.br
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brasil-do-trecho
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   RESET E ESTILOS BASE
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: #1a3a52;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1em;
}

a {
  color: #FF8C00;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1a3a52;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   CONTAINER E LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
}

.col {
  flex: 1;
  padding: 15px;
  min-width: 250px;
}

.col-full {
  flex: 0 0 100%;
}

.col-2-3 {
  flex: 0 0 66.666%;
}

.col-1-3 {
  flex: 0 0 33.333%;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background-color: #1a3a52;
  color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header a {
  color: #fff;
}

.site-header a:hover {
  color: #FF8C00;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo img {
  max-height: 40px;
}

.site-logo a {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo a:hover {
  text-decoration: none;
}

/* ============================================
   MENU PRINCIPAL - HORIZONTAL
   ============================================ */

.site-nav {
  display: flex !important;
  flex: 1;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
}

.site-nav li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

.site-nav li a {
  display: inline-block !important;
  padding: 15px 14px !important;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0 !important;
  white-space: nowrap;
}

.site-nav li a:hover {
  background-color: #FF8C00 !important;
  color: #fff;
  text-decoration: none;
}

.site-nav li.current-menu-item > a {
  background-color: #FF8C00;
  color: #fff;
}

/* Submenu */
.site-nav ul {
  list-style: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background-color: #1a3a52 !important;
  min-width: 200px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
  border-top: 3px solid #FF8C00 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-nav li:hover > ul {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.site-nav ul li {
  display: block !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 !important;
  padding: 0 !important;
}

.site-nav ul li:last-child {
  border-bottom: none;
}

.site-nav ul li a {
  display: block !important;
  padding: 12px 20px !important;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  transition: all 0.3s ease;
  text-transform: none;
  margin: 0 !important;
}

.site-nav ul li a:hover {
  background-color: #FF8C00 !important;
  color: #fff;
  text-decoration: none;
  padding-left: 25px !important;
}

.site-nav ul li.current-menu-item > a {
  background-color: #FF8C00 !important;
  color: #fff;
}

/* ============================================
   SEARCH FORM
   ============================================ */

.search-form {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.search-form input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  min-width: 150px;
}

.search-form button {
  padding: 8px 15px;
  background-color: #FF8C00;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #e67e00;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

.post-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 30px;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.post-card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #e0e0e0;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-content {
  padding: 20px;
}

.post-card-category {
  display: inline-block;
  background-color: #1a3a52;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.post-card-category:hover {
  background-color: #FF8C00;
  color: #fff;
  text-decoration: none;
}

.post-card-category a {
  color: #fff;
  text-decoration: none;
}

.post-card-category a:hover {
  color: #fff;
  text-decoration: none;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card-title a {
  color: #1a3a52;
}

.post-card-title a:hover {
  color: #FF8C00;
  text-decoration: none;
}

.post-card-excerpt {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #999;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.post-card-author {
  font-weight: 600;
  color: #1a3a52;
}

.post-card-date {
  color: #999;
}

/* ============================================
   FEATURED POST
   ============================================ */

.featured-post {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-post-image {
  height: 400px;
  overflow: hidden;
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.featured-post-category {
  display: inline-block;
  background-color: #1a3a52;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  width: fit-content;
  transition: all 0.3s ease;
}

.featured-post-category:hover {
  background-color: #FF8C00;
}

.featured-post-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.featured-post-excerpt {
  font-size: 1rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.featured-post-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #999;
}

/* ============================================
   PAGINAÇÃO
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #1a3a52;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: #FF8C00;
  color: #fff;
  border-color: #FF8C00;
  text-decoration: none;
}

.pagination .current {
  background-color: #FF8C00;
  color: #fff;
  border-color: #FF8C00;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  background-color: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget {
  margin-bottom: 30px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 3px solid #FF8C00;
  color: #1a3a52;
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

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

.widget ul li a {
  color: #1a3a52;
  font-weight: 500;
}

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

/* ============================================
   WIDGET: MAIS LIDAS
   ============================================ */

.widget-most-read {
  margin-bottom: 30px;
}

.most-read-posts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.most-read-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.most-read-item:hover {
  background-color: #f0f0f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.most-read-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.most-read-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.most-read-content {
  flex: 1;
  min-width: 0;
}

.most-read-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.2;
}

.most-read-content h4 a {
  color: #1a3a52;
  text-decoration: none;
}

.most-read-content h4 a:hover {
  color: #FF8C00;
}

.most-read-date {
  font-size: 0.8rem;
  color: #999;
}

/* ============================================
   WIDGET: WHATSAPP
   ============================================ */

.widget-whatsapp {
  margin-bottom: 30px;
  padding: 0 !important;
}

.whatsapp-card {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  border: none;
  color: #fff;
}

.whatsapp-description {
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.whatsapp-button:hover {
  background-color: rgba(255, 255, 255, 0.35);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.whatsapp-icon {
  font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: #1a3a52;
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.site-footer a {
  color: #FF8C00;
}

.site-footer a:hover {
  color: #fff;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 8px;
}

.footer-widget ul li a {
  color: #fff;
}

.footer-widget ul li a:hover {
  color: #FF8C00;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: #FF8C00;
  color: #fff;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .site-nav li a {
    padding: 12px 10px !important;
    font-size: 11px;
  }

  .search-form {
    order: 2;
    width: 100%;
  }

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

  .featured-post-image {
    height: 250px;
  }

  .featured-post-content {
    padding: 25px;
  }

  .featured-post-title {
    font-size: 1.5rem;
  }

  .col-2-3 {
    flex: 0 0 100%;
  }

  .col-1-3 {
    flex: 0 0 100%;
  }

  .post-card-image {
    height: 200px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }

  .container {
    padding: 0 15px;
  }

  .site-logo {
    font-size: 1rem;
  }

  .site-logo img {
    max-height: 35px;
  }

  .search-form {
    display: none;
  }

  .post-card-image {
    height: 150px;
  }

  .post-card-content {
    padding: 15px;
  }

  .featured-post-content {
    padding: 20px;
  }

  .featured-post-title {
    font-size: 1.25rem;
  }

  .row {
    margin: -10px;
  }

  .col {
    padding: 10px;
  }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.pt-40 {
  padding-top: 40px;
}

.pb-40 {
  padding-bottom: 40px;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
