@media print {
    /* Hide non-essential elements */
    .navbar,
    .footer,
    .share-buttons,
    .btn-outline-secondary,
    #scrollToTop,
    .related-articles,
    .article-card,
    .no-print {
        display: none !important;
    }

    /* Reset body padding */
    body {
        padding: 0 !important;
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    /* Optimize content for print */
    .article-container {
        margin: 0;
        padding: 0;
        width: 100% !important;
    }

    .article-header h1 {
        font-size: 24pt;
        margin-bottom: 1cm;
    }

    .article-meta {
        font-size: 10pt;
        color: #666 !important;
        margin-bottom: 1cm;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.5;
        color: black !important;
    }

    /* Image handling */
    .featured-image-container {
        max-height: none;
        margin-bottom: 1cm;
    }

    .featured-image-container img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }

    /* Optimize headings and text */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    p, blockquote, ul, ol {
        orphans: 3;
        widows: 3;
    }

    /* Add page information */
    @page {
        margin: 2cm;
    }

    /* Show URLs for links */
    .article-content a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }

    /* Ensure proper page breaks */
    .article-content img,
    .article-content blockquote {
        page-break-inside: avoid;
    }

    /* Add source information at the end */
    .article-content:after {
        content: "\A\A Fuente: En Terapia Contigo (enterapiacontigo.com)";
        white-space: pre;
        font-size: 10pt;
        color: #666;
        margin-top: 2cm;
    }

    /* Remove shadows and effects */
    .card,
    .featured-image-container,
    img {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Ensure dark text on light background */
    * {
        color: black !important;
        background: transparent !important;
    }
}

.article-container {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.8;
}

.article-header h1 {
    font-family: 'Playfair Display', serif;
    color: #333;
}

.article-content {
    font-size: 1.1rem;
    color: #2c3e50;
}

.article-content h2,
.article-content h3 {
    font-family: 'Playfair Display', serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid #60a6bf;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

.article-meta {
    font-size: 0.9rem;
}

.featured-image-container {
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
}

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

.btn-outline-secondary {
    border-color: #dee2e6;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #333;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.article-card {
    cursor: pointer;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    opacity: 0.7;
}

.article-card[data-category="anxiety"]::before {
    background: #FFB74D;
}

.article-card[data-category="depression"]::before {
    background: #7986CB;
}

.article-card[data-category="therapy"]::before {
    background: #81C784;
}

.article-card[data-category="wellness"]::before {
    background: #F48FB1;
}

.article-card[data-category="other"]::before {
    background: #B0BEC5;
}

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

.article-icon {
    font-size: 1.2rem !important;
    opacity: 0.7;
}

.article-card[data-category="anxiety"] .article-icon {
    color: #FFB74D;
}

.article-card[data-category="depression"] .article-icon {
    color: #7986CB;
}

.article-card[data-category="therapy"] .article-icon {
    color: #81C784;
}

.article-card[data-category="wellness"] .article-icon {
    color: #F48FB1;
}

.article-card[data-category="other"] .article-icon {
    color: #B0BEC5;
}

.category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.article-card[data-category="anxiety"] .category-badge {
    background-color: #FFF3E0;
    color: #F57C00;
}

.article-card[data-category="depression"] .category-badge {
    background-color: #E8EAF6;
    color: #3949AB;
}

.article-card[data-category="therapy"] .category-badge {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.article-card[data-category="wellness"] .category-badge {
    background-color: #FCE4EC;
    color: #C2185B;
}

.article-card[data-category="other"] .category-badge {
    background-color: #ECEFF1;
    color: #546E7A;
}

.read-more-btn {
    color: #666;
    font-weight: 500;
}

.fa-x-twitter {
    font-size: 1.1em;
    vertical-align: middle;
}

.article-share-section {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}


.btn-return {
    background-color: var(--color-light);
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-return:hover {
    background-color: var(--color-secondary);
    color: var(--color-light);
    transform: translateX(-5px);
    box-shadow: 0 4px 8px rgba(74, 78, 105, 0.2);
}

.btn-return i {
    transition: transform 0.3s ease;
}

.btn-return:hover i {
    transform: translateX(-3px);
}
