/* ===========================
   BLOG STYLES - Padrão Alfabrill
   =========================== */

:root {
  --navy: #0b1e35;
  --teal: #004d40;
  --tealdark: #0b6f63;
  --gold: #c4a962;
  --brown: #6b4f4f;
  --white: #fff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border-color: rgba(196, 169, 98, 0.2);
  --shadow: 0 4px 24px rgba(11, 30, 53, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   HERO SECTION
   =========================== */

.blog-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, rgba(11, 30, 53, 0.95) 100%);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
}

.blog-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #c4a962;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.blog-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(196, 169, 98, 0.3));
}

.blog-hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* ===========================
   FILTERS - Fundo claro
   =========================== */

.filters {
  padding: 1.5rem 0;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.filter-group label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.filter-select {
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid #e2e8f0;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.filter-select:hover {
  border-color: var(--gold);
}

.filter-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.1);
}

.btn-filter {
  padding: 0.6rem 1.5rem;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-filter:hover {
  background: var(--tealdark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 77, 64, 0.25);
}

.search-input {
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid #e2e8f0;
  color: var(--text);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 169, 98, 0.1);
}

/* ===========================
   MAIN CONTENT - Fundo branco
   =========================== */

.main {
  padding: 3rem 0;
  background: var(--white);
  flex: 1;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Post Card - Estilo cartão com sombra suave */
.post-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow);
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(11, 30, 53, 0.12);
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--teal), var(--tealdark));
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 77, 64, 0.1);
  color: var(--teal);
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--navy);
  line-height: 1.4;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.6;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-read-more {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-read-more:hover {
  color: var(--brown);
  transform: translateX(4px);
}

/* ===========================
   LOADING STATE
   =========================== */

.loading {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid #e2e8f0;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===========================
   EMPTY STATE
   =========================== */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid #e2e8f0;
}

.btn-pagination {
  padding: 0.65rem 1.5rem;
  background: var(--white);
  border: 1px solid #e2e8f0;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.3s ease;
}

.btn-pagination:hover:not(:disabled) {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: var(--text-muted);
  font-weight: 600;
}

/* ===========================
   NEWSLETTER CTA - Estilo site principal
   =========================== */

.newsletter-cta {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--navy) 0%, rgba(11, 30, 53, 0.95) 100%);
  color: var(--white);
  margin: 0;
}

.newsletter-cta h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.newsletter-cta p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.newsletter-cta input[type="email"] {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

.newsletter-cta input[type="email"]::placeholder {
  color: var(--text-muted);
}

.newsletter-cta input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}

.btn-primary {
  padding: 0.85rem 2rem;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--tealdark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 77, 64, 0.3);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
  .blog-hero {
    padding: 3rem 0 2rem;
  }

  .blog-hero-title {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .blog-logo {
    width: 50px;
    height: 50px;
  }

  .blog-hero-subtitle {
    font-size: 1rem;
  }

  .filters .container {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  .search-input {
    max-width: 100%;
  }

  .btn-filter {
    width: 100%;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .btn-pagination {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .newsletter-cta {
    padding: 3rem 0;
  }

  .newsletter-cta h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 2rem 0 1.5rem;
  }

  .filters {
    padding: 1rem 0;
  }

  .main {
    padding: 2rem 0;
  }

  .post-content {
    padding: 1rem;
  }

  .newsletter-cta {
    padding: 2rem 0;
  }
}
