/*
 * CSS do template de página estática (template-parts/content-page.php).
 * Extraído de lá (onde vivia inline) para cá. Enfileirado condicionalmente
 * (is_page()) em functions.php (temanovo_scripts).
 */
:root {
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 16px;
}

/* ============================================
   CONTENT PAGE - PREMIUM
   ============================================ */

.content-page {
    max-width: 850px !important;
    margin: 40px auto 60px;
    padding: 0 24px;
    background: #fff;
    animation: contentFadeIn 0.6s ease;
}

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

/* ============================================
   HEADER
   ============================================ */

.content-header {
    margin-bottom: 32px;
    box-shadow: none;
}

.content-header-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.badge-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    padding: 4px 14px;
    border-radius: 30px;
}

.badge-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--tn-color-muted);
    background: rgba(0,0,0,0.04);
    padding: 4px 14px;
    border-radius: 30px;
}

.badge-reading-time i {
    color: var(--tn-color-primary);
}

.content-title {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 700;
	text-align: center;
    color: var(--tn-color-text);
    letter-spacing: -0.02em;
    margin: 0 0 20px 0;
}

/* Brilho em degradê passando pelo título, pra marcar visualmente que é o
   título da página. Em @supports pra cair no texto sólido normal em
   navegadores sem background-clip: text. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .content-title {
        background-image: linear-gradient(
            100deg,
            var(--tn-color-text) 35%,
            var(--tn-color-primary) 48%,
            var(--tn-color-secondary) 52%,
            var(--tn-color-text) 65%
        );
        background-size: 260% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: tnTitleShine 4s ease-in-out infinite alternate;
    }
}

@keyframes tnTitleShine {
    0% {
        background-position: 180% 0;
    }
    100% {
        background-position: -80% 0;
    }
}

.content-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-author-line {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-author-line .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--tn-color-primary);
}

.meta-author-name {
    font-weight: 600;
    color: var(--tn-color-text);
    font-size: 0.9rem;
}

.meta-separator {
    color: rgba(0,0,0,0.2);
}

.meta-date {
    font-size: 0.85rem;
    color: var(--tn-color-muted);
}

.meta-date i {
    margin-right: 4px;
    color: var(--tn-color-primary);
}

/* ============================================
   SHARE BUTTON & DROPDOWN
   ============================================ */

.meta-share {
    position: relative;
}

.share-btn {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
    color: var(--tn-color-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
    transform: scale(1.05);
}

.share-btn.active {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
}

/* Share Dropdown */
.share-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(0,0,0,0.06);
}

.share-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.share-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 8px;
}

.share-dropdown-header span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tn-color-text);
}

.share-close {
    background: none;
    border: none;
    color: var(--tn-color-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    font-size: 14px;
}

.share-close:hover {
    color: var(--tn-color-primary);
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0 8px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--tn-color-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
}

.share-option i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.share-option:hover {
    background: rgba(0,0,0,0.04);
    transform: translateX(4px);
}

.share-option.facebook:hover {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.08);
}

.share-option.twitter:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.share-option.linkedin:hover {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.08);
}

.share-option.whatsapp:hover {
    color: #25d366;
    background: rgba(37, 211, 102, 0.08);
}

.share-option.email:hover {
    color: #ea4335;
    background: rgba(234, 67, 53, 0.08);
}

.share-option.copy-link:hover {
    color: var(--tn-color-primary);
    background: rgba(var(--tn-color-primary-rgb), 0.08);
}

.share-option.copy-link.copied {
    color: #00a86b;
}

.share-option.copy-link.copied i {
    animation: copyPulse 0.5s ease;
}

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

/* Mobile: full width dropdown */
@media (max-width: 480px) {
    .share-dropdown {
        width: 300px;
        right: -120px;
    }
}

/* ============================================
   FEATURED IMAGE
   ============================================ */

.content-featured-image {
    position: relative;
    margin: 0 0 40px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    isolation: isolate;
}

.content-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.content-featured-image:hover img {
    transform: scale(1.02);
}

/* Moldura automática (definida no Customizer > Moldura automática) */
.content-featured-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--tn-frame-image) center/cover no-repeat;
    pointer-events: none;
    z-index: 2;
}

.featured-caption {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--tn-color-muted);
    background: rgba(0,0,0,0.03);
    text-align: center;
    font-style: italic;
}

/* ============================================
   CONTENT BODY
   ============================================ */

.content-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--tn-color-muted);
}

.content-body > *:first-child {
    margin-top: 0;
}

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

.content-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--tn-color-text);
    margin: 48px 0 20px;
    padding-left: 16px;
    border-left: 5px solid var(--tn-color-primary);
    line-height: 1.3;
}

.content-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--tn-color-text);
    margin: 36px 0 16px;
    line-height: 1.3;
}

.content-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tn-color-text);
    margin: 28px 0 12px;
}

.content-body img {
    max-width: 100%;
    height: auto;
    margin: 32px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.content-body a {
    color: var(--tn-color-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.content-body a:hover {
    border-bottom-color: var(--tn-color-primary);
}

.content-body blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(var(--tn-color-primary-rgb), 0.05), rgba(0,0,0,0.02));
    border-left: 5px solid var(--tn-color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--tn-color-text);
}

.content-body blockquote p:last-child {
    margin-bottom: 0;
}

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

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

.content-body ul li::marker {
    color: var(--tn-color-primary);
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 0.95rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.content-body th,
.content-body td {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.content-body thead {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
}

.content-body thead th {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.content-body tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.content-body tbody tr:hover {
    background: rgba(var(--tn-color-primary-rgb), 0.04);
}

/* ============================================
   TAGS
   ============================================ */

.content-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px 0;
    margin: 32px 0 0;
    border-top: 2px solid rgba(0,0,0,0.04);
}

.tags-label {
    font-weight: 600;
    color: var(--tn-color-text);
    font-size: 0.9rem;
}

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

.content-tags a {
    display: inline-block;
    padding: 4px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tn-color-muted);
    background: rgba(0,0,0,0.04);
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.content-tags a:hover {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--tn-color-primary-rgb), 0.3);
}

/* ============================================
   AUTHOR BOX
   ============================================ */

.content-meta {
    margin: 48px 0 40px;
}

.meta-author-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.meta-author-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--tn-color-primary), var(--tn-color-secondary));
    border-radius: 4px 0 0 4px;
}

.meta-author-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--tn-color-primary);
}

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

.meta-author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.meta-author-box:hover .meta-author-avatar img {
    transform: scale(1.05);
    border-color: var(--tn-color-primary);
    box-shadow: 0 8px 24px rgba(var(--tn-color-primary-rgb), 0.2);
}

.meta-author-info {
    flex: 1;
}

.meta-author-name-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.meta-author-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tn-color-text);
}

.author-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #00a86b;
    background: rgba(0, 168, 107, 0.1);
    padding: 2px 12px;
    border-radius: 30px;
}

.author-verified i {
    font-size: 12px;
}

.author-bio {
    margin: 8px 0 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--tn-color-muted);
    padding: 10px 16px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    border-left: 3px solid var(--tn-color-primary);
}

.author-bio i {
    color: var(--tn-color-primary);
    margin-right: 6px;
}

.author-social {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
    color: var(--tn-color-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.author-social a:hover {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(var(--tn-color-primary-rgb), 0.3);
}

/* ============================================
   POST NAVIGATION
   ============================================ */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 48px 0 20px;
    padding-top: 32px;
    border-top: 2px solid rgba(0,0,0,0.04);
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    display: flex;
    align-items: center;
}

.post-navigation .nav-previous {
    justify-content: flex-start;
}

.post-navigation .nav-next {
    justify-content: flex-end;
}

.post-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tn-color-text);
    text-decoration: none;
    border-radius: 12px;
    background: rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    max-width: 100%;
}

.post-navigation a i {
    color: var(--tn-color-primary);
    transition: transform 0.3s ease;
}

.post-navigation a:hover {
    background: linear-gradient(135deg, var(--tn-color-primary), var(--tn-color-secondary));
    color: #fff;
    transform: translateX(0);
    box-shadow: 0 4px 16px rgba(var(--tn-color-primary-rgb), 0.3);
}

.post-navigation a:hover i {
    color: #fff;
}

.post-navigation .nav-previous a:hover i {
    transform: translateX(-4px);
}

.post-navigation .nav-next a:hover i {
    transform: translateX(4px);
}

.post-navigation a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

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

@media (max-width: 900px) {
    .content-page {
        margin: 20px auto 40px;
        padding: 0 16px;
    }

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

    .content-title::before {
        width: 40px;
    }

    .content-body {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .meta-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
    }

    .meta-author-box::before {
        width: 100%;
        height: 4px;
        top: 0;
        left: 0;
        right: 0;
        border-radius: 4px 4px 0 0;
    }

    .meta-author-avatar img {
        width: 80px;
        height: 80px;
    }

    .meta-author-name-wrapper {
        justify-content: center;
    }

    .author-bio {
        text-align: left;
    }

    .author-social {
        justify-content: center;
    }

    .content-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .meta-share {
        align-self: flex-start;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        justify-content: center;
    }

    .post-navigation a span {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .content-page {
        margin: 12px auto 30px;
        padding: 0 12px;
    }

    .content-title {
        font-size: 1.5rem;
    }

    .content-header-badge {
        gap: 8px;
    }

    .badge-category,
    .badge-reading-time {
        font-size: 0.65rem;
        padding: 3px 10px;
    }

    .meta-author-box {
        padding: 16px;
    }

    .meta-author-name {
        font-size: 1rem;
    }

    .author-bio {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .content-body {
        font-size: 0.95rem;
    }

    .content-body h2 {
        font-size: 1.4rem;
        padding-left: 12px;
    }

    .content-body h3 {
        font-size: 1.2rem;
    }

    .post-navigation a {
        font-size: 0.8rem;
        padding: 10px 14px;
    }

    .post-navigation a span {
        max-width: 100px;
    }

    .share-dropdown {
        width: 280px;
        right: -140px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .content-page,
    .meta-author-box,
    .content-featured-image img,
    .content-tags a,
    .author-social a,
    .post-navigation a,
    .share-dropdown,
    .content-title {
        transition: none !important;
        animation: none !important;
    }

    .content-featured-image:hover img {
        transform: none;
    }

    .meta-author-box:hover {
        transform: none;
    }
}
