/* ====================================
   ARTICULOS.CSS - Estilos para Blog
   ==================================== */

/* ================================
   ARTICLE PAGE LAYOUT
   ================================ */

.article-page {
  background: #fff;
  padding: 3rem 0;
  min-height: 80vh;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

.article-breadcrumb span {
  color: var(--border);
}

/* ================================
   ARTICLE HEADER
   ================================ */
/*
.article-header {
  margin-bottom: 3rem;
  border-bottom: 2px solid var(--light);
  padding-bottom: 2rem;
}
*/

.article-header h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 700;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--muted);
  padding-bottom: 0;
  border-bottom: 1px solid var(--light);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ================================
   ARTICLE IMAGE COMPONENTS
   ================================ */

.article-main-image,
.article-featured-image,
.article-image-responsive {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-height: 360px;
}



.article-main-image img,
.article-featured-image,
.article-image-responsive {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
}

.article-main-image,
.article-image-responsive {
  margin-bottom: 0;
}

.article-main-image figcaption {
  padding: 1rem;
  background: var(--light);
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* ================================
   ARTICLE BODY CONTENT
   ================================ */

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 700;
}

.article-body h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  font-weight: 600;
}

.article-body ul,
.article-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

/* ================================
   ARTICLE AUTHOR
   ================================ */

.article-author {
  background: var(--light);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  margin: 0;
}

.author-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.author-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ================================
   ARTICLE ACTIONS & SHARING
   ================================ */

.article-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 2px solid var(--light);
  border-bottom: 2px solid var(--light);
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-btn {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.back-button {
  padding: 0.75rem 1.25rem;
  background: var(--light);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.back-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ================================
   RELATED ARTICLES
   ================================ */

.related-articles {
  margin: 3rem 0;
}

.related-articles h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.related-card {
  display: block;
  padding: 1.5rem;
  background: var(--light);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--success);
}

.related-card .tag {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.related-card h4 {
  margin: 0.5rem 0;
  color: var(--text);
  font-size: 1.1rem;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ================================
   COMMENTS SECTION
   ================================ */

.comments-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 3px solid var(--light);
}

.comments-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.comments-header {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.comments-stats p {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text);
}

.rating-selector {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rating-btn {
  padding: 0.6rem 1rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.rating-btn:hover,
.rating-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* ================================
   COMMENT FORM
   ================================ */

.comment-form {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 2px solid var(--border);
}

.comment-form h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form select:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.comment-form textarea {
  min-height: 120px;
}

.submit-btn {
  padding: 0.85rem 1.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================
   COMMENTS LIST
   ================================ */

.comments-list {
  margin-bottom: 2rem;
}

.comment-card {
  background: white;
  padding: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.comment-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-header strong {
  font-size: 1rem;
  color: var(--text);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.comment-rating {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.comment-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.75rem 0;
}

.comment-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.comment-actions button {
  background: white;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.2s;
}

.comment-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--light);
}

/* ================================
   CTA SECTION
   ================================ */

.blog-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
}

.blog-cta h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.blog-cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}
/*
.btn-buy {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.85rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid white;
}

.btn-buy:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}*/

/* ================================
   BLOG HOME - FEATURED & GRID
   ================================ */
.articles-container {
  display: grid;
  gap: 2rem;
}

/* Featured Article (First) */
.article-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  align-items: center;
  margin-bottom: 3rem;
}
.article-featured img{margin-left:1rem;}

.article-featured-content {
  padding: 1.4rem 1.8rem;
}

.article-featured-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.article-featured-excerpt {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.article-featured-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.article-featured-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.read-more-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid var(--primary);
}

.read-more-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Articles Grid (2 columns) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 14px;
}

.article-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-content h3 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.article-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.article-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.article-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.75rem;
  transition: all 0.2s;
}

.read-more-link:hover {
  color: var(--primary-dark);
  margin-left: 0.25rem;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 2rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-featured {
    grid-template-columns: 1fr;
  }

  .article-featured-image {
    min-height: 250px;
  }

  .article-featured-content {
    padding: 1.5rem;
  }

  .article-featured-content h2 {
    font-size: 1.4rem;
  }

  .article-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .share-buttons {
    width: 100%;
    justify-content: center;
  }

  .share-btn {
    flex: 1;
    min-width: 150px;
  }

  .back-button {
    width: 100%;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .rating-selector {
    flex-direction: column;
  }

  .rating-btn {
    width: 100%;
  }

  .comment-form input,
  .comment-form select,
  .comment-form textarea {
    font-size: 16px; /* Previene zoom en iOS */
  }

  .article-meta {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .blog-hero h1 {
    font-size: 1.75rem;
  }

  .section-intro {
    font-size: 1rem;
  }

  .articles-container {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .article-featured-content {
    padding: 1rem;
  }

  .article-featured-content h2 {
    font-size: 1.2rem;
  }

  .comment-form {
    padding: 1rem;
  }

  .article-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .share-btn,
  .back-button {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
  }

  .comment-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .blog-cta h2 {
    font-size: 1.5rem;
  }

  .blog-cta p {
    font-size: 0.95rem;
  }
}

/* ================================
   BLOG HOME — INLINE STYLES EXTRAÍDOS
   ================================ */

/* Fondo y padding del <main> de la página blog */
.blog-main {
  background: #f8fafc;
  padding: 0;
}

/* Separación superior del grid de artículos */
.articles-grid {
  margin-top: 3rem;
}

/* Wrapper de tags en el artículo destacado */
.article-featured-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* Links dentro de los títulos de las cards — sin decoración ni color extra */
.article-featured-content h2 a,
.article-card-content h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-featured-content h2 a:hover,
.article-card-content h3 a:hover {
  color: var(--primary);
}

/* Container dentro de blog-cta sin padding lateral extra */
.blog-cta .container {
  padding: 0;
}
