/* ================================================
   Blog Archive Styles
   ================================================ */

/* Hide default Woodmart page title on blog archive pages */
.blog-archive-page .wd-page-title,
.blog-archive-page .page-title,
.blog-home-page .wd-page-title,
.blog-home-page .page-title,
.blog-category-page .wd-page-title,
.blog-category-page .page-title,
.blog-tag-page .wd-page-title,
.blog-tag-page .page-title,
body.home .wd-page-title,
body.category .wd-page-title,
body.tag .wd-page-title {
    display: none !important;
}

/* ================================================
   Hero Section
   ================================================ */

.blog-hero-area {
    border-radius: var(--radius-16);
    background: var(--Power-Lime);
    position: relative;
    display: flex;
    padding: var(--space-48) var(--radius-32) var(--radius-32);
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-primary);
    justify-content: start;
    gap: var(--radius-16);
    margin: -40px -30px var(--radius-32);
    /* Corner cutout mask */
    --r: 15px;
    --s: 15px;
    --x: 150px;
    --y: 10px;
    --_m: /calc(2*var(--r)) calc(2*var(--r)) radial-gradient(#000 70%,#0000 72%);
    --_g: conic-gradient(at calc(100% - var(--r)) var(--r), rgba(0, 0, 0, 0) 25%, #000 0);
    --_d: (var(--s) + var(--r));
    mask: calc(100% - var(--_d) - var(--x)) 0 var(--_m), 100% calc(var(--_d) + var(--y)) var(--_m), radial-gradient(var(--s) at 100% 0, #0000 99%, #000 calc(100% + 1px)) calc(-1* var(--r) - var(--x)) calc(var(--r) + var(--y)), var(--_g) calc(-1* var(--_d) - var(--x)) 0, var(--_g) 0 calc(var(--_d) + var(--y));
    mask-repeat: no-repeat;
}

.blog-hero-section {
    position: relative;
    max-width: 1100px;
    width: 100%;
}

.blog-hero-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--new-green);
    margin: 0 0 16px 0;
}

/* Description Section with Read More */
.blog-description-section {
    margin-bottom: 24px;
}

.blog-description-text {
    position: relative;
    font: var(--body-l);
    color: var(--new-green);
    max-height: 88px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.blog-description-text[data-collapsed="false"] {
    max-height: none;
}

/* Gradient fade overlay for collapsed state */
.blog-description-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent 0%, var(--power-lime, #ADFF60) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.blog-description-text[data-collapsed="false"]::after {
    opacity: 0;
}

.blog-description-content {
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--new-green);
    text-wrap-style: pretty;
}


/* H4 styling in blog description */
.blog-description-content h4 {
    font-family: var(--font-biryani);
    font-weight: 700;
    font-size: 18px;
    line-height: 1.1;
    color: var(--new-green);
    margin: 0 0 6px 0;
}

.blog-read-more-link {
    display: inline-block;
    color: var(--new-green);
    text-decoration: underline;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.3s ease;
}

.blog-read-more-link:hover {
    color: var(--volt-pink-dark);
}

/* ================================================
   Chips Section
   ================================================ */

.blog-chips-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.blog-chips-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-chips-label {
    font: var(--body-sb);
    color: var(--new-green);
    text-transform: capitalize;
}

.blog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 16px;
    border: 1.5px solid var(--new-green);
    border-radius: 40px;
    background: transparent;
    color: var(--new-green);
    font-size: 14px;
    font-weight: 300;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.blog-chip:hover {
    background: var(--new-green);
    color: var(--white);
}

.blog-chip.active {
    background: var(--new-green);
    color: var(--white);
}

/* Disabled chip - when filtering wouldn't change results */
.blog-chip.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.blog-chip.disabled:hover {
    background: transparent;
    color: var(--new-green);
}

.blog-chip-clear {
    border-style: dashed;
}

.blog-chip-clear.active {
    border-style: solid;
}

/* ================================================
   Posts Grid
   ================================================ */

.blog-content-area {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 60px;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ================================================
   Post Card (Matching Figma Design)
   ================================================ */

.blog-post-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    transition: transform 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-4px);
}

.blog-post-card-link {
    display: block;
    text-decoration: none;
}

.blog-post-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-8, 8px);
    overflow: hidden;
    background: var(--grey-1);
}

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

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

.blog-post-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--grey-1) 0%, var(--grey-2) 100%);
}

/* Category Badge - Top Right Position per Figma */
.blog-post-card-category {
    position: absolute;
    top: 13px;
    right: 13px;
    padding: 5px 8px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sales-light-red, #FFC3C3);
    color: var(--sales-red, #B1292B);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    text-transform: capitalize;
    border-radius: 100px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Post Card Content */
.blog-post-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.blog-post-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--new-green, #0F3F36);
    margin: 0;
}

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

.blog-post-card-title a:hover {
    color: var(--volt-pink-dark)!important;
}

/* Change title color when hovering anywhere on the card (including image) */
.blog-post-card:hover .blog-post-card-title a {
    color: var(--volt-pink-dark)!important;
}

/* Post Card Tags - Green Pills per Figma */
.blog-post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-post-card-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 2px 8px;
    background: var(--new-light-green, #D8FFB4);
    color: var(--new-green, #0F3F36);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: capitalize;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.blog-post-card-tag:hover {
    background: var(--new-green, #0F3F36);
    color: var(--white);
}

/* ================================================
   Pagination
   ================================================ */

.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.blog-pagination ul {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.blog-pagination li {
    margin: 0;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--new-green);
    border-radius: var(--radius-8);
    background: transparent;
    color: var(--new-green);
    font: var(--body-sb);
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pagination a:hover {
    background: var(--new-green);
    color: var(--white);
}

.blog-pagination .current {
    background: var(--new-green);
    color: var(--white);
}

/* ================================================
   No Posts Message
   ================================================ */

.blog-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--grey-1);
    border-radius: var(--radius-16);
}

.blog-no-posts p {
    font: var(--body-l);
    color: var(--new-green);
    margin: 0;
}

/* ================================================
   Loading State & Transitions
   ================================================ */

/* Smooth content area transitions */
.blog-content-area {
    transition: opacity 0.3s ease;
}

.blog-content-area.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* Grid fade transition */
.blog-posts-grid {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.blog-posts-grid.loading {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.blog-posts-grid.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Loading overlay with spinner */
.blog-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 10;
    border-radius: var(--radius-8);
}

.blog-content-area.is-loading .blog-loading-overlay {
    opacity: 1;
    visibility: visible;
}

/* Modern loading spinner */
.blog-loading-spinner {
    width: 48px;
    height: 48px;
    position: relative;
}

.blog-loading-spinner::before,
.blog-loading-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.blog-loading-spinner::before {
    border-top-color: var(--new-green, #0F3F36);
    animation: blog-spin 1s linear infinite;
}

.blog-loading-spinner::after {
    border-right-color: var(--power-lime, #ADFF60);
    animation: blog-spin 0.5s linear infinite reverse;
}

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

/* Skeleton loading cards */
.blog-post-card-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-post-card-skeleton .skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-8, 8px);
    background: linear-gradient(90deg, var(--grey-1) 25%, var(--grey-2) 50%, var(--grey-1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.blog-post-card-skeleton .skeleton-title {
    height: 20px;
    width: 90%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--grey-1) 25%, var(--grey-2) 50%, var(--grey-1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.1s;
}

.blog-post-card-skeleton .skeleton-tags {
    display: flex;
    gap: 8px;
}

.blog-post-card-skeleton .skeleton-tag {
    height: 20px;
    width: 60px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--grey-1) 25%, var(--grey-2) 50%, var(--grey-1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.2s;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Chip active state animation */
.blog-chip {
    transition: all 0.2s ease, transform 0.15s ease;
}

.blog-chip:active {
    transform: scale(0.95);
}

.blog-chip.is-filtering {
    position: relative;
    pointer-events: none;
}

.blog-chip.is-filtering::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: chip-pulse 0.8s ease-in-out infinite;
}

@keyframes chip-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Fade in animation for new content */
.blog-post-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.blog-post-card:nth-child(1) { animation-delay: 0.05s; }
.blog-post-card:nth-child(2) { animation-delay: 0.1s; }
.blog-post-card:nth-child(3) { animation-delay: 0.15s; }
.blog-post-card:nth-child(4) { animation-delay: 0.2s; }
.blog-post-card:nth-child(5) { animation-delay: 0.25s; }
.blog-post-card:nth-child(6) { animation-delay: 0.3s; }
.blog-post-card:nth-child(7) { animation-delay: 0.35s; }
.blog-post-card:nth-child(8) { animation-delay: 0.4s; }
.blog-post-card:nth-child(9) { animation-delay: 0.45s; }
.blog-post-card:nth-child(10) { animation-delay: 0.5s; }
.blog-post-card:nth-child(11) { animation-delay: 0.55s; }
.blog-post-card:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No results state */
.blog-no-posts {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================================
   Responsive Styles
   ================================================ */

@media (max-width: 1200px) {
    .blog-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .blog-hero-area {
        margin: -20px -15px var(--radius-32);
        padding: var(--space-48) 20px var(--radius-32);
        --r: 10px;
        --s: 12px;
        --x: 100px;
    }
    
    .blog-hero-title {
        font-size: 48px;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .blog-post-card-title {
        font-size: 16px;
    }
    
    .blog-post-card-category {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .blog-hero-area {
        margin: -20px 0 24px;
        padding: 32px 16px 24px;
        --r: 8px;
        --s: 10px;
        --x: 80px;
    }
    
    .blog-hero-title {
        font-size: 36px;
    }
    
    .blog-description-text {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .blog-chips-container {
        gap: 12px;
    }
    
    .blog-chip {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .blog-content-area {
        padding: 0 0 40px;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .blog-post-card {
        gap: 6px;
    }
    
    .blog-post-card-category {
        top: 8px;
        right: 8px;
        padding: 2px 6px;
        padding-top: 3px;
        height: 20px;
        font-size: 10px;
    }
    
    .blog-post-card-content {
        gap: 6px;
    }
    
    .blog-post-card-title {
        font-size: 14px;
    }
    
    .blog-post-card-tags {
        gap: 6px;
    }
    
    .blog-post-card-tag {
        height: 18px;
        font-size: 10px;
        padding: 2px 6px;
        padding-top: 3px;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 32px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .blog-post-card-title {
        font-size: 13px;
    }
    
    .blog-post-card-category {
        top: 6px;
        right: 6px;
        padding: 2px 6px;
        height: 18px;
        font-size: 9px;
    }
    
    .blog-post-card-tag {
        height: 16px;
        font-size: 9px;
        padding: 1px 5px;
        padding-top: 2px;
    }
    
    .blog-pagination a,
    .blog-pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ================================================
   Single Post Category/Tag Pills
   ================================================ */

.blog-single-category-pill {
    display: inline-flex;
    padding: 4px 14px;
    background: var(--sales-light-red, #FFC3C3);
    color: var(--sales-red, #B1292B);
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.blog-single-category-pill:hover {
    background: var(--sales-red, #B1292B);
    color: var(--white);
}

/* Stars wrapper for blog pages */
.blog-archive-page .top-stars-container {
    position: relative;
    margin-bottom: -20px;
    z-index: 3;
}

.blog-archive-page .stars-wrapper {
    position: absolute;
    top: 8px;
    right: -8px;
    display: flex;
    gap: 4px;
}

.blog-archive-page .stars-wrapper svg {
    width: 16px;
    height: 16px;
}

.blog-archive-page .stars-wrapper svg path {
    fill: var(--new-green);
}

@media (min-width: 992px) {
    .blog-archive-page .stars-wrapper svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 991px) {
    .blog-archive-page .stars-wrapper {
        top: -15px;
        right: 0px;
        gap: 2px;
    }
}

/* Mobile styles for blog post single hero - max 690px */
@media (max-width: 690px) {
    .blog-post-single .shop-hero-area {
        padding: var(--space-48) var(--radius-32) var(--radius-32) !important;
        margin: 0px -10px var(--radius-32) !important;
        --r: 12px !important;
        --s: 15px !important;
        --x: 80px !important;
        --y: 0px !important;
    }

    .shop-hero-section {
        padding: 0px!important;
    }
}
