/* Blog page custom styles – Oficina Total */

.blog-hero {
  background: linear-gradient(87deg, var(--color-primary), var(--color-success) 100%);
  color: #fff;
  padding: var(--space-16) 0 var(--space-12) 0;
  text-align: center;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.blog-title {
  font-size: var(--font-size-2xl);
  letter-spacing: -1px;
}
.blog-subtitle {
  font-size: var(--font-size-lg);
  font-weight: 400;
  margin-bottom: var(--space-4);
  max-width: 40ch;
}
.blog-cta {
  font-size: var(--font-size-lg);
  background: #fff;
  color: var(--color-primary);
  border: 2px solid #fff;
}
.blog-cta:hover,
.blog-cta:focus-visible {
  background: var(--color-primary-hover);
  color: #fff;
}

/* Featured posts */
.featured-posts {
  margin: 32px 0;
  position: relative;
}
.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.featured-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}
.featured-img {
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  object-fit: cover;
  height: 180px;
}
.featured-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.read-more {
  font-weight: 700;
  text-decoration: underline;
  color: var(--color-primary);
  transition: color 0.15s;
}
.read-more:hover,
.read-more:focus-visible {
  color: var(--color-primary-hover);
}

/* Latest posts list */
.latest-grid {
  align-items: start;
}
.latest-posts {
  flex: 2 1 0;
  min-width: 0;
}
.post-list {
  margin: 0 0 var(--space-8) 0;
}
.post-card {
  display: flex;
  gap: var(--space-4);
  flex-direction: row;
  align-items: flex-start;
}
.post-img-link,
.post-img {
  border-radius: var(--radius-md);
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  object-fit: cover;
  background: var(--color-neutral-200);
  margin: 0 0 0 0;
}
@media (max-width: 600px) {
  .post-card {
    flex-direction: column;
    align-items: stretch;
  }
  .post-img-link, .post-img {
    width: 100%;
    height: 180px;
  }
}
.post-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.post-meta {
  font-size: var(--font-size-xs);
  color: var(--color-neutral-500);
  gap: var(--space-3);
  margin: 0 0 var(--space-2) 0;
}
.meta-author {
  color: var(--color-primary);
  text-decoration: none;
}
.meta-category a {
  color: var(--color-primary-hover);
}

/* Related posts */
.related-posts {
  margin: var(--space-8) 0 0 0;
}
.related-list li {
  margin-bottom: var(--space-1);
}
.related-list a {
  color: var(--color-neutral-600);
  text-decoration: underline dotted;
}
.related-list a:hover { color: var(--color-primary-hover); }

/* Sidebar */
.sidebar {
  flex: 1 1 300px;
  min-width: 220px;
  max-width: 340px;
  gap: var(--space-6);
  align-items: flex-start;
}
.sidebar-card {
  padding: var(--space-4);
  background: var(--color-neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.category-list a {
  color: var(--color-success);
  font-weight: 500;
}
.category-list a:hover { color: var(--color-primary); }

.author-list {
  margin: 0;
  padding: 0;
}
.author-bio {
  align-items: center;
}
.author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-xs);
  margin-right: var(--space-2);
}
.author-desc {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-neutral-500);
}
.author-link {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  text-decoration: underline;
  margin-top: var(--space-1);
}
.author-link:hover { color: var(--color-primary-hover); }

.archive-list a {
  color: var(--color-neutral-600);
  font-size: var(--font-size-sm);
}
.archive-list a:hover { color: var(--color-primary-hover); }

/* Engagement (comments/share/newsletter) */
.engagement-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: stretch;
  margin-top: 32px;
}
.comments-cta-grid {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.comment-form textarea {
  min-height: 80px;
  resize: vertical;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-base);
}
.comment-form button {
  align-self: flex-end;
}
.share-cta {
  align-items: center;
  gap: var(--space-1);
}
.icon-link img {
  width: 28px;
  height: 28px;
  filter: grayscale(15%) contrast(1.35);
  opacity: 0.9;
}
.icon-link img:hover {
  opacity: 1;
  filter: none;
}
.newsletter-cta {
  max-width: 340px;
  margin: 0 auto;
}
.subscribe-form {
  width: 100%;
}
.subscribe-form input[type="email"] {
  max-width: 180px;
  flex: 1 1 0;
}
.newsletter-info {
  font-size: var(--font-size-xs);
  color: var(--color-neutral-500);
  margin-top: var(--space-2);
}

/* Explore CTA section */
.explore-section {
  margin: var(--space-12) 0 var(--space-8) 0;
}
.explore-inner {
  padding: var(--space-8) 0;
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(104deg, var(--color-success) 20%, var(--color-primary) 75%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.explore-links {
  justify-content: center;
  margin-top: var(--space-4);
}
.button-alt {
  background: var(--color-success);
  color: #fff;
}
.button-alt:hover,
.button-alt:focus-visible {
  background: var(--color-primary-hover);
  color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .latest-grid {
    flex-direction: column;
    gap: var(--space-8);
  }
  .sidebar {
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .blog-hero {
    padding: var(--space-8) 0 var(--space-6) 0;
  }
  .featured-img {
    height: 120px;
  }
  .newsletter-cta {
    max-width: 100%;
  }
  .comments-cta-grid {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* Misc */
.accent-bg {
  background: linear-gradient(87deg, var(--color-primary), var(--color-success) 100%) !important;
  color: #fff !important;
}
.flex-column-mobile {
  flex-direction: row;
}
@media (max-width: 800px) {
  .flex-column-mobile {
    flex-direction: column !important;
    gap: var(--space-4) !important;
  }
}
