/* Grid layout styles */
.field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .field-grid {
        grid-template-columns: 1fr;
    }
}

/* Handout specific styles */
.handout-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.handout-item {
    background: #161b22;
    border: 1px solid #30363d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.handout-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: #58a6ff;
}

.handout-item h3 {
    margin-top: 0;
    color: #f0f6fc;
}

.handout-item h3 a {
    text-decoration: none;
    color: #58a6ff;
    transition: color 0.3s ease;
}

.handout-item h3 a:hover {
    color: #79c0ff;
}

.handout-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    color: #7d8590;
    margin-bottom: 15px;
}

.handout-meta span {
    margin-bottom: 5px;
}

.handout-actions {
    margin-top: 15px;
}

.handout-figures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.figure {
    background: #21262d;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid #30363d;
}

.handout-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #30363d;
}

.figure-caption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #7d8590;
    text-align: center;
}

.small-figure {
    max-height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border: 1px solid #30363d;
    border-radius: 8px;
}

/* Cards */
.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.5s ease-out;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #30363d;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.5rem;
    text-align: left;
}

.card-header h2, .card-header h3 {
    color: #f0f6fc;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #58a6ff, #79c0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body {
    background: #161b22;
    color: #e6edf3;
    padding: 2rem;
}

/* Subtask Cards */
.subtask-card {
    background: #21262d;
    border: 1px solid #30363d;
    border-left: 4px solid #30363d;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.subtask-card:hover {
    border-left-color: #58a6ff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.subtask-card.completed {
    border-left-color: #238636;
    background: linear-gradient(135deg, rgba(35, 134, 54, 0.1) 0%, rgba(46, 160, 67, 0.05) 100%);
}

.subtask-card.in-progress {
    border-left-color: #d29922;
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.1) 0%, rgba(242, 204, 96, 0.05) 100%);
}
