/* DWR7 Blog Styles */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(242, 101, 34, 0.2);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-niche {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-orange);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-dark-muted);
    margin-bottom: 10px;
}

.blog-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card p {
    color: var(--text-dark-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-orange);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: gap 0.3s;
}

.blog-card:hover .blog-card-link {
    gap: 10px;
}

/* Modal de Leitura Premium (Glassmorphism) */
.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.blog-modal.active {
    opacity: 1;
    pointer-events: all;
}

.blog-modal-container {
    background: var(--bg-white);
    width: 100%;
    max-width: 850px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.blog-modal.active .blog-modal-container {
    transform: translateY(0);
}

.blog-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
}

.blog-modal-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-modal-header-niche {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-orange);
    letter-spacing: 1px;
}

.blog-modal-header-date {
    font-size: 0.8rem;
    color: var(--text-dark-muted);
}

.blog-modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.blog-modal-close:hover {
    background: var(--accent-orange);
    color: #fff;
    transform: rotate(90deg);
}

.blog-modal-content {
    padding: 32px;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-modal-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    line-height: 1.3;
}

.blog-modal-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}

.blog-modal-body {
    font-size: 1.05rem;
    color: #2d3748;
}

/* Markdown formatting inside modal */
.blog-modal-body h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    color: var(--text-dark);
}

.blog-modal-body h3 {
    font-size: 1.25rem;
    margin: 24px 0 12px;
    color: var(--text-dark);
}

.blog-modal-body p {
    margin-bottom: 20px;
}

.blog-modal-body ul, .blog-modal-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

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

.blog-modal-body strong {
    color: #1a202c;
}

.blog-modal-body blockquote {
    border-left: 4px solid var(--accent-orange);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-dark-muted);
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-modal-content {
        padding: 20px;
    }
    
    .blog-modal-content h1 {
        font-size: 1.6rem;
    }
    
    .blog-modal-header {
        padding: 16px 20px;
    }
}

/* Tabelas Premium */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 28px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.table-container th {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 2px solid var(--border-light);
}

.table-container td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    color: #4a5568;
    background-color: #fff;
}

.table-container tr:last-child td {
    border-bottom: none;
}

.table-container tr:nth-child(even) td {
    background-color: #fcfdfd;
}

/* Divisória de Conteúdo */
.blog-separator {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(242, 101, 34, 0.4), rgba(255, 255, 255, 0));
    margin: 32px 0;
}
