/**
 * CS Viagens & Eventos
 * Estilos específicos da página Blog
 */

/* ========================================
   Variáveis CSS
   ======================================== */
:root {
    --blog-primary: #1142d4;
    --blog-primary-light: rgba(17, 66, 212, 0.1);
    --blog-text-dark: #0f172a;
    --blog-text-muted: #64748b;
    --blog-bg-light: #f6f6f8;
    --blog-bg-dark: #101522;
}

/* ========================================
   Hero Section - Post em Destaque
   ======================================== */
.blog-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.8));
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem;
    max-width: 48rem;
}

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

.blog-hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--blog-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.blog-hero-title {
    color: white;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

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

.blog-hero:hover .blog-hero-title {
    text-decoration: underline;
}

.blog-hero-excerpt {
    color: #e2e8f0;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-hero-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--blog-primary);
    color: white;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.blog-hero-btn:hover {
    background-color: rgba(17, 66, 212, 0.9);
    transform: scale(1.05);
}

.blog-hero-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* ========================================
   Post Cards
   ======================================== */
.blog-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dark .blog-card {
    background-color: #1e293b;
}

.blog-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.blog-card-img-wrapper {
    position: relative;
    overflow: hidden;
}

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

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

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(17, 66, 212, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0.25rem;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--blog-primary);
}

.blog-card-excerpt {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.dark .blog-card-excerpt {
    color: #94a3b8;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blog-primary);
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: auto;
}

.blog-card-link:hover {
    text-decoration: underline;
}

/* ========================================
   Sidebar
   ======================================== */
.blog-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* Search */
.blog-search {
    position: relative;
    width: 100%;
}

.blog-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem !important;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dark .blog-search-input {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(17, 66, 212, 0.1);
}

.blog-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Categories */
.blog-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.blog-category-link:hover {
    background-color: #f1f5f9;
}

.dark .blog-category-link:hover {
    background-color: #334155;
}

.blog-category-link.active {
    background-color: var(--blog-primary-light);
    color: var(--blog-primary);
    font-weight: 700;
}

.blog-category-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-category-count {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.blog-category-link.active .blog-category-count {
    background-color: var(--blog-primary);
    color: white;
}

.blog-category-link:not(.active) .blog-category-count {
    border: 1px solid #e2e8f0;
    color: #94a3b8;
}

.dark .blog-category-link:not(.active) .blog-category-count {
    border-color: #475569;
}

/* Recent Posts */
.blog-recent-post {
    display: flex;
    gap: 0.75rem;
}

.blog-recent-post:hover .blog-recent-title {
    color: var(--blog-primary);
}

.blog-recent-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f1f5f9;
}

.dark .blog-recent-img {
    background-color: #334155;
}

.blog-recent-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-recent-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.dark .blog-recent-title {
    color: #e2e8f0;
}

.blog-recent-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-tag {
    padding: 0.375rem 0.75rem;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.dark .blog-tag {
    background-color: #334155;
    color: #94a3b8;
}

.blog-tag:hover,
.blog-tag.active {
    background-color: var(--blog-primary);
    color: white;
}

/* CTA Box */
.blog-cta {
    padding: 1.5rem;
    background-color: #0f172a;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    color: white;
}

.blog-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
    background-size: 24px 24px;
}

.blog-cta-content {
    position: relative;
    z-index: 10;
}

.blog-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-cta-text {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.blog-cta-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: white;
    color: #0f172a;
    font-weight: 700;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.blog-cta-btn:hover {
    background-color: var(--blog-primary);
    color: white;
}

/* ========================================
   Pagination
   ======================================== */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.blog-pagination a {
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.dark .blog-pagination a {
    border-color: #475569;
    color: #94a3b8;
}

.blog-pagination a:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
}

.blog-pagination .active {
    background-color: var(--blog-primary);
    color: white;
    border: none;
}

.blog-pagination .disabled {
    color: #cbd5e1;
    pointer-events: none;
}

.dark .blog-pagination .disabled {
    color: #475569;
}

/* ========================================
   Newsletter Section
   ======================================== */
.blog-newsletter {
    background-color: rgba(17, 66, 212, 0.05);
    border-top: 1px solid rgba(17, 66, 212, 0.1);
    border-bottom: 1px solid rgba(17, 66, 212, 0.1);
    padding: 4rem 1rem;
    margin-top: 3rem;
}

.dark .blog-newsletter {
    background-color: rgba(17, 66, 212, 0.1);
}

.blog-newsletter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: var(--blog-primary);
    color: white;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.blog-newsletter-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .blog-newsletter-title {
        font-size: 2.25rem;
    }
}

.blog-newsletter-text {
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.dark .blog-newsletter-text {
    color: #94a3b8;
}

.blog-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 32rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .blog-newsletter-form {
        flex-direction: row;
    }
}

.blog-newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 1rem;
}

.dark .blog-newsletter-input {
    background-color: #1e293b;
    color: #e2e8f0;
}

.blog-newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 66, 212, 0.2);
}

.blog-newsletter-btn {
    padding: 1rem 2rem;
    background-color: var(--blog-primary);
    color: white;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.blog-newsletter-btn:hover {
    background-color: rgba(17, 66, 212, 0.9);
}

.blog-newsletter-privacy {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 1rem;
}

/* ========================================
   Filter Badges
   ======================================== */
.blog-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--blog-primary-light);
    color: var(--blog-primary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

.blog-filter-badge-remove {
    display: inline-flex;
    padding: 0.125rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.blog-filter-badge-remove:hover {
    background-color: var(--blog-primary);
    color: white;
}

/* ========================================
   Empty State
   ======================================== */
.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.blog-empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.dark .blog-empty-icon {
    color: #475569;
}

.blog-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.blog-empty-text {
    color: #94a3b8;
}

.blog-empty-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blog-primary);
    font-weight: 500;
    margin-top: 1rem;
}

.blog-empty-link:hover {
    text-decoration: underline;
}

/* ========================================
   Placeholder Image
   ======================================== */
.blog-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(17, 66, 212, 0.2), rgba(17, 66, 212, 0.4));
}

.blog-placeholder-icon {
    font-size: 3rem;
    color: rgba(17, 66, 212, 0.5);
}

/* ========================================
   Mobile Search
   ======================================== */
.blog-mobile-search {
    display: block;
}

@media (min-width: 768px) {
    .blog-mobile-search {
        display: none;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeIn 0.3s ease-out;
}

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