/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 0;
    padding: 1rem 0 0.5rem; /* Reduce bottom padding */
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.75rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.breadcrumb-current {
    color: #374151;
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article Container */
.article-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.main-content .article-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Adjust spacing for the container within main-content */
.main-content .single-article {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Category Badge */
.article-category {
    padding: 0 2rem 0; /* Remove top padding completely */
    margin-top: 0; /* Ensure no margin is added */
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.category-badge:hover {
    transform: translateY(-2px);
}

.category-link {
    color: white;
    text-decoration: none;
}

/* Article Header */
.article-header {
    padding: 1.5rem 2rem 2rem;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #111827;
    letter-spacing: -0.025em;
}

.title-emoji {
    font-size: 0.8em;
    margin-left: 0.5rem;
}

.article-meta {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.meta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.meta-item i {
    color: #9ca3af;
    font-size: 1.1em;
}

/* Article Content */
.article-content {
    padding: 0 2rem 2rem;
}

.content-section {
    margin-bottom: 3rem;
}

.lead-paragraph {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1.5rem;
    font-weight: 400;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.article-content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.highlight-text {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    font-weight: 500;
}

.hashtag {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.hashtag:hover {
    text-decoration: underline;
}

.emoji {
    font-size: 1.2em;
    margin-left: 0.5rem;
}

/* Image Gallery */
.image-gallery {
    margin: 3rem 0;
}

.gallery-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
    display: inline-block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 2rem;
}

/* Article Footer */
.article-footer {
    border-top: 2px solid #f3f4f6;
    padding: 2rem;
    background: #f9fafb;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tags-section h4,
.share-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-item {
    background: #e5e7eb;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.tag-item:hover {
    background: #d1d5db;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #000;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.copy-link {
    background: #6b7280;
    color: white;
}

/* Post Navigation - Con mayor especificidad para evitar conflictos */
.single-article .post-navigation {
    border-top: 2px solid #f3f4f6;
    padding: 2rem;
    background: white;
}

.single-article .post-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.single-article .post-nav-previous,
.single-article .post-nav-next {
    display: flex;
    flex-direction: column;
}

.single-article .post-nav-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single-article .post-nav-link {
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.single-article .post-nav-link:hover {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.single-article .post-nav-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
}

.single-article .post-nav-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.single-article .post-nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: #111827;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: calc(100% - 70px);
}

.single-article .post-nav-next {
    text-align: right;
}

.single-article .post-nav-next .post-nav-content {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999; /* Increased from 1000 to ensure it's above all other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.modal-nav {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
    pointer-events: all;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.prev-btn {
    margin-left: -25px;
}

.next-btn {
    margin-right: -25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .article-header,
    .article-content,
    .article-footer,
    .post-navigation {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .meta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .single-article .post-nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .single-article .post-nav-next {
        text-align: left;
    }
    
    .single-article .post-nav-next .post-nav-content {
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .breadcrumb-current {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .lead-paragraph {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}