/* Featured Content Grid */

.ttb-featured-grid-wrapper {
    width: 100%;
    margin: 40px 0;
}

/* Filter Tabs */
.ttb-featured-grid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.ttb-filter-tab {
    background: #f5f5f5;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttb-filter-tab:hover {
    background: #fff;
    border-color: var(--main-nav-bg-color, #4a90e2);
    color: var(--main-nav-bg-color, #4a90e2);
    transform: translateY(-2px);
}

.ttb-filter-tab.active {
    background: var(--main-nav-bg-color, #4a90e2);
    border-color: var(--main-nav-bg-color, #4a90e2);
    color: #fff;
}

.ttb-filter-tab i {
    font-size: 13px;
}

/* Featured Grid Container */
.ttb-featured-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    min-height: 500px;
    position: relative;
    transition: opacity 0.3s ease;
}

.ttb-featured-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Layout: 1 Large + 2 Small (3 posts) */
.ttb-featured-grid-layout-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.ttb-featured-grid-layout-3 .ttb-grid-hero {
    grid-row: 1 / 3;
    grid-column: 1;
}

/* Layout: 1 Large + 4 Small (5 posts) */
.ttb-featured-grid-layout-5 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
}

.ttb-featured-grid-layout-5 .ttb-grid-hero {
    grid-row: 1 / 3;
    grid-column: 1;
}

/* Layout: 1 Large + 6 Small (7 posts) */
.ttb-featured-grid-layout-7 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
}

.ttb-featured-grid-layout-7 .ttb-grid-hero {
    grid-row: 1 / 4;
    grid-column: 1;
}

/* Grid Items */
.ttb-featured-grid-item {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
    min-height: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ttb-featured-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Card - Larger */
.ttb-grid-hero {
    min-height: 500px;
}

/* Regular Cards */
.ttb-grid-card {
    min-height: 240px;
}

/* Gradient Overlay */
.ttb-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    transition: background 0.3s ease;
}

.ttb-featured-grid-item:hover .ttb-grid-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/* Content Container */
.ttb-grid-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    z-index: 2;
    color: #fff;
}

.ttb-grid-hero .ttb-grid-content {
    padding: 35px;
}

/* Post Type Badge */
.ttb-grid-post-type-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Post type specific colors */
.ttb-grid-post-type-badge[data-post-type="post"] {
    background: rgba(74, 144, 226, 0.9);
}

.ttb-grid-post-type-badge[data-post-type="shows"] {
    background: rgba(156, 39, 176, 0.9);
}

.ttb-grid-post-type-badge[data-post-type="page"] {
    background: rgba(67, 160, 71, 0.9);
}

/* Title */
.ttb-grid-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.ttb-grid-hero .ttb-grid-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.ttb-grid-title a,
.ttb-grid-title a:link,
.ttb-grid-title a:visited,
.ttb-grid-title a:active {
    color: #fff !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.ttb-grid-title a:hover {
    color: #f0f0f0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Author Info */
.ttb-grid-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: 0.95;
}

.ttb-grid-author-avatar {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    display: block;
}

.ttb-grid-author-name {
    font-weight: 600;
}

/* Loading State */
.ttb-featured-grid-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.ttb-featured-grid-loading i {
    margin-right: 10px;
    font-size: 24px;
    color: var(--main-nav-bg-color, #4a90e2);
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .ttb-featured-grid-layout-3,
    .ttb-featured-grid-layout-5,
    .ttb-featured-grid-layout-7 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .ttb-featured-grid-layout-3 .ttb-grid-hero,
    .ttb-featured-grid-layout-5 .ttb-grid-hero,
    .ttb-featured-grid-layout-7 .ttb-grid-hero {
        grid-row: 1 / 3;
        grid-column: 1;
    }

    .ttb-grid-hero {
        min-height: 400px;
    }

    .ttb-grid-card {
        min-height: 200px;
    }

    .ttb-grid-hero .ttb-grid-title {
        font-size: 26px;
    }

    .ttb-grid-title {
        font-size: 18px;
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .ttb-featured-grid-wrapper {
        margin: 30px 0;
    }

    .ttb-featured-grid-filters {
        gap: 8px;
        margin-bottom: 20px;
    }

    .ttb-filter-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .ttb-featured-grid-layout-3,
    .ttb-featured-grid-layout-5,
    .ttb-featured-grid-layout-7 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
    }

    .ttb-featured-grid-layout-3 .ttb-grid-hero,
    .ttb-featured-grid-layout-5 .ttb-grid-hero,
    .ttb-featured-grid-layout-7 .ttb-grid-hero {
        grid-row: auto;
        grid-column: auto;
    }

    .ttb-grid-hero {
        min-height: 350px;
    }

    .ttb-grid-card {
        min-height: 250px;
    }

    .ttb-grid-content {
        padding: 20px;
    }

    .ttb-grid-hero .ttb-grid-content {
        padding: 25px;
    }

    .ttb-grid-hero .ttb-grid-title {
        font-size: 24px;
    }

    .ttb-grid-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .ttb-grid-post-type-badge {
        font-size: 10px;
        padding: 5px 12px;
    }
}

/* Accessibility */
.ttb-featured-grid-item:focus-within {
    outline: 3px solid var(--main-nav-bg-color, #4a90e2);
    outline-offset: 3px;
}

.ttb-grid-title a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Animation for filter transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ttb-featured-grid-item {
    animation: fadeIn 0.4s ease forwards;
}

.ttb-featured-grid-item:nth-child(1) { animation-delay: 0s; }
.ttb-featured-grid-item:nth-child(2) { animation-delay: 0.1s; }
.ttb-featured-grid-item:nth-child(3) { animation-delay: 0.2s; }
.ttb-featured-grid-item:nth-child(4) { animation-delay: 0.3s; }
.ttb-featured-grid-item:nth-child(5) { animation-delay: 0.4s; }
.ttb-featured-grid-item:nth-child(6) { animation-delay: 0.5s; }
.ttb-featured-grid-item:nth-child(7) { animation-delay: 0.6s; }
.ttb-featured-grid-item:nth-child(8) { animation-delay: 0.7s; }
