/*
 * IPTV Blog Modern Style
 * Design moderno e tecnológico para blog de IPTV
 * 
 * IMPORTANTE: Este CSS aplica estilização APENAS nas páginas de blog (archive, single-post)
 * As cores e estilos do resto do site (menu, header, footer, etc.) são PRESERVADOS
 * e não são afetados por este arquivo.
 * 
 * Classes WordPress utilizadas para targeting específico:
 * - body.blog -> Página principal do blog
 * - body.archive -> Páginas de arquivo (categorias, tags, datas)
 * - body.single-post -> Páginas de post individual
 */

/* ===== Variáveis CSS ===== */
:root {
    --iptv-primary: #FF0100;
    --iptv-secondary: #cc0100;
    --iptv-accent: #ff3333;
    --iptv-dark: #0a0a0a;
    --iptv-dark-secondary: #1a1a1a;
    --iptv-dark-tertiary: #2a2a2a;
    --iptv-light: #f8fafc;
    --iptv-gradient: linear-gradient(135deg, #FF0100 0%, #cc0100 100%);
    --iptv-gradient-2: linear-gradient(135deg, #ff3333 0%, #FF0100 100%);
    --iptv-gradient-3: linear-gradient(135deg, #FF0100 0%, #ff6666 100%);
    --iptv-shadow: 0 20px 25px -5px rgba(255, 1, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --iptv-shadow-lg: 0 25px 50px -12px rgba(255, 1, 0, 0.25);
}

/* ===== Reset e Base - Aplica APENAS em páginas de blog ===== */
body.blog,
body.archive,
body.single-post {
    background: var(--iptv-dark) !important;
}

.blog .site-main,
.archive .site-main,
.single-post .site-main {
    background: var(--iptv-dark) !important;
    color: var(--iptv-light) !important;
    padding: 2rem 1rem !important;
    min-height: 100vh;
}

/* ===== Archive Page (Listagem de Posts) ===== */
.archive-header-modern {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 3rem;
    background: var(--iptv-gradient);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.archive-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 20px 20px;
    opacity: 0.3;
}

.archive-header-modern h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.archive-header-modern .archive-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

/* ===== Grid de Posts ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Cards de Posts ===== */
.post-card {
    background: var(--iptv-dark-secondary) !important;
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 1, 0, 0.2) !important;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--iptv-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--iptv-shadow-lg);
    border-color: rgba(255, 1, 0, 0.5) !important;
}

/* ===== Thumbnail do Post ===== */
.post-card-thumbnail {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: var(--iptv-dark-tertiary);
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.1);
}

.post-card-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    pointer-events: none;
}

/* ===== Badge de Categoria ===== */
.post-card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--iptv-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ===== Conteúdo do Card ===== */
.post-card-content {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

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

.post-card-meta-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.post-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.post-card h2 a {
    color: var(--iptv-light);
    text-decoration: none;
    background: linear-gradient(to right, var(--iptv-primary), var(--iptv-secondary));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

.post-card h2 a:hover {
    background-size: 100% 2px;
}

.post-card-excerpt {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ===== Botão Ler Mais ===== */
.post-card-read-more {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    background: var(--iptv-gradient) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(255, 1, 0, 0.4) !important;
}

.post-card-read-more:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 12px rgba(255, 1, 0, 0.6) !important;
}

.post-card-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.post-card-read-more:hover::after {
    transform: translateX(4px);
}

/* ===== Single Post (Post Único) ===== */
.single-post-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--iptv-dark-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--iptv-shadow-lg);
}

/* ===== Header do Post Único ===== */
.single-post-header {
    position: relative;
    padding: 3rem 2rem;
    background: var(--iptv-gradient);
    text-align: center;
}

.single-post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 30px 30px;
    opacity: 0.3;
}

.single-post-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.single-post-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: white;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .single-post-header h1 {
        font-size: 2rem;
    }
}

/* ===== Meta Info do Post Único ===== */
.single-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

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

.single-post-meta-icon {
    width: 18px;
    height: 18px;
}

/* ===== Featured Image ===== */
.single-post-featured-image {
    position: relative;
    overflow: hidden;
    max-height: 500px;
}

.single-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Conteúdo do Post ===== */
.single-post-content {
    padding: 3rem 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: var(--iptv-light);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.single-post-content h2 {
    font-size: 2rem;
    background: var(--iptv-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single-post-content h3 {
    font-size: 1.5rem;
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.single-post-content a {
    color: var(--iptv-primary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.single-post-content a:hover {
    border-bottom-color: var(--iptv-primary);
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--iptv-shadow);
}

.single-post-content blockquote {
    border-left: 4px solid var(--iptv-primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--iptv-dark-tertiary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.single-post-content ul,
.single-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.single-post-content li {
    margin-bottom: 0.75rem;
}

.single-post-content code {
    background: var(--iptv-dark-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #a5b4fc;
}

.single-post-content pre {
    background: var(--iptv-dark-tertiary);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.single-post-content pre code {
    background: transparent;
    padding: 0;
}

/* ===== Tags do Post ===== */
.post-tags-section {
    padding: 2rem;
    border-top: 1px solid var(--iptv-dark-tertiary);
}

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

.post-tag {
    background: var(--iptv-dark-tertiary);
    color: var(--iptv-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.post-tag:hover {
    background: var(--iptv-gradient);
    border-color: var(--iptv-primary);
    transform: translateY(-2px);
}

/* ===== Paginação ===== */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem;
}

.pagination-modern a {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    background: var(--iptv-dark-secondary) !important;
    color: var(--iptv-light) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 1, 0, 0.3) !important;
}

.pagination-modern a:hover {
    background: var(--iptv-gradient) !important;
    border-color: var(--iptv-primary) !important;
    transform: scale(1.05);
}

/* ===== Animações ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.6s ease-out;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== Efeito de Loading ===== */
.post-card-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.post-card:hover .post-card-thumbnail::before {
    left: 100%;
}

/* ===== Responsividade ===== */
@media (max-width: 768px) {
    .site-main {
        padding: 1rem 0.5rem;
    }
    
    .archive-header-modern {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .archive-header-modern h1 {
        font-size: 2rem;
    }
    
    .single-post-container {
        border-radius: 0;
    }
    
    .single-post-header,
    .single-post-content {
        padding: 2rem 1.5rem;
    }
    
    .single-post-meta {
        gap: 1rem;
    }
}

/* ===== Estado vazio (sem posts) ===== */
.no-posts-found {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--iptv-dark-secondary);
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 600px;
}

.no-posts-found h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--iptv-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.no-posts-found p {
    color: #94a3b8;
    font-size: 1.125rem;
}
