/* BLOG POST WIDGET STYLES (PURE CSS FOR LUMA & HYVA) */

.blog-widget-recent {
    /* max-width: auto; */
    margin: 0 auto;
    padding: 80px 20px;
    background: #fff;
    box-sizing: border-box;
}

/* Container Utility */
.blog-widget-recent.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.blog-widget-recent .title {
    color: #001f3f; /* navy-900 */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 500;
    margin-bottom: 50px;
    text-align: center;
    border: none;
    text-transform: none;
}

/* ✅ Fixed: was .blog-container-wrapper.relative — class never matched template */
.blog-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden; /* Added to prevent horizontal overflow */
}

/* Carousel track fills available space between arrows */
.blog-container-wrapper .post-list.carousel-view {
    flex: 1;
    min-width: 0;
}

/* COMMON LIST RESET */
.blog-widget-recent .post-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    /* gap: 20px; */
}

/* GRID MODE */
.blog-widget-recent .post-list.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1023px) {
    .blog-widget-recent .post-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .blog-widget-recent .post-list.grid-view {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* CAROUSEL MODE */
.blog-widget-recent .post-list.carousel-view {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
}

/* Carousel Cards */
/* Mobile: ~1 card width (85%) */
.blog-widget-recent .post-list.carousel-view .post-holder {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 85%;
}

/* Tablet: 2 cards, 1 gap of 20px → each card = (100% - 20px) / 2 */
@media (min-width: 768px) {
    .blog-widget-recent .post-list.carousel-view .post-holder {
        width: calc((100% - 20px) / 2);
    }
}

/* Desktop: 3 cards, 2 gaps of 20px → each card = (100% - 40px) / 3 */
@media (min-width: 1024px) {
    .blog-widget-recent .post-list.carousel-view .post-holder {
        width: calc((100% - 40px) / 3);
    }
}

/* ARROWS (HYVA & LUMA) */
.blog-widget-recent .blog-arrow {
    background: transparent;
    border: none;
    width: 3.25rem;
    height: 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #001f3f;
    cursor: grab;
    font-size: 2rem;
    z-index: 10;
    /* ✅ Prevent arrows from shrinking inside flex container */
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.blog-widget-recent .blog-arrow:hover {
    opacity: 0.7;
}

/* ✅ Ensure arrow spans are properly centered */
.blog-widget-recent .blog-arrow span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Hide Scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* CARD DETAILS */
.blog-widget-recent .post-content {
    text-align: left;
}

.blog-widget-recent .post-ftimg-hld {
    height: 220px; /* h-70 = 280px */
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem; /* mt-4 on text */
}

.blog-widget-recent .post-ftimg-hld img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* transition: transform 0.6s ease; */
}

/* .blog-widget-recent .post-holder:hover .post-ftimg-hld img {
    transform: scale(1.05);
} */

.blog-widget-recent .post-info {
    color: #9c9c9c; /* silver-chalice placeholder */
    font-size: 0.875rem; /* text-sm */
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem; /* mb-3 */
}

.blog-widget-recent .post-title {
    margin: 0;
}

.blog-widget-recent .post-title a {
    color: #1a1a1a; /* rich-black */
    font-size: 1.25rem; /* text-xl */
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 400;
}

.blog-widget-recent .post-title a:hover {
    text-decoration: underline;
}

.blog-widget-recent .post-description {
    color: #333; /* dark-charcoal */
    font-size: 1.125rem; /* text-lg */
    font-weight: 300;
    margin-top: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FOOTER */
.blog-widget-recent .blog-footer {
    text-align: center;
    /* margin-top: 2.5rem; mt-10 */
}

.blog-widget-recent .read-all-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #d26a4c; /* orange-350 */
    font-size: 1rem; /* text-base */
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.25rem;
}

.blog-widget-recent .read-all-blog .arrow-icon {
    height: 1rem;
    margin-left: 0.25rem;
    display: inline-block;
}

.blog-widget-recent .read-all-blog img {
    height: 100%;
    width: auto;
}

.post-holder .aspect-video {
    position: relative;
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 ratio, forces height regardless of aspect-ratio CSS support */
    overflow: hidden;
}

.post-holder .aspect-video picture,
.post-holder .aspect-video picture img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BLOG POST WIDGET STYLES — LUMA ONLY */
/* Scoped under .luma-layout so these rules can never match the
   Hyvä (Tailwind) template, which has its own class names and
   does not carry this wrapper class. */

.luma-layout.blog-widget-recent {
    margin: 0 auto;
    padding: 80px 20px;
    background: #fff;
    box-sizing: border-box;
}

.luma-layout.blog-widget-recent .title {
    color: #001f3f;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 50px;
    text-align: center;
    border: none;
    text-transform: none;
}

.luma-layout .blog-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.luma-layout .blog-container-wrapper .post-list.carousel-view {
    flex: 1;
    min-width: 0;
}

.luma-layout .post-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
}

.luma-layout .post-list.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1023px) {
    .luma-layout .post-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .luma-layout .post-list.grid-view {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.luma-layout .post-list.carousel-view {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
}

.luma-layout .post-list.carousel-view .post-holder {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 85%;
}

@media (min-width: 768px) {
    .luma-layout .post-list.carousel-view .post-holder {
        width: calc((100% - 20px) / 2);
    }
}

@media (min-width: 1024px) {
    .luma-layout .post-list.carousel-view .post-holder {
        width: calc((100% - 40px) / 3);
    }
}

.luma-layout .blog-arrow {
    background: transparent;
    border: none;
    width: 3.25rem;
    height: 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #001f3f;
    cursor: grab;
    font-size: 2rem;
    z-index: 10;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.luma-layout .blog-arrow:hover {
    opacity: 0.7;
}

.luma-layout .blog-arrow span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.luma-layout .no-scrollbar::-webkit-scrollbar {
    display: none;
}

.luma-layout .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.luma-layout .post-content {
    text-align: left;
}

.luma-layout .post-ftimg-hld {
    height: 220px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.luma-layout .post-ftimg-hld img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.luma-layout .post-info {
    color: #9c9c9c;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem;
}

.luma-layout .post-title {
    margin: 0;
}

.luma-layout .post-title a {
    color: #1a1a1a;
    font-size: 1.25rem;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 400;
}

.luma-layout .post-title a:hover {
    text-decoration: underline;
}

.luma-layout .post-description {
    color: #333;
    font-size: 1.125rem;
    font-weight: 300;
    margin-top: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.luma-layout .blog-footer {
    text-align: center;
}

.luma-layout .read-all-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #d26a4c;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.25rem;
}

.luma-layout .read-all-blog .arrow-icon {
    height: 1rem;
    margin-left: 0.25rem;
    display: inline-block;
}

.luma-layout .read-all-blog img {
    height: 100%;
    width: auto;
}
