/* css/blog.css */

/* Blog Hero Section */
.blog-hero-section {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.blog-hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.blog-hero-section p {
    font-size: 1.125rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* === HORIZONTAL CATEGORIES SECTION === */
.horizontal-categories-section {
    padding: 1.5rem 0 0.5rem 0;
    border-bottom: 1px solid rgba(173, 82, 7, 0.1);
    display: block; /* Visible on mobile and tablet by default */
}
.categories-slider-container {
    position: relative;
    overflow: hidden;
}
.categories-slider {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.categories-slider::-webkit-scrollbar {
    display: none;
}
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.category-pill:hover {
    background-color: #f9fafb;
    border-color: #ad5207;
    color: #ad5207;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.category-pill.active {
    background-color: #ad5207;
    border-color: #ad5207;
    color: white;
    box-shadow: 0 2px 6px rgba(173, 82, 7, 0.25);
}
.category-pill.active:hover {
    background-color: #92450a;
}
.category-pill .count {
    background-color: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.category-pill.active .count {
    background-color: rgba(255, 255, 255, 0.25);
}

/* === Main Blog Section Layout === */
.blog-main-section {
    padding-top: 3rem; /* Increased top padding for better separation */
    padding-bottom: 3rem;
}
.blog-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
.grid-container-blog-posts {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
}

/* === ENHANCED BLOG CARD STYLES === */
.blog-post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: left;
    text-decoration: none;
    color: inherit;
}
.blog-post-card:hover {
    color: #ad5207;
}
.blog-post-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 1rem;
}
.blog-post-card:hover img {
    transform: scale(1.03);
}
.blog-post-card .card-content {
    padding-top: 15px;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.blog-post-card .card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ad5207;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
.blog-post-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: inherit;
    transition: color 0.3s ease;
}
.blog-post-card h3 a {
    text-decoration: none;
    color: inherit;
}
.blog-post-card .card-author {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}
/* Hide elements not in new design */
.blog-post-card p.excerpt,
.blog-post-card .card-meta,
.blog-post-card .read-more-link {
    display: none;
}

/* === REFACTORED: Unified & Mobile-First Widget Styles === */
.blog-sidebar {
    display: none; /* Hidden on mobile by default */
}
.sidebar-widget {
    background-color: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.sidebar-widget .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ad5207;
}
.sidebar-widget .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-widget .widget-list li {
    border-bottom: 1px solid #f3f4f6;
}
.sidebar-widget .widget-list li:last-child {
    border-bottom: none;
}
.sidebar-widget .widget-list li a {
    display: block;
    padding: 0.75rem 0;
    text-decoration: none;
    color: #4B5563;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}
.sidebar-widget .widget-list li a:hover {
    color: #ad5207;
    padding-left: 0.5rem;
}
.sidebar-widget .widget-list li a.active {
    color: #ad5207;
    font-weight: 700;
}


/* === Featured & Subscription Sections (No Major Changes) === */
.featured-post-section { padding: 2rem 0; }
.featured-post-card { display: grid; grid-template-columns: 1fr; background-color: #fffaf2; border-radius: 1rem; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.3s ease; border: 1px solid #eee; }
.featured-post-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); }
.featured-image-container { position: relative; width: 100%; overflow: hidden; }
.featured-image-container img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform 0.3s ease; }
.featured-post-card:hover .featured-image-container img { transform: scale(1.05); }
.featured-content-container { padding: 2rem; }
.featured-tag { display: inline-block; padding: 0.25rem 0.75rem; background-color: #ad5207; color: white; border-radius: 999px; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }
.featured-content-container h2 { font-size: 1.5rem; margin: 0 0 1rem 0; line-height: 1.3; }
.featured-content-container .excerpt { font-size: 1.1rem; color: #4B5563; margin-bottom: 1.5rem; }

.subscribe-widget-section { padding: 3rem 0; background-color: #f9fafb; }
.subscribe-widget { background-color: #fffaf2; padding: 2.5rem; border-radius: 1rem; margin: 0 auto; max-width: 600px; text-align: center; border: 1px solid rgba(173, 82, 7, 0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.subscribe-widget .widget-title { font-size: 2rem; }
.subscribe-widget p { font-size: 1.125rem; color: #4B5563; margin-top: 0; margin-bottom: 1.5rem; }
.subscribe-input { width: 100%; padding: 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 1rem; }
.subscribe-button { width: 100%; padding: 0.75rem; font-size: 1rem; }

/* === PAGINATION STYLES === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #ad5207;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.pagination-btn:hover {
    background-color: #e88e07;
    transform: translateY(-2px);
}
.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.pagination-number:hover {
    background-color: #fff0e1;
    border-color: #ad5207;
    color: #ad5207;
}
.pagination-number.active {
    background-color: #ad5207;
    border-color: #ad5207;
    color: white;
}
.pagination-ellipsis {
    color: #9ca3af;
    padding: 0 0.25rem;
}

/* === NO POSTS MESSAGE === */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.no-posts i {
    font-size: 3rem;
    color: #ad5207;
    margin-bottom: 1rem;
}
.no-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}
.no-posts p {
    color: #666;
    margin-bottom: 2rem;
}

/* === SIDEBAR WIDGET ENHANCEMENTS === */
.search-widget .search-form {
    display: flex;
    gap: 0.5rem;
}
.search-widget .search-input {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}
.search-widget .search-btn {
    padding: 0.7rem 1rem;
    background-color: #ad5207;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.search-widget .search-btn:hover {
    background-color: #e88e07;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-list .count {
    background-color: rgba(173, 82, 7, 0.1);
    color: #ad5207;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
.popular-posts li {
    border-bottom: 1px solid #f3f4f6;
    padding: 0.75rem 0;
}
.popular-posts li:first-child {
    padding-top: 0;
}
.popular-posts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.popular-post-link {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}
.popular-post-link:hover {
    opacity: 0.7;
}
.popular-post-image {
    flex-shrink: 0;
    width: 90px;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f3f4f6;
}
.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popular-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.popular-post-info h4 {
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    color: #1a1a1a;
    font-weight: 600;
}
.popular-post-info .views {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.newsletter-widget p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.newsletter-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}
.newsletter-btn {
    width: 100%;
}

/* ====== REFACTORED: Simplified Responsive Layout ====== */

/* Mobile optimizations */
@media (max-width: 767px) {
    .category-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.35rem;
    }
    .category-pill .count {
        padding: 0.1rem 0.35rem;
        font-size: 0.65rem;
        min-width: 16px;
    }
    .category-pill i {
        font-size: 0.7rem;
    }
}

/* Tablet View (768px and up) */
@media (min-width: 768px) {
    .grid-container-blog-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .featured-post-card {
        grid-template-columns: 1fr 1fr;
    }
    .featured-content-container {
        padding: 3rem;
    }
    .featured-content-container h2 {
        font-size: 1.75rem;
    }
}

/* Desktop View (1024px and up) */
@media (min-width: 1024px) {
    .horizontal-categories-section {
        display: none; /* Hide horizontal scroll on desktop */
    }
    .blog-sidebar {
        display: block; /* Show sidebar on desktop */
    }
    .blog-layout-grid {
        grid-template-columns: 1fr 280px; /* Reduced sidebar from 350px to 280px */
        gap: 2.5rem;
    }
    .grid-container-blog-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .grid-container-blog-posts {
        grid-template-columns: repeat(3, 1fr);
    }
}