/**
 * Blog Styles - Flow Up
 * Sistema de blog PHP
 */

/* =====================================================
   BLOG LISTING PAGE
   ===================================================== */

/* Search Form */
.blog-search-form .form-control {
    border: none;
    border-radius: 50px 0 0 50px;
    padding: 0.75rem 1.5rem;
}

.blog-search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.5rem;
}

/* Categories Navigation */
.blog-categories-nav {
    -webkit-overflow-scrolling: touch;
}

.blog-categories-nav .nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-categories-nav .nav::-webkit-scrollbar {
    display: none;
}

.blog-categories-nav .nav-link {
    white-space: nowrap;
    color: var(--dominant-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blog-categories-nav .nav-link:hover {
    background-color: rgba(79, 52, 139, 0.1);
}

.blog-categories-nav .nav-link.active {
    background-color: var(--dominant-color);
    color: white;
}

.blog-categories-nav .nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Blog Cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

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

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card .card-title a {
    transition: color 0.3s ease;
}

.blog-card .card-title a:hover {
    color: var(--dominant-color) !important;
}

/* Featured Post Card */
.blog-featured-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-featured-card:hover {
    transform: translateY(-5px);
}

.blog-featured-card a {
    text-decoration: none;
    color: inherit;
}

.blog-featured-card img {
    min-height: 300px;
}

/* Post Meta */
.post-meta ion-icon {
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Sidebar */
.blog-sidebar .card-header {
    border-bottom: none;
}

.blog-sidebar .list-group-item {
    border-left: none;
    border-right: none;
    transition: background-color 0.3s ease;
}

.blog-sidebar .list-group-item:hover {
    background-color: rgba(79, 52, 139, 0.05);
}

.blog-sidebar .list-group-item:first-child {
    border-top: none;
}

.blog-sidebar .list-group-item a {
    color: var(--dominant-color);
}

/* Pagination */
.pagination .page-link {
    color: var(--dominant-color);
    border-color: #dee2e6;
    border-radius: 50px;
    margin: 0 0.25rem;
    min-width: 40px;
    text-align: center;
}

.pagination .page-item.active .page-link {
    background-color: var(--dominant-color);
    border-color: var(--dominant-color);
}

.pagination .page-link:hover {
    background-color: rgba(79, 52, 139, 0.1);
    color: var(--dominant-color);
}

/* =====================================================
   BLOG POST PAGE
   ===================================================== */

/* Post Hero */
.post-meta-hero {
    color: rgba(255, 255, 255, 0.8);
}

.post-meta-hero ion-icon {
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Post Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    color: var(--dominant-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.post-content h3 {
    color: var(--purple-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.post-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.post-content a {
    color: var(--dominant-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--purple-dark);
}

/* Code blocks */
.post-content pre {
    background: var(--light-grey);
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--dominant-color);
}

.post-content code {
    background: var(--light-grey);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--dominant-color);
}

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

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--dominant-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--light-grey);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

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

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

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

.post-content th,
.post-content td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.post-content th {
    background: var(--dominant-color);
    color: white;
}

.post-content tr:nth-child(even) {
    background: var(--light-grey);
}

/* Tags */
.post-tags .badge {
    font-weight: normal;
    transition: all 0.3s ease;
}

.post-tags .badge:hover {
    background-color: var(--dominant-color) !important;
    color: white !important;
}

/* Share Buttons */
.share-buttons .btn {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
}

.share-buttons .btn:hover {
    background-color: var(--dominant-color);
    border-color: var(--dominant-color);
    color: white;
}

/* Author Box */
.author-box {
    border-left: 4px solid var(--dominant-color);
}

/* Related Posts */
.related-posts .blog-card {
    max-width: 350px;
    margin: 0 auto;
}

.related-posts .card-img-top {
    height: 180px;
}

/* CTA Section */
.blog-cta {
    color: white;
}

.blog-cta h2,
.blog-cta p {
    color: white;
}

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

@media (max-width: 991px) {
    .blog-sidebar {
        margin-top: 3rem;
    }
}

@media (max-width: 767px) {
    .blog-categories-nav .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .blog-featured-card .row {
        flex-direction: column;
    }

    .blog-featured-card img {
        min-height: 200px;
    }

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

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

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

    .blog-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* =====================================================
   UTILITIES
   ===================================================== */

.object-fit-cover {
    object-fit: cover;
}

.bg-dominant-color {
    background-color: var(--dominant-color);
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}
