/* ===== Blog Section - BBC Style ===== */

/* General Styles */
.blog-section {
    padding: 3rem 0;
    background-color: #f8f8f8;
}

.blog-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #222;
    position: relative;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.75rem;
}

.blog-section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #D85050;
}

/* ===== RICH CONTENT STYLING - BBC INSPIRED ===== */

/* Prose Container */
.prose {
    max-width: none;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
}

/* Headings */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    color: #222;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h1 {
    font-size: 2.25rem;
    border-bottom: 3px solid #D85050;
    padding-bottom: 0.5rem;
}

.prose h2 {
    font-size: 1.875rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.prose h3 {
    font-size: 1.5rem;
    color: #D85050;
}

.prose h4 {
    font-size: 1.25rem;
    color: #555;
}

.prose h5 {
    font-size: 1.125rem;
    color: #666;
}

.prose h6 {
    font-size: 1rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Links */
.prose a {
    color: #D85050;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.prose a:hover {
    color: #242463;
    border-bottom-color: #242463;
}

/* Lists */
.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.prose ul li, .prose ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.prose ul li {
    list-style-type: disc;
}

.prose ol li {
    list-style-type: decimal;
}

.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes - BBC Style */
.prose blockquote {
    border-left: 4px solid #D85050;
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background-color: #f9f9f9;
    position: relative;
    font-size: 1.125rem;
    line-height: 1.6;
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    left: 0.5rem;
    top: -0.5rem;
    font-size: 3rem;
    color: #D85050;
    font-family: Georgia, serif;
    line-height: 1;
}

.prose blockquote p {
    margin-bottom: 0.5rem;
}

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

.prose blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #777;
    font-style: normal;
}

.prose blockquote cite::before {
    content: '— ';
}

/* Images and Figures - BBC Style */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.prose figure {
    margin: 2rem 0;
    text-align: center;
}

.prose figure img {
    margin: 0 auto;
    display: block;
}

.prose figcaption {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #666;
    border-left: 3px solid #D85050;
    font-style: italic;
    text-align: left;
    background-color: #f8f8f8;
    border-radius: 0 4px 4px 0;
    line-height: 1.4;
}

/* Image Alignment Classes */
.prose .align-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 50%;
}

.prose .align-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 50%;
}

.prose .align-center {
    display: block;
    margin: 1.5rem auto;
    text-align: center;
}

.prose .img-responsive {
    width: 100%;
    height: auto;
}

.prose .img-rounded {
    border-radius: 8px;
}

.prose .img-circle {
    border-radius: 50%;
}

.prose .img-thumbnail {
    border: 1px solid #ddd;
    padding: 4px;
    background-color: #fff;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.prose table th,
.prose table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.prose table th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #D85050;
}

.prose table tr:hover {
    background-color: #f9f9f9;
}

/* Code */
.prose code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #c7254e;
    border: 1px solid #e1e1e8;
}

.prose pre {
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid #D85050;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: #333;
    font-size: 0.9rem;
}

/* Horizontal Rules */
.prose hr {
    border: none;
    height: 2px;
    background-color: #eee;
    margin: 2rem 0;
    position: relative;
}

.prose hr::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 4px;
    background-color: #D85050;
}

/* Emphasis */
.prose strong {
    font-weight: 700;
    color: #222;
}

.prose em {
    font-style: italic;
    color: #555;
}

.prose mark {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* Subscript and Superscript */
.prose sub,
.prose sup {
    font-size: 0.8rem;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.prose sub {
    bottom: -0.25em;
}

.prose sup {
    top: -0.5em;
}

/* Text Alignment Classes */
.prose .align-left,
.prose p.align-left,
.prose h1.align-left,
.prose h2.align-left,
.prose h3.align-left,
.prose h4.align-left,
.prose h5.align-left,
.prose h6.align-left {
    text-align: left !important;
}

.prose .align-center,
.prose p.align-center,
.prose h1.align-center,
.prose h2.align-center,
.prose h3.align-center,
.prose h4.align-center,
.prose h5.align-center,
.prose h6.align-center {
    text-align: center !important;
}

.prose .align-right,
.prose p.align-right,
.prose h1.align-right,
.prose h2.align-right,
.prose h3.align-right,
.prose h4.align-right,
.prose h5.align-right,
.prose h6.align-right {
    text-align: right !important;
}

/* Ensure default left alignment for all text elements */
.prose * {
    direction: ltr;
}

.prose p,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6,
.prose li,
.prose td,
.prose th {
    text-align: left;
}

/* Clear floats */
.prose::after {
    content: '';
    display: table;
    clear: both;
}

/* Responsive adjustments for rich content */
@media (max-width: 768px) {
    .prose {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .prose h1 {
        font-size: 1.75rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose .align-left,
    .prose .align-right {
        float: none;
        margin: 1rem 0;
        max-width: 100%;
    }
    
    .prose figure {
        margin: 1rem 0;
    }
    
    .prose figcaption {
        font-size: 0.85rem;
    }
    
    .prose blockquote {
        padding: 0.75rem 0 0.75rem 1rem;
        margin: 1.5rem 0;
        font-size: 1rem;
    }
    
    .prose table {
        font-size: 0.9rem;
    }
    
    .prose table th,
    .prose table td {
        padding: 0.5rem;
    }
}

/* Category Tabs - BBC Style */
.blog-categories-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 2rem;
    position: relative;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

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

.blog-category-tab {
    white-space: nowrap;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-right: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 4px;
}

.blog-category-tab.active {
    color: #fff;
    background-color: #242463;
}

.blog-category-tab:not(.active):hover {
    background-color: #f0f0f0;
}

/* Posts Carousel Container */
.blog-posts-carousel {
    position: relative;
    margin: 0 -15px;
    padding: 0 15px;
}

.blog-posts-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1rem;
    gap: 1.5rem;
}

.blog-posts-row::-webkit-scrollbar {
    display: none;
}

/* Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.carousel-arrow.prev {
    left: 5px;
}

.carousel-arrow.next {
    right: 5px;
}

.carousel-arrow i {
    color: #333;
    font-size: 1.2rem;
}

/* Post Card - BBC Style */
.blog-post-card {
    flex: 0 0 auto;
    width: 300px;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-post-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.blog-post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-content {
    padding: 1.25rem;
}

.blog-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #222;
}

.blog-post-title a {
    color: inherit;
    text-decoration: none;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #777;
}

.blog-post-meta .date {
    margin-right: 0.75rem;
}

.blog-post-meta .reading-time {
    display: flex;
    align-items: center;
}

.blog-post-meta .reading-time i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.blog-post-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured Post */
.featured-post {
    margin-bottom: 2.5rem;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.featured-post-image {
    height: 400px;
    position: relative;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
    color: #fff;
}

.featured-post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-post-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.featured-post-title a {
    color: inherit;
    text-decoration: none;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.featured-post-meta .date {
    margin-right: 1rem;
}

.featured-post-excerpt {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.featured-post-link {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.featured-post-link:hover {
    text-decoration: underline;
}

/* Blog Detail Page */
.blog-detail-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.blog-detail-header {
    margin-bottom: 2rem;
}

.blog-detail-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #222;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #666;
}

.blog-detail-meta .author {
    margin-right: 1rem;
    font-weight: 600;
}

.blog-detail-meta .date {
    margin-right: 1rem;
}

.blog-detail-meta .reading-time {
    display: flex;
    align-items: center;
}

.blog-detail-meta .reading-time i {
    margin-right: 0.25rem;
}

.blog-detail-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.blog-detail-content {
    margin-bottom: 2rem;
}

.blog-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.blog-detail-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-detail-tag:hover {
    background-color: #242463;
    color: #fff;
}

/* Sidebar */
.blog-sidebar {
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #222;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #242463;
}

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.sidebar-category-item {
    margin-bottom: 0.75rem;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-category-link:hover {
    color: #242463;
}

.sidebar-category-count {
    display: inline-block;
    min-width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    background-color: #eee;
    color: #555;
    border-radius: 15px;
    font-size: 0.8rem;
}

.sidebar-posts {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.sidebar-post-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

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

.sidebar-post-image {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 1rem;
}

.sidebar-post-content {
    flex: 1;
}

.sidebar-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.sidebar-post-title a {
    color: #333;
    text-decoration: none;
}

.sidebar-post-title a:hover {
    color: #242463;
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: #777;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background-color: #eee;
    color: #555;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-tag:hover {
    background-color: #242463;
    color: #fff;
}

/* Related Posts */
.related-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #222;
}

.related-posts-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.related-post-col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    margin-bottom: 1.5rem;
}

/* Blog Index Page */
.blog-index-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.blog-index-header {
    margin-bottom: 2rem;
}

.blog-index-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #222;
}

.blog-index-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.blog-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.blog-grid-item {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    margin-bottom: 2rem;
}

.blog-search-form {
    margin-bottom: 2rem;
}

.blog-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination li.active span {
    background-color: #242463;
    color: #fff;
    border-color: #242463;
}

.pagination li a:hover {
    background-color: #f0f0f0;
}

/* Responsive Adjustments */
@media (max-width: 1199px) {
    .blog-grid-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .related-post-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 991px) {
    .blog-detail-title {
        font-size: 2rem;
    }
    
    .featured-post-image {
        height: 300px;
    }
    
    .featured-post-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .blog-grid-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .related-post-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .blog-post-card {
        width: 100%;
    }
    
    .blog-detail-title {
        font-size: 1.75rem;
    }
    
    .featured-post-overlay {
        padding: 1.5rem;
    }
    
    .featured-post-title {
        font-size: 1.25rem;
    }
} 