/* Main Layout Styles */
/* ... (Keep previous generic styles, but adding new card styles below) ... */

body {
    background-color: var(--bg-color);
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-xl);
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

nav a.active,
nav a:hover {
    color: var(--primary-color);
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
}

/* Content Sections */
.content-section {
    padding: var(--spacing-xl) var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.section-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--text-main);
}

/* Grids */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    /* Slightly wider for better card layout */
    gap: var(--spacing-xl);
    align-items: start;
    /* PREVENT neighbors from stretching to match expansion height */
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* CARDS RELOADED - EXPRESSIVE */
/* Base styles handled by .neu-card now */

/* Hover state is handled by .neu-card, but we can add specific inner interactions */
.resource-card:hover .logo-box {
    transform: scale(1.1) rotate(5deg);
}

.card-header-flex {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-standard);
}

.card-title-box {
    flex-grow: 1;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 2px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.neu-divider {
    border: 0;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    margin: var(--spacing-md) 0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* Increased gap further */
    margin-bottom: 12px;
    /* Increased bottom spacing */
    line-height: 2.0;
    /* Ensure line height for wrapping */
}

.card-expanded-content {
    animation: expandFlat 0.4s var(--ease-standard);
    transform-origin: top center;
    margin-top: var(--spacing-md);
}

.card-expanded-content.closing {
    animation: collapseFlat 0.3s ease-in forwards;
}

/* Expansion Fix - Grow height only, no horizontal displacement */
.neu-card.active-card {
    z-index: 10;
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    background: var(--surface-color);
}

.category-link {
    display: inline-block;
    text-decoration: none;
    padding: 6px 14px;
    background: var(--surface-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s var(--ease-standard);
    border: 1px solid var(--border-color);
}

.category-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Visibility */
.hidden {
    display: none !important;
}

/* Hero for Landing - Expressive */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    text-align: center;
    background-image: linear-gradient(to bottom, var(--surface-subtle) 0%, var(--bg-color) 100%);
    border-bottom: 1px solid var(--border-color);
}

.landing-hero h1 {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    letter-spacing: -0.03em;
    animation: slideUpFade 0.8s var(--ease-standard);
}

.action-buttons {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* Citation Specifics */

.citation-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Citation Warnings - "Big Bubbles" */
.citation-warning {
    color: #c0392b;
    background: rgba(255, 118, 117, 0.1);
    padding: 12px 16px;
    /* Increased padding */
    border-radius: 8px;
    /* Slightly more rounded */
    margin-bottom: 8px;
    /* Increased margin */
    font-size: 0.95rem;
    /* Slightly larger text */
    border: 1px solid rgba(192, 57, 43, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Section Divider */
.search-section-divider {
    text-align: center;
    margin: 60px 0 40px;
}

.search-section-divider h4 {
    font-size: 1.6rem;
    margin: 20px 0 10px;
    color: var(--primary-dark);
}

.search-section-divider p {
    color: var(--text-muted);
}

/* Search Container */
.search-container {
    margin-bottom: 60px;
}

.search-bar-wrapper {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.search-bar-wrapper input {
    flex-grow: 1;
}

/* Dual Search Layout */
.dual-search-container {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.search-section {
    flex: 1;
    min-width: 450px;
}

@media (max-width: 1024px) {
    .search-section {
        min-width: 100%;
    }
}

/* Professional CORE Cards */
.core-results-grid {
    grid-template-columns: 1fr;
    gap: 30px;
}

.core-paper-card {
    padding: 0;
    overflow: hidden;
}

.paper-card-layout {
    display: flex;
    min-height: 220px;
}

.paper-thumbnail-container {
    width: 180px;
    background: #f8f9fa;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    flex-shrink: 0;
}

.paper-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.paper-info-container {
    flex-grow: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
}

.paper-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.paper-year {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

.paper-publisher {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.paper-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
    line-height: 1.3;
}

.paper-authors {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 500;
}

.paper-abstract {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
}

.paper-actions {
    margin-top: auto;
    display: flex;
    gap: 15px;
}

.paper-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
    text-decoration: none;
}

/* Mobile responsive for CORE cards */
@media (max-width: 768px) {
    .paper-card-layout {
        flex-direction: column;
    }

    .paper-thumbnail-container {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .paper-info-container {
        padding: 20px;
    }

    .paper-title {
        font-size: 1.2rem;
    }
}