/* --- Global Theme Polish --- */
.publication-section {
    width: 100%;
    padding: 5rem 2rem;
    background: #e0f7f9; /* Softened the ace9ec slightly */
}

/* --- Filter Bar: Better Spacing --- */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 4rem;
    align-items: center; /* Changed from flex-end */
    justify-content: center;
}

    .filter-controls select {
        border: none;
        border-bottom: 2px solid #00796b;
        background: transparent;
        /* Use padding-left to push the text away from the edge */
        padding: 0.5rem 0 0.5rem 12px;
        font-size: 1rem;
        color: #004d40;
        width: 200px;
        /* This helps center/align the arrow and text better */
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300796b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 0.7rem top 50%;
        background-size: 0.65rem auto;
    }

        .filter-controls select:focus {
            outline: none;
            border-bottom-color: #004d40;
            background: rgba(255,255,255,0.3);
        }

/* --- Card: Professional Refinement --- */
.publication-card {
    background: linear-gradient(180deg, #e0f7f9, #f3e6ff); /* Brighter white for better contrast */
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2.5rem 2rem; /* Reduced the massive 5rem padding */
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 121, 107, 0.05);
}

    .publication-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0, 77, 64, 0.12);
    }

.publication-logo {
    max-height: 80px;
    width: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.publication-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-align: center;
}

.publication-authors {
    font-size: 0.9rem;
    color: #00796b;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.25rem;
}

.publication-date {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* --- Abstract: Equal Height Trick --- */
.publication-description {
    font-size: 0.92rem;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
    /* Limit to 4 lines so cards match up */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-button {
    align-self: center;
    background-color: #212529;
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px !important; /* Pill style looks more modern */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .publication-button:hover {
        background-color: #00796b;
        box-shadow: 0 4px 12px rgba(0, 121, 107, 0.3);
    }

/* --- Reset Button --- */
.reset-btn {
    background-color: #6c757d;
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    height: auto;
    transition: 0.2s;
}

    .reset-btn:hover {
        background-color: #343a40;
    }


/* Animation for filtering */
.pub-item, [class*="col-"] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}