/* blog.css */

/* Core Variables */
:root {
    --blog-primary: #2563eb;
    --blog-secondary: #475569;
    --blog-dark: #1e293b;
    --blog-light: #f8fafc;
    --blog-success: #22c55e;
    --blog-danger: #ef4444;
    --blog-warning: #f59e0b;
    --blog-info: #0ea5e9;
    --blog-gray: #94a3b8;
    --blog-text: #334155;
    --blog-shadow: rgba(0, 0, 0, 0.1);
    --blog-radius: 1rem;
    --blog-radius-sm: 0.5rem;
    --blog-transition: all 0.3s ease;
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
    color: var(--blog-text);
    line-height: 1.6;
}

.container-fluid {
    padding-left: 5%;
    padding-right: 5%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--blog-dark);
}

/* Hero Section */
.blog-hero {
    background-color: var(--blog-dark);
    overflow: hidden;
    position: relative;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-background {
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    transform: scale(1.1);
    opacity: 0.6;
}

/* Search Bar */
.search-form .form-control {
    border: none;
    height: 54px;
    font-size: 1.1rem;
    padding-left: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: var(--blog-transition);
}

.search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form .btn {
    padding: 0 1.5rem;
    font-size: 1.1rem;
}

/* Category Pills */
.category-pills .badge {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--blog-transition);
}

.category-pills .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--blog-shadow);
}

/* Featured Post Card */
.featured-post-card {
    background: #fff;
    overflow: hidden;
    transition: var(--blog-transition);
}

.featured-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--blog-shadow);
}

.featured-image {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.featured-image img {
    transition: var(--blog-transition);
}

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

/* Post Cards Grid */
.posts-container {
    margin: -1rem;
}

.post-card {
    background: #fff;
    border-radius: var(--blog-radius);
    overflow: hidden;
    transition: var(--blog-transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--blog-shadow);
}

.post-image {
    position: relative;
    padding-top: 66%;
}

.post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--blog-transition);
}

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

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.post-content {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    color: var(--blog-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--blog-gray);
    font-size: 0.875rem;
}

/* Author Meta */
.author-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.author-name {
    font-weight: 500;
    color: var(--blog-dark);
}

/* Sidebar */
.blog-widget {
    background: #fff;
    border-radius: var(--blog-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--blog-shadow);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--blog-light);
}

/* Popular Posts Widget */
.popular-post {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--blog-light);
}

.popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    border-radius: var(--blog-radius-sm);
    overflow: hidden;
}

.popular-post-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--blog-light) 0%, #fff 100%);
    padding: 4rem 0;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-control {
    height: 54px;
    border: none;
    padding-left: 1.5rem;
    box-shadow: 0 4px 12px var(--blog-shadow);
}

/* Load More Button */
.load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 500;
    transition: var(--blog-transition);
}

.load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--blog-shadow);
}

/* View Toggle Buttons */
.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-options .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--blog-radius-sm);
}

/* List View Styles */
.list-view .post-card {
    display: flex;
    flex-direction: row;
}

.list-view .post-image {
    width: 300px;
    padding-top: 0;
    flex-shrink: 0;
}

.list-view .post-content {
    flex: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--blog-light);
    border-top-color: var(--blog-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .min-vh-75 {
        min-height: 60vh;
    }

    .featured-image {
        min-height: 300px;
    }

    .list-view .post-image {
        width: 200px;
    }
}

@media (max-width: 767.98px) {
    .blog-hero {
        text-align: center;
    }

    .list-view .post-card {
        flex-direction: column;
    }

    .list-view .post-image {
        width: 100%;
        padding-top: 66%;
    }
}

/* Utility Classes */
.object-fit-cover {
    object-fit: cover;
}

.hover-lift {
    transition: var(--blog-transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--blog-shadow);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero Section Fixes */
.blog-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: #ffffff;
}

/* Breadcrumb Styles */
.blog-hero .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.blog-hero .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.blog-hero .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.blog-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
}

.blog-hero .breadcrumb-item a:hover {
    color: #ffffff;
}

.blog-hero .breadcrumb-item.active {
    color: #ffffff;
}

/* Hero Text Styles */
.blog-hero h1,
.blog-hero .h1,
.blog-hero h2,
.blog-hero .h2 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-hero .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.blog-hero .lead {
    color: rgba(255, 255, 255, 0.9);
}

/* Search Form in Hero */
.blog-hero .search-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.blog-hero .search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.blog-hero .search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

/* Category Pills in Hero */
.blog-hero .badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.blog-hero .badge:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Optional Hero Height Adjustment */
.blog-hero .min-vh-40 {
    min-height: 30vh !important;
    /* Or adjust to your preferred height */
}

.blog-post-heading {
    font-size: 1.5rem;
    /* Adjust font size for dynamic headings */
    font-weight: 600;
    color: var(--blog-dark);
    margin-bottom: 0.5rem;
}

.subheading {
    font-size: 1rem;
    /* Smaller text for subheadings */
    font-weight: 400;
    color: var(--blog-secondary);
    /* Dimmed text for subheadings */
    line-height: 1.6;
    display: block;
    /* Each subheading on a new line */
    margin-top: 0.25rem;
}

.dynamic-bullets {
    list-style-type: disc;
    /* Default bullet style */
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.dynamic-bullets li {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--blog-text);
    margin-bottom: 0.5rem;
}

.underlined-italic {
    font-style: italic;
    /* Make text italic */
    text-decoration: underline;
    /* Add underline */
    font-size: 1.25rem;
    /* Adjust font size */
    font-weight: 500;
    /* Optional: Adjust weight */
    color: var(--blog-dark);
    /* Use your preferred color variable */
    margin-bottom: 1rem;
    /* Add spacing below */
}

/* App icon wrapper improvements */
.app-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: var(--blog-radius);
}

.app-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Improve mobile post card layout */
    .post-card {
        margin-bottom: 1rem;
    }

    .post-card .row {
        flex-direction: row !important;
    }

    .post-card .col-4 {
        width: 35%;
        padding: 0.75rem;
    }

    .post-card .col-8 {
        width: 65%;
    }

    /* Adjust content spacing */
    .post-content {
        padding: 0.75rem !important;
    }

    .post-content h3 {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .post-meta {
        font-size: 0.75rem !important;
    }

    .post-excerpt {
        font-size: 0.8rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hero section adjustments */
    .blog-hero {
        padding: 2rem 0;
    }

    .blog-hero h1 {
        font-size: 1.75rem;
    }

    /* Category pills adjustments */
    .category-pills .badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Featured post improvements */
.featured-post-card {
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}