/* ========== CARD GRID SYSTEM ========== */

/* Grid Container */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 2rem 0;
}

/* Base Card */
.card-grid .content-card {
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: 100%;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.card-grid .content-card:hover {
    border-color: #0084c9;
    box-shadow: 0 8px 24px rgba(0, 132, 201, 0.15);
    transform: translateY(-4px);
}

/* Card Image Area */
.card-grid .content-card .card-image {
    height: 150px;
    width: 100%;
    background-size: cover;
    background-position: center;
	background: linear-gradient(135deg, #0084c9 0%, #00a5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-grid .content-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-grid .content-card .card-image .card-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
}

.card-grid .content-card .card-image--video {
    background: linear-gradient(135deg, #e53935 0%, #ef5350 100%);
}

.card-grid .content-card .card-image--pdf {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.card-grid .content-card .card-image--article {
    background: linear-gradient(135deg, #0084c9 0%, #00a5db 100%);
}

/* Card Body */
.card-grid .content-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.card-grid .content-card .card-title {
    font-family: 'Ruda', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #595959;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.card-grid .content-card .card-description {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    color: #595959;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.card-grid .content-card .card-date {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-bottom: 6px;
    display: block;
}

.card-grid .content-card .card-link {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0084c9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.card-grid .content-card:hover .card-link {
    color: #00a5db;
    gap: 10px;
}

/* ========== NO IMAGE VARIANT ========== */
.card-grid .content-card.content-card--no-image .card-body {
    padding: 24px 20px;
}

/* ========== LOCKED STATE ========== */
.card-grid .content-card.content-card--locked .card-image {
    filter: grayscale(100%);
    opacity: 0.7;
}

.card-grid .content-card.content-card--locked .card-image::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(89, 89, 89, 0.85);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-grid .content-card.content-card--unlocked .card-image::after {
    content: '\f3c1';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(89, 89, 89, 0.85);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-grid .content-card.content-card--locked .card-title,
.card-grid .content-card.content-card--locked .card-description {
    color: #999999;
}

.card-grid .content-card.content-card--locked .card-link {
    color: #b0b0b0;
}

.card-grid .content-card.content-card--locked:hover {
    border-color: #999999;
    box-shadow: 0 8px 24px rgba(89, 89, 89, 0.12);
}

.card-grid .content-card.content-card--locked:hover .card-link {
    color: #999999;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* 
 * With sidebar (1024px+): content area = viewport - 380px
 * Without sidebar (768-1023px): content area ≈ viewport - 60px
 * Mobile (below 768px): content area ≈ viewport - 40px
 *
 * 3 cards need: 300px × 3 + 24px × 2 = 948px
 * 2 cards need: 300px × 2 + 24px = 624px
 */

/* Mobile: 1 column, compact image to fit 2 cards on screen */
/* Mobile: 2 columns with compact cards */
@media (max-width: 679px) {
    .card-grid {
        justify-content: center;
        gap: 16px;
    }
    
    .card-grid .content-card {
        width: calc(50% - 8px);
        min-width: 180px;
        max-width: 280px;
    }
    
    .card-grid .content-card .card-image {
        height: 100px;
    }
    
    .card-grid .content-card .card-image .card-icon {
        font-size: 36px;
    }
    
    .card-grid .content-card .card-body {
        padding: 16px;
    }
    
    .card-grid .content-card .card-title {
        font-size: 15px;
    }
    
    .card-grid .content-card .card-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

/* Very small screens: 1 column */
@media (max-width: 419px) {
    .card-grid {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .card-grid .content-card {
        width: 100%;
        max-width: 300px;
    }
}

/* ========== END CARD GRID SYSTEM ========== */

/* ========== TEAM CARD VARIANT ========== */

.card-grid .content-card.content-card--team {
    text-align: center;
	width: 260px;
}

.card-grid .content-card.content-card--team .card-image {
    height: auto;
    background: linear-gradient(180deg, #d0ebf7 0%, #e8f4fa 50%, #ffffff 100%);
    padding: 12px 24px;
}

.card-grid .content-card.content-card--team .card-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 25%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card-grid .content-card.content-card--team:hover .card-image img {
    box-shadow: 0 6px 20px rgba(0, 132, 201, 0.25);
}

.card-grid .content-card.content-card--team .card-body {
    padding: 12px;
}

.card-grid .content-card.content-card--team .card-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.card-grid .content-card.content-card--team .card-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0084c9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.card-grid .content-card.content-card--team .card-description {
    display: none;
	font-size: 14px;
    color: #595959;
    opacity: 0.85;
}

.card-grid .content-card.content-card--team .card-link {
    justify-content: center;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 679px) {
    .card-grid .content-card.content-card--team .card-image {
        padding: 10px 20px;
    }
    
    .card-grid .content-card.content-card--team .card-image img {
        width: 100px;
        height: 100px;
    }
    
    .card-grid .content-card.content-card--team .card-body {
        padding: 10px;
    }
    
    .card-grid .content-card.content-card--team .card-title {
        font-size: 16px;
    }
    
    .card-grid .content-card.content-card--team .card-subtitle {
        font-size: 13px;
    }
}

/* ========== CONTENT TYPE ICON ========== */

.card-grid .content-card .card-type-icon {
    position: absolute;
    top: 12px;
    right: 12px;   /* changed from left */
    width: 28px;
    height: 28px;
    background: rgba(89, 89, 89, 0.85);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CARD TAGS ========== */

.card-grid .content-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.card-grid .content-card .card-tags .tag {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Category Colors - adjust these to your categories */
.card-grid .content-card .card-tags .tag--science {
	background: #e8f5e9;
    color: #2e7d32;
}

.card-grid .content-card .card-tags .tag--business {
    background: #e3f2fd;
    color: #1565c0;
}

.card-grid .content-card .card-tags .tag--research {
    background: #e3f2fd;
    color: #1565c0;
}


/* Overflow indicator */
.card-grid .content-card .card-tags .tag--more {
    background: transparent;
    color: #999;
    padding: 3px 4px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 679px) {
    .card-grid .content-card .card-tags .tag {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* ========== FILTER SECTION ========== */

.filter-section {
	//padding: 30px 40px;
	background: #fafafa;
	border-bottom: 1px solid #e0e0e0;
}

.filter-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2px;
    align-items: start;
    margin-bottom: 15px;
}


.filter-label {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #595959;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 10px; /* Align with button text */
}


.filter-buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.filter-btn {
	padding: 6px 16px;
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #595959;
	cursor: pointer;
	transition: all 0.3s ease;
}

.filter-btn:hover {
	border-color: #0084c9;
	color: #0084c9;
}

.filter-btn.active {
	background: #0084c9;
	border-color: #0084c9;
	color: white;
}

/* ========== ACTIVE FILTERS ROW ========== */

.filter-row--active {
	display: none;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
	margin-top: 15px;
}

.filter-row--active.is-visible {
	display: flex;
}

.filter-active-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-grow: 1;
}

.filter-active-chips .chip {
	font-family: 'Roboto', sans-serif;
	font-size: 12px;
	font-weight: 500;
	padding: 6px 12px;
	border-radius: 16px;
	background: #e3f2fd;
	color: #1565c0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-active-chips .chip .remove {
	cursor: pointer;
	opacity: 0.7;
	font-size: 10px;
}

.filter-active-chips .chip .remove:hover {
	opacity: 1;
}

.filter-clear {
	font-size: 14px;
	color: #999;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 12px;
	font-family: 'Roboto', sans-serif;
}

.filter-clear:hover {
	color: #d32f2f;
}

.no-results {
	text-align: center;
	padding: 60px 20px;
	color: #999;
}

.no-results i {
	font-size: 48px;
	margin-bottom: 15px;
	display: block;
}
	