/* Blog Styles */

/* CSS Variables for Colors */
:root {
  --blog-primary-color: #c4d850;
  --blog-primary-hover: #7f9503;
  --blog-primary-dark: #788c02;
  --blog-text-dark: #2c3e50;
  --blog-text-muted: #6c757d;
  --blog-bg-light: #f8f9fa;
  --blog-border-light: #e9ecef;
}

/* Blog Header */
.blog-header {
  background: linear-gradient(13deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  margin-left: -5vw;
  margin-right: -8vw;
}

.blog-header h1 {
  font-size: 4rem;
  font-weight: 700;
  color: var(--blog-text-dark);
  margin-bottom: 1rem;
}

.blog-header p {
  font-size: 2.2rem;
  color: var(--blog-text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog Search */
.blog-search {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* Blog search now uses shared components from home.css */

/* Blog Content */
.blog-content {
  padding: 4rem 0;
  background: #fafafa;
}

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-main h2 {
  font-size: 3.5rem;
  color: var(--blog-text-dark);
  margin-bottom: 2rem;
  font-weight: 600;
}

/* Blog Posts Grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-post-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image img {
  transform: scale(1.05);
}

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

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--blog-text-muted);
}

.reading-time {
  color: var(--blog-primary-color);
  font-weight: 500;
}

.blog-post-content h3 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-post-content h3 a {
  color: var(--blog-text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-post-content h3 a:hover {
  color: var(--blog-primary-color);
}

.blog-post-excerpt {
  color: var(--blog-text-muted);
  font-size: 1.6rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-category-tag {
  background: var(--blog-bg-light);
  color: #495057;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 1.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.blog-category-tag:hover {
  background: var(--blog-primary-color);
  color: white;
}

.blog-read-more {
  color: var(--blog-primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.blog-read-more:hover {
  color: var(--blog-primary-hover);
}

.blog-read-more i {
  transition: transform 0.3s ease;
}

.blog-read-more:hover i {
  transform: translateX(3px);
}

/* Blog Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-widget {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-widget p {
  font-size: 1.6rem;
  line-height: 1.6;
}

.blog-widget h3 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--blog-primary-color);
  padding-bottom: 0.5rem;
}

.blog-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-categories-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--blog-border-light);
}

.blog-categories-list li:last-child {
  border-bottom: none;
}

.blog-categories-list a {
  color: #495057;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
  font-size: 1.6rem;
}

.blog-categories-list a:hover {
  color: var(--blog-primary-color);
}

.post-count {
  background: var(--blog-bg-light);
  color: var(--blog-text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-cta {
  background: linear-gradient(
    135deg,
    var(--blog-primary-color) 0%,
    var(--blog-primary-dark) 100%
  );
  color: white;
  padding: 1.5rem 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(196, 216, 80, 0.3);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 216, 80, 0.4);
}

/* Single Blog Post Styles */
.blog-post-single {
  background: white;
}

.blog-post-header {
  background: linear-gradient(
    135deg,
    var(--blog-bg-light) 0%,
    var(--blog-border-light) 100%
  );
  padding: 2rem 0 3rem;
}

.breadcrumb {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--blog-text-muted);
}

.breadcrumb a {
  color: #495057;
  text-decoration: none;
}

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

.breadcrumb span {
  margin: 0 0.5rem;
}

.blog-post-header .blog-post-meta {
  margin-bottom: 2rem;
  justify-content: flex-start;
}

.separator {
  color: var(--blog-border-light);
}

.blog-post-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--blog-text-dark);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.blog-post-lead {
  font-size: 1.5rem;
  color: var(--blog-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 800px;
}

.blog-post-featured-image {
  max-width: 1200px;
  margin: -1rem auto 3rem;
  padding: 0 1rem;
}

.blog-post-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.blog-post-content-wrapper {
  padding: 3rem 0;
}

.blog-post-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-post-content {
  font-size: 1.6rem;
  line-height: 1.9;
  color: #343a40;
}

.blog-post-content h2 {
  font-size: 2.9rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  margin: 2.5rem 0 1rem;
}

.blog-post-content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  margin: 2rem 0 1rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

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

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

/* Share Buttons */
.blog-share {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--blog-bg-light);
  border-radius: 12px;
}

.blog-share h4 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.share-btn.whatsapp {
  background: #25d366;
  color: white;
}

.share-btn.linkedin {
  background: #0077b5;
  color: white;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Blog CTA */
.blog-cta {
  background: linear-gradient(135deg, var(--blog-text-dark) 0%, #34495e 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  margin: 3rem 0;
}

.blog-cta h3 {
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.blog-cta p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Related Posts */
.related-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.related-post {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--blog-border-light);
}

.related-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-post-image {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}

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

.related-post-content h4 {
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.related-post-content h4 a {
  color: #495057;
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-post-content h4 a:hover {
  color: var(--blog-primary-color);
}

.related-post-content time {
  font-size: 1.25rem;
  color: var(--blog-text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-layout,
  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
  }

  .blog-header {
    padding: 2rem 0;
  }

  .blog-header h1 {
    font-size: 3.5rem;
  }

  .blog-header p {
    font-size: 2rem;
  }

  .blog-main h2 {
    font-size: 3rem;
  }

  .blog-post-content h3 {
    font-size: 2rem;
  }

  .blog-post-excerpt {
    font-size: 1.5rem;
  }

  .blog-post-meta {
    font-size: 1.3rem;
  }

  .blog-read-more {
    font-size: 1.3rem;
  }

  .blog-category-tag {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }

  .blog-widget h3 {
    font-size: 2rem;
  }

  .blog-widget p {
    font-size: 1.4rem;
  }

  .blog-categories-list a {
    font-size: 1.4rem;
  }

  .btn-cta {
    font-size: 1.3rem;
    padding: 1.3rem 2rem;
  }

  .blog-content {
    padding: 2rem 0;
  }

  .blog-post-content-wrapper {
    padding: 2rem 0;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    justify-content: center;
  }

  .blog-post-featured-image {
    margin: 0 auto 2rem;
  }

  /* Aumentar espaciado en móvil para mejor legibilidad */
  .blog-post-card {
    margin-bottom: 1.5rem;
  }

  .blog-post-content {
    padding: 2rem;
  }

  /* Mobile adjustments now handled by shared components in home.css */
}
