/* ==========================================================================
   BLOG - HERO INSIGHTS SECTION (1440px Baseline, #DBD5FF)
   ========================================================================== */
/* ==========================================================================
   BLOG PAGE MASTER WRAPPER
   ========================================================================== */

.blog-page-master {
    width: 100%;
    max-width: 100%;;
    margin: 0 auto;
    background-color: #DBD5FF; /* Matches the blog section background */
    box-sizing: border-box;
    overflow: hidden;
}

.ow-blog-hero-section {
    position: relative;
    width: 100%;
    max-width: 100%;;
    background-color: #DBD5FF;
    margin: 0 auto;
    padding: 96px 48px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.ow-blog-hero-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 64px;
    box-sizing: border-box;
}

/* ==========================================================================
   Header (Title & Desc)
   ========================================================================== */

.ow-blog-header {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 48px;
}

/* Title: Aspekta 400, 56px */
.ow-blog-title {
    flex: 1;
    max-width: 564px;
    font-family: 'Aspekta', sans-serif;
    font-weight: 400;
    font-size: 56px;
    line-height: 110%; /* 61.6px */
    letter-spacing: -1.12px;
    color: #111111;
    margin: 0;
}

/* Description: Inter 400, 16px */
.ow-blog-desc {
    flex: 1;
    max-width: 524px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%; /* 24px */
    color: rgba(17, 17, 17, 0.75);
    margin: 0 0 8px 0; /* Aligns visually with the bottom of the title */
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.ow-blog-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

.ow-blog-col-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ow-blog-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

/* ==========================================================================
   Tags / Meta Styling
   ========================================================================== */

.ow-blog-meta-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.ow-blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: rgba(145, 128, 255, 0.25); /* #9180ff40 */
    border-radius: 4px;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    line-height: 120%;
    color: #2A2A2A;
}

/* ==========================================================================
   Large Featured Card (Left)
   ========================================================================== */

.ow-blog-card-large {
    background-color: #FFFFFF;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Chamfer on the Bottom-Right only */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ow-blog-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.ow-blog-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ow-blog-card-link:focus-visible {
    outline: 2px solid #7E6DEB;
    outline-offset: 2px;
}

.ow-blog-card-media {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #E2E2E2;
}

.ow-blog-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.ow-blog-card-title {
    font-family: 'Aspekta', sans-serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 120%; /* 38.4px */
    letter-spacing: -0.64px;
    color: #111111;
    margin: 0;
}

.ow-blog-card-excerpt {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: #4C4D4A;
    margin: 0;
}

/* ==========================================================================
   Small List Cards (Right)
   ========================================================================== */

.ow-blog-card-small {
    background-color: #FFFFFF;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    /* Chamfers on Top-Right AND Bottom-Right */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ow-blog-card-small:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ow-blog-card-link-horizontal {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.ow-blog-card-link-horizontal:focus-visible {
    outline: 2px solid #7E6DEB;
    outline-offset: 2px;
}

.ow-blog-small-media {
    width: 180px;
    min-height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #E2E2E2;
    flex-shrink: 0;
}

.ow-blog-small-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    flex: 1;
}

.ow-blog-small-title {
    font-family: 'Aspekta', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 120%; /* 28.8px */
    letter-spacing: -0.48px;
    color: #111111;
    margin: 0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .ow-blog-hero-section {
        padding: 72px 32px;
    }

    .ow-blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    
    .ow-blog-grid {
        flex-direction: column;
    }

    .ow-blog-card-media {
        height: 340px;
    }
}

@media (max-width: 640px) {
    .ow-blog-hero-section {
        padding: 48px 16px;
    }
    
    .ow-blog-title {
        font-size: 44px;
        line-height: 48px;
    }
    
    .ow-blog-card-content,
    .ow-blog-small-content {
        padding: 20px;
    }
    
    .ow-blog-card-link-horizontal {
        flex-direction: column;
    }

    .ow-blog-small-media {
        width: 100%;
        height: 200px;
    }

    /* Adjust clip-path for stacked layout on mobile */
    .ow-blog-card-small {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
    }
}


/* ==========================================================================
   BLOG ARCHIVE GRID SECTION (1440px Baseline, #111111 Background)
   ========================================================================== */

.ow-blog-archive-section {
    position: relative;
    width: 100%;
    max-width: 100%;;
    background-color: #111111;
    margin: 0 auto;
    padding: 48px 48px 96px 48px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.ow-blog-archive-inner {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-sizing: border-box;
}

/* ==========================================================================
   Header & Controls Row (Search + Filter Pills)
   ========================================================================== */

.ow-blog-archive-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Heading: Aspekta 400, 56px, #FDFFF6 */
.ow-blog-archive-heading {
    font-family: 'Aspekta-400', 'Aspekta', sans-serif;
    font-weight: 400;
    font-size: 56px;
    line-height: 110%; /* 61.6px */
    letter-spacing: -1.12px;
    color: #FDFFF6;
    margin: 0;
}

.ow-blog-controls-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* Search Form */
.ow-blog-search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    height: 44px;
    width: 350px;
    padding: 0 4px 0 16px;
    box-sizing: border-box;
}

.ow-blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Inter-Regular', 'Inter', sans-serif;
    font-size: 14px;
    color: #FDFFF6;
}

.ow-blog-search-input::placeholder {
    color: #FDFFF6;
    opacity: 0.6;
}

.ow-blog-search-submit {
    background-color: #CAED57;
    color: #111111;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    height: 36px;
    font-family: 'Inter-SemiBold', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.ow-blog-search-submit:hover {
    filter: brightness(0.95);
}

/* Category Filter Pills Container */
.ow-blog-filters-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(253, 255, 246, 0.08);
    padding: 4px;
    border-radius: 1000px;
    backdrop-filter: blur(6px);
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
}

.ow-blog-filters-scroll::-webkit-scrollbar {
    display: none;
}

/* Individual Filter Pill */
.ow-blog-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 100px;
    font-family: 'Helvetica Neue-Medium', Helvetica, sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #111111;
    background-color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ow-blog-filter-pill:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.ow-blog-filter-pill.active {
    background-color: #CAED57; /* Lime active state matching design */
    box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Grid & Card Design (#F3F0E8 Card Background)
   ========================================================================== */

.ow-blog-grid-container {
    width: 100%;
}

.ow-blog-cards-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    box-sizing: border-box;
}

.ow-blog-grid-card {
    background-color: #F3F0E8;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Chamfered bottom-right corner matching theme style */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.ow-blog-card-anchor {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ow-blog-card-anchor:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.ow-blog-card-anchor:focus-visible {
    outline: 2px solid #CAED57;
    outline-offset: 2px;
}

.ow-blog-card-thumb {
    width: 100%;
    height: 256px;
    background-size: cover;
    background-position: center;
    background-color: #E2E2E2;
}

.ow-blog-card-body {
    padding: 24px 24px 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    flex: 1;
}

.ow-blog-card-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ow-blog-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: rgba(145, 128, 255, 0.25);
    border-radius: 4px;
    font-family: 'DM Mono-Medium', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #2A2A2A;
}

.ow-blog-card-text-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ow-blog-card-title {
    font-family: 'Aspekta-500', 'Aspekta', sans-serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 130%; /* 28.6px */
    letter-spacing: -0.44px;
    color: #111111;
    margin: 0;
}

.ow-blog-card-excerpt {
    font-family: 'Inter-Regular', 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%; /* 24px */
    color: rgba(17, 17, 17, 0.75);
    margin: 0;
}

/* ==========================================================================
   Pagination Styling
   ========================================================================== */

.ow-blog-pagination-wrap {
    margin-top: 64px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.ow-blog-pagination-wrap ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ow-blog-pagination-wrap li {
    margin: 0;
}

.ow-blog-pagination-wrap a,
.ow-blog-pagination-wrap span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-family: 'Inter-Medium', 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    box-sizing: border-box;
}

.ow-blog-pagination-wrap a.page-numbers {
    background-color: #FFFFFF;
    color: #262626;
}

.ow-blog-pagination-wrap a.page-numbers:hover {
    background-color: #F3F3F3;
}

.ow-blog-pagination-wrap span.current {
    background-color: #CAED57;
    color: #111111;
}

.ow-blog-no-results {
    width: 100%;
    text-align: center;
    padding: 64px 0;
    color: #FDFFF6;
    font-family: 'Inter-Regular', sans-serif;
    font-size: 16px;
    opacity: 0.7;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 900px) {
    .ow-blog-archive-section {
        padding: 32px 24px 64px 24px;
    }

    .ow-blog-archive-heading {
        font-size: 44px;
    }

    .ow-blog-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .ow-blog-controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ow-blog-search-form {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .ow-blog-archive-section {
        padding: 32px 16px 48px 16px;
    }

    .ow-blog-archive-heading {
        font-size: 36px;
    }

    .ow-blog-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* ==========================================================================
   Blog archive: tablet (2 cards per page) and mobile (1 card per page).
   The page size itself is set by the ?bpp value in 2-archive-grid.php; this is the layout.
   Pagination sits at the bottom left.
   ========================================================================== */
@media (max-width: 1023px) {
    .ow-blog-archive-section {
        padding: 36px;
    }

    .ow-blog-archive-inner {
        gap: 36px;
    }

    .ow-blog-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }

    .ow-blog-pagination-wrap {
        margin-top: 36px;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .ow-blog-archive-section {
        padding: 24px 16px;
    }

    .ow-blog-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Category filter: arrow buttons on both sides (tablet and mobile). On desktop the bar wrapper is transparent to layout. */
.ow-blog-filters-bar {
    display: contents;
}

.ow-blog-filter-arrow {
    display: none;
}

@media (max-width: 1023px) {
    .ow-blog-filters-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        min-width: 0;
        padding: 4px;
        background-color: rgba(253, 255, 246, 0.08);
        border-radius: 1000px;
        backdrop-filter: blur(6px);
        align-self: flex-start;
    }

    .ow-blog-filters-bar .ow-blog-filters-scroll {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0;
        background: none;
        backdrop-filter: none;
        border-radius: 0;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ow-blog-filter-pill {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .ow-blog-filter-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 9999px;
        background-color: #FDFFF6;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .ow-blog-filter-arrow:disabled {
        opacity: 0.4;
        cursor: default;
    }
}
