/**
 * Single Post Styles
 *
 * @package Informativo_Angolano
 * @since 1.0.0
 */

/* ==========================================================================
   SINGLE POST CONTAINER
   ========================================================================== */

.single-post-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   SINGLE HERO SECTION
   ========================================================================== */

.single-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

@media (min-width: 768px) {
    .single-hero-section {
        min-height: 70vh;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 2rem 0 3rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 3rem 0 4rem;
    }
}

.hero-post-info {
    max-width: 800px;
}

.hero-category {
    display: inline-block;
    background: var(--primary-color, #c8102e);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.hero-category:hover {
    background: var(--primary-hover, #a00d26);
    color: #fff;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
}

/* ==========================================================================
   SINGLE POST HEADER (Fallback - No Featured Image)
   ========================================================================== */

.single-post-header {
    padding: 2rem 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.single-post-header .single-category {
    display: inline-block;
    background: var(--primary-color, #c8102e);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.single-post-header .entry-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .single-post-header .entry-title {
        font-size: 2.25rem;
    }
}

/* ==========================================================================
   POST META
   ========================================================================== */

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
}

.single-post-header .post-meta {
    color: #666;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta-item svg {
    flex-shrink: 0;
}

.post-meta-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-meta-item a:hover {
    color: var(--primary-color, #c8102e);
}

.meta-author {
    font-weight: 500;
}

.meta-date {
    color: inherit;
}

/* ==========================================================================
   SINGLE POST CONTENT WRAPPER
   ========================================================================== */

.single-post-content-wrapper {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .single-post-content-wrapper {
        padding: 4rem 0;
    }
}

.single-main-content {
    width: 100%;
}

@media (min-width: 992px) {
    .single-main-content {
        width: calc(100% - 320px);
    }
}

/* ==========================================================================
   ENTRY CONTENT - TYPOGRAPHY OPTIMIZADA
   ========================================================================== */

.entry-content.single-content {
    font-size: var(--text-base); /* 16px */
    line-height: var(--leading-relaxed); /* 1.625 */
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .entry-content.single-content {
        font-size: var(--text-lg); /* 18px */
    }
}

.entry-content.single-content p {
    margin-bottom: var(--space-6);
    line-height: var(--leading-relaxed);
}

.entry-content.single-content h2 {
    font-size: var(--text-3xl); /* 30px */
    font-weight: 700;
    margin: var(--space-10) 0 var(--space-4);
    color: var(--text-primary);
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-tight);
}

@media (min-width: 768px) {
    .entry-content.single-content h2 {
        font-size: var(--text-4xl); /* 36px */
        letter-spacing: var(--tracking-wider);
    }
}

.entry-content.single-content h3 {
    font-size: var(--text-2xl); /* 24px */
    font-weight: 700;
    margin: var(--space-8) 0 var(--space-3);
    color: var(--text-primary);
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-snug);
}

@media (min-width: 768px) {
    .entry-content.single-content h3 {
        font-size: var(--text-3xl); /* 30px */
    }
}

.entry-content.single-content h4 {
    font-size: var(--text-xl); /* 20px */
    font-weight: 700;
    margin: var(--space-6) 0 var(--space-2);
    color: var(--text-primary);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-snug);
}

.entry-content.single-content h5 {
    font-size: var(--text-lg); /* 18px */
    font-weight: 700;
    margin: var(--space-5) 0 var(--space-2);
    color: var(--text-primary);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-normal);
}

.entry-content.single-content h6 {
    font-size: var(--text-base); /* 16px */
    font-weight: 700;
    margin: var(--space-4) 0 var(--space-2);
    color: var(--text-primary);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-normal);
}

.entry-content.single-content a {
    color: var(--primary-color, #c8102e);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.entry-content.single-content a:hover {
    color: var(--primary-hover, #a00d26);
}

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

.entry-content.single-content figure {
    margin: 2rem 0;
}

.entry-content.single-content figure img {
    margin: 0;
}

.entry-content.single-content figcaption {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Blockquotes */
.entry-content.single-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary-color, #c8102e);
    background: #f8f9fa;
    font-style: italic;
    font-size: 1.125rem;
    color: #555;
    border-radius: 0 8px 8px 0;
}

@media (min-width: 768px) {
    .entry-content.single-content blockquote {
        padding: 2rem 2.5rem;
        font-size: 1.25rem;
    }
}

.entry-content.single-content blockquote p {
    margin-bottom: 0;
}

.entry-content.single-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #888;
    font-style: normal;
}

/* Lists */
.entry-content.single-content ul,
.entry-content.single-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content.single-content li {
    margin-bottom: 0.5rem;
}

.entry-content.single-content ul {
    list-style: disc;
}

.entry-content.single-content ol {
    list-style: decimal;
}

/* Tables */
.entry-content.single-content table {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.entry-content.single-content table th,
.entry-content.single-content table td {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.entry-content.single-content table th {
    background: #f8f9fa;
    font-weight: 700;
}

.entry-content.single-content table tr:nth-child(even) {
    background: #fafafa;
}

/* Code */
.entry-content.single-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
}

.entry-content.single-content pre {
    background: #1a1a1a;
    color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Pull quotes */
.entry-content.single-content .pullquote {
    float: right;
    width: 100%;
    margin: 1.5rem 0;
    padding: 1rem 0;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--primary-color, #c8102e);
    border: none;
    text-align: center;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .entry-content.single-content .pullquote {
        width: 40%;
        margin: 1rem 0 1rem 2rem;
    }
}

/* ==========================================================================
   READING PROGRESS BAR
   ========================================================================== */

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.1);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color, #c8102e);
    transition: width 0.1s ease;
}

/* ==========================================================================
   ENTRY FOOTER (Tags and Share)
   ========================================================================== */

.single-entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

/* Post Tags */
.entry-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tags-label {
    font-weight: 600;
    color: #1a1a1a;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-list a {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: #f0f2f5;
    color: #555;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tags-list a:hover {
    background: var(--primary-color, #c8102e);
    color: #fff;
}

/* ==========================================================================
   SHARE BUTTONS
   ========================================================================== */

.share-buttons-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-label {
    font-weight: 600;
    color: #1a1a1a;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

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

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #000;
}

.share-whatsapp {
    background: #25d366;
}

.share-email {
    background: #666;
}

.share-copy {
    background: var(--primary-color, #c8102e);
    border: none;
    cursor: pointer;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Copy feedback */
.copy-feedback {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.share-btn:hover .copy-feedback {
    opacity: 1;
}

/* ==========================================================================
   AUTHOR BIO
   ========================================================================== */

.author-bio-container {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 576px) {
    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

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

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

@media (min-width: 768px) {
    .author-avatar img {
        width: 100px;
        height: 100px;
    }
}

.author-info {
    flex: 1;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

@media (max-width: 576px) {
    .author-header {
        justify-content: center;
    }
}

.author-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.author-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name a:hover {
    color: var(--primary-color, #c8102e);
}

.author-role {
    background: var(--primary-color, #c8102e);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.author-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .author-social {
        justify-content: center;
    }
}

.author-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    transition: all 0.3s ease;
}

.author-social-link:hover {
    background: var(--primary-color, #c8102e);
    color: #fff;
}

.author-social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.author-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color, #c8102e);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-view-all:hover {
    color: var(--primary-hover, #a00d26);
}

.author-view-all svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.author-view-all:hover svg {
    transform: translateX(4px);
}

/* Dark mode for author bio */
body.dark-mode .author-bio-container {
    background: #252525;
}

body.dark-mode .author-name a {
    color: #fff;
}

body.dark-mode .author-description {
    color: #aaa;
}

body.dark-mode .author-social-link {
    background: #333;
    color: #aaa;
}

body.dark-mode .author-social-link:hover {
    background: var(--primary-color, #c8102e);
    color: #fff;
}

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */

.related-posts-container {
    margin-top: 3rem;
}

.related-posts-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color, #c8102e);
}

.related-posts-title svg {
    color: var(--primary-color, #c8102e);
}

.related-posts-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-post-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.related-post-link {
    display: block;
    text-decoration: none;
}

.related-post-thumbnail {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
}

.related-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-item:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    pointer-events: none;
}

.related-post-placeholder {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.related-post-content {
    padding: 1.25rem;
}

.related-category {
    display: inline-block;
    background: var(--primary-color, #c8102e);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-item:hover .related-post-title {
    color: var(--primary-color, #c8102e);
}

.related-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.related-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.related-post-meta svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Dark mode for related posts */
body.dark-mode .related-post-item {
    background: #252525;
}

body.dark-mode .related-post-title {
    color: #fff;
}

body.dark-mode .related-post-meta {
    color: #999;
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color, #c8102e);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-body {
    display: flex;
    gap: 1rem;
}

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

.comment-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-date {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.comment-text {
    color: #555;
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color, #c8102e);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-reply-link:hover {
    color: var(--primary-hover, #a00d26);
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color, #c8102e);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

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

.comment-form .submit {
    background: var(--primary-color, #c8102e);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    justify-self: start;
}

.comment-form .submit:hover {
    background: var(--primary-hover, #a00d26);
    transform: translateY(-2px);
}

/* Dark mode for comments */
body.dark-mode .comments-title,
body.dark-mode .comment-author,
body.dark-mode .comment-reply-title {
    color: #fff;
}

body.dark-mode .comment {
    border-bottom-color: #333;
}

body.dark-mode .comment-date {
    color: #888;
}

body.dark-mode .comment-text {
    color: #ccc;
}

body.dark-mode .comment-form label {
    color: #ccc;
}

body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: #252525;
    border-color: #444;
    color: #fff;
}

body.dark-mode .comment-form input:focus,
body.dark-mode .comment-form textarea:focus {
    border-color: var(--primary-color, #c8102e);
}

/* ==========================================================================
   SIDEBAR (Single Post)
   ========================================================================== */

.single-sidebar {
    display: none;
}

@media (min-width: 992px) {
    .single-sidebar {
        display: flex;
        flex-direction: column;
        width: 300px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   RESPONSIVE FIXES
   ========================================================================== */

@media (max-width: 991px) {
    .single-sidebar {
        order: -1;
        width: 100%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    .single-hero-section {
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .entry-content.single-content {
        font-size: 1rem;
    }
    
    .share-buttons-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .single-hero-section {
        min-height: 40vh;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .author-bio {
        padding: 1.5rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .single-hero-section,
    .entry-share,
    .author-bio-container,
    .related-posts-container,
    .comments-area,
    .single-sidebar {
        display: none !important;
    }
    
    .entry-content.single-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .single-post-header .entry-title {
        font-size: 18pt;
    }
}

/* ==========================================================================
   FIM DO SINGLE POST CSS
   ========================================================================== */

