/* ========================================
   BLOG & ARTICLE STYLES - DP Estudio · Tienda Online
   ======================================== */

/* --- BLOG INDEX STYLES --- */

/* Blog Hero */
.blog-hero {
    padding: 160px 0 60px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Blog Content */
.blog-content {
    padding: 60px 0 100px;
    background: var(--bg-dark);
}

/* Featured Article */
.blog-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 60px;
    transition: all 0.3s ease;
}

.blog-featured:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.15);
    transform: translateY(-4px);
}

.featured-image {
    position: relative;
    min-height: 350px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-featured:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.featured-content h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content h2 a:hover {
    color: var(--primary);
}

.featured-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.article-meta .category {
    background: rgba(168, 85, 247, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.article-meta .date,
.article-meta .read-time {
    color: var(--text-muted);
}

.article-meta i {
    margin-right: 4px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.blog-card:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.12);
    transform: translateY(-6px);
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.08);
}

.card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(8px);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-content h3 a:hover {
    color: var(--primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-content .article-meta {
    font-size: 0.8rem;
    gap: 12px;
    margin-bottom: 8px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.pagination-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-current {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Newsletter */
.blog-newsletter {
    background: var(--gradient-primary);
    padding: 40px 50px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.blog-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.newsletter-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.newsletter-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.newsletter-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.newsletter-text p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.newsletter-form input {
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.95rem;
    width: 260px;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
}

.newsletter-form .btn {
    background: white;
    color: var(--primary);
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.newsletter-form .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* --- ARTICLE STYLES --- */

/* Article Header */
.article-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at right center, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--primary);
}

/* Article Meta Header */
.article-meta-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.article-meta-header .category {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-meta-header .date,
.article-meta-header .read-time {
    color: var(--text-secondary);
}

.article-meta-header i {
    margin-right: 5px;
}

/* Article Title */
.article-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 20px;
    max-width: 900px;
}

/* Article Excerpt */
.article-excerpt {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 750px;
    margin-bottom: 30px;
}

/* Author Card */
.author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-width: 600px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Article Content */
.article-content {
    padding: 60px 0 80px;
    background: var(--bg-dark);
}

.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    align-items: start;
}

/* Featured Image (Article) */
/* Note: 'featured-image' class is also used in blog card, but article specific styles might conflict if not scoped or if identical. 
   In blog card: min-height 350px.
   In article: height 400px fixed.
   Let's check usage.
   In article.css:
   .featured-image { width: 100%; height: 400px; ... margin-bottom: 40px; }
   
   In blog.css:
   .featured-image { position: relative; min-height: 350px; ... }

   We should be careful. 
   The article page uses <div class="featured-image"><img...></div> inside .article-main.
   The blog index uses <div class="featured-image"> inside .blog-featured.
   
   I will adapt the article's scoped selector to be more specific if possible or just let them cascade. 
   Actually, the article one sets a specific height. 
   Let's make the article one specific to .article-wrapper .featured-image or .article-main .featured-image
*/
.article-main .featured-image {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    min-height: auto;
    /* Reset min-height from blog card if needed */
}

.article-main .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Body */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body .intro {
    font-size: 1.2rem;
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin-bottom: 30px;
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 50px 0 20px;
    padding-top: 20px;
}

.article-body h2:first-of-type {
    margin-top: 30px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 12px;
}

.article-body strong {
    color: var(--text-primary);
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 40px;
}

.table-of-contents h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-of-contents h4 i {
    color: var(--primary);
}

.table-of-contents ol {
    padding-left: 20px;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary);
}

/* Info Box */
.info-box {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
}

.info-box h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    margin: 0;
    color: var(--text-primary);
}

/* Warning Box */
.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
}

.warning-box h4 {
    color: #f59e0b;
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box p {
    margin: 0;
    color: var(--text-primary);
}

/* Comparison Table */
.comparison-table {
    margin: 30px 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: rgba(168, 85, 247, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table tr.highlight {
    background: rgba(168, 85, 247, 0.08);
}

.comparison-table tr.highlight td {
    color: var(--primary);
}

/* Card Grid (inside article) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.mini-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.mini-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
    font-size: 1.3rem;
}

.mini-card h5 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.mini-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* Numbered List */
.numbered-list {
    counter-reset: item;
    list-style: none;
    padding: 0;
}

.numbered-list>li {
    counter-increment: item;
    padding-left: 50px;
    position: relative;
    margin-bottom: 30px;
}

.numbered-list>li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

.numbered-list strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.numbered-list p {
    margin: 0;
}

/* CTA Box */
.cta-box {
    background: var(--gradient-primary);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin: 50px 0;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 24px;
    position: relative;
}

.cta-box .btn {
    background: white;
    color: var(--primary);
    position: relative;
}

.cta-box .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Article Footer */
.article-footer {
    padding-top: 40px;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
}

.tag-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.share-buttons-large {
    display: flex;
    gap: 10px;
}

.share-btn-lg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn-lg.whatsapp {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.share-btn-lg.whatsapp:hover {
    background: #25d366;
    color: white;
}

.share-btn-lg.facebook {
    background: rgba(66, 103, 178, 0.15);
    color: #4267b2;
}

.share-btn-lg.facebook:hover {
    background: #4267b2;
    color: white;
}

.share-btn-lg.twitter {
    background: rgba(29, 161, 242, 0.15);
    color: #1da1f2;
}

.share-btn-lg.twitter:hover {
    background: #1da1f2;
    color: white;
}

/* Sidebar */
.article-sidebar {
    position: relative;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
}

.sidebar-card.sticky {
    position: sticky;
    top: 100px;
}

.sidebar-card h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.related-articles {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.related-articles li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.related-articles li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-articles a {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.related-articles a:hover {
    transform: translateX(4px);
}

.related-title {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-cta {
    background: rgba(168, 85, 247, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.sidebar-cta h5 {
    color: var(--text-primary);
    margin-bottom: 6px;
}

.sidebar-cta p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* More Articles Section */
.more-articles {
    background: var(--bg-darker);
    padding: 60px 0 80px;
}

.more-articles h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.more-articles .blog-grid {
    margin-bottom: 0;
}

/* Responsive (Consolidated) */
@media (max-width: 1024px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 280px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-newsletter {
        flex-direction: column;
        text-align: center;
        padding: 35px 30px;
    }

    .newsletter-content {
        flex-direction: column;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
        max-width: 360px;
    }

    .newsletter-form input {
        width: 100%;
    }

    .article-wrapper {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 140px 0 50px;
    }

    .blog-content {
        padding: 40px 0 80px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .featured-content {
        padding: 28px;
    }

    .featured-content h2 {
        font-size: 1.4rem;
    }

    .card-image {
        height: 200px;
    }

    .article-meta {
        gap: 10px;
    }

    .article-header {
        padding: 120px 0 50px;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-excerpt {
        font-size: 1.1rem;
    }

    .author-card {
        flex-wrap: wrap;
    }

    .share-buttons {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }

    /* Article featured image specific override if needed */
    .article-main .featured-image {
        height: 250px;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.4rem;
    }

    .cta-box {
        padding: 30px 24px;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons-large {
        flex-wrap: wrap;
    }

    .more-articles .blog-grid {
        grid-template-columns: 1fr;
    }
}