/* ===== BLOG DETAIL PAGE ===== */
.blog-detail-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.blog-detail-page .navbar + * {
    margin-top: 0 !important;
}

/* ===== BANNER DE DETALLE ===== */
.post-detail-banner {
    position: relative;
    width: 100%;
    height: 768px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: linear-gradient(135deg, #1e3a47 0%, #2d4a5a 50%, #1e3a47 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0 !important;
}

.post-detail-banner-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
}

.post-detail-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 30px;
}

.post-breadcrumb {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    animation: fadeInDown 0.6s ease-out;
}

.post-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb-separator {
    margin: 0 10px;
}

.post-detail-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 25px;
    line-height: 1.3;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.meta-item {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    font-size: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TAGS Y CATEGORÍAS ===== */
.post-tags-section {
    background: #f8f9fa;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.post-tags-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tags-categories-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.tags-group,
.categories-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tags-label,
.categories-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tags-list,
.categories-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.category-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.post-content-section {
    padding: 80px 0;
    background: #ffffff;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.post-content-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    align-items: start;
}

/* Contenido principal */
.post-main-content {
    max-width: 100%;
}

.post-excerpt-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.post-excerpt-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.post-excerpt-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ffffff;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.post-content-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #2d3748;
}

.post-content-body h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 50px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.post-content-body h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.post-content-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 40px;
    margin-bottom: 15px;
}

.post-content-body p {
    margin-bottom: 20px;
}

.post-content-body ul,
.post-content-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content-body li {
    margin-bottom: 10px;
}

.post-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.post-content-body blockquote {
    border-left: 4px solid #667eea;
    padding: 20px 30px;
    background: #f8f9fa;
    margin: 30px 0;
    border-radius: 8px;
    font-style: italic;
    color: #495057;
}

.post-footer-meta {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.meta-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.meta-label {
    font-weight: 600;
    color: #6c757d;
}

.meta-value {
    color: #495057;
}

/* ===== SIDEBAR ===== */
.post-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.share-box {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.share-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-btn i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.share-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #ffffff;
}

.share-twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: #ffffff;
}

.share-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: #ffffff;
}

.share-whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
}

.share-copy:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.share-copy.copied {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.back-to-list {
    margin-top: 20px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

/* ===== PUBLICACIONES RELACIONADAS (CAROUSEL) ===== */
.related-posts-section {
    width: 100%;
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.related-posts-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.related-posts-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.related-posts-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.related-posts-carousel-container {
    width: 100%;
    overflow: hidden;
}

.related-posts-carousel-slider {
    display: flex;
    gap: 30px;
    animation: slideRelatedCarousel 40s linear infinite;
}

@keyframes slideRelatedCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.related-posts-carousel-slider:hover {
    animation-play-state: paused;
}

/* Related Post Card */
.related-post-slide {
    flex: 0 0 380px;
    width: 380px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.related-post-slide:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.related-post-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.related-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-post-slide:hover .related-post-image {
    transform: scale(1.1);
}

.related-post-image-placeholder {
    font-size: 3.5rem;
    color: rgba(20, 32, 41, 0.2);
}

.related-post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.related-post-date {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-post-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.related-post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-excerpt {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-btn {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.related-post-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .post-detail-banner {
        height: 520px;
    }
    
    .post-detail-title {
        font-size: 2.2rem;
    }
    
    .post-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .post-sidebar {
        order: 2;
    }
    
    .post-main-content {
        order: 1;
    }
    
    .sidebar-sticky {
        position: relative;
        top: 0 !important;
    }
    
    .share-box {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .share-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .share-btn {
        flex: 1 1 calc(50% - 4px);
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .share-btn i {
        font-size: 1rem;
    }
    
    .related-post-slide {
        flex: 0 0 320px;
        width: 320px;
    }
}

@media (max-width: 575.98px) {
    .post-detail-banner {
        height: 340px;
    }
    
    .post-detail-title {
        font-size: 1.6rem;
    }
    
    .post-detail-meta {
        gap: 15px;
    }
    
    .meta-item {
        font-size: 0.85rem;
    }
    
    .post-content-section {
        padding: 50px 0;
    }
    
    .post-excerpt-box {
        padding: 20px 25px;
    }
    
    .post-excerpt-text {
        font-size: 1rem;
    }
    
    .post-content-body {
        font-size: 1rem;
    }
    
    .post-content-body h2 {
        font-size: 1.6rem;
    }
    
    .tags-categories-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .share-box {
        padding: 15px;
    }
    
    .share-title {
        font-size: 0.9rem;
    }
    
    .share-btn {
        flex: 1 1 100%;
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .share-btn i {
        font-size: 0.9rem;
    }
    
    .related-posts-title {
        font-size: 1.6rem;
    }
    
    .related-post-slide {
        flex: 0 0 280px;
        width: 280px;
    }
    
    .related-post-image-wrapper {
        height: 180px;
    }
    
    .related-post-content {
        padding: 20px;
    }
}

/* Accesibilidad: reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .related-posts-carousel-slider,
    .post-detail-title,
    .post-detail-meta,
    .post-breadcrumb {
        animation: none !important;
    }
    
    .related-post-slide:hover,
    .share-btn:hover,
    .back-btn:hover {
        transform: none !important;
    }
    
    .related-post-image {
        transition: none !important;
    }
}
