/* ===== ENDPOINTS GRID ===== */
.endpoints-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
    transition: all 0.3s ease;
    width: 100%;
}

.endpoints-grid.filtering {
    opacity: 0.7;
}

/* ===== ENDPOINT CARDS ===== */
.endpoint-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.endpoint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.endpoint-card:hover::before {
    opacity: 1;
}

.endpoint-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.endpoint-card:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.endpoint-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.endpoint-card > * {
    position: relative;
    z-index: 2;
}

/* ===== DJANGO MODELS CARD LAYOUT ===== */
/* Models container */
.models-container {
    max-width: 100%;
    margin: 0 auto;
}

/* App description styling */
.app-description {
    font-size: 1rem;
    color: var(--md-default-fg-color--light);
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* Model cards grid */
.model-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Individual model card */
.model-card {
    background: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--md-primary-fg-color);
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover::before {
    opacity: 1;
}

/* Model header */
.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.model-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.model-header h3 a {
    color: var(--md-default-fg-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.model-header h3 a:hover {
    color: var(--md-primary-fg-color);
}

/* Model badge */
.model-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animation for cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for multiple cards */
.model-card:nth-child(1) { animation-delay: 0.1s; }
.model-card:nth-child(2) { animation-delay: 0.2s; }
.model-card:nth-child(3) { animation-delay: 0.3s; }
.model-card:nth-child(4) { animation-delay: 0.4s; }
.model-card:nth-child(5) { animation-delay: 0.5s; }
.model-card:nth-child(6) { animation-delay: 0.6s; }
