@keyframes loading_wheel {
    0% {
      transform: rotate(7deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  .content-filter.is-loading {
    position: relative;
    min-height: 200px; /* Ensure there's space for the loading wheel */
  }

  .content-filter.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 100%;
    border: 1px solid #dee2e6;
    border-left-color: #00bceb;
    animation: loading_wheel 1.1s infinite linear;
    z-index: 10;
  }

  /* Hide grid content when loading */
  .content-filter.is-loading > * {
    opacity: 0;
    pointer-events: none;
  }

.content-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px; /* Horizontal spacing between columns */
    row-gap: 24px; /* Default vertical spacing between rows 2 and 3 */
    margin: 0 auto 40px auto; /* 40px space after the main grid */
    padding-top: 16px;
}

/* First item spans full width across first row */
.content-filter > .content-filter__item:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: stretch;
    margin-bottom: 16px; /* 40px total gap = 24px default + 16px extra */
}

/* Horizontal layout for items 1-3 */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper,
.content-filter > .content-filter__item:nth-child(2) .content-filter-item__image-wrapper,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__image-wrapper {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    align-self: flex-start;
}

/* Extra margin for first item image on desktop */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper {
    margin-bottom: 25px;
}

/* 16:9 aspect ratio for items 1-3 images */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper::before,
.content-filter > .content-filter__item:nth-child(2) .content-filter-item__image-wrapper::before,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__image-wrapper::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.content-filter > .content-filter__item:nth-child(1) .content-filter-item__image,
.content-filter > .content-filter__item:nth-child(2) .content-filter-item__image,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.content-filter > .content-filter__item:nth-child(1) .content-filter-item__content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-filter > .content-filter__item:nth-child(2) .content-filter-item__content-wrapper,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Apply left padding only when item has an image - space between image and text */
.content-filter-item--has-image .content-filter-item__content-wrapper {
    padding-left: 24px; /* Space between image and text when side by side */
}

/* Titles for items 1-3 */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__title,
.content-filter > .content-filter__item:nth-child(2) .content-filter-item__title,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__title {
    color: #1B1C1D;
    font-size: 24px;
    font-style: normal;
    font-weight: 350;
    line-height: 135%; /* 32.4px */
}

/* Item 1 specific spacing */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__title {
    margin-bottom: 24px; /* Space between title and description */
}

/* Items 2-3 specific spacing */
.content-filter > .content-filter__item:nth-child(2) .content-filter-item__title,
.content-filter > .content-filter__item:nth-child(3) .content-filter-item__title {
    margin-bottom: 12px; /* Space between title and meta */
}

/* Item 1 description */
.content-filter > .content-filter__item:nth-child(1) .content-filter-item__description {
    color: #606162;
    font-size: 16px;
    font-style: normal;
    font-weight: 350;
    line-height: 150%; /* 24px */
    margin-bottom: 12px; /* Space between description and meta */
}

/* Left column of second row - items 2 and 3 stacked */
.content-filter > .content-filter__item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: stretch;
}

.content-filter > .content-filter__item:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    align-items: stretch;
}

/* Right column container for 2x2 grid */
.content-filter-right-grid {
    grid-column: 2;
    grid-row: 2 / 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 15px;
    align-content: start;
}

/* Top row container to align dividers */
.content-filter-top-row {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    position: relative;
}

/* Bottom row items positioning */
.content-filter-right-grid .content-filter__item:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.content-filter-right-grid .content-filter__item:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

/* Ensure items in right grid don't span multiple cells */
.content-filter-right-grid .content-filter__item {
    grid-column: span 1;
    grid-row: span 1;
}

/* Explicit positioning for right grid items */
.content-filter-right-grid > .content-filter-top-row .content-filter__item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.content-filter-right-grid > .content-filter-top-row .content-filter__item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.content-filter-right-grid .content-filter__item:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.content-filter-right-grid .content-filter__item:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

/* Right grid items: text-only layout */
.content-filter-right-grid .content-filter__item {
    display: block;
    align-self: start;
}

.content-filter-right-grid .content-filter-item__image-wrapper {
    display: none;
}

.content-filter-right-grid .content-filter-item__content-wrapper {
    padding: 0;
    flex: none;
}

/* Titles for items 4-7 */
.content-filter-right-grid .content-filter-item__title {
    color: #1B1C1D;
    font-size: 16px;
    font-style: normal;
    font-weight: 350;
    line-height: 150%; /* 24px */
    margin-bottom: 12px; /* Space between title and meta */
}

/* Meta line for all items */
.content-filter-item__meta {
    color: #606162;
    font-size: 12px;
    font-style: normal;
    font-weight: 350;
    line-height: 140%; /* 16.8px */
    letter-spacing: 0.24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Add dividers above each item in right grid using border */
.content-filter-right-grid .content-filter__item {
    border-top: 1px solid #ddd;
    padding-top: 16px;
    margin-top: 24px;
}

/* Remove top margin from first row items (4 & 5) on desktop/tablet */
.content-filter-right-grid > .content-filter-top-row .content-filter__item {
    margin-top: 0;
}

/* Removed background, borders, and shadows from all items */

.content-filter-item__image-wrapper {
    position: relative;
    overflow: hidden;
}

.content-filter-item__image {
    display: block;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    text-decoration: none;
    position: relative;
    border-radius: 4px;
}

.content-filter-item__content-wrapper {
    padding: 0;
}

.content-filter-item__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
    color: #1a1a1a;
}

.content-filter-item__title:hover {
    color: #0066cc;
}

.content-filter-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.content-filter-item__tag {
    color: #0066cc;
    text-decoration: none;
}

.content-filter-item__tag:hover {
    text-decoration: underline;
}

/* Play icon SVG - positioned in lower left corner */
.content-filter-play-img {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    z-index: 2;
    transition: transform 0.1s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

/* Play icon hover effect - triggered by image hover */
.content-filter-item__image:hover .content-filter-play-img,
.content-filter-play-img:hover {
    transform: scale(1.05);
}

/* Play triangle color change on hover - triggered by image hover */
.content-filter-item__image:hover .content-filter-play-img .play-triangle,
.content-filter-play-img:hover .play-triangle {
    fill: #0076D5; /* Cisco blue */
}

/* External icon - keep in upper right */
.content-filter-external-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    z-index: 2;
}

/* Hidden placeholder item for 6-item layout */
.content-filter__item--hidden {
    display: none;
}

/* Prevent link color changes on hover */
.content-filter-item__title:hover {
    color: inherit;
    text-decoration: underline;
    text-decoration: underline;
    text-decoration-color: #C3C4C5;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

/* Tablet Layout: 768px - 1024px */
@media (max-width: 1024px) and (min-width: 768px) {
    .content-filter {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 30px;
    }
    
    /* Item 1: Full width, image above text */
    .content-filter > .content-filter__item:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
    }
    
    .content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper {
        flex: none;
        align-self: stretch;
        margin-bottom: 24px;
    }
    
    /* Remove left padding on tablet for item 1 since image is above text */
    .content-filter > .content-filter__item:nth-child(1).content-filter-item--has-image .content-filter-item__content-wrapper {
        padding-left: 0;
    }
    
    /* Items 2-3: Full width, horizontal layout maintained */
    .content-filter > .content-filter__item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .content-filter > .content-filter__item:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }
    
    /* Right grid: Full width, 2x2 grid maintained */
    .content-filter-right-grid {
        grid-column: 1;
        grid-row: 4;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        
        .content-filter__item:nth-child(2) {
            grid-column: 1;
            grid-row: 2;
        }
        .content-filter__item:nth-child(3) {
            grid-column: 2;
            grid-row: 2;
        }
    }
}

/* Mobile Layout: < 768px */
@media (max-width: 767px) {
    .content-filter {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 30px;
    }
    
    /* All items: Full width, stacked vertically */
    .content-filter > .content-filter__item:nth-child(1) {
        grid-column: 1;
        grid-row: auto;
        flex-direction: column;
    }
    
    .content-filter > .content-filter__item:nth-child(2),
    .content-filter > .content-filter__item:nth-child(3) {
        grid-column: 1;
        grid-row: auto;
        flex-direction: column;
    }
    
    /* Image adjustments for mobile */
    .content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper,
    .content-filter > .content-filter__item:nth-child(2) .content-filter-item__image-wrapper,
    .content-filter > .content-filter__item:nth-child(3) .content-filter-item__image-wrapper {
        flex: none;
        position: relative;
        overflow: hidden;
        margin-bottom: 24px;
        align-self: stretch;
    }
    
    /* Limit image width for items 2 and 3 on mobile */
    .content-filter > .content-filter__item:nth-child(2) .content-filter-item__image-wrapper,
    .content-filter > .content-filter__item:nth-child(3) .content-filter-item__image-wrapper {
        max-width: 282px;
    }
    
    /* Maintain 16:9 aspect ratio on mobile */
    .content-filter > .content-filter__item:nth-child(1) .content-filter-item__image-wrapper::before,
    .content-filter > .content-filter__item:nth-child(2) .content-filter-item__image-wrapper::before,
    .content-filter > .content-filter__item:nth-child(3) .content-filter-item__image-wrapper::before {
        content: '';
        display: block;
        padding-top: 56.25%; /* 16:9 aspect ratio */
    }
    
    .content-filter > .content-filter__item:nth-child(1) .content-filter-item__image,
    .content-filter > .content-filter__item:nth-child(2) .content-filter-item__image,
    .content-filter > .content-filter__item:nth-child(3) .content-filter-item__image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* Remove left padding on mobile since images are above text */
    .content-filter-item--has-image .content-filter-item__content-wrapper {
        padding-left: 0;
    }
    
    /* Right grid: Single column on mobile */
    .content-filter-right-grid {
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0;
    }
    
    /* Make top row container single column on mobile */
    .content-filter-top-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .content-filter-right-grid > .content-filter-top-row .content-filter__item {
        margin-top:24px;
    }
    
    /* Reset grid positioning for mobile */
    .content-filter-right-grid > .content-filter-top-row .content-filter__item:nth-child(1),
    .content-filter-right-grid > .content-filter-top-row .content-filter__item:nth-child(2) {
        grid-column: 1;
        grid-row: auto;
    }
    
    .content-filter-right-grid .content-filter__item:nth-child(3),
    .content-filter-right-grid .content-filter__item:nth-child(4) {
        grid-column: 1;
        grid-row: auto;
    }
}