/* 
 * Premium Blog Styling
 * Modern, responsive, and elegant design for blog content
 */

/* Typography */
.blog-container {
  --blog-heading-color: #1a1a2e;
  --blog-text-color: #333344;
  --blog-accent-color: #0d6efd;
  --blog-secondary-color: #4a4a8a;
  --blog-light-bg: #f8f9fc;
  --blog-border-color: #e9ecef;
  --blog-card-shadow: 0 10px 30px rgba(0,0,0,0.08);
  --blog-img-shadow: 0 15px 35px rgba(0,0,0,0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--blog-text-color);
  line-height: 1.7;
  font-size: 1.05rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.blog-header::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--blog-accent-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.blog-title {
  font-weight: 700;
  color: var(--blog-heading-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.blog-description {
  color: var(--blog-secondary-color);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Post Grid Layout */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-gap: 2.5rem;
  margin-bottom: 3rem;
}

/* Post Cards */
.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--blog-card-shadow);
  border: 1px solid var(--blog-border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.blog-card-img-container {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
  background-color: var(--blog-light-bg);
}

.blog-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.blog-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  color: var(--blog-heading-color);
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.blog-card-excerpt {
  color: var(--blog-text-color);
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.blog-card-meta {
  font-size: 0.9rem;
  color: var(--blog-secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.blog-card-date {
  display: flex;
  align-items: center;
}

.blog-card-date i {
  margin-right: 0.5rem;
}

.blog-read-more {
  color: var(--blog-accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.blog-read-more:hover {
  text-decoration: none;
  opacity: 0.85;
}

.blog-read-more i {
  transition: transform 0.2s ease;
  margin-left: 0.25rem;
}

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

/* Single Post Styles */
.blog-post {
  background: white;
  border-radius: 12px;
  box-shadow: var(--blog-card-shadow);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.blog-post-header {
  margin-bottom: 2rem;
  position: relative;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blog-heading-color);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  color: var(--blog-secondary-color);
  font-size: 1rem;
}

.blog-post-date {
  margin-right: 1.5rem;
  display: flex;
  align-items: center;
}

.blog-post-date i {
  margin-right: 0.5rem;
}

.blog-post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.blog-post-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--blog-heading-color);
}

.blog-post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.75rem 0 1rem;
  color: var(--blog-heading-color);
}

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

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

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

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

.blog-post-content a {
  color: var(--blog-accent-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.blog-post-content a:hover {
  border-bottom-color: var(--blog-accent-color);
}

.blog-post-content blockquote {
  border-left: 4px solid var(--blog-accent-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  background-color: var(--blog-light-bg);
  border-radius: 0 8px 8px 0;
}

.blog-post-content blockquote p:last-child {
  margin-bottom: 0;
}

.blog-post-content code {
  background-color: var(--blog-light-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.blog-back-button {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--blog-accent-color);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.blog-back-button i {
  margin-right: 0.5rem;
}

.blog-back-button:hover {
  opacity: 0.85;
  text-decoration: none;
  transform: translateX(-3px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .blog-post {
    padding: 2rem;
  }
  
  .blog-post-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .blog-container {
    padding: 1.5rem 1rem;
  }
  
  .blog-title {
    font-size: 2rem;
  }
  
  .blog-grid {
    grid-gap: 1.5rem;
  }
  
  .blog-post {
    padding: 1.5rem;
  }
  
  .blog-post-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .blog-card-img-container {
    padding-top: 56%;
  }
  
  .blog-title {
    font-size: 1.8rem;
  }
  
  .blog-post-title {
    font-size: 1.5rem;
  }
  
  .blog-post-content {
    font-size: 1rem;
  }
}

/* Empty State */
.blog-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--blog-light-bg);
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-empty-state-icon {
  font-size: 3rem;
  color: var(--blog-secondary-color);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.blog-empty-state-text {
  font-size: 1.2rem;
  color: var(--blog-secondary-color);
  margin-bottom: 1.5rem;
}

/* Featured Post */
.blog-featured-post {
  margin-bottom: 3rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--blog-card-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.blog-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.blog-featured-label {
  display: inline-block;
  background: var(--blog-accent-color);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
  margin-bottom: 1rem;
}

.blog-featured-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-featured-title a {
  color: var(--blog-heading-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-featured-title a:hover {
  color: var(--blog-accent-color);
}

.blog-featured-excerpt {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

@media (max-width: 992px) {
  .blog-featured-post {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .blog-featured-img-container {
    height: 300px;
    overflow: hidden;
  }
  
  .blog-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.blog-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0 0.25rem;
  padding: 0 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  color: var(--blog-text-color);
  background-color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  text-decoration: none;
}

.blog-pagination-link:hover {
  background-color: var(--blog-light-bg);
  text-decoration: none;
}

.blog-pagination-link.active {
  background-color: var(--blog-accent-color);
  color: white;
}

.blog-pagination-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* WhatsApp CTA */
.blog-cta-section {
  margin-top: 3rem;
}

.blog-whatsapp-cta {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 12px;
  padding: 2.5rem;
  margin-top: 3rem;
  box-shadow: var(--blog-card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-whatsapp-cta::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.07)' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.8;
}

.blog-cta-content {
  position: relative;
  z-index: 1;
}

.blog-cta-icon {
  font-size: 3.5rem;
  color: white;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: pulse 2s infinite;
}

.blog-cta-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.blog-cta-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.blog-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #075E54;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.blog-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #075E54;
}

.blog-cta-button i {
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .blog-whatsapp-cta {
    padding: 2rem 1.5rem;
  }
  
  .blog-cta-title {
    font-size: 1.5rem;
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Newsletter Section */
.blog-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--blog-heading-color);
  position: relative;
  padding-bottom: 0.75rem;
}

.blog-section-title::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 3px;
  background: var(--blog-accent-color);
  bottom: 0;
  left: 0;
  border-radius: 2px;
}

.blog-newsletter {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: var(--blog-card-shadow);
  text-align: center;
}

.blog-newsletter p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.blog-newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.blog-related-section {
  margin-top: 3rem;
}

.blog-post-share {
  display: flex;
  align-items: center;
}

.blog-post-share a {
  margin-left: 1rem;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.blog-post-share a:hover {
  color: var(--blog-accent-color) !important;
}

/* Table of Contents */
.blog-toc {
  position: sticky;
  top: 2rem;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--blog-card-shadow);
  margin-bottom: 2rem;
}

.blog-toc-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--blog-border-color);
}

.blog-toc-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

.blog-toc-list li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
}

.blog-toc-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blog-accent-color);
}

.blog-toc-list a {
  color: var(--blog-text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-toc-list a:hover {
  color: var(--blog-accent-color);
}

/* Code Block Styling */
.blog-post-content pre {
  background-color: #f8f9fc;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.blog-post-content pre code {
  background-color: transparent;
  padding: 0;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  color: #333;
  display: block;
}

/* Table Styling */
.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blog-post-content th, 
.blog-post-content td {
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.blog-post-content th {
  background-color: #f8f9fc;
  font-weight: 600;
  text-align: left;
}

.blog-post-content tbody tr:nth-child(even) {
  background-color: #fcfcfd;
}

.blog-post-content tbody tr:hover {
  background-color: #f8f9fc;
}

/* Print Styles */
@media print {
  .blog-container {
    max-width: 100%;
    padding: 0;
  }
  
  .blog-post {
    box-shadow: none;
    padding: 0;
  }
  
  .blog-reading-progress,
  .blog-related-section,
  .blog-back-button,
  .blog-post-share,
  .blog-cta-section {
    display: none !important;
  }
} 