/*
Theme Name: Pipelore Blog
Theme URI: https://pipelore.com
Author: Pipelore
Author URI: https://pipelore.com
Description: Tema profissional para o blog da Pipelore - Software de gestão de manutenção predial. Design moderno, responsivo e otimizado para SEO.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pipelore-blog
Tags: blog, custom-colors, custom-logo, featured-images, responsive-layout, translation-ready

Pipelore Blog Theme - Copyright 2024 Pipelore
*/

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

:root {
  /* Pipelore Brand Colors */
  --background: #f5f5f5;
  --foreground: #4e4968;
  --card: #ffffff;
  --card-foreground: #4e4968;
  --primary: #4e4968;
  --primary-foreground: #ffffff;
  --secondary: #f5f5f5;
  --secondary-foreground: #4e4968;
  --muted: #f0eff4;
  --muted-foreground: #655e8a;
  --accent: #f37441;
  --accent-foreground: #ffffff;
  --lavender: #a197d3;
  --lavender-foreground: #4e4968;
  --orange-light: #f68b5f;
  --border: #e5e4e8;
  --ring: #f37441;
  --radius: 0.75rem;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #4e4968 0%, #655e8a 100%);
  --gradient-accent: linear-gradient(135deg, #f37441 0%, #f68b5f 100%);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(78, 73, 104, 0.08), 0 4px 12px rgba(78, 73, 104, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(78, 73, 104, 0.12), 0 8px 24px rgba(78, 73, 104, 0.08);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--orange-light);
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== HEADER ===== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.invert-image {
  filter: brightness(0) invert(1);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.site-logo svg {
  width: 2rem;
  height: 2rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.site-title span {
  color: var(--accent);
}

/* Search Form */
.search-form {
  flex: 1;
  max-width: 400px;
  display: none;
}

@media (min-width: 768px) {
  .search-form {
    display: block;
  }
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  background: var(--background);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 116, 65, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  width: 1rem;
  height: 1rem;
}

/* CTA Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-cta {
  background: var(--gradient-accent);
  color: var(--accent-foreground);
  box-shadow: 0 2px 8px rgba(243, 116, 65, 0.3);
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 116, 65, 0.4);
  color: var(--accent-foreground);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--muted);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-newsletter {
  background: var(--accent-foreground);
  color: var(--primary);
}

.btn-newsletter:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: var(--gradient-hero);
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  color: var(--primary-foreground);
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== CATEGORY FILTER ===== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 0;
}

.category-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.category-btn.active {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(243, 116, 65, 0.2);
}

/* ===== ARTICLE CARDS ===== */
.articles-grid {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.article-card a {
  text-decoration: none;
  color: inherit;
}

.article-thumbnail {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(78, 73, 104, 0.2), rgba(161, 151, 211, 0.3));
  position: relative;
  overflow: hidden;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  padding: 1.25rem;
}

.article-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--lavender);
  color: var(--lavender-foreground);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.article-meta-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.meta-item svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Featured Article */
.featured-article {
  grid-column: 1 / -1;
}

.featured-article .article-card {
  display: grid;
}

@media (min-width: 768px) {
  .featured-article .article-card {
    grid-template-columns: 1fr 1fr;
  }

  .featured-article .article-thumbnail {
    aspect-ratio: auto;
    height: 100%;
  }

  .featured-article .article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }

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

/* ===== SINGLE ARTICLE ===== */
.article-header {
  padding: 3rem 0 2rem;
}

.article-header .article-category {
  background: var(--accent);
  color: var(--accent-foreground);
}

.article-header .article-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .article-header .article-title {
    font-size: 2.5rem;
  }
}

.article-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.author-role {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.article-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted-foreground);
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tag {
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.share-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-right: 0.5rem;
}

.share-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: var(--muted);
}

.share-btn.whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: #25D366;
  color: #25D366;
}

.share-btn.linkedin:hover {
  background: rgba(10, 102, 194, 0.1);
  border-color: #0A66C2;
  color: #0A66C2;
}

.share-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Like Button */
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.like-button:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.like-button.liked {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.like-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== COMMENTS ===== */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.comments-title svg {
  color: var(--accent);
}

.comment-form {
  background: var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  resize: none;
  min-height: 100px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-count {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(161, 151, 211, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lavender);
}

.comment-author {
  font-weight: 600;
  font-size: 0.875rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.comment-content {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.no-comments {
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
  background: var(--gradient-hero);
  padding: 4rem 0;
  text-align: center;
}

.newsletter-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-foreground);
}

.newsletter-title {
  color: var(--primary-foreground);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .newsletter-title {
    font-size: 1.875rem;
  }
}

.newsletter-text {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-foreground);
  font-size: 0.875rem;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--primary-foreground);
}

/* ===== RELATED ARTICLES ===== */
.related-articles {
  padding: 3rem 0;
  background: var(--muted);
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary-foreground);
  text-decoration: none;
}

.footer-logo svg {
  width: 2rem;
  height: 2rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-heart {
  color: var(--accent);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.pagination a,
.pagination span {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--muted);
}

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-foreground);
}

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

.widget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-0 {
  margin-top: 0;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ===== WORDPRESS SPECIFIC ===== */
.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}