/* ── Project Cards ────────────────────────────────────── */
.project-card {
    background: #fff;
    border: 1px solid rgba(125,1,159,.1);
    border-radius: 16px;
    height: 100%;
    transition: transform .3s cubic-bezier(.4,0,.2,1),
                box-shadow .3s,
                border-color .3s;
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7D019F, #FED403);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    border-radius: 0 0 16px 16px;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(125,1,159,.12);
    border-color: rgba(125,1,159,.22);
}
.project-card:hover::after { transform: scaleX(1); }

.project-icon-wrapper {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(125,1,159,.1) 0%, rgba(254,212,3,.07) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
    transition: transform .3s;
}
.project-card:hover .project-icon-wrapper {
    transform: scale(1.12) rotate(-3deg);
}

.project-icon {
    width: 34px; height: 34px;
    object-fit: contain;
    /* filter: invert(32%) sepia(80%) saturate(600%) hue-rotate(200deg) brightness(95%); */
}

.project-name {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .4rem;
}

.project-description {
    font-size: .88rem;
    line-height: 1.6;
    color: #64748b;
}

/* ── Sample Cards ─────────────────────────────────────── */
.sample-card {
    background: #f9fafb;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid rgba(125,1,159,.08);
}

/* ── Section Title ────────────────────────────────────── */
.section-title {
    font-weight: 700;
    color: #1e293b;
    position: relative;
    display: inline-block;
    padding-bottom: .75rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 50px; height: 4px;
    background: linear-gradient(90deg, #7D019F, #FED403);
    border-radius: 9999px;
}

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb-nav {
    margin-bottom: 2rem;
    font-size: 0.88rem;
    color: #64748b;
}
.breadcrumb-nav a {
    color: #7D019F;
    text-decoration: none;
    transition: color .2s;
}

/* ── Research Area Sections ───────────────────────────── */
.research-area-section {
    padding: 1rem 0;
}

.research-area-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: .5rem;
}

.research-area-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    border-radius: 9999px;
}

.research-area-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.research-area-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* RTL support for research area title underline */
[dir="rtl"] .research-area-title::after {
    left: auto;
    right: 0;
}
.breadcrumb-nav a:hover { color: #4f46e5; }

/* ── Page wrapper ─────────────────────────────────────── */
.projects-page {
    padding: 3rem 0;
}

/* ── Project Detail – Description ─────────────────────── */
.project-description-full {
    font-size: 1rem;
    line-height: 1.8;
}
.project-description-full img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

/* ── Interaction Section ──────────────────────────────── */
.interaction-section {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
}

/* ── Samples ──────────────────────────────────────────── */
.samples-section .sample-btn {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.samples-section .sample-btn.btn-secondary { color: #fff; }

/* ── Response Area ────────────────────────────────────── */
.response-section {
    border-top: 2px solid rgba(99,102,241,.15);
    padding-top: 1rem;
}
.response-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.response-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-size: 0.85rem;
}

/* ── Visible Output Fields ───────────────────────────── */
.output-fields {
    margin: 0;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.output-field-item {
    border-bottom: 1px solid #e8eaed;
    padding-bottom: 0.5rem;
}

.output-field-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.output-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.2rem;
}

.output-field-value {
    font-size: 0.95rem;
    color: #212529;
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}

/* ── Evaluation Iframe ────────────────────────────────── */
.evaluation-iframe-wrapper {
    position: relative;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.evaluation-iframe {
    width: 100%;
    min-height: 600px;
    height: 80vh;
    border: none;
}

/* ── OCR Preview ──────────────────────────────────────── */
#image-preview-container {
    text-align: center;
}

#image-preview {
    max-height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* ── Responsive – Interaction ─────────────────────────── */
@media (max-width: 576px) {
    .interaction-section {
        padding: 1rem;
    }

    .evaluation-iframe {
        min-height: 400px;
        height: 60vh;
    }
}
