/* ========================================
   BLOG.CSS — Blog component styles
   Matches Laxi Super Mart design system
   ======================================== */

/* ========================================
   BLOG GRID & CARDS
   ======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.blog-card {
    background: #ffffff;
    border: 1px solid #d4ddd8;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(26, 60, 52, 0.08);
    transform: translateY(-3px);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #3b9b78;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6a6b76;
    margin-bottom: 10px;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-card-meta i {
    font-size: 12px;
    color: #3b9b78;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #222222;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: #3b9b78;
}

.blog-card-excerpt {
    font-size: 14px;
    color: #6a6b76;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6a6b76;
    font-weight: 500;
}

.blog-card-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card-link {
    font-size: 13px;
    font-weight: 600;
    color: #3b9b78;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.blog-card-link:hover {
    gap: 8px;
}

/* ========================================
   FEATURED POST HERO
   ======================================== */
.blog-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: #ffffff;
    border: 1px solid #d4ddd8;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 48px;
    transition: box-shadow 0.3s;
}

.blog-featured:hover {
    box-shadow: 0 12px 32px rgba(26, 60, 52, 0.1);
}

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

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

.blog-featured:hover .blog-featured-image img {
    transform: scale(1.03);
}

.blog-featured-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-tag {
    display: inline-block;
    background: #dff7d7;
    color: #1a3c34;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    width: fit-content;
}

.blog-featured-title {
    font-size: 28px;
    font-weight: 800;
    color: #222222;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.blog-featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-featured-title a:hover {
    color: #3b9b78;
}

.blog-featured-excerpt {
    font-size: 15px;
    color: #6a6b76;
    line-height: 1.7;
    margin-bottom: 20px;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6a6b76;
}

.blog-featured-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-featured-meta i {
    color: #3b9b78;
    font-size: 13px;
}

/* ========================================
   CATEGORY FILTER PILLS
   ======================================== */
.blog-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.blog-filters::-webkit-scrollbar {
    display: none;
}

.blog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #d4ddd8;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #6a6b76;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.blog-filter-pill:hover {
    border-color: #3b9b78;
    color: #1a3c34;
    background: #f0fdf0;
}

.blog-filter-pill.active {
    background: #3b9b78;
    color: #ffffff;
    border-color: #3b9b78;
}

.blog-filter-pill i {
    font-size: 13px;
}

/* ========================================
   PAGINATION
   ======================================== */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 0;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #d4ddd8;
    color: #6a6b76;
    background: #ffffff;
}

.blog-pagination a:hover {
    border-color: #3b9b78;
    color: #1a3c34;
    background: #f0fdf0;
}

.blog-pagination .active {
    background: #3b9b78;
    color: #ffffff;
    border-color: #3b9b78;
}

.blog-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ========================================
   BLOG POST HERO
   ======================================== */
.blog-post-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.blog-post-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.blog-post-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 20%, rgba(26, 60, 52, 0.85) 100%);
    z-index: 1;
}

.blog-post-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 48px;
    width: 100%;
    text-align: center;
}

.blog-post-hero .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.blog-post-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-post-hero .breadcrumb a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.blog-post-hero .breadcrumb .sep {
    color: rgba(255, 255, 255, 0.3);
}

.blog-post-hero .breadcrumb .current {
    color: rgba(255, 255, 255, 0.8);
}

.blog-post-hero-tag {
    display: inline-block;
    background: rgba(59, 155, 120, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

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

.blog-post-hero h1 {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.blog-post-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
}

.blog-post-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-post-hero-meta i {
    font-size: 13px;
}

/* ========================================
   ARTICLE BODY TYPOGRAPHY
   ======================================== */
.blog-article-wrapper {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px 64px;
    position: relative;
}

.blog-article {
    max-width: 800px;
}

.blog-article h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a3c34;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.blog-article h3 {
    font-size: 20px;
    font-weight: 700;
    color: #222222;
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.35;
}

.blog-article p {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 16px;
}

.blog-article ul,
.blog-article ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.blog-article ul {
    list-style: disc;
}

.blog-article ol {
    list-style: decimal;
}

.blog-article li {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 8px;
}

.blog-article blockquote {
    border-left: 4px solid #3b9b78;
    padding: 16px 24px;
    margin: 24px 0;
    background: #f0fdf0;
    border-radius: 0 12px 12px 0;
    font-size: 17px;
    color: #1a3c34;
    font-style: italic;
    line-height: 1.7;
}

.blog-article figure {
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
}

.blog-article figure img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.blog-article figcaption {
    font-size: 13px;
    color: #6a6b76;
    text-align: center;
    padding: 10px 0 0;
    font-style: italic;
}

.blog-article a {
    color: #3b9b78;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.blog-article a:hover {
    color: #2d7d5e;
}

.blog-article strong {
    font-weight: 700;
    color: #222222;
}

.blog-article table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d4ddd8;
    margin: 24px 0;
}

.blog-article table th {
    background: #1a3c34;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.blog-article table td {
    padding: 12px 20px;
    font-size: 15px;
    color: #222222;
    border-bottom: 1px solid #f0f0f0;
}

.blog-article table tr:last-child td {
    border-bottom: none;
}

.blog-article table tr:hover td {
    background: #f0fdf0;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */
.blog-toc {
    background: #f8faf9;
    border: 1px solid #e8ede9;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.blog-toc-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3c34;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-toc-title i {
    color: #3b9b78;
}

.blog-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.blog-toc li {
    counter-increment: toc;
    margin-bottom: 6px;
}

.blog-toc li a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: #6a6b76;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
    line-height: 1.5;
}

.blog-toc li a::before {
    content: counter(toc) ".";
    font-weight: 600;
    color: #3b9b78;
    min-width: 20px;
}

.blog-toc li a:hover {
    color: #3b9b78;
}

.blog-toc li.toc-h3 a {
    padding-left: 28px;
    font-size: 13px;
}

.blog-toc li.toc-h3 a::before {
    content: "—";
    color: #d4ddd8;
}

/* ========================================
   SOCIAL SHARE BUTTONS
   ======================================== */
.blog-share {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.blog-share-label {
    font-size: 11px;
    font-weight: 700;
    color: #6a6b76;
    text-transform: uppercase;
    letter-spacing: 1px;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    margin-bottom: 8px;
}

.blog-share a,
.blog-share button {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d4ddd8;
    background: #ffffff;
    color: #6a6b76;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    font-family: inherit;
}

.blog-share a:hover,
.blog-share button:hover {
    border-color: #3b9b78;
    color: #3b9b78;
    background: #f0fdf0;
}

.blog-share-mobile {
    display: none;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 24px;
}

.blog-share-mobile a,
.blog-share-mobile button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #d4ddd8;
    background: #ffffff;
    color: #6a6b76;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    font-family: inherit;
}

.blog-share-mobile a:hover,
.blog-share-mobile button:hover {
    border-color: #3b9b78;
    color: #3b9b78;
    background: #f0fdf0;
}

.share-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a3c34;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.share-tooltip.show {
    opacity: 1;
}

/* ========================================
   AUTHOR BOX
   ======================================== */
.blog-author-box {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f8faf9;
    border: 1px solid #e8ede9;
    border-radius: 16px;
    padding: 28px;
    margin: 40px 0;
}

.blog-author-box img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-author-box-info h4 {
    font-size: 17px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 4px;
}

.blog-author-box-info p {
    font-size: 14px;
    color: #6a6b76;
    line-height: 1.6;
}

/* ========================================
   RELATED POSTS
   ======================================== */
.blog-related {
    padding: 64px 0;
    border-top: 1px solid #e8ede9;
}

.blog-related-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-related h2 {
    font-size: 28px;
    font-weight: 300;
    color: #1a3c34;
    margin-bottom: 32px;
    letter-spacing: -0.3px;
}

/* ========================================
   BLOG SEARCH
   ======================================== */
.blog-search {
    position: relative;
    max-width: 400px;
    margin-bottom: 32px;
}

.blog-search input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: 1px solid #d4ddd8;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    color: #222222;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search input:focus {
    outline: none;
    border-color: #3b9b78;
    box-shadow: 0 0 0 3px rgba(59, 155, 120, 0.12);
}

.blog-search input::placeholder {
    color: #aab0a8;
}

.blog-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #6a6b76;
    pointer-events: none;
}

/* ========================================
   BLOG CTA BANNER
   ======================================== */
.blog-cta-banner {
    background: linear-gradient(135deg, #1a3c34 0%, #2d6b54 100%);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.blog-cta-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 155, 120, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-cta-banner h3 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.blog-cta-banner p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.blog-cta-banner a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #ffffff;
    color: #1a3c34;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    position: relative;
    z-index: 1;
}

.blog-cta-banner a:hover {
    background: #dff7d7;
    transform: translateY(-1px);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.blog-faq {
    margin: 40px 0;
}

.blog-faq h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a3c34;
    margin-bottom: 20px;
}

.blog-faq-item {
    border: 1px solid #d4ddd8;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.blog-faq-q {
    padding: 18px 24px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.blog-faq-q:hover {
    background: #f0fdf0;
}

.blog-faq-q i {
    font-size: 14px;
    color: #6a6b76;
    transition: transform 0.3s;
}

.blog-faq-item.open .blog-faq-q i {
    transform: rotate(180deg);
}

.blog-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.blog-faq-item.open .blog-faq-a {
    max-height: 500px;
}

.blog-faq-a-inner {
    padding: 0 24px 20px;
    font-size: 15px;
    color: #6a6b76;
    line-height: 1.7;
}

/* ========================================
   BLOG LISTING HEADER
   ======================================== */
.blog-header {
    padding: 48px 0 24px;
}

.blog-header h1 {
    font-size: 40px;
    font-weight: 300;
    color: #1a3c34;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.blog-header p {
    font-size: 16px;
    color: #6a6b76;
    line-height: 1.6;
}

.blog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

/* ========================================
   CATEGORY PAGE HEADER
   ======================================== */
.blog-category-header {
    background: linear-gradient(135deg, #1a3c34 0%, #2d6b54 100%);
    padding: 64px 0 48px;
    color: #ffffff;
    text-align: center;
}

.blog-category-header h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 10px;
}

.blog-category-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 auto;
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.blog-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.blog-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   NO RESULTS
   ======================================== */
.blog-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 20px;
    color: #6a6b76;
}

.blog-no-results i {
    font-size: 48px;
    color: #d4ddd8;
    margin-bottom: 16px;
    display: block;
}

.blog-no-results p {
    font-size: 16px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-featured {
        grid-template-columns: 1fr 1fr;
    }

    .blog-article-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-share {
        display: none;
    }

    .blog-share-mobile {
        display: flex;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured-image {
        min-height: 220px;
    }

    .blog-featured-body {
        padding: 24px;
    }

    .blog-featured-title {
        font-size: 22px;
    }

    .blog-header h1 {
        font-size: 30px;
    }

    .blog-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-post-hero {
        min-height: 340px;
    }

    .blog-post-hero h1 {
        font-size: 26px;
    }

    .blog-article-wrapper {
        padding: 32px 20px 48px;
    }

    .blog-article h2 {
        font-size: 22px;
    }

    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }

    .blog-cta-banner {
        padding: 32px 24px;
    }

    .blog-cta-banner h3 {
        font-size: 22px;
    }

    .blog-category-header {
        padding: 48px 0 36px;
    }

    .blog-category-header h1 {
        font-size: 28px;
    }

    .blog-search {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-card-image {
        height: 170px;
    }

    .blog-pagination a,
    .blog-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
