.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
    padding: 2em 0;
}

.doc-card {
    /* Reduced opacity and blur to make background images visible */
    background: linear-gradient(135deg, 
        rgba(30, 30, 30, 0.3) 0%, 
        rgba(46, 46, 46, 0.4) 100%);
    /* Reduced blur for better image visibility */
    backdrop-filter: blur(var(--glass-blur-docs)) saturate(var(--glass-saturation-docs));
    -webkit-backdrop-filter: blur(var(--glass-blur-docs)) saturate(var(--glass-saturation-docs));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(93, 143, 179, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(93, 143, 179, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.doc-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* When there's an image */
.doc-card.has-image {
    grid-row: span 2;
}

.doc-card.has-image .doc-content {
    flex: 0 0 auto;
}

/* When there's no image */
.doc-card:not(.has-image) {
    grid-row: span 1;
    min-height: 150px;
}

.doc-card:not(.has-image) .doc-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.doc-content {
    padding: 1.5em;
    /* Increased opacity for better text contrast on light backgrounds */
    background: linear-gradient(
        to bottom,
        rgba(20, 20, 20, 0.75) 0%,
        rgba(26, 26, 26, 0.8) 100%
    );
    /* Reduced blur for better image visibility */
    backdrop-filter: blur(var(--glass-blur-docs-content)) saturate(var(--glass-saturation-light));
    -webkit-backdrop-filter: blur(var(--glass-blur-docs-content)) saturate(var(--glass-saturation-light));
    position: relative;
    z-index: 2;
    height: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards without images - remove background entirely to show liquid glass effect */
.doc-card:not(.has-image) .doc-content {
    /* No background - the backdrop-filter and SVG filter wrapper will provide the visual effect */
    background: transparent;
}

.doc-content h2 {
    margin: 0 0 0.5em 0;
    color: var(--color-white);
    font-size: 1.4em;
    /* Add text shadow for better visibility on light backgrounds */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
}

.doc-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    line-height: 1.5;
    /* Add text shadow for better visibility on light backgrounds */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 6px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
        padding: 1em;
    }
    
    .doc-card.has-image,
    .doc-card:not(.has-image) {
        grid-row: auto;
    }
} 