/* ==========================================
   POST DETAIL PAGE - COMPLETE REDESIGN
   ========================================== */

/* Hero Section */
.post-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.post-hero-section .hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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");
    animation: moveParticles 20s linear infinite;
}

@keyframes moveParticles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.post-hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-breadcrumb a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-breadcrumb a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-breadcrumb i.fa-chevron-right {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.hero-breadcrumb > span {
    color: white;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Post Content Section */
.post-content-section {
    padding: 0 0 4rem;
}

.post-content-section .container {
    max-width: 1400px;
    margin: 0 auto;
}

.post-content-section .row {
    justify-content: center;
}

/* Post Header Card */
.post-header-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-color);
}

.post-header-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Post Thumbnail (miniatura quadrada) */
.post-thumbnail-container {
    position: relative;
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

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

.post-thumbnail-container:hover .post-thumbnail-image {
    transform: scale(1.1);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-thumbnail-container:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay i {
    color: white;
    font-size: 2rem;
}

.post-header-text {
    flex: 1;
}

.post-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.post-format-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(16, 185, 129, 0.12));
    color: #0f766e;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8B4513;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.post-meta-row .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.95rem;
}

.post-meta-row .meta-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Post Description Card */
.post-description-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header-custom {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.card-header-custom i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-header-custom h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.card-content {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.05rem;
}

.card-content p {
    margin-bottom: 1rem;
}

/* Tags Card */
.post-tags-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tags-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.tags-header i {
    color: var(--primary-color);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tag-item i {
    font-size: 0.8rem;
}

/* Comments Section */
.post-comments-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.comments-header i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.comments-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.comments-count {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Comment Form */
.comment-form-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-form-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.comment-form .form-group {
    margin-bottom: 1rem;
}

.comment-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.comment-form label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.comment-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.comment-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.15);
    outline: none;
}

.comment-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-submit-comment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    width: 100%;
}

.btn-submit-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Comments List */
.comments-list {
    margin-top: 1.5rem;
}

.no-comments {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-color);
}

.no-comments i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.no-comments p {
    font-size: 0.95rem;
    margin: 0;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar i {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.6;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--gray-color);
}

.comment-text {
    color: #555;
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}

/* Sidebar Cards */
.sidebar-download-card,
.sidebar-share-card,
.sidebar-related-card,
.sidebar-category-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.download-card-header,
.stats-header,
.related-header,
.category-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.download-card-header i,
.stats-header i,
.related-header i,
.category-card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.download-card-header h3,
.stats-header h3,
.related-header h3,
.category-card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

/* Download Card */
.download-info {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-info .info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    color: var(--text-color);
}

.download-info .info-item i {
    color: #10b981;
    font-size: 1.2rem;
}

.btn-download-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 1rem;
}

.btn-download-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.download-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-color);
    margin: 0;
    text-align: center;
}

.download-notice i {
    color: var(--primary-color);
}

/* Share Card Sidebar */
.sidebar-share-card .share-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sidebar-share-card .share-header i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.sidebar-share-card .share-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.sidebar-share-card .share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.sidebar-share-card .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.sidebar-share-card .share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.sidebar-share-card .share-btn i {
    font-size: 1rem;
    min-width: 16px;
    text-align: center;
}

.sidebar-share-card .share-btn span {
    font-size: 0.8rem;
}

.sidebar-share-card .share-btn.facebook { background: #1877f2; }
.sidebar-share-card .share-btn.twitter { background: #1da1f2; }
.sidebar-share-card .share-btn.whatsapp { background: #25d366; }
.sidebar-share-card .share-btn.telegram { background: #0088cc; }

/* Related Posts */
.related-posts-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.related-post-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 94px;
    border: 1px solid rgba(59, 130, 246, 0.08);
}

.related-post-item:hover {
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.14);
}

.related-post-image {
    width: 64px;
    height: 64px;
    aspect-ratio: auto;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

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

.related-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.related-post-category {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
    font-size: 0.64rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.related-post-content h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 0.45rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 0.74rem;
    color: var(--gray-color);
    margin-top: auto;
}

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

@media (max-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .related-posts-section {
        padding: 1.5rem;
    }

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

/* Category Card */
.category-link-large {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.category-link-large:hover {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.category-link-large i:first-child {
    font-size: 1.5rem;
}

.category-link-large i:last-child {
    font-size: 1rem;
}

.category-card-body p {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 0;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 992px) {
    .post-title {
        font-size: 2rem;
    }

    .share-buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .post-hero-section {
        padding: 3rem 0 2rem;
    }

    .post-header-card {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-meta-row {
        gap: 1rem;
    }

    .post-description-card {
        padding: 1.5rem;
    }

    .share-buttons-grid {
        grid-template-columns: 1fr;
    }

    .download-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .download-info .info-item {
        padding: 0.5rem 0;
    }
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-header-content {
        flex-direction: column;
        align-items: center;
    }

    .post-thumbnail-container {
        width: 150px;
        height: 150px;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .sidebar-share-card .share-buttons-grid {
        grid-template-columns: 1fr;
    }
}
