/*!
Theme Name: Dr. Thiago Tagliari - Blog Médico
Theme URI: https://drthiagotagliari.com
Description: Tema WordPress profissional para blog médico, otimizado para SEO e conversão. Desenvolvido especificamente para urologistas e médicos especialistas.
Author: Manus
Author URI: https://manus.im
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dr-thiago-blog
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
Tags: blog, medical, doctor, responsive, seo-friendly, turquoise, professional

Este tema foi desenvolvido para médicos especialistas que desejam um blog
profissional, rápido e otimizado para SEO. Suporta tabelas, figuras, vídeos
e CTAs para WhatsApp.
*/

/* ==========================================================================
   RESET E CONFIGURAÇÕES GLOBAIS
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
}

/* ==========================================================================
   PALETA DE CORES
   ========================================================================== */

:root {
  --color-primary: #6B8FA3;
  --color-secondary: #2DD4BF;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-accent: #00AA00;
  --color-border: #e0e0e0;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-weight: 600;
}

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: 1.5rem;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}

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

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

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

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

.site-header {
  background-color: var(--color-bg);
  box-shadow: 0 2px 4px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.site-logo a {
  color: var(--color-primary);
}

.main-navigation {
  display: flex;
  gap: 2rem;
}

.main-navigation a {
  color: var(--color-text);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--color-secondary);
}

/* ==========================================================================
   HERO SECTION (Para página inicial)
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #5a7a92 100%);
  color: white;
  padding: 4rem 0;
  display: flex;
  align-items: center;
  min-height: 500px;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-cta {
  display: inline-block;
  background-color: var(--color-secondary);
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-cta:hover {
  background-color: #1ab8a8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

/* ==========================================================================
   POST CONTENT
   ========================================================================== */

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  border-bottom: 3px solid var(--color-secondary);
  padding-bottom: 0.5rem;
}

.post-content h3 {
  margin-top: 1.5rem;
  color: var(--color-text);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px var(--color-shadow);
}

.post-content table thead {
  background-color: var(--color-primary);
  color: white;
}

.post-content table th,
.post-content table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.post-content table tbody tr:hover {
  background-color: var(--color-bg-light);
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px var(--color-shadow);
}

.post-content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.post-content figcaption {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.post-content blockquote {
  border-left: 4px solid var(--color-secondary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--color-text-light);
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   SINGLE POST TEMPLATE
   ========================================================================== */

.single-post {
  padding: 2rem 0;
}

.post-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-bg-light);
  padding-bottom: 1.5rem;
}

.post-title {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px var(--color-shadow);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--color-secondary);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* ==========================================================================
   CTA WHATSAPP
   ========================================================================== */

.whatsapp-cta {
  background: linear-gradient(135deg, #25D366 0%, #1da853 100%);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-cta-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: white;
}

.whatsapp-cta-text {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.whatsapp-cta-button {
  display: inline-block;
  background-color: white;
  color: #25D366;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.whatsapp-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   POSTS RELACIONADOS
   ========================================================================== */

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-bg-light);
}

.related-posts-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-post-card {
  background-color: var(--color-bg-light);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px var(--color-shadow);
}

.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.related-post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.related-post-content {
  padding: 1rem;
}

.related-post-title {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.related-post-title a {
  color: var(--color-primary);
}

.related-post-title a:hover {
  color: var(--color-secondary);
}

/* ==========================================================================
   ARCHIVE / BLOG LISTING
   ========================================================================== */

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.post-card {
  background-color: var(--color-bg-light);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px var(--color-shadow);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px var(--color-shadow);
}

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

.post-card-content {
  padding: 1.5rem;
}

.post-card-category {
  display: inline-block;
  background-color: var(--color-secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--color-primary);
}

.post-card-title a:hover {
  color: var(--color-secondary);
}

.post-card-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.post-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  display: flex;
  justify-content: space-between;
}

.read-more-link {
  color: var(--color-secondary);
  font-weight: 600;
  text-decoration: none;
}

.read-more-link:hover {
  text-decoration: underline;
}

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

.site-footer {
  background-color: var(--color-primary);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

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

.site-footer h3 {
  color: white;
  margin-bottom: 1rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: var(--color-secondary);
}

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

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

.sidebar {
  background-color: var(--color-bg-light);
  padding: 1.5rem;
  border-radius: 4px;
  margin-left: 2rem;
}

.sidebar-widget {
  margin-bottom: 2rem;
}

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

.sidebar-widget-title {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 0.5rem;
}

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

.sidebar-widget li {
  margin-bottom: 0.5rem;
}

.sidebar-widget a {
  color: var(--color-secondary);
}

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

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.search-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
}

.search-form button {
  padding: 10px 20px;
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

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

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--color-text);
}

.pagination a:hover,
.pagination .current {
  background-color: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary);
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-bg-light);
}

.comment-list {
  list-style: none;
}

.comment {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--color-bg-light);
  border-radius: 4px;
}

.comment-author {
  font-weight: 600;
  color: var(--color-primary);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-left: 0.5rem;
}

.comment-content {
  margin-top: 0.5rem;
  color: var(--color-text);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.comment-form {
  margin-top: 2rem;
}

.comment-form-field {
  margin-bottom: 1rem;
}

.comment-form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.comment-form-field input,
.comment-form-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

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

.comment-submit {
  background-color: var(--color-secondary);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.comment-submit:hover {
  background-color: #1ab8a8;
}

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   ACESSIBILIDADE
   ========================================================================== */

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVO
   ========================================================================== */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  
  .container {
    padding: 0 15px;
  }
  
  .main-navigation {
    gap: 1rem;
  }
  
  .hero-section {
    padding: 2rem 0;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .post-title {
    font-size: 1.8rem;
  }
  
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    margin-left: 0;
    margin-top: 2rem;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1rem; }
  
  .main-navigation {
    display: none;
  }
  
  .hero-section {
    padding: 1.5rem 0;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .post-content table {
    font-size: 0.85rem;
  }
  
  .post-content table th,
  .post-content table td {
    padding: 8px;
  }
}
