/* ==========================================================================
   BLOG STYLES - Complementa los estilos base inline
   ========================================================================== */

/* Blog Main */
.blog-main {
    min-height: calc(100vh - 200px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.blog-hero .lead {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.blog-breadcrumb {
    background: var(--light-gray);
    padding: 15px 20px;
}

.blog-breadcrumb .container {
    max-width: 1140px;
    margin: 0 auto;
}

.blog-breadcrumb .breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.95rem;
}

.blog-breadcrumb .breadcrumb li {
    display: flex;
    align-items: center;
}

.blog-breadcrumb .breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 8px;
    color: var(--gray-text);
}

.blog-breadcrumb .breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.blog-breadcrumb .breadcrumb a:hover {
    text-decoration: underline;
}

.blog-breadcrumb .breadcrumb .active {
    color: var(--gray-text);
}

/* ==========================================================================
   READING PROGRESS BAR
   ========================================================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */
.blog-article {
    padding: 60px 0;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-layout {
    max-width: 900px;
    margin: 0 auto;
}

.blog-sidebar {
    display: none !important;
}

/* Article Header */
.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.article-category-badge:hover {
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
}

.article-category-badge i {
    margin-right: 8px;
}

.article-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.25;
    margin-bottom: 25px;
}

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 1rem;
    color: var(--gray-text);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--primary-color);
}

.meta-divider {
    width: 4px;
    height: 4px;
    background: var(--gray-text);
    border-radius: 50%;
    opacity: 0.5;
}

/* Featured Image */
.article-featured-image {
    margin: 0 0 40px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Excerpt */
.article-excerpt {
    font-size: 1.25rem;
    color: var(--gray-text);
    line-height: 1.8;
    padding: 25px 30px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    font-weight: 500;
}

/* Article Content */
.article-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 50px 0 25px;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 40px 0 20px;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 30px 0 15px;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.article-content ul,
.article-content ol {
    margin: 25px 0;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.article-content ul li::marker {
    color: var(--primary-color);
}

.article-content strong {
    font-weight: 700;
    color: var(--text-color);
}

/* Blockquote - Green gradient */
.article-content blockquote {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.article-content blockquote p {
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

/* Tables */
.article-content table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-content th {
    background: var(--primary-dark);
    color: var(--white);
    padding: 15px 20px;
    text-align: left;
    font-weight: 700;
}

.article-content td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.article-content tr:nth-child(even) {
    background: var(--light-gray);
}

/* Code */
.article-content code {
    background: var(--light-gray);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    color: var(--primary-dark);
}

.article-content pre {
    background: var(--dark-bg);
    color: #f8f8f2;
    padding: 25px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 30px 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.article-faq {
    margin: 50px 0;
    padding: 40px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.faq-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-title i {
    color: var(--secondary-color);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 20px 25px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--light-gray);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 400;
    transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px 20px;
    color: var(--gray-text);
    line-height: 1.7;
}

/* ==========================================================================
   TAGS
   ========================================================================== */
.article-tags {
    margin: 40px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-label {
    font-weight: 600;
    color: var(--text-color);
}

.tags-label i {
    color: var(--primary-color);
    margin-right: 8px;
}

.tag-link {
    background: var(--light-gray);
    color: var(--gray-text);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

/* ==========================================================================
   SHARE BUTTONS
   ========================================================================== */
.article-share {
    margin: 40px 0;
    padding: 30px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    text-align: center;
}

.share-label {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-3px);
    color: var(--white);
    text-decoration: none;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #000; }
.share-linkedin { background: #0077b5; }
.share-whatsapp { background: #25d366; }

/* ==========================================================================
   CTA BOX - Orange gradient like landing pages
   ========================================================================== */
.article-cta-box {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 50px 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cta-content h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.cta-content p {
    opacity: 0.9;
    margin: 0;
    font-size: 1rem;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 30px;
    background: var(--white);
    color: var(--secondary-dark);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: var(--secondary-dark);
    text-decoration: none;
}

/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */
.related-articles {
    margin: 60px 0 0;
    padding-top: 50px;
    border-top: 2px solid var(--light-gray);
}

.related-articles h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

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

.related-content {
    padding: 20px;
}

.related-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.related-content h4 a {
    color: var(--text-color);
    text-decoration: none;
}

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

.related-date {
    font-size: 0.9rem;
    color: var(--gray-text);
}

.related-date i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* ==========================================================================
   BLOG INDEX PAGE
   ========================================================================== */
.blog-content-section {
    padding: 60px 20px;
    background: var(--light-gray);
}

.blog-content-section .container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Article Cards */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.article-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

.article-card-no-image {
    height: 220px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.3);
}

.card-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px;
    line-height: 1.4;
}

.article-card-title a {
    color: inherit;
    text-decoration: none;
}

.article-card-title a:hover {
    color: var(--primary-color);
}

.article-card-meta {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.article-card-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.article-card-excerpt {
    color: var(--gray-text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-card-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s;
}

.article-card-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* Featured card */
.article-card-featured {
    grid-column: span 2;
}

.article-card-featured .article-card-image {
    height: 300px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.blog-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.blog-pagination .pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination .pagination li a,
.blog-pagination .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.blog-pagination .pagination li a {
    background: var(--white);
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.blog-pagination .pagination li a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.blog-pagination .pagination li.active span {
    background: var(--primary-color);
    color: var(--white);
}

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.category-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.category-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* ==========================================================================
   SEARCH
   ========================================================================== */
.blog-search {
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-form button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   NO RESULTS
   ========================================================================== */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray-text);
    opacity: 0.3;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--gray-text);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .article-cta-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-icon {
        margin: 0 auto;
    }

    .article-card-featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-content h2 {
        font-size: 1.6rem;
    }

    .article-content h3 {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .meta-divider {
        display: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-share {
        padding: 20px;
    }

    .share-buttons {
        gap: 10px;
    }

    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 50px 15px;
    }

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .article-container {
        padding: 0 15px;
    }

    .article-title {
        font-size: 1.7rem;
    }

    .article-content {
        font-size: 1.05rem;
    }

    .article-excerpt {
        padding: 20px;
        font-size: 1.1rem;
    }

    .article-cta-box {
        padding: 30px 20px;
    }

    .cta-content h3 {
        font-size: 1.3rem;
    }

    .btn-cta-primary {
        padding: 14px 25px;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
    .site-header,
    .whatsapp-button-styled,
    .article-share,
    .article-cta-box,
    .related-articles,
    .footer,
    .reading-progress {
        display: none !important;
    }

    .article-content {
        font-size: 12pt;
    }

    .article-title {
        font-size: 24pt;
    }
}
